@indfnd/common 1.0.120 → 1.0.122
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/CHANGELOG.md +9 -0
- package/dist/ind-common.es.js +28 -9
- package/dist/ind-common.umd.cjs +76 -76
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.122](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.121...v1.0.122) (2025-07-17)
|
|
6
|
+
|
|
7
|
+
### [1.0.121](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.120...v1.0.121) (2025-07-15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **table:** 修复表格数据更新逻辑 ([831f489](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/831f489faec08a4881ba5524913bc53b8b31d366))
|
|
13
|
+
|
|
5
14
|
### [1.0.120](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.119...v1.0.120) (2025-07-12)
|
|
6
15
|
|
|
7
16
|
|
package/dist/ind-common.es.js
CHANGED
|
@@ -5460,7 +5460,7 @@ var lodash = { exports: {} };
|
|
|
5460
5460
|
})(lodash, lodash.exports);
|
|
5461
5461
|
var _ = lodash.exports;
|
|
5462
5462
|
const name$1 = "@indfnd/common";
|
|
5463
|
-
const version = "1.0.
|
|
5463
|
+
const version = "1.0.121";
|
|
5464
5464
|
const author = "huxuetong";
|
|
5465
5465
|
const publishConfig = {
|
|
5466
5466
|
registry: "https://registry.npmjs.org/"
|
|
@@ -49227,7 +49227,7 @@ var FormImpl = {
|
|
|
49227
49227
|
});
|
|
49228
49228
|
}
|
|
49229
49229
|
_.forEach(this.fieldList, (d, idx) => {
|
|
49230
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n
|
|
49230
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
49231
49231
|
let itemInner;
|
|
49232
49232
|
if (d.render) {
|
|
49233
49233
|
itemInner = d.render(h, d, this.form);
|
|
@@ -49671,11 +49671,23 @@ var FormImpl = {
|
|
|
49671
49671
|
default: {
|
|
49672
49672
|
let text = this.form[d.formKey];
|
|
49673
49673
|
if (d.enumKey) {
|
|
49674
|
-
|
|
49674
|
+
let temp = text;
|
|
49675
|
+
text = ((this.enumData[d.enumKey] || {}).enumData || {})[text];
|
|
49676
|
+
if ((text === null || text === void 0) && (temp == null ? void 0 : temp.includes(","))) {
|
|
49677
|
+
text = temp.split(",").map((m) => ((this.enumData[d.enumKey] || {}).enumData || {})[m]).join("\u3001");
|
|
49678
|
+
}
|
|
49675
49679
|
} else if (d.enumList && d.enumList.length) {
|
|
49676
|
-
|
|
49680
|
+
let temp = text;
|
|
49681
|
+
text = ((d.enumList || []).find(({ K }) => K === text) || {}).V;
|
|
49682
|
+
if ((text === null || text === void 0) && (temp == null ? void 0 : temp.includes(","))) {
|
|
49683
|
+
text = temp.split(",").map((m) => ((d.enumList || []).find(({ K }) => K === m) || {}).V).join("\u3001");
|
|
49684
|
+
}
|
|
49677
49685
|
} else if (d.enumData) {
|
|
49678
|
-
|
|
49686
|
+
let temp = text;
|
|
49687
|
+
text = d.enumData[text];
|
|
49688
|
+
if ((text === null || text === void 0) && (temp == null ? void 0 : temp.includes(","))) {
|
|
49689
|
+
text = temp.split(",").map((m) => d.enumData[m]).join("\u3001");
|
|
49690
|
+
}
|
|
49679
49691
|
}
|
|
49680
49692
|
if (d.dateFormat) {
|
|
49681
49693
|
text = formatDate$1(text);
|
|
@@ -54786,14 +54798,21 @@ const __vue2_script$14 = {
|
|
|
54786
54798
|
return datasTmp;
|
|
54787
54799
|
}
|
|
54788
54800
|
},
|
|
54801
|
+
flattenData(data) {
|
|
54802
|
+
return _.reduce(data, (rlt, item2) => {
|
|
54803
|
+
let children = item2.children && item2.children.length ? this.flattenData(item2.children) : [];
|
|
54804
|
+
return [...rlt, item2, ...children];
|
|
54805
|
+
}, []);
|
|
54806
|
+
},
|
|
54789
54807
|
async updateTableData(callback, isUpdateOriginValue = true) {
|
|
54790
54808
|
if (!this.rowKey) {
|
|
54791
54809
|
console.warn("\u8BF7\u4F20rowKey\uFF0C\u8C22\u8C22");
|
|
54792
54810
|
return;
|
|
54793
54811
|
}
|
|
54794
54812
|
this.updating = true;
|
|
54813
|
+
const value = this.flattenData(this.value);
|
|
54795
54814
|
const valueDataMap = _.reduce(
|
|
54796
|
-
|
|
54815
|
+
value || [],
|
|
54797
54816
|
(rlt, item2) => {
|
|
54798
54817
|
Object.assign(rlt, { [item2[this.rowKey]]: item2 });
|
|
54799
54818
|
return rlt;
|
|
@@ -54801,14 +54820,14 @@ const __vue2_script$14 = {
|
|
|
54801
54820
|
{}
|
|
54802
54821
|
);
|
|
54803
54822
|
this.gridApi.forEachNode((node) => {
|
|
54804
|
-
callback(node.data, (key,
|
|
54823
|
+
callback(node.data, (key, value2) => {
|
|
54805
54824
|
if (isUpdateOriginValue) {
|
|
54806
54825
|
const valueData = valueDataMap[node.data[this.rowKey]];
|
|
54807
|
-
valueData[key] =
|
|
54826
|
+
valueData[key] = value2;
|
|
54808
54827
|
}
|
|
54809
54828
|
const column = this.gridColumnApi.getColumn(key);
|
|
54810
54829
|
if (column) {
|
|
54811
|
-
node.setDataValue(column,
|
|
54830
|
+
node.setDataValue(column, value2);
|
|
54812
54831
|
}
|
|
54813
54832
|
});
|
|
54814
54833
|
});
|