1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-09-28 07:13:21 +08:00

增加语法检查能力

This commit is contained in:
shangbin
2021-09-15 10:54:05 +08:00
parent 7795d52f95
commit cc20787843
2 changed files with 17 additions and 8 deletions

View File

@@ -110,10 +110,8 @@ export class MainPanelProvider {
}
saveJSCode(code) {
const temp = code.replace(/.+\*\/\s*/gs, "");
const JSCodeInfo = eval(`(function(){return ${temp}})()`);
this.externalJS = JSCodeInfo;
this.codeGenerator.setExternalJS(JSCodeInfo);
this.externalJS = code;
this.codeGenerator.setExternalJS(code);
this.reRender();
}