增加刷新目录树上下文菜单

This commit is contained in:
purocean
2019-08-22 14:19:40 +08:00
parent 605060a205
commit 2f85a9ff16
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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 () {
+1
View File
@@ -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') {