hfn-components 0.7.2 → 0.7.4

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.
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
34
34
  };
35
35
  }>>, {
36
36
  readonly text: string | number | undefined;
37
- readonly dealType: "colorPercentage" | "percentage" | "basicText4" | "notProcessed" | "colorText" | "percentage4" | "absPercentage" | "thousandText2" | "thousandText4" | "other" | "customDeal" | "customSlot";
37
+ readonly dealType: "colorPercentage" | "percentage" | "basicText4" | "notProcessed" | "colorText" | "percentage4" | "absPercentage" | "thousandText2" | "thousandText4" | "thoundsandText2" | "other" | "customDeal" | "customSlot";
38
38
  readonly dealFunction: Function;
39
39
  readonly row: Record<string, any>;
40
40
  }, {}>;
@@ -132,7 +132,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
132
132
  /* TEXT */
133
133
  )) : item.dealType === "customSlot" ? renderSlot(_ctx.$slots, item.slot, {
134
134
  key: 1,
135
- text: item.dataKey ? scope.row[item.dataKey] : scope.row[item.key],
135
+ text: item.dataKey ? scope.row[item.dataKey] : $setup.convertKey(scope.row, item.key),
136
136
  row: scope.row
137
137
  }) : item.dealType === "other" ? (openBlock(), createBlock($setup["ColumnDeal"], {
138
138
  key: 2,
@@ -140,6 +140,7 @@ export declare const CLOUMN_DEAL: {
140
140
  absPercentage: (val: number | string | undefined) => string;
141
141
  thousandText2: (val: number | string | undefined) => string;
142
142
  thousandText4: (val: number | string | undefined) => string;
143
+ thoundsandText2: (val: number | string | undefined) => string;
143
144
  notProcessed: null;
144
145
  other: null;
145
146
  customDeal: null;
@@ -1,4 +1,4 @@
1
- import { thousandText4, thousandText2, absPercentage, percentage4, percentage, basicText4 } from '../utils/table.mjs';
1
+ import { thousandText2, thousandText4, absPercentage, percentage4, percentage, basicText4 } from '../utils/table.mjs';
2
2
 
3
3
  const TABLE_KEY_BASE = {
4
4
  index: "\u5E8F\u53F7",
@@ -183,6 +183,7 @@ const CLOUMN_DEAL = {
183
183
  absPercentage,
184
184
  thousandText2,
185
185
  thousandText4,
186
+ thoundsandText2: thousandText2,
186
187
  notProcessed: null,
187
188
  other: null,
188
189
  customDeal: null,
@@ -3,6 +3,7 @@ import '../constants/chartConfig.mjs';
3
3
  import { splitK, dataHandle } from './tool.mjs';
4
4
 
5
5
  const convertKey = (data, key) => {
6
+ if (!data || !key) return void 0;
6
7
  const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
7
8
  return data[key] || data[newKey];
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "",
5
5
  "main": "es/index.mjs",
6
6
  "module": "es/index.mjs",