@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.
- package/dist/lib/helpers.js +3 -0
- package/dist/lib/schemaHandler.js +2 -3
- package/package.json +1 -1
package/dist/lib/helpers.js
CHANGED
|
@@ -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.
|
|
147
|
-
return renderTextarea(
|
|
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
|
},
|