bri-components 1.4.83 → 1.4.84
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.
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/controls/.DS_Store +0 -0
- package/src/components/controls/senior/.DS_Store +0 -0
- package/src/components/list/DshBox/DshSingleData.vue +13 -1
- package/src/components/list/mixins/DshFlatTableMixin.js +2 -2
- package/src/components/list/mixins/tableBaseMixin.js +9 -4
- package/src/styles/.DS_Store +0 -0
- package/src/styles/components/.DS_Store +0 -0
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<!-- 底部编辑按钮 -->
|
|
18
18
|
<dsh-buttons
|
|
19
19
|
class="DshSingleData-btns"
|
|
20
|
-
:list="
|
|
20
|
+
:list="selfOperationList"
|
|
21
21
|
@click="$dshEmit($event, formData)"
|
|
22
22
|
></dsh-buttons>
|
|
23
23
|
</template>
|
|
@@ -73,6 +73,18 @@
|
|
|
73
73
|
computed: {
|
|
74
74
|
formData () {
|
|
75
75
|
return this.data[0];
|
|
76
|
+
},
|
|
77
|
+
selfOperationList () {
|
|
78
|
+
return this.operationList.map(operationItem => {
|
|
79
|
+
return {
|
|
80
|
+
...operationItem,
|
|
81
|
+
...(
|
|
82
|
+
operationItem.operationFunc
|
|
83
|
+
? operationItem.operationFunc(operationItem, this.formData, undefined, this.operationList)
|
|
84
|
+
: {}
|
|
85
|
+
)
|
|
86
|
+
};
|
|
87
|
+
});
|
|
76
88
|
}
|
|
77
89
|
},
|
|
78
90
|
created () {},
|
|
@@ -335,7 +335,7 @@ export default {
|
|
|
335
335
|
},
|
|
336
336
|
quickChangeVal (operationItem, row, rowIndex, column, params) {
|
|
337
337
|
if (["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._type)) {
|
|
338
|
-
this
|
|
338
|
+
this.dealRuleRecord(row, column);
|
|
339
339
|
this.dealSameRowsVal({ row, rowIndex, column });
|
|
340
340
|
|
|
341
341
|
this.change("quickChangeVal", row, rowIndex, column, ...params);
|
|
@@ -343,7 +343,7 @@ export default {
|
|
|
343
343
|
},
|
|
344
344
|
changeVal (operationItem, row, rowIndex, column, params) {
|
|
345
345
|
if (!["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._type)) {
|
|
346
|
-
this
|
|
346
|
+
this.dealRuleRecord(row, column);
|
|
347
347
|
this.dealSameRowsVal({ row, rowIndex, column });
|
|
348
348
|
|
|
349
349
|
this.change("changeVal", row, rowIndex, column, ...params);
|
|
@@ -845,19 +845,19 @@ export default {
|
|
|
845
845
|
|
|
846
846
|
// 输入框失去焦点
|
|
847
847
|
controlBlur (operationItem, row, rowIndex, column, params) {
|
|
848
|
-
this
|
|
848
|
+
this.dealRuleRecord(row, column);
|
|
849
849
|
},
|
|
850
850
|
// 输入框值改变立即
|
|
851
851
|
quickChangeVal (operationItem, row, rowIndex, column, params) {
|
|
852
852
|
if (["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._type)) {
|
|
853
|
-
this
|
|
853
|
+
this.dealRuleRecord(row, column);
|
|
854
854
|
this.change("quickChangeVal", row, rowIndex, column, ...params);
|
|
855
855
|
}
|
|
856
856
|
},
|
|
857
857
|
// 输入框值改变
|
|
858
858
|
changeVal (operationItem, row, rowIndex, column, params) {
|
|
859
859
|
if (!["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._type)) {
|
|
860
|
-
this
|
|
860
|
+
this.dealRuleRecord(row, column);
|
|
861
861
|
this.change("changeVal", row, rowIndex, column, ...params);
|
|
862
862
|
}
|
|
863
863
|
},
|
|
@@ -1476,7 +1476,7 @@ export default {
|
|
|
1476
1476
|
column = this.$transformDynamicProperty(column, row, this.parentObj);
|
|
1477
1477
|
|
|
1478
1478
|
// 未触发校验时 不显示错误
|
|
1479
|
-
if (
|
|
1479
|
+
if (this.ruleRecordMap[this.getMixKey(row, column)] || this.showRuleMessage) {
|
|
1480
1480
|
// 校验必填不通过 => 校验对比
|
|
1481
1481
|
const resultObj = {};
|
|
1482
1482
|
this.$getFieldRuleResult(column, row, resultObj) &&
|
|
@@ -1717,6 +1717,11 @@ export default {
|
|
|
1717
1717
|
// 行id + 分隔符 + 列key 组成键
|
|
1718
1718
|
getMixKey (row, column, splitStr = "--") {
|
|
1719
1719
|
return `${row._id}${splitStr}${column._key}`;
|
|
1720
|
+
},
|
|
1721
|
+
// 更新校验显示的标记
|
|
1722
|
+
dealRuleRecord (row, column) {
|
|
1723
|
+
// this.$set(this.ruleRecordMap, this.getMixKey(row, column), true);
|
|
1724
|
+
this.ruleRecordMap[this.getMixKey(row, column)] = true;
|
|
1720
1725
|
}
|
|
1721
1726
|
}
|
|
1722
1727
|
};
|
|
Binary file
|
|
Binary file
|