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-14 19:01:50 +08:00
parent 8ca6a9b725
commit 8220a44291
5 changed files with 44 additions and 19 deletions

View File

@@ -42,9 +42,7 @@ export default {
},
onSave() {
const code = this.$refs.codeEditor.getEditorCode();
const temp = code.replace(/.+\*\/\s*/gs, "");
const JSCodeInfo = eval(`(function(){return ${temp}})()`);
console.info(JSCodeInfo.methods.request.toString());
this.$emit("saveJSCode", code);
}
},
watch: {