mirror of
https://github.com/purocean/yn.git
synced 2026-10-12 23:31:39 +08:00
限制 markdown 文件才可以被标记
This commit is contained in:
@@ -83,9 +83,14 @@ export default {
|
||||
{ id: 'openInTerminal', label: '在终端中打开', onClick: () => this.revealInXterminal() }
|
||||
]))
|
||||
} else {
|
||||
this.$contextMenu.show([
|
||||
{ id: 'mark', label: this.item.marked ? '取消标记' : '标记文件', onClick: () => this.toggleMark() }
|
||||
].concat(menu))
|
||||
// markdown 文件可以被标记
|
||||
if (this.item.path.endsWith('.md')) {
|
||||
this.$contextMenu.show([
|
||||
{ id: 'mark', label: this.item.marked ? '取消标记' : '标记文件', onClick: () => this.toggleMark() }
|
||||
].concat(menu))
|
||||
} else {
|
||||
this.$contextMenu.show(menu)
|
||||
}
|
||||
}
|
||||
},
|
||||
async toggleMark () {
|
||||
|
||||
Reference in New Issue
Block a user