hfn-components 0.2.9 → 0.3.1

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.
@@ -51,6 +51,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
51
51
  readonly type: BooleanConstructor;
52
52
  readonly default: true;
53
53
  };
54
+ readonly auxiliaryData: {
55
+ readonly type: ObjectConstructor;
56
+ readonly default: null;
57
+ };
54
58
  readonly downLoadAutn: {
55
59
  readonly type: BooleanConstructor;
56
60
  readonly default: false;
@@ -74,6 +78,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
74
78
  readonly tooltipUnit: string;
75
79
  readonly watchResize: boolean;
76
80
  readonly showLegend: boolean;
81
+ readonly auxiliaryData: Record<string, any>;
77
82
  readonly downLoadAutn: boolean;
78
83
  readonly lineColor: string[];
79
84
  } & {}>;
@@ -142,6 +147,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
142
147
  readonly type: BooleanConstructor;
143
148
  readonly default: true;
144
149
  };
150
+ readonly auxiliaryData: {
151
+ readonly type: ObjectConstructor;
152
+ readonly default: null;
153
+ };
145
154
  readonly downLoadAutn: {
146
155
  readonly type: BooleanConstructor;
147
156
  readonly default: false;
@@ -164,6 +173,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
164
173
  readonly tooltipUnit: string;
165
174
  readonly watchResize: boolean;
166
175
  readonly showLegend: boolean;
176
+ readonly auxiliaryData: Record<string, any>;
167
177
  readonly downLoadAutn: boolean;
168
178
  readonly lineColor: string[];
169
179
  }, {}>> & Record<string, any>;
@@ -53,6 +53,10 @@ export declare const chartProps: {
53
53
  readonly type: BooleanConstructor;
54
54
  readonly default: true;
55
55
  };
56
+ readonly auxiliaryData: {
57
+ readonly type: ObjectConstructor;
58
+ readonly default: null;
59
+ };
56
60
  readonly downLoadAutn: {
57
61
  readonly type: BooleanConstructor;
58
62
  readonly default: false;
@@ -63,6 +63,11 @@ const chartProps = {
63
63
  type: Boolean,
64
64
  default: true
65
65
  },
66
+ //堆叠辅助数据
67
+ auxiliaryData: {
68
+ type: Object,
69
+ default: null
70
+ },
66
71
  //数据下载
67
72
  downLoadAutn: {
68
73
  type: Boolean,
@@ -58,6 +58,10 @@ declare const _default: import("vue").DefineComponent<{
58
58
  readonly type: BooleanConstructor;
59
59
  readonly default: true;
60
60
  };
61
+ readonly auxiliaryData: {
62
+ readonly type: ObjectConstructor;
63
+ readonly default: null;
64
+ };
61
65
  readonly downLoadAutn: {
62
66
  readonly type: BooleanConstructor;
63
67
  readonly default: false;
@@ -81,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
81
85
  readonly tooltipUnit: string;
82
86
  readonly watchResize: boolean;
83
87
  readonly showLegend: boolean;
88
+ readonly auxiliaryData: Record<string, any>;
84
89
  readonly downLoadAutn: boolean;
85
90
  readonly lineColor: string[];
86
91
  } & {}>;
@@ -149,6 +154,10 @@ declare const _default: import("vue").DefineComponent<{
149
154
  readonly type: BooleanConstructor;
150
155
  readonly default: true;
151
156
  };
157
+ readonly auxiliaryData: {
158
+ readonly type: ObjectConstructor;
159
+ readonly default: null;
160
+ };
152
161
  readonly downLoadAutn: {
153
162
  readonly type: BooleanConstructor;
154
163
  readonly default: false;
@@ -171,6 +180,7 @@ declare const _default: import("vue").DefineComponent<{
171
180
  readonly tooltipUnit: string;
172
181
  readonly watchResize: boolean;
173
182
  readonly showLegend: boolean;
183
+ readonly auxiliaryData: Record<string, any>;
174
184
  readonly downLoadAutn: boolean;
175
185
  readonly lineColor: string[];
176
186
  }, {}>;
@@ -85,6 +85,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
85
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
86
86
  ]);
87
87
  }
88
- var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/chart/src/HtChart.vue"]]);
88
+ var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/chart/src/HtChart.vue"]]);
89
89
 
90
90
  export { chart as default };
