mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 21:40:50 +00:00
fix: 修复标签列表顺序不一致的问题
根据nVal的顺序查找listData,保持查找结果的顺序一致
This commit is contained in:
parent
477fb37c06
commit
86dae538b9
@ -66,10 +66,13 @@ export default {
|
||||
if (nVal != oVal) {
|
||||
if (nVal.length) {
|
||||
this.labelList = [];
|
||||
this.listData.map((item) => {
|
||||
if (nVal.includes(item.id)) {
|
||||
this.labelList.push(item);
|
||||
}
|
||||
// 根据nVal 去listData 中查找 不改变查找出来的顺序
|
||||
nVal.forEach((item) => {
|
||||
this.listData.forEach((item2) => {
|
||||
if (item == item2.id) {
|
||||
this.labelList.push(item2);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user