diff --git a/src/components/Minder/minder.vue b/src/components/Minder/minder.vue index 577b8bc..8c4b06c 100644 --- a/src/components/Minder/minder.vue +++ b/src/components/Minder/minder.vue @@ -417,6 +417,7 @@ export default { this.saved = true this.title = this.file.name this.$emit('onEdit', this.saved) + this.bakValue = value this.$refs.historyPopover.loadHistoryList(this.file.id) }).catch(() => { this.saveBtnUpdating = false diff --git a/src/components/MonacoEditorVue/index.js b/src/components/MonacoEditorVue/index.js index e85518b..3149eeb 100644 --- a/src/components/MonacoEditorVue/index.js +++ b/src/components/MonacoEditorVue/index.js @@ -119,6 +119,19 @@ export default { theme: theme, ...options }); + this.editor.addAction({ + id: 'my-unique-id', + label: 'Hello World', + keybindings: [ + monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_M, + ], + contextMenuGroupId: 'navigation', + contextMenuOrder: 1.5, + run: function(ed) { + alert('Hello World!'); + } + }); + this.diffEditor && this._setModel(this.value, this.original); this._editorMounted(this.editor); //编辑器初始化后 }, diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 958f25a..f8a5fd8 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -449,9 +449,10 @@ title="提示" content="此文件不支持预览, 是否下载该文件?" :show.sync="notPreviewDialogVisible" - operatButtonText="强行使用文本编辑器打开" + button-size="mini" + operatButtonText="取消" confirmButtonText="下载" - @operating="forciblyOpen(openingFile)" + @operating="notPreviewDialogVisible = false" @confirm="determineDownload(openingFile)" > diff --git a/src/components/message/MessageDialog.vue b/src/components/message/MessageDialog.vue index 7ff430d..e0ad583 100644 --- a/src/components/message/MessageDialog.vue +++ b/src/components/message/MessageDialog.vue @@ -1,7 +1,5 @@