调整图片、再次查询未渲染问题
This commit is contained in:
parent
d7f01a3069
commit
b7378267cf
@ -278,12 +278,14 @@
|
||||
}
|
||||
},
|
||||
filterData() {
|
||||
this.checkedItems = []
|
||||
this.allData.map(item => {
|
||||
if (item.DEPARTMENT_ID == this.model.DEPARTMENT_ID && item.POST_NAME == this.model.Nav_Post.NAME) {
|
||||
this.filterDatas = item
|
||||
//默认全选
|
||||
const allIds= this.filterDatas.Nav_Librarys.map(item => item.ID);
|
||||
this.$set(this, 'filterDatas', item);
|
||||
this.$nextTick(() => { // 等待 DOM 渲染新数据后再全选
|
||||
const allIds = this.filterDatas.Nav_Librarys.map(item1 => item1.ID);
|
||||
this.checkedItems = ['all', ...allIds];
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
@ -325,9 +327,9 @@
|
||||
if (Array.isArray(item.Nav_Photo)) {
|
||||
item.Nav_Photo.forEach(photo => {
|
||||
// 判断图片name是否已存在,不存在则添加
|
||||
if (!photoNames.has(photo.name)) {
|
||||
if (!photoNames.has(photo.NAME)) {
|
||||
allPhotos.push(photo);
|
||||
photoNames.add(photo.name);
|
||||
photoNames.add(photo.NAME);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user