@@ -17,6 +17,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  watch(
18
18
  () => props.chartData,
19
19
  (val) => {
20
+ console.log(val);
20
21
  echartOptions.series = cloneDeep(val);
21
22
  drawGraph();
22
23
  },
@@ -708,18 +708,22 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
708
708
  readonly convertKey: (data: any, key: string) => any;
709
709
  ColumnDeal: import("vue").DefineComponent<{
710
710
  readonly dealType: {
711
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
711
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
712
712
  readonly default: "";
713
713
  };
714
714
  readonly text: {
715
715
  readonly type: import("vue").PropType<string | number | undefined>;
716
716
  readonly default: undefined;
717
717
  };
718
+ readonly dealFunction: {
719
+ readonly type: FunctionConstructor;
720
+ readonly default: () => () => void;
721
+ };
722
+ readonly row: {
723
+ readonly type: ObjectConstructor;
724
+ readonly default: () => void;
725
+ };
718
726
  }, {
719
- props: import("@vue/shared").LooseRequired<{
720
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other";
721
- readonly text?: string | number | undefined;
722
- } & {}>;
723
727
  readonly CLOUMN_DEAL: {
724
728
  basicText4: (val: string | number | undefined) => string;
725
729
  colorText: (val: string | number | undefined) => string;
@@ -728,21 +732,33 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
728
732
  percentage4: (val: string | number | undefined) => string;
729
733
  absPercentage: (val: string | number | undefined) => string;
730
734
  thoundsandText2: (val: string | number | undefined) => string;
735
+ thoundsandText4: (val: string | number | undefined) => string;
731
736
  notProcessed: null;
732
737
  other: null;
738
+ customDeal: null;
733
739
  };
734
740
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
735
741
  readonly dealType: {
736
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
742
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
737
743
  readonly default: "";
738
744
  };
739
745
  readonly text: {
740
746
  readonly type: import("vue").PropType<string | number | undefined>;
741
747
  readonly default: undefined;
742
748
  };
749
+ readonly dealFunction: {
750
+ readonly type: FunctionConstructor;
751
+ readonly default: () => () => void;
752
+ };
753
+ readonly row: {
754
+ readonly type: ObjectConstructor;
755
+ readonly default: () => void;
756
+ };
743
757
  }>>, {
744
758
  readonly text: string | number | undefined;
745
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other";
759
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal";
760
+ readonly dealFunction: Function;
761
+ readonly row: Record<string, any>;
746
762
  }, {}>;
747
763
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
748
764
  readonly dataSource: {
@@ -1,17 +1,21 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  readonly dealType: {
3
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
3
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
4
4
  readonly default: "";
5
5
  };
6
6
  readonly text: {
7
7
  readonly type: import("vue").PropType<string | number | undefined>;
8
8
  readonly default: undefined;
9
9
  };
10
+ readonly dealFunction: {
11
+ readonly type: FunctionConstructor;
12
+ readonly default: () => () => void;
13
+ };
14
+ readonly row: {
15
+ readonly type: ObjectConstructor;
16
+ readonly default: () => void;
17
+ };
10
18
  }, {
11
- props: import("@vue/shared").LooseRequired<{
12
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other";
13
- readonly text?: string | number | undefined;
14
- } & {}>;
15
19
  readonly CLOUMN_DEAL: {
16
20
  basicText4: (val: string | number | undefined) => string;
17
21
  colorText: (val: string | number | undefined) => string;
@@ -20,20 +24,32 @@ declare const _default: import("vue").DefineComponent<{
20
24
  percentage4: (val: string | number | undefined) => string;
21
25
  absPercentage: (val: string | number | undefined) => string;
22
26
  thoundsandText2: (val: string | number | undefined) => string;
27
+ thoundsandText4: (val: string | number | undefined) => string;
23
28
  notProcessed: null;
24
29
  other: null;
30
+ customDeal: null;
25
31
  };
26
32
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
33
  readonly dealType: {
28
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
34
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
29
35
  readonly default: "";
30
36
  };
31
37
  readonly text: {
32
38
  readonly type: import("vue").PropType<string | number | undefined>;
33
39
  readonly default: undefined;
34
40
  };
41
+ readonly dealFunction: {
42
+ readonly type: FunctionConstructor;
43
+ readonly default: () => () => void;
44
+ };
45
+ readonly row: {
46
+ readonly type: ObjectConstructor;
47
+ readonly default: () => void;
48
+ };
35
49
  }>>, {
36
50
  readonly text: string | number | undefined;
37
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other";
51
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal";
52
+ readonly dealFunction: Function;
53
+ readonly row: Record<string, any>;
38
54
  }, {}>;
39
55
  export default _default;
@@ -4,32 +4,36 @@ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
4
4
 
5
5
  const _hoisted_1 = { key: 0 };
6
6
  const _hoisted_2 = { key: 1 };
7
- const _hoisted_3 = { key: 2 };
7
+ const _hoisted_3 = ["innerHTML"];
8
+ const _hoisted_4 = { key: 3 };
8
9
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9
- return $setup.props.dealType === "notProcessed" || $setup.props.dealType === "other" ? (openBlock(), createElementBlock(
10
+ return _ctx.dealType === "notProcessed" || _ctx.dealType === "other" ? (openBlock(), createElementBlock(
10
11
  "div",
11
12
  _hoisted_1,
12
- toDisplayString($setup.props.text),
13
+ toDisplayString(_ctx.text),
13
14
  1
14
15
  /* TEXT */
15
- )) : $setup.props.dealType === "colorText" || $setup.props.dealType === "colorPercentage" ? (openBlock(), createElementBlock("div", _hoisted_2, [
16
+ )) : _ctx.dealType === "colorText" || _ctx.dealType === "colorPercentage" ? (openBlock(), createElementBlock("div", _hoisted_2, [
16
17
  createElementVNode(
17
18
  "span",
18
19
  {
19
- style: normalizeStyle({ color: $setup.props.text > 0 ? "red" : $setup.props.text < 0 ? "green" : "" })
20
+ style: normalizeStyle({ color: _ctx.text > 0 ? "red" : _ctx.text < 0 ? "green" : "" })
20
21
  },
21
- toDisplayString($setup.props.text !== void 0 ? $setup.CLOUMN_DEAL[$setup.props.dealType]($setup.props.text) : "-"),
22
+ toDisplayString(_ctx.text !== void 0 ? $setup.CLOUMN_DEAL[_ctx.dealType](_ctx.text) : "-"),
22
23
  5
23
24
  /* TEXT, STYLE */
24
25
  )
25
- ])) : (openBlock(), createElementBlock(
26
+ ])) : _ctx.dealType === "customDeal" ? (openBlock(), createElementBlock("div", {
27
+ key: 2,
28
+ innerHTML: _ctx.dealFunction(_ctx.row)()
29
+ }, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(
26
30
  "div",
27
- _hoisted_3,
28
- toDisplayString($setup.props.text !== void 0 ? $setup.CLOUMN_DEAL[$setup.props.dealType]($setup.props.text) : "-"),
31
+ _hoisted_4,
32
+ toDisplayString(_ctx.text !== void 0 ? $setup.CLOUMN_DEAL[_ctx.dealType](_ctx.text) : "-"),
29
33
  1
30
34
  /* TEXT */
31
35
  ));
32
36
  }
33
- var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/columnDeal.vue"]]);
37
+ var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/columnDeal.vue"]]);
34
38
 
35
39
  export { ColumnDeal as default };
@@ -8,8 +8,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  props: columnDealProps,
9
9
  setup(__props, { expose: __expose }) {
10
10
  __expose();
11
- const props = __props;
12
- const __returned__ = { props, get CLOUMN_DEAL() {
11
+ const __returned__ = { get CLOUMN_DEAL() {
13
12
  return CLOUMN_DEAL;
14
13
  } };
15
14
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
@@ -3,6 +3,7 @@ import type { clounmKyeType, dealKeyType } from 'hfn-components/es/constants';
3
3
  export interface ElTableColumns {
4
4
  key: clounmKyeType;
5
5
  dealType: dealKeyType;
6
+ dealFunction?: Function;
6
7
  width: string | number;
7
8
  customizeLabel?: string;
8
9
  }
@@ -26,13 +27,21 @@ export declare const elTableProps: {
26
27
  };
27
28
  export declare const columnDealProps: {
28
29
  readonly dealType: {
29
- readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
30
+ readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
30
31
  readonly default: "";
31
32
  };
32
33
  readonly text: {
33
34
  readonly type: PropType<string | number | undefined>;
34
35
  readonly default: undefined;
35
36
  };
37
+ readonly dealFunction: {
38
+ readonly type: FunctionConstructor;
39
+ readonly default: () => () => void;
40
+ };
41
+ readonly row: {
42
+ readonly type: ObjectConstructor;
43
+ readonly default: () => void;
44
+ };
36
45
  };
37
46
  export type ElTableProps = ExtractPropTypes<typeof elTableProps>;
38
47
  export type ColumnDealProps = ExtractPropTypes<typeof columnDealProps>;
@@ -24,6 +24,16 @@ const columnDealProps = {
24
24
  text: {
25
25
  type: [String, Number],
26
26
  default: void 0
27
+ },
28
+ dealFunction: {
29
+ type: Function,
30
+ default: () => () => {
31
+ }
32
+ },
33
+ row: {
34
+ type: Object,
35
+ default: () => {
36
+ }
27
37
  }
28
38
  };
29
39
 
@@ -708,18 +708,22 @@ declare const _default: import("vue").DefineComponent<{
708
708
  readonly convertKey: (data: any, key: string) => any;
709
709
  ColumnDeal: import("vue").DefineComponent<{
710
710
  readonly dealType: {
711
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
711
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
712
712
  readonly default: "";
713
713
  };
714
714
  readonly text: {
715
715
  readonly type: import("vue").PropType<string | number | undefined>;
716
716
  readonly default: undefined;
717
717
  };
718
+ readonly dealFunction: {
719
+ readonly type: FunctionConstructor;
720
+ readonly default: () => () => void;
721
+ };
722
+ readonly row: {
723
+ readonly type: ObjectConstructor;
724
+ readonly default: () => void;
725
+ };
718
726
  }, {
719
- props: import("@vue/shared").LooseRequired<{
720
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other";
721
- readonly text?: string | number | undefined;
722
- } & {}>;
723
727
  readonly CLOUMN_DEAL: {
724
728
  basicText4: (val: string | number | undefined) => string;
725
729
  colorText: (val: string | number | undefined) => string;
@@ -728,21 +732,33 @@ declare const _default: import("vue").DefineComponent<{
728
732
  percentage4: (val: string | number | undefined) => string;
729
733
  absPercentage: (val: string | number | undefined) => string;
730
734
  thoundsandText2: (val: string | number | undefined) => string;
735
+ thoundsandText4: (val: string | number | undefined) => string;
731
736
  notProcessed: null;
732
737
  other: null;
738
+ customDeal: null;
733
739
  };
734
740
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
735
741
  readonly dealType: {
736
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other">;
742
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
737
743
  readonly default: "";
738
744
  };
739
745
  readonly text: {
740
746
  readonly type: import("vue").PropType<string | number | undefined>;
741
747
  readonly default: undefined;
742
748
  };
749
+ readonly dealFunction: {
750
+ readonly type: FunctionConstructor;
751
+ readonly default: () => () => void;
752
+ };
753
+ readonly row: {
754
+ readonly type: ObjectConstructor;
755
+ readonly default: () => void;
756
+ };
743
757
  }>>, {
744
758
  readonly text: string | number | undefined;
745
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "notProcessed" | "other";
759
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal";
760
+ readonly dealFunction: Function;
761
+ readonly row: Record<string, any>;
746
762
  }, {}>;
747
763
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
748
764
  readonly dataSource: {
@@ -34,8 +34,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
34
34
  }, null, 8, ["dealType", "text"])) : (openBlock(), createBlock($setup["ColumnDeal"], {
35
35
  key: 1,
36
36
  dealType: item.dealType,
37
- text: $setup.convertKey(scope.row, item.key)
38
- }, null, 8, ["dealType", "text"]))
37
+ text: $setup.convertKey(scope.row, item.key),
38
+ row: scope.row,
39
+ "deal-function": item.dealFunction
40
+ }, null, 8, ["dealType", "text", "row", "deal-function"]))
39
41
  ]),
40
42
  _: 2
41
43
  /* DYNAMIC */
@@ -51,6 +53,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
51
53
  [$setup["vLoading"], $setup.props.loading]
52
54
  ]);
