代码调整
This commit is contained in:
parent
14ecacf811
commit
173643eb37
@ -17,8 +17,8 @@
|
||||
<el-tabs id="cardTab" v-model="cardTab" class="card" type="border-card" @tab-click="onSelectCardTab">
|
||||
<el-tab-pane label="元素绘制" name="first">
|
||||
<el-tabs v-model="enabledTab" class="card" type="card" @tab-click="onSelectTab">
|
||||
<el-tab-pane v-for="(element,index) in elementList" :key="index" :label="element.name" :name="element.code" :lazy="true">
|
||||
<data-form :ref="'dataform'+element.code" :form="element" :form-model="element.model" />
|
||||
<el-tab-pane v-for="(element,index) in elementList" :key="index" :label="element.name" :name="element.type" :lazy="true">
|
||||
<data-form :ref="'dataform'+element.type" :form="element" :form-model="element.model" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="bottomBtnGroup">
|
||||
@ -87,8 +87,8 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.composeName = this.$route.query.composeName;
|
||||
this.elementList = new BuilderFactory().getFormList();
|
||||
this.enabledTab = this.elementList[0].code;
|
||||
this.elementList = formBuilder.buildFormList();
|
||||
this.enabledTab = this.elementList[0].type;
|
||||
this.getComposeElemList();
|
||||
},
|
||||
methods: {
|
||||
@ -126,7 +126,7 @@ export default {
|
||||
onSelected(em) {
|
||||
if (em.model) {
|
||||
this.selected = JSON.parse(JSON.stringify(em.model));
|
||||
const elem = this.elementList.find(el => el.code == this.selected.type);
|
||||
const elem = this.elementList.find(el => el.type == this.selected.type);
|
||||
if (elem) {
|
||||
elem.model = this.selected;
|
||||
this.enabledTab = this.selected.type;
|
||||
@ -185,7 +185,6 @@ export default {
|
||||
if (source.elementList) {
|
||||
this.composeElemList = source.elementList;
|
||||
this.statusTab = this.composeElemList[0].code;
|
||||
debugger;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user