@zscreate/zhxy-app-component 1.0.395 → 1.0.397
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1063,16 +1063,20 @@ export default {
|
|
|
1063
1063
|
if (widget.options.maxValue || widget.options.minValue) {
|
|
1064
1064
|
if (this.tableKey) {
|
|
1065
1065
|
if(!this.rules[this.tableKey][this.widget.model]) this.rules[this.tableKey][this.widget.model] = []
|
|
1066
|
-
this.rules[this.tableKey][this.widget.model].
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1066
|
+
if (!this.rules[this.tableKey][this.widget.model].some(r => r.validator === this.validateNumRange)) {
|
|
1067
|
+
this.rules[this.tableKey][this.widget.model].push({
|
|
1068
|
+
validator: this.validateNumRange,
|
|
1069
|
+
trigger: "change",
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1070
1072
|
} else {
|
|
1071
1073
|
if(!this.rules[this.widget.model]) this.rules[this.widget.model] = []
|
|
1072
|
-
this.rules[this.widget.model].
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1074
|
+
if (!this.rules[this.widget.model].some(r => r.validator === this.validateNumRange)) {
|
|
1075
|
+
this.rules[this.widget.model].push({
|
|
1076
|
+
validator: this.validateNumRange,
|
|
1077
|
+
trigger: "change",
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1076
1080
|
}
|
|
1077
1081
|
} else {
|
|
1078
1082
|
// 清空最多最少选
|
|
@@ -947,7 +947,7 @@ export default {
|
|
|
947
947
|
gen.model
|
|
948
948
|
];
|
|
949
949
|
this.tableInitByModel(tableModel);
|
|
950
|
-
if (gen.options.defaultAddRow && (!this.models[gen.model] || (Array.isArray(this.models[gen.model]) && this.models[gen.model].length === 0))) {
|
|
950
|
+
if (gen.options.defaultAddRow && !gen.options.disabled && (!this.models[gen.model] || (Array.isArray(this.models[gen.model]) && this.models[gen.model].length === 0))) {
|
|
951
951
|
this.addToTableData(gen, gen.model, 'addModel')
|
|
952
952
|
}
|
|
953
953
|
}
|
|
@@ -1484,13 +1484,13 @@ export default {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
})
|
|
1486
1486
|
// 子表单有必填校验 判断有没有添加行, 没有添加行需要手动添加行, 让它触发校验
|
|
1487
|
-
tables.forEach(table => {
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
})
|
|
1487
|
+
// tables.forEach(table => {
|
|
1488
|
+
// if (!table.options.requiredAddDefaultRow) return
|
|
1489
|
+
// const model = this.models[table.model]
|
|
1490
|
+
// if ( !model || ( Array.isArray(model) && model.length === 0 )) {
|
|
1491
|
+
// this.addToTableData(table, table.model, 'addModel')
|
|
1492
|
+
// }
|
|
1493
|
+
// })
|
|
1494
1494
|
},
|
|
1495
1495
|
/**
|
|
1496
1496
|
* @param {回调函数} fn 成功的回调函数
|