bri-components 1.4.40 → 1.4.41
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
CHANGED
|
@@ -275,18 +275,20 @@ export default {
|
|
|
275
275
|
});
|
|
276
276
|
},
|
|
277
277
|
quickChangeVal (operationItem, row, rowIndex, column, params) {
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
if (this.isUseQuickChange({ row, rowIndex, column })) {
|
|
279
|
+
this.$set(this.ruleRecordMap, this.getMixKey(row, column), { showRuleMessage: true });
|
|
280
|
+
this.dealSameRowsVal({ row, rowIndex, column });
|
|
280
281
|
|
|
281
|
-
|
|
282
|
+
this.change("quickChangeVal", row, rowIndex, column, ...params);
|
|
283
|
+
}
|
|
282
284
|
},
|
|
283
285
|
changeVal (operationItem, row, rowIndex, column, params) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
+
if (!this.isUseQuickChange({ row, rowIndex, column })) {
|
|
287
|
+
this.$set(this.ruleRecordMap, this.getMixKey(row, column), { showRuleMessage: true });
|
|
286
288
|
this.dealSameRowsVal({ row, rowIndex, column });
|
|
287
|
-
}
|
|
288
289
|
|
|
289
|
-
|
|
290
|
+
this.change("changeVal", row, rowIndex, column, ...params);
|
|
291
|
+
}
|
|
290
292
|
},
|
|
291
293
|
|
|
292
294
|
/* ----------- 方法 ---------- */
|
|
@@ -337,15 +339,19 @@ export default {
|
|
|
337
339
|
|
|
338
340
|
return rowspan;
|
|
339
341
|
},
|
|
342
|
+
// 是都满足使用quickChange
|
|
343
|
+
isUseQuickChange ({ row, rowIndex, column }) {
|
|
344
|
+
return ["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._type) &&
|
|
345
|
+
this.mergeRowColKeys.includes(column._key) &&
|
|
346
|
+
this.rowspanMap[this.getMixKey(row, column)] > 1;
|
|
347
|
+
},
|
|
340
348
|
// 合并单元格的行,某列的值全部跟着修改
|
|
341
349
|
dealSameRowsVal ({ row, rowIndex, column }, list = this.allListData) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
.
|
|
346
|
-
|
|
347
|
-
});
|
|
348
|
-
}
|
|
350
|
+
const indexInAll = list.findIndex(dataItem => dataItem._id === row._id);
|
|
351
|
+
list.slice(indexInAll + 1, indexInAll + this.rowspanMap[this.getMixKey(row, column)])
|
|
352
|
+
.forEach(rowItem => {
|
|
353
|
+
rowItem[column._key] = this.$deepCopy(row[column._key]);
|
|
354
|
+
});
|
|
349
355
|
}
|
|
350
356
|
}
|
|
351
357
|
};
|
|
@@ -813,8 +813,7 @@ export default {
|
|
|
813
813
|
},
|
|
814
814
|
// 输入框值改变立即
|
|
815
815
|
quickChangeVal (operationItem, row, rowIndex, column, params) {
|
|
816
|
-
|
|
817
|
-
this.change("quickChangeVal", row, rowIndex, column, ...params);
|
|
816
|
+
// 啥也不做,平级表格合并单元格时用这个方法
|
|
818
817
|
},
|
|
819
818
|
// 输入框值改变
|
|
820
819
|
changeVal (operationItem, row, rowIndex, column, params) {
|