@xfe-repo/web-components 1.7.5 → 1.7.6
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/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -719,6 +719,8 @@ type CurrencyUnit = 'yuan' | 'jiao' | 'fen';
|
|
|
719
719
|
interface CurrencyProps {
|
|
720
720
|
/** 单位 'yuan' | 'jiao' | 'fen',默认分 */
|
|
721
721
|
unit?: CurrencyUnit;
|
|
722
|
+
/** 金额展示单位,默认人民币 */
|
|
723
|
+
priceUnit?: string;
|
|
722
724
|
/** 保留的小数位,默认 2 位 */
|
|
723
725
|
toFixed?: number;
|
|
724
726
|
/** 具体金额字段 */
|
package/dist/index.d.ts
CHANGED
|
@@ -719,6 +719,8 @@ type CurrencyUnit = 'yuan' | 'jiao' | 'fen';
|
|
|
719
719
|
interface CurrencyProps {
|
|
720
720
|
/** 单位 'yuan' | 'jiao' | 'fen',默认分 */
|
|
721
721
|
unit?: CurrencyUnit;
|
|
722
|
+
/** 金额展示单位,默认人民币 */
|
|
723
|
+
priceUnit?: string;
|
|
722
724
|
/** 保留的小数位,默认 2 位 */
|
|
723
725
|
toFixed?: number;
|
|
724
726
|
/** 具体金额字段 */
|
package/dist/index.js
CHANGED
|
@@ -3160,7 +3160,7 @@ var Counter = function Counter(param) {
|
|
|
3160
3160
|
// src/Currency/index.tsx
|
|
3161
3161
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3162
3162
|
var Currency = function Currency(props) {
|
|
3163
|
-
var _props_unit = props.unit, unit = _props_unit === void 0 ? "fen" : _props_unit, _props_toFixed = props.toFixed, toFixed = _props_toFixed === void 0 ? 2 : _props_toFixed, children = props.children, className = props.className;
|
|
3163
|
+
var _props_unit = props.unit, unit = _props_unit === void 0 ? "fen" : _props_unit, _props_priceUnit = props.priceUnit, priceUnit = _props_priceUnit === void 0 ? "\uFFE5" : _props_priceUnit, _props_toFixed = props.toFixed, toFixed = _props_toFixed === void 0 ? 2 : _props_toFixed, children = props.children, className = props.className;
|
|
3164
3164
|
if (children === void 0 || children === null) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", {
|
|
3165
3165
|
className: className,
|
|
3166
3166
|
children: "--"
|
|
@@ -3168,7 +3168,8 @@ var Currency = function Currency(props) {
|
|
|
3168
3168
|
if (children.toString().includes("*")) return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", {
|
|
3169
3169
|
className: className,
|
|
3170
3170
|
children: [
|
|
3171
|
-
|
|
3171
|
+
priceUnit,
|
|
3172
|
+
" ",
|
|
3172
3173
|
children
|
|
3173
3174
|
]
|
|
3174
3175
|
});
|
|
@@ -3181,7 +3182,7 @@ var Currency = function Currency(props) {
|
|
|
3181
3182
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", {
|
|
3182
3183
|
className: className,
|
|
3183
3184
|
children: [
|
|
3184
|
-
|
|
3185
|
+
priceUnit,
|
|
3185
3186
|
priceDic[unit].toFixed(toFixed)
|
|
3186
3187
|
]
|
|
3187
3188
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -2866,7 +2866,7 @@ var Counter = function Counter(param) {
|
|
|
2866
2866
|
// src/Currency/index.tsx
|
|
2867
2867
|
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2868
2868
|
var Currency = function Currency(props) {
|
|
2869
|
-
var _props_unit = props.unit, unit = _props_unit === void 0 ? "fen" : _props_unit, _props_toFixed = props.toFixed, toFixed = _props_toFixed === void 0 ? 2 : _props_toFixed, children = props.children, className = props.className;
|
|
2869
|
+
var _props_unit = props.unit, unit = _props_unit === void 0 ? "fen" : _props_unit, _props_priceUnit = props.priceUnit, priceUnit = _props_priceUnit === void 0 ? "\uFFE5" : _props_priceUnit, _props_toFixed = props.toFixed, toFixed = _props_toFixed === void 0 ? 2 : _props_toFixed, children = props.children, className = props.className;
|
|
2870
2870
|
if (children === void 0 || children === null) return /* @__PURE__ */ jsx23("span", {
|
|
2871
2871
|
className: className,
|
|
2872
2872
|
children: "--"
|
|
@@ -2874,7 +2874,8 @@ var Currency = function Currency(props) {
|
|
|
2874
2874
|
if (children.toString().includes("*")) return /* @__PURE__ */ jsxs8("span", {
|
|
2875
2875
|
className: className,
|
|
2876
2876
|
children: [
|
|
2877
|
-
|
|
2877
|
+
priceUnit,
|
|
2878
|
+
" ",
|
|
2878
2879
|
children
|
|
2879
2880
|
]
|
|
2880
2881
|
});
|
|
@@ -2887,7 +2888,7 @@ var Currency = function Currency(props) {
|
|
|
2887
2888
|
return /* @__PURE__ */ jsxs8("span", {
|
|
2888
2889
|
className: className,
|
|
2889
2890
|
children: [
|
|
2890
|
-
|
|
2891
|
+
priceUnit,
|
|
2891
2892
|
priceDic[unit].toFixed(toFixed)
|
|
2892
2893
|
]
|
|
2893
2894
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfe-repo/web-components",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"react-dom": "18.2.0",
|
|
63
63
|
"react-use": "^17.5.1",
|
|
64
64
|
"swr": "^2.2.5",
|
|
65
|
+
"@xfe-repo/web-service": "1.6.0",
|
|
65
66
|
"@xfe-repo/web-micro": "1.7.0",
|
|
66
67
|
"@xfe-repo/web-router": "1.6.1",
|
|
67
|
-
"@xfe-repo/web-service": "1.6.0",
|
|
68
68
|
"@xfe-repo/web-utils": "1.6.0"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|