mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
增加刷新目录树上下文菜单
This commit is contained in:
@@ -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 () {
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user