ztxkui 4.2.23-570 → 4.2.23-571

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.
@@ -307,6 +307,24 @@ function useColumns(tableHandleRef) {
307
307
  } }));
308
308
  },
309
309
  },
310
+ {
311
+ title: i18next.t('税率'),
312
+ width: 140,
313
+ dataIndex: 'taxRate',
314
+ key: 'taxRate',
315
+ shouldCellUpdate: function (record, preRecord) {
316
+ return (record === null || record === void 0 ? void 0 : record.taxRate) !== (preRecord === null || preRecord === void 0 ? void 0 : preRecord.taxRate);
317
+ },
318
+ render: function (text) { return (text ? exactRound(text, 2) : text); },
319
+ },
320
+ {
321
+ title: i18next.t('计价数量'),
322
+ width: 140,
323
+ dataIndex: 'valuationQuantity',
324
+ key: 'valuationQuantity',
325
+ required: true,
326
+ render: function (text) { return (text ? exactRound(text, quantity_precision) : text); },
327
+ },
310
328
  ];
311
329
  useEffect(function () {
312
330
  setTimeout(function () {
@@ -22,6 +22,8 @@ export declare const data2: {
22
22
  test4: number;
23
23
  test5: number;
24
24
  test3: string;
25
+ taxRate: string;
26
+ valuationQuantity: string;
25
27
  }[];
26
28
  export declare const data3: {
27
29
  id: string;
@@ -31,4 +33,6 @@ export declare const data3: {
31
33
  test4: number;
32
34
  test5: number;
33
35
  test3: string;
36
+ taxRate: string;
37
+ valuationQuantity: string;
34
38
  }[];
@@ -44,6 +44,8 @@ export var data2 = new Array(29).fill(1).map(function (item, index) {
44
44
  test4: index + 100,
45
45
  test5: index,
46
46
  test3: index === 20 ? null : '14,855.00',
47
+ taxRate: '0.060000',
48
+ valuationQuantity: '1.9999',
47
49
  };
48
50
  });
49
51
  data2[0].test4 = 22;
@@ -119,7 +119,9 @@ var TableMenu = function (_a) {
119
119
  // 做列合并时,render返回的是一个对象
120
120
  return (React.createElement(Descriptions.Item, { key: item.key, label: React.createElement("span", { style: { display: 'flex', alignItems: 'center' } },
121
121
  React.createElement("span", { style: { color: 'red' } }, item.validate ? '*' : ''),
122
- item.label) }, isValidElement(renderItem) ? (renderItem) : isValidElement(renderItem === null || renderItem === void 0 ? void 0 : renderItem.children) ? (renderItem === null || renderItem === void 0 ? void 0 : renderItem.children) : (React.createElement("span", { title: currentRecord[item.key] }, currentRecord[item.key]))));
122
+ item.label) }, isValidElement(renderItem) ? (renderItem) : isValidElement(renderItem === null || renderItem === void 0 ? void 0 : renderItem.children) ? (renderItem === null || renderItem === void 0 ? void 0 : renderItem.children) : renderItem != null && typeof renderItem !== 'object' ? (
123
+ // render返回了string或number,直接渲染该值
124
+ renderItem) : (React.createElement("span", { title: currentRecord[item.key] }, currentRecord[item.key]))));
123
125
  });
124
126
  }
125
127
  return (React.createElement(React.Fragment, null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "4.2.23-570",
3
+ "version": "4.2.23-571",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",