Merge branch 'master' of http://192.168.5.5:10010/r/vue-smart-ai
| | |
| | | // vue-js-tree 默认展开,控制部分折叠. z-tree 默认折叠, 控制部分展开 |
| | | if (this.foldNodeList[n.id]) { |
| | | if (this.zTree) { |
| | | n.open = true |
| | | n.open = false |
| | | } else { |
| | | n.opened = false |
| | | } |
| | |
| | | |
| | | node.forEach(n => { |
| | | if (n.children && n.children.length > 0) { |
| | | if (this.zTree) { |
| | | n.open = true |
| | | } |
| | | this.sortTreeData(n.children) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | //展开 |
| | | itemExpand (e, id, node) { |
| | | this.TreeDataPool.foldNodeList[node.id] = true |
| | | delete this.TreeDataPool.foldNodeList[node.id] |
| | | }, |
| | | // 折叠 |
| | | itemCollapse (e, id, node) { |
| | | delete this.TreeDataPool.foldNodeList[node.id] |
| | | this.TreeDataPool.foldNodeList[node.id] = true |
| | | }, |
| | | dropNode (node, item, draggedItem, e) { |
| | | // console.log('dropNode', node, item, draggedItem); |