53
55
  }
54
- var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/elTable.vue"]]);
56
+ var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/elTable.vue"]]);
55
57
 
56
58
  export { elTable as default };
@@ -199,6 +199,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
199
199
  }, 8, ["modelValue"])
200
200
  ]);
201
201
  }
202
- var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/htTarget/src/htTarget.vue"]]);
202
+ var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/htTarget/src/htTarget.vue"]]);
203
203
 
204
204
  export { htTarget as default };
@@ -18,6 +18,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18
18
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_3, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
19
19
  ]);
20
20
  }
21
- var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
21
+ var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
22
22
 
23
23
  export { htPieChart as default };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, shallowRef, reactive, watch, ref } from 'vue';
2
2
  import { pieProps } from './HtPieChart.mjs';
3
3
  import cloneDeep from 'lodash.clonedeep';
4
- import { BASIC_PIE_CONFIG } from '../../../constants/chartConfig.mjs';
4
+ import { useBasicPieConfig } from '../../../constants/chartConfig.mjs';
5
5
  import * as echarts from 'echarts/core';
6
6
 
7
7
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -11,7 +11,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  __expose();
12
12
  const props = __props;
13
13
  const myChart = shallowRef();
14
- const echartOptions = reactive(cloneDeep(BASIC_PIE_CONFIG));
14
+ const echartOptions = reactive(cloneDeep(useBasicPieConfig(props.floatNumber)));
15
15
  watch(
16
16
  () => props.chartData,
17
17
  (val) => {
@@ -86,7 +86,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  myChart.value.setOption(echartOptions, true);
87
87
  }, 200);
