1. 增加formId属性以防止包含使用多个v-form-render组件时冲突;

2. 修复name属性编辑的必填校验错误。
This commit is contained in:
vdpAdmin
2022-03-16 17:52:22 +08:00
parent 0fc6093da6
commit d40b6e8d2d
6 changed files with 99 additions and 12 deletions

View File

@ -90,6 +90,19 @@ export default {
}
},
setWidgetOption(optionName, optionValue) { //通用组件选项修改API
if (this.widget.options.hasOwnProperty(optionName)) {
this.widget.options[optionName] = optionValue
}
},
/**
* 获取子表单的行数
*/
getSubFormRowCount() {
return !this.rowIdData ? 0 : this.rowIdData.length
},
disableSubFormRow(rowIndex) {
this.widget.widgetList.forEach(subWidget => {
let swRefName = subWidget.options.name + '@row' + this.rowIdData[rowIndex]

View File

@ -146,6 +146,10 @@
this.rowIdData.splice(rowIndex, 1)
},
getRowIdData() {
return this.rowIdData
},
initFieldSchemaData() { //初始化fieldSchemaData
if (this.widget.type !== 'sub-form') {
return