修复动态加载数据为空数组之前数据缓存问题

场景:删除只有一个子菜单下的子菜单,接口返回空数组,无法更新该节点下数据
pull/22163/head
jackycoder 2022-09-20 18:10:55 +08:00 committed by GitHub
parent cf3f1bd71d
commit 5805f80988
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -198,9 +198,7 @@ export default {
treeData[key].loading = false;
treeData[key].loaded = true;
treeData[key].expanded = true;
if (data.length) {
this.$set(lazyTreeNodeMap, key, data);
}
this.$set(lazyTreeNodeMap, key, data);
this.table.$emit('expand-change', row, true);
});
}