ztxkui 10.0.77 → 10.0.79
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.
|
@@ -489,8 +489,13 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
function priceOrAmountFormat(text, precision) {
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
if (typeof text === 'string') {
|
|
493
|
+
text = text === null || text === void 0 ? void 0 : text.replaceAll(',', '');
|
|
494
|
+
}
|
|
495
|
+
if (typeof text === 'number' || typeof text === 'string') {
|
|
496
|
+
return toThousand(exactRound(text, precision));
|
|
497
|
+
}
|
|
498
|
+
return text;
|
|
494
499
|
}
|
|
495
500
|
}
|
|
496
501
|
}
|
|
@@ -26,8 +26,13 @@ import classNames from 'classnames';
|
|
|
26
26
|
import { toThousand, exactRound } from 'ztxkutils/dist/tools';
|
|
27
27
|
import ZtxkContext from '../../utils/ZtxkContext';
|
|
28
28
|
function priceOrAmountFormat(text, precision) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
if (typeof text === 'string') {
|
|
30
|
+
text = text === null || text === void 0 ? void 0 : text.replaceAll(',', '');
|
|
31
|
+
}
|
|
32
|
+
if (typeof text === 'number' || typeof text === 'string') {
|
|
33
|
+
return toThousand(exactRound(text, precision));
|
|
34
|
+
}
|
|
35
|
+
return text;
|
|
31
36
|
}
|
|
32
37
|
var Item = function (_a) {
|
|
33
38
|
var children = _a.children, className = _a.className, title = _a.title, showDiff = _a.showDiff, restProps = __rest(_a, ["children", "className", "title", "showDiff"]);
|
|
@@ -15,8 +15,13 @@ import classNames from 'classnames';
|
|
|
15
15
|
import { toThousand, exactRound } from 'ztxkutils/dist/tools';
|
|
16
16
|
import ZtxkContext from '../../utils/ZtxkContext';
|
|
17
17
|
function priceOrAmountFormat(text, precision) {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
if (typeof text === 'string') {
|
|
19
|
+
text = text === null || text === void 0 ? void 0 : text.replaceAll(',', '');
|
|
20
|
+
}
|
|
21
|
+
if (typeof text === 'number' || typeof text === 'string') {
|
|
22
|
+
return toThousand(exactRound(text, precision));
|
|
23
|
+
}
|
|
24
|
+
return text;
|
|
20
25
|
}
|
|
21
26
|
var Item = function (_a) {
|
|
22
27
|
var children = _a.children, className = _a.className, title = _a.title, _b = _a.colon, colon = _b === void 0 ? true : _b, span = _a.span, titleSpan = _a.titleSpan, titleProps = _a.titleProps, textProps = _a.textProps, showDiff = _a.showDiff, _c = _a.isEllipsis, isEllipsis = _c === void 0 ? true : _c, isBlod = _a.isBlod;
|