diff --git a/src/views/Main/Editor/Tabs/Tab/SqlEditor/index.vue b/src/views/Main/Editor/Tabs/Tab/SqlEditor/index.vue index 23721f4..6a28394 100644 --- a/src/views/Main/Editor/Tabs/Tab/SqlEditor/index.vue +++ b/src/views/Main/Editor/Tabs/Tab/SqlEditor/index.vue @@ -1,6 +1,6 @@ @@ -28,7 +28,6 @@ export default { theme: 'neo', lineNumbers: true, line: true, - autofocus: true, autoRefresh: true, extraKeys: { 'Ctrl-Space': showHintOnDemand } } @@ -40,7 +39,10 @@ export default { } }, methods: { - onChange: debounce(showHint, 400) + onChange: debounce(showHint, 400), + focus () { + this.$refs.cm.codemirror.focus() + } } } diff --git a/src/views/Main/Editor/Tabs/Tab/index.vue b/src/views/Main/Editor/Tabs/Tab/index.vue index c97efa9..8ff8ae9 100644 --- a/src/views/Main/Editor/Tabs/Tab/index.vue +++ b/src/views/Main/Editor/Tabs/Tab/index.vue @@ -8,7 +8,7 @@ >