表单配置

This commit is contained in:
yanran200730
2022-03-09 17:01:09 +08:00
parent f1d34435e5
commit 7f2d6942dc
2 changed files with 13 additions and 7 deletions

View File

@@ -374,7 +374,8 @@
type: String,
areaId: String,
value: Array,
appType: String
appType: String,
currIndex: Number
},
components: {
@@ -438,6 +439,12 @@
}
},
currIndex (v, oldV) {
if (this.appType && !this.value.length && oldV === 0) {
this.getInitFileds()
}
},
activeIndex () {
if (this.activeIndex > -1 && this.groupIndex > -1 && !this.isGroup) {
const filed = this.targetList[this.groupIndex].column[this.activeIndex]
@@ -497,9 +504,6 @@
},
mounted () {
if (this.appType && !this.value.length) {
this.getInitFileds()
}
},
methods: {
@@ -584,7 +588,7 @@
...item,
groupIndex: i,
groupName: group.groupName,
fieldDbName: this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`,
fieldDbName: item.isInit === '1' ? item.fieldDbName : (this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`),
defaultValue: item.type === 'checkbox' && item.defaultValue ? item.defaultValue.join('`') : item.defaultValue,
selectValues: item.options ? item.options.map(v => v.label).join('`') : ''
})