1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-06-06 21:14:03 +08:00

fix: init js code bug

This commit is contained in:
shangbin 2022-01-11 19:15:01 +08:00
parent 2439ab2678
commit 722a375108

View File

@ -76,7 +76,14 @@ const keymaster = require('keymaster');
export default {
name: "vcc",
props: ['initCodeEntity'],
props: {
initCodeEntity: {
type: Object,
default: () => {
return {};
}
}
},
components: {
RawComponents: () => import("../components/RawComponents"),
ToolsBar: () => import("./ToolsBar"),
@ -189,7 +196,7 @@ export default {
this.currentEditRawInfo = null;
}).onSelectElement(rawInfo => {
this.currentEditRawInfo = rawInfo;
}).saveJSCodeOnly(this.convertLogicCode(this.initCodeEntity.JSCode))
}).saveJSCodeOnly(this.convertLogicCode(this.initCodeEntity.JSCode ? this.initCodeEntity.JSCode : ''))
.render(this.initCodeEntity.codeStructure ? this.initCodeEntity.codeStructure : this.getFakeData());
},