fix(数据集): 修复数据集菜单树操作显示不同步问题

This commit is contained in:
ziyujiahao 2023-03-30 17:34:03 +08:00
parent c4dfc0e847
commit 9497e1db33

View File

@ -374,10 +374,15 @@ export function insertBatchTreeNode(nodeInfoArray, tree) {
}
export function updateCacheTree(opt, treeName, nodeInfoFull, tree) {
const nodeInfo = {
...nodeInfoFull,
panelData: null,
panelStyle: null
const nodeInfo = deepCopy(nodeInfoFull)
if( nodeInfo instanceof Array){
nodeInfo.forEach(item=>{
delete item.panelData
delete item.panelStyle
})
}else{
delete nodeInfo.panelData
delete nodeInfo.panelStyle
}
if (opt === 'new' || opt === 'copy') {
insertTreeNode(nodeInfo, tree)