@hzab/list-render 1.10.13 → 1.10.14

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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
- # @hzab/list-render@1.10.12
1
+ # @hzab/list-render@1.10.14
2
2
 
3
- fix: 首次列表加载携带queryFormInitialValues的参数
3
+ fix: table function title input 输入中文异常修复
4
+
5
+ # @hzab/list-render@1.10.13
6
+
7
+ fix: 首次列表加载携带 queryFormInitialValues 的参数
4
8
  feat: schema title 支持传入 ReactNode,支持通过 schemaScope 传入
5
9
  fix: table 响应数据 去除 inTable == false 的字段
6
10
  fix: table 响应表单 FormilyField 环境变量 scenario: "tableReactionsForm"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.10.13",
3
+ "version": "1.10.14",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -135,19 +135,6 @@ const TableRender = forwardRef(function (props, tableRef) {
135
135
  const { name, title } = field;
136
136
  const comName = field["x-component"];
137
137
 
138
- const decoratorProps = field["x-decorator-props"] || {};
139
- let _title = isFunction(title) ? title() : title;
140
- if (decoratorProps.tooltip) {
141
- _title = (
142
- <span className="col-title-tooltip-wrap inline-block-max-w">
143
- {_title}
144
- <Tooltip className="col-title-tooltip" title={decoratorProps.tooltip}>
145
- <QuestionCircleOutlined className="col-title-tooltip-icon" />
146
- </Tooltip>
147
- </span>
148
- );
149
- }
150
-
151
138
  let _colConf = {};
152
139
 
153
140
  if (props.config?.colConf && props.config?.colConf[name]) {
@@ -217,6 +204,22 @@ const TableRender = forwardRef(function (props, tableRef) {
217
204
  };
218
205
  }
219
206
 
207
+ let _title = isFunction(title) ? title() : title;
208
+ if (_colConf?.title) {
209
+ _title = isFunction(_colConf?.title) ? _colConf?.title() : _colConf?.title;
210
+ }
211
+ const decoratorProps = field["x-decorator-props"] || {};
212
+ if (decoratorProps.tooltip) {
213
+ _title = (
214
+ <span className="col-title-tooltip-wrap inline-block-max-w">
215
+ {_title}
216
+ <Tooltip className="col-title-tooltip" title={decoratorProps.tooltip}>
217
+ <QuestionCircleOutlined className="col-title-tooltip-icon" />
218
+ </Tooltip>
219
+ </span>
220
+ );
221
+ }
222
+
220
223
  columns.push({
221
224
  // field, // HACK: 直接传入 field 在 title 传入 ReactNode,内部深克隆导致页面报错白屏。使用函数获取解决
222
225
  getField: () => field,
@@ -224,8 +227,8 @@ const TableRender = forwardRef(function (props, tableRef) {
224
227
  ..._colConf,
225
228
  onCell: (record, rowIndex) =>
226
229
  _colConf?.onCell?.({ ...record, _field: { ...field, ...(fieldSchemas?.[name] || {}) } }, rowIndex) || {},
227
- // 函数式传入,解决 title ReactNode 传入报错问题
228
- title: () => (isFunction(_colConf?.title) ? _colConf?.title() : _title),
230
+ // 函数式传入,解决 title ReactNode 传入报错问题(table 组件内部对 columns 进行 lodash.deepClone 导致 ReactNode 变成对象无法正常渲染) Uncaught TypeError: this.queryFeedbacks is not a function
231
+ title: () => _title,
229
232
  key: name,
230
233
  dataIndex: name,
231
234
  render: getColRender(colRender),