Skip to content

Commit

Permalink
feat(browser): support the shortcut key ctrl + S to update the API (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
chuangker authored and xcorp1986 committed Jan 6, 2021
1 parent b7ce689 commit 69bc370
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions views/pages/project-detail/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ export default {
this.codeEditor.clearSelection()
this.codeEditor.getSession().setUseWorker(false)
this.codeEditor.on('change', this.onChange)
this.codeEditor.commands.addCommand({
name: 'save',
bindKey: {win: 'Ctrl-S', mac: 'Command-S'},
exec: () => {
this.submit()
}
})
},
watch: {
'value.show': function (show) {
Expand Down

0 comments on commit 69bc370

Please sign in to comment.