File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/js/module/workbench/script Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 8080import module from ' ../index' ;
8181import setting from ' ./setting.vue' ;
8282import api from ' @/js/service/api' ;
83+ import storage from ' @/js/helper/storage' ;
8384import _ from ' lodash' ;
8485export default {
8586 components: {
@@ -139,6 +140,17 @@ export default {
139140 this .$refs .editor .insertValueIntoEditor (args .value );
140141 }
141142 },
143+ ' Workbench:setParseAction' (id) {
144+ if (id === this .script .id ) {
145+ const editor = this .$refs .editor ;
146+ if (editor) {
147+ const isParserClose = !! storage .get (' isParserClose' , ' local' );
148+ editor .isParserClose = isParserClose;
149+ editor .closeParser && editor .closeParser .set (! isParserClose);
150+ editor .openParser && editor .openParser .set (isParserClose);
151+ }
152+ }
153+ },
142154 undo () {
143155 this .$refs .editor .undo ();
144156 },
@@ -165,7 +177,7 @@ export default {
165177 if (status === ' start' ) {
166178 this .loading = false ;
167179 // 执行开始时,脚本的按钮设置为running状态
168- this .script .running = true ;
180+ // this.script.running = true;
169181 }
170182 // 当抛出的为错误或者execute接口报错时,loading状态改为false,否则无法再次点击执行
171183 if (status === ' execute' || status === ' error' ) {
@@ -220,4 +232,4 @@ export default {
220232 },
221233 },
222234};
223- </script >
235+ </script >
You can’t perform that action at this time.
0 commit comments