[update 拆分详情树节点排序] 拖拽后保留上次展开节点
This commit is contained in:
@@ -231,7 +231,9 @@ export default {
|
||||
const treeData = res.result || []
|
||||
treeData.forEach(node => this.addTitleToNodes(node))
|
||||
this.treeData = treeData
|
||||
this.expandedKeys = this.treeData.length > 0 ? [this.treeData[0].id] : []
|
||||
if (this.treeData.length > 0 && this.expandedKeys <= 0) {
|
||||
this.expandedKeys = [this.treeData[0].id]
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
@@ -249,6 +251,7 @@ export default {
|
||||
this.$emit('close')
|
||||
this.model = {}
|
||||
this.treeData = []
|
||||
this.expandedKeys = []
|
||||
this.visible = false
|
||||
},
|
||||
handleCancel () {
|
||||
|
||||
Reference in New Issue
Block a user