3h1-ui 3.0.0-next.250 → 3.0.0-next.251
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/es/index.js +14 -6
- package/lib/index.js +14 -6
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -27845,6 +27845,11 @@ function useRowSelection(propsRef, tableData, emit) {
|
|
|
27845
27845
|
setSelectedRows
|
|
27846
27846
|
};
|
|
27847
27847
|
}
|
|
27848
|
+
function formatNumberWithThousandSeparator$1(val) {
|
|
27849
|
+
const [intPart, decimalPart] = String(val).split(".");
|
|
27850
|
+
const formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
27851
|
+
return decimalPart !== void 0 ? `${formattedInt}.${decimalPart}` : formattedInt;
|
|
27852
|
+
}
|
|
27848
27853
|
function useDataSource(propsRef, {
|
|
27849
27854
|
getPaginationInfo,
|
|
27850
27855
|
setPagination,
|
|
@@ -27871,9 +27876,9 @@ function useDataSource(propsRef, {
|
|
|
27871
27876
|
const total = dataSourceRef.value.reduce((acc, cur) => {
|
|
27872
27877
|
return +acc + (+cur[field] || 0);
|
|
27873
27878
|
}, 0);
|
|
27874
|
-
obj[field] =
|
|
27875
|
-
|
|
27876
|
-
|
|
27879
|
+
obj[field] = formatNumberWithThousandSeparator$1(
|
|
27880
|
+
total.toFixed(unref(propsRef).summaryPrecision)
|
|
27881
|
+
);
|
|
27877
27882
|
});
|
|
27878
27883
|
return obj;
|
|
27879
27884
|
});
|
|
@@ -30134,6 +30139,11 @@ const ShyTag = /* @__PURE__ */ defineComponent({
|
|
|
30134
30139
|
return () => unref(renderTag);
|
|
30135
30140
|
}
|
|
30136
30141
|
});
|
|
30142
|
+
function formatNumberWithThousandSeparator(val) {
|
|
30143
|
+
const [intPart, decimalPart] = String(val).split(".");
|
|
30144
|
+
const formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
30145
|
+
return decimalPart !== void 0 ? `${formattedInt}.${decimalPart}` : formattedInt;
|
|
30146
|
+
}
|
|
30137
30147
|
const handleItem = (item, ellipsis) => {
|
|
30138
30148
|
const {
|
|
30139
30149
|
key: key2,
|
|
@@ -30319,9 +30329,7 @@ const useColumns$1 = (propsRef, getPaginationRef, tableAction2, wrapRef) => {
|
|
|
30319
30329
|
var _a2, _b, _c;
|
|
30320
30330
|
const isSummaryCol = (_b = (_a2 = unref(propsRef).summaryTotalFields) == null ? void 0 : _a2.includes) == null ? void 0 : _b.call(_a2, column2.dataIndex);
|
|
30321
30331
|
const summaryFormat = (text) => {
|
|
30322
|
-
return text || isNumber$3(text) ? isNumber$3(+text) && !isNaN(+text) ? (+text).toFixed(unref(propsRef).summaryPrecision)
|
|
30323
|
-
return match + (string3.charAt(offset2 + 1) === "." || offset2 === string3.length - 1 ? "" : ",");
|
|
30324
|
-
}) : text : text;
|
|
30332
|
+
return text || isNumber$3(text) ? isNumber$3(+text) && !isNaN(+text) ? formatNumberWithThousandSeparator((+text).toFixed(unref(propsRef).summaryPrecision)) : text : text;
|
|
30325
30333
|
};
|
|
30326
30334
|
const {
|
|
30327
30335
|
slots,
|
package/lib/index.js
CHANGED
|
@@ -27869,6 +27869,11 @@ function useRowSelection(propsRef, tableData, emit) {
|
|
|
27869
27869
|
setSelectedRows
|
|
27870
27870
|
};
|
|
27871
27871
|
}
|
|
27872
|
+
function formatNumberWithThousandSeparator$1(val) {
|
|
27873
|
+
const [intPart, decimalPart] = String(val).split(".");
|
|
27874
|
+
const formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
27875
|
+
return decimalPart !== void 0 ? `${formattedInt}.${decimalPart}` : formattedInt;
|
|
27876
|
+
}
|
|
27872
27877
|
function useDataSource(propsRef, {
|
|
27873
27878
|
getPaginationInfo,
|
|
27874
27879
|
setPagination,
|
|
@@ -27895,9 +27900,9 @@ function useDataSource(propsRef, {
|
|
|
27895
27900
|
const total = dataSourceRef.value.reduce((acc, cur) => {
|
|
27896
27901
|
return +acc + (+cur[field] || 0);
|
|
27897
27902
|
}, 0);
|
|
27898
|
-
obj[field] =
|
|
27899
|
-
|
|
27900
|
-
|
|
27903
|
+
obj[field] = formatNumberWithThousandSeparator$1(
|
|
27904
|
+
total.toFixed(vue.unref(propsRef).summaryPrecision)
|
|
27905
|
+
);
|
|
27901
27906
|
});
|
|
27902
27907
|
return obj;
|
|
27903
27908
|
});
|
|
@@ -30158,6 +30163,11 @@ const ShyTag = /* @__PURE__ */ vue.defineComponent({
|
|
|
30158
30163
|
return () => vue.unref(renderTag);
|
|
30159
30164
|
}
|
|
30160
30165
|
});
|
|
30166
|
+
function formatNumberWithThousandSeparator(val) {
|
|
30167
|
+
const [intPart, decimalPart] = String(val).split(".");
|
|
30168
|
+
const formattedInt = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
30169
|
+
return decimalPart !== void 0 ? `${formattedInt}.${decimalPart}` : formattedInt;
|
|
30170
|
+
}
|
|
30161
30171
|
const handleItem = (item, ellipsis) => {
|
|
30162
30172
|
const {
|
|
30163
30173
|
key: key2,
|
|
@@ -30343,9 +30353,7 @@ const useColumns$1 = (propsRef, getPaginationRef, tableAction2, wrapRef) => {
|
|
|
30343
30353
|
var _a2, _b, _c;
|
|
30344
30354
|
const isSummaryCol = (_b = (_a2 = vue.unref(propsRef).summaryTotalFields) == null ? void 0 : _a2.includes) == null ? void 0 : _b.call(_a2, column2.dataIndex);
|
|
30345
30355
|
const summaryFormat = (text) => {
|
|
30346
|
-
return text || utils$1.isNumber(text) ? utils$1.isNumber(+text) && !isNaN(+text) ? (+text).toFixed(vue.unref(propsRef).summaryPrecision)
|
|
30347
|
-
return match + (string3.charAt(offset2 + 1) === "." || offset2 === string3.length - 1 ? "" : ",");
|
|
30348
|
-
}) : text : text;
|
|
30356
|
+
return text || utils$1.isNumber(text) ? utils$1.isNumber(+text) && !isNaN(+text) ? formatNumberWithThousandSeparator((+text).toFixed(vue.unref(propsRef).summaryPrecision)) : text : text;
|
|
30349
30357
|
};
|
|
30350
30358
|
const {
|
|
30351
30359
|
slots,
|