From 2f85a9ff16e9aced5cd6b9f61043c7ae84ec9ede Mon Sep 17 00:00:00 2001 From: purocean Date: Thu, 22 Aug 2019 14:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=A0=91=E4=B8=8A=E4=B8=8B=E6=96=87=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Tree.vue | 2 ++ frontend/src/components/TreeNode.vue | 1 + 2 files changed, 3 insertions(+) diff --git a/frontend/src/components/Tree.vue b/frontend/src/components/Tree.vue index e6c30ee2..a6875a09 100644 --- a/frontend/src/components/Tree.vue +++ b/frontend/src/components/Tree.vue @@ -25,6 +25,7 @@ export default { this.$bus.on('file-uploaded', this.refresh) this.$bus.on('file-marked', this.refresh) this.$bus.on('file-unmarked', this.refresh) + this.$bus.on('tree-refresh', this.refresh) this.refresh() }, beforeDestroy () { @@ -34,6 +35,7 @@ export default { this.$bus.off('file-uploaded', this.refresh) this.$bus.off('file-marked', this.refresh) this.$bus.off('file-unmarked', this.refresh) + this.$bus.off('tree-refresh', this.refresh) }, methods: { showContextMenu () { diff --git a/frontend/src/components/TreeNode.vue b/frontend/src/components/TreeNode.vue index 8a9c63f8..b2429268 100644 --- a/frontend/src/components/TreeNode.vue +++ b/frontend/src/components/TreeNode.vue @@ -77,6 +77,7 @@ export default { { id: 'delete', label: '删除', onClick: () => this.deleteFile() }, { type: 'separator' }, { id: 'openInOS', label: '在系统中打开', onClick: () => this.revealInExplorer() }, + { id: 'openInOS', label: '刷新目录树', onClick: () => this.$bus.emit('tree-refresh') }, ] if (item.type === 'dir') {