Commit ea76d091 by Mr. Lan

fix bug.

parent fa929d85
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
> >
<el-table-column <el-table-column
width="50" width="50"
align="center"
header-align="center"
> >
<template slot="header"> <template slot="header">
<i style="font-size: 25px; color: #409EFF;cursor:pointer;" class="el-icon-circle-plus" @click="addCol(item)" /> <i style="font-size: 25px; color: #409EFF;cursor:pointer;" class="el-icon-circle-plus" @click="addCol(item)" />
...@@ -89,7 +87,7 @@ ...@@ -89,7 +87,7 @@
:data="data" :data="data"
:disabled="disabled" :disabled="disabled"
:is-label="false" :is-label="false"
@input-change="onInputChange" @input-change="onSubformInputChange"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -165,7 +163,8 @@ export default { ...@@ -165,7 +163,8 @@ export default {
this.generateModle(item.list) this.generateModle(item.list)
}) })
} else if (genList[i].type === 'subform') { } else if (genList[i].type === 'subform') {
this.generateModle(genList[i].columns.list) // this.generateModle(genList[i].columns.list)
console.log(genList[i].columns)
} else { } else {
if (this.value && Object.keys(this.value).indexOf(genList[i].model) >= 0) { if (this.value && Object.keys(this.value).indexOf(genList[i].model) >= 0) {
this.models[genList[i].model] = this.value[genList[i].model] this.models[genList[i].model] = this.value[genList[i].model]
...@@ -211,6 +210,9 @@ export default { ...@@ -211,6 +210,9 @@ export default {
reset() { reset() {
this.$refs.generateForm.resetFields() this.$refs.generateForm.resetFields()
}, },
onSubformInputChange(value, field) {
this.$emit('on-change', field, value, this.models)
},
onInputChange(value, field) { onInputChange(value, field) {
this.$emit('on-change', field, value, this.models) this.$emit('on-change', field, value, this.models)
}, },
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
upload upload
generate-code generate-code
generate-json generate-json
:advance-fields="['editor', 'cascader', 'subform']" :advance-fields="['editor', 'cascader']"
> >
<template slot="action" /> <template slot="action" />
</fm-making-form> </fm-making-form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment