Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed non-SQL script type could not be closed
  • Loading branch information
xtt55 committed Sep 5, 2019
commit 312f00d5343cdd2d25b097f9946db54ac48a7635
16 changes: 14 additions & 2 deletions src/js/module/workbench/script/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import module from '../index';
import setting from './setting.vue';
import api from '@/js/service/api';
import storage from '@/js/helper/storage';
import _ from 'lodash';
export default {
components: {
Expand Down Expand Up @@ -139,6 +140,17 @@ export default {
this.$refs.editor.insertValueIntoEditor(args.value);
}
},
'Workbench:setParseAction'(id) {
if (id === this.script.id) {
const editor = this.$refs.editor;
if (editor) {
const isParserClose = !!storage.get('isParserClose', 'local');
editor.isParserClose = isParserClose;
editor.closeParser && editor.closeParser.set(!isParserClose);
editor.openParser && editor.openParser.set(isParserClose);
}
}
},
undo() {
this.$refs.editor.undo();
},
Expand All @@ -165,7 +177,7 @@ export default {
if (status === 'start') {
this.loading = false;
// 执行开始时,脚本的按钮设置为running状态
this.script.running = true;
// this.script.running = true;
}
// 当抛出的为错误或者execute接口报错时,loading状态改为false,否则无法再次点击执行
if (status === 'execute' || status === 'error') {
Expand Down Expand Up @@ -220,4 +232,4 @@ export default {
},
},
};
</script>
</script>