@hw-component/form 1.10.20 → 1.10.21

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/Text/index.js CHANGED
@@ -17,7 +17,8 @@ var HText = (function (_ref) {
17
17
  size = _ref$size === void 0 ? 0 : _ref$size,
18
18
  props = _objectWithoutProperties(_ref, _excluded);
19
19
  var text = useMemo(function () {
20
- if (typeof value === "undefined" || value === null || (value === null || value === void 0 ? void 0 : value.trim()) === "") {
20
+ var relVal = value === null || value === void 0 ? void 0 : value.toString();
21
+ if (typeof value === "undefined" || value === null || (relVal === null || relVal === void 0 ? void 0 : relVal.trim()) === "") {
21
22
  return "-";
22
23
  }
23
24
  return value;
package/lib/Text/index.js CHANGED
@@ -20,7 +20,8 @@ var HText = (function (_ref) {
20
20
  size = _ref$size === void 0 ? 0 : _ref$size,
21
21
  props = _objectWithoutProperties(_ref, _excluded);
22
22
  var text = React.useMemo(function () {
23
- if (typeof value === "undefined" || value === null || (value === null || value === void 0 ? void 0 : value.trim()) === "") {
23
+ var relVal = value === null || value === void 0 ? void 0 : value.toString();
24
+ if (typeof value === "undefined" || value === null || (relVal === null || relVal === void 0 ? void 0 : relVal.trim()) === "") {
24
25
  return "-";
25
26
  }
26
27
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.10.20",
3
+ "version": "1.10.21",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,8 @@ export default ({
16
16
  ...props
17
17
  }: HFormTextProps) => {
18
18
  const text = useMemo(() => {
19
- if (typeof value === "undefined" || value === null||value?.trim()==="") {
19
+ const relVal=value?.toString();
20
+ if (typeof value === "undefined" || value === null||relVal?.trim()==="") {
20
21
  return "-";
21
22
  }
22
23
  return value;