没办法技术有限,只能靠笨方法实现.就是每次增删改查都刷新一遍数据,如果有什么好办法也可以分享给我
data(){
return {
maps:new Map()//储存 子菜单信息
}
},
//每次增删改查都重新加载菜单
reshow(pid){
const {tree,treeNode,resolve} = vm.maps.get(pid);
this.$set(this.$refs.table.store.states.lazyTreeNodeMap,pid,[]);//清空子菜单
this.getList();//重新加载主菜单
this.load(tree,treeNode,resolve);//重新加载子菜单
},
load(tree, treeNode, resolve) {
const pid = tree.CLASSIFICATIONOFDOCUMENTS_ID;
vm.maps.set(pid,{tree,treeNode,resolve});//将信息放入map
}