@quansitech/antd-admin 1.1.47 → 1.1.48

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.
@@ -291,6 +291,9 @@ export function getValueByPath(obj, path) {
291
291
  return current;
292
292
  }
293
293
  export function renderTextarea(text) {
294
+ if (typeof text !== 'string') {
295
+ text = '-';
296
+ }
294
297
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
295
298
  style: {
296
299
  whiteSpace: 'pre-wrap'
@@ -65,7 +65,6 @@ var handleUploadRules = function handleUploadRules(rules) {
65
65
  rules.push({
66
66
  validator: uploadValidator
67
67
  });
68
- console.log(rules);
69
68
  return rules;
70
69
  };
71
70
  export var commonHandler = function commonHandler(schema) {
@@ -143,8 +142,8 @@ export var schemaHandler = {
143
142
  return _objectSpread({}, schema);
144
143
  },
145
144
  textarea: function textarea(schema) {
146
- schema.renderText = function (text) {
147
- return renderTextarea(text);
145
+ schema.render = function (dom, entity, index, action, schema) {
146
+ return renderTextarea((entity === null || entity === void 0 ? void 0 : entity[schema.dataIndex]) || entity.value);
148
147
  };
149
148
  return _objectSpread({}, schema);
150
149
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quansitech/antd-admin",
3
- "version": "1.1.47",
3
+ "version": "1.1.48",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"