88
88
  };
89
- console.log(echarts);
90
89
  const __returned__ = { props, myChart, echartOptions, chartResize, noData, drawGraph, setLenged, setEchartTooltip, echartInit };
91
90
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
92
91
  return __returned__;
@@ -444,6 +444,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
444
444
  /* STABLE_FRAGMENT */
445
445
  );
446
446
  }
447
- var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/table/HtTable.vue"]]);
447
+ var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/table/HtTable.vue"]]);
448
448
 
449
449
  export { Table as default };
@@ -5,4 +5,4 @@ import type { ComposeOption } from 'echarts/core';
5
5
  export type ECOption = ComposeOption<BarSeriesOption | LineSeriesOption | TitleComponentOption | TooltipComponentOption | GridComponentOption | DatasetComponentOption>;
6
6
  export default echarts;
7
7
  export declare const BASIC_CHART_CONFIG: any;
8
- export declare const BASIC_PIE_CONFIG: any;
8
+ export declare const useBasicPieConfig: any;
@@ -85,7 +85,7 @@ const BASIC_CHART_CONFIG = {
85
85
  ],
86
86
  series: []
87
87
  };
88
- const BASIC_PIE_CONFIG = {
88
+ const useBasicPieConfig = (floatNumber = 2) => ({
89
89
  series: [
90
90
  {
91
91
  name: "",
@@ -95,7 +95,7 @@ const BASIC_PIE_CONFIG = {
95
95
  label: {
96
96
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
97
97
  formatter: function(params) {
98
- const val = params.data.percent ? (params.data.percent * 100).toFixed(2) : params.percent.toFixed(2);
98
+ const val = params.data.percent ? (params.data.percent * 100).toFixed(floatNumber) : params.percent.toFixed(floatNumber);
99
99
  return ` ${params.name}: ${val}%`;
100
100
  },
101
101
  fontWeight: "bolder",
@@ -104,6 +104,6 @@ const BASIC_PIE_CONFIG = {
104
104
  data: []
105
105
  }
106
106
  ]
107
- };
107
+ });
108
108
 
109
- export { BASIC_CHART_CONFIG, BASIC_PIE_CONFIG };
109
+ export { BASIC_CHART_CONFIG, useBasicPieConfig };
@@ -1,4 +1,4 @@
1
1
  export { INSTALLED_KEY } from './key.mjs';
2
2
  export { CLOUMN_DEAL, TABLE_KEY, convertKey } from './table.mjs';
3
3
  export { BASIC_KEY, TARGET_END_KEY, TARGET_HEAD_KEY } from './target.mjs';
4
- export { BASIC_CHART_CONFIG, BASIC_PIE_CONFIG } from './chartConfig.mjs';
4
+ export { BASIC_CHART_CONFIG, useBasicPieConfig } from './chartConfig.mjs';
@@ -110,8 +110,10 @@ export declare const CLOUMN_DEAL: {
110
110
  percentage4: (val: number | string | undefined) => string;
111
111
  absPercentage: (val: number | string | undefined) => string;
112
112
  thoundsandText2: (val: number | string | undefined) => string;
113
+ thoundsandText4: (val: number | string | undefined) => string;
113
114
  notProcessed: null;
114
115
  other: null;
116
+ customDeal: null;
115
117
  };
116
118
  export declare const convertKey: (data: any, key: string) => any;
117
119
  export type clounmKyeType = keyof typeof TABLE_KEY;
@@ -125,6 +125,9 @@ const absPercentage = (val) => {
125
125
  const thoundsandText2 = (val) => {
126
126
  return typeof val === "number" ? splitK(dataHandle(val, false, 2)) : "-";
127
127
  };
128
+ const thoundsandText4 = (val) => {
129
+ return typeof val === "number" ? splitK(dataHandle(val, false, 4)) : "-";
130
+ };
128
131
  const CLOUMN_DEAL = {
129
132
  basicText4,
130
133
  colorText: basicText4,
@@ -133,8 +136,10 @@ const CLOUMN_DEAL = {
133
136
  percentage4,
134
137
  absPercentage,
135
138
  thoundsandText2,
139
+ thoundsandText4,
136
140
  notProcessed: null,
137
- other: null
141
+ other: null,
142
+ customDeal: null
138
143
  };
139
144
  const convertKey = (data, key) => {
140
145
  const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
@@ -0,0 +1,59 @@
1
+ .echart-box {
2
+ width: 100%;
3
+ height: 100%;
4
+ display: flex;
5
+ flex-direction: column;
6
+ position: relative;
7
+ }
8
+
9
+ .echart-content {
10
+ flex: auto;
11
+ }
12
+
13
+ .echart-lenged {
14
+ width: 100%;
15
+ height: auto;
16
+ margin-top: 6px;
17
+ padding-right: 22px;
18
+ box-sizing: border-box;
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ font-size: 12px;
22
+ position: relative;
23
+ z-index: 999;
24
+ }
25
+
26
+ .bg-span {
27
+ display: inline-block;
28
+ width: 14px;
29
+ height: 2px;
30
+ margin-right: 6px;
31
+ }
32
+
33
+ .bg-span-bar {
34
+ display: inline-block;
35
+ width: 16px;
36
+ height: 10px;
37
+ border-radius: 2px;
38
+ margin-right: 6px;
39
+ }
40
+
41
+ .span-box {
42
+ margin-left: 5px;
43
+ margin-right: 6px;
44
+ cursor: pointer;
45
+ display: flex;
46
+ align-items: center;
47
+ }
48
+
49
+ .noData {
50
+ width: 100%;
51
+ height: 100%;
52
+ font-size: 16px;
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ position: absolute;
57
+ bottom: 0px;
58
+ color: #ccc;
59
+ }
@@ -66,6 +66,7 @@ const setEchartXAxis = (options, type, xAxisData) => {
66
66
  options.xAxis = {
67
67
  type,
68
68
  data: xAxis,
69
+ boundaryGap: true,
69
70
  axisTick: {
70
71
  alignWithLabel: true
71
72
  }
@@ -138,6 +139,11 @@ const setEchartTooltip = (options, props) => {
138
139
  html += `<span style='color:${params[i].color}'>
139
140
  ${params[i].seriesName}</span>\uFF1A${params[i].value[1].toFixed(2)}%
140
141
  `;
142
+ } else if (props.chartType === "category") {
143
+ console.log(props.auxiliaryData);
144
+ html += `<span style='color:${params[i].color}'>
145
+ ${params[i].seriesName}</span>\uFF1A${props.auxiliaryData[params[i].seriesName][params[0].name]}(${params[i].value || params[i].value === 0 ? Number(params[i].value).toFixed(props.floatNumber) : ""}%)
146
+ `;
141
147
  } else {
142
148
  html += `<span style='color:${params[i].color}'>${params[i].seriesName}</span>\uFF1A${params[i].value[2]?.toFixed(props.floatNumber)}\uFF08${params[i].value[1] > 0 ? "+" : ""}${params[i].value[1]}%\uFF09`;
143
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.2.9",
3
+ "version": "0.3.1",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",