mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
修复文件导航栏自动收缩bug
This commit is contained in:
@@ -194,7 +194,6 @@ export default {
|
||||
if (!this.fileTree || !this.fileTree.children) return []
|
||||
let nodes = this.sortFiles(this.fileTree.children)
|
||||
nodes = this.filterFiles(nodes)
|
||||
nodes = this.computeExpanded(nodes)
|
||||
return nodes
|
||||
},
|
||||
expandedPaths () {
|
||||
@@ -309,7 +308,6 @@ export default {
|
||||
onDirClick (data, node) {
|
||||
const vm = this
|
||||
setTimeout(() => {
|
||||
console.log(data.path, node.expanded)
|
||||
vm.$set(vm.nodeExpandedDict, data.path, node.expanded)
|
||||
}, 0)
|
||||
},
|
||||
@@ -342,16 +340,6 @@ export default {
|
||||
return true
|
||||
})
|
||||
},
|
||||
computeExpanded (nodes) {
|
||||
return nodes.map(node => {
|
||||
if (node.is_dir) {
|
||||
node.children = this.computeExpanded(node.children)
|
||||
} else {
|
||||
node.expanded = !!this.nodeExpandedDict[node.path]
|
||||
}
|
||||
return node
|
||||
})
|
||||
},
|
||||
isActiveFile (node) {
|
||||
return node.path === this.currentFilePath
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user