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:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user