hfn-components 0.2.3 → 0.2.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.
@@ -86,6 +86,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
86
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
87
87
  ]);
88
88
  }
89
- var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/chart/src/HtChart.vue"]]);
89
+ var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/chart/src/HtChart.vue"]]);
90
90
 
91
91
  export { chart as default };
@@ -34,11 +34,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  () => props.lineColor,
35
35
  () => {
36
36
  echartOptions.color = props.lineColor;
37
- if (myChart.value) {
38
- echartInit();
39
- }
37
+ echartInit();
40
38
  },
41
- { deep: true, immediate: true }
39
+ { deep: true }
42
40
  );
43
41
  const drawGraph = () => {
44
42
  echartOptions.color = props.lineColor;
@@ -64,7 +62,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
64
62
  setTimeout(() => {
65
63
  if (!myChart.value) {
66
64
  const ele = document.getElementById(props.chartId);
67
- myChart.value = echarts.init(ele, null, { devicePixelRatio: 2, locale: "ZH" });
65
+ myChart.value = echarts.init(ele, null, { devicePixelRatio: 2 });
68
66
  }
69
67
  myChart.value.setOption(echartOptions, true);
70
68
  }, 200);
@@ -17,9 +17,9 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
17
17
  };
18
18
  }, {
19
19
  props: import("@vue/shared").LooseRequired<{
20
- readonly loading: boolean;
21
20
  readonly dataSource: unknown[];
22
21
  readonly tableColumn: import("./src/elTable").ElTableColumns[];
22
+ readonly loading: boolean;
23
23
  readonly headerColor: string;
24
24
  } & {}>;
25
25
  readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -653,7 +653,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
653
653
  readonly convertKey: (data: any, key: string) => any;
654
654
  ColumnDeal: import("vue").DefineComponent<{
655
655
  readonly dealType: {
656
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
656
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
657
657
  readonly default: "";
658
658
  };
659
659
  readonly text: {
@@ -662,7 +662,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
662
662
  };
663
663
  }, {
664
664
  props: import("@vue/shared").LooseRequired<{
665
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
665
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
666
666
  readonly text?: string | number | undefined;
667
667
  } & {}>;
668
668
  readonly CLOUMN_DEAL: {
@@ -670,12 +670,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
670
670
  colorText: (val: string | number | undefined) => string;
671
671
  colorPercentage: (val: string | number | undefined) => string;
672
672
  percentage: (val: string | number | undefined) => string;
673
- absPercentage: (val: string | number | undefined) => string;
674
673
  notProcessed: null;
675
674
  };
676
675
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
677
676
  readonly dealType: {
678
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
677
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
679
678
  readonly default: "";
680
679
  };
681
680
  readonly text: {
@@ -683,8 +682,8 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
683
682
  readonly default: undefined;
684
683
  };
685
684
  }>>, {
685
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
686
686
  readonly text: string | number | undefined;
687
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
688
687
  }, {}>;
689
688
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
690
689
  readonly dataSource: {
@@ -704,9 +703,9 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
704
703
  readonly default: "#f0f0f0";
705
704
  };
706
705
  }>>, {
707
- readonly loading: boolean;
708
706
  readonly dataSource: unknown[];
709
707
  readonly tableColumn: import("./src/elTable").ElTableColumns[];
708
+ readonly loading: boolean;
710
709
  readonly headerColor: string;
711
710
  }, {}>> & Record<string, any>;
712
711
  export default HtElTable;
@@ -1,6 +1,6 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  readonly dealType: {
3
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
3
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
4
4
  readonly default: "";
5
5
  };
6
6
  readonly text: {
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
9
9
  };
10
10
  }, {
11
11
  props: import("@vue/shared").LooseRequired<{
12
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
12
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
13
13
  readonly text?: string | number | undefined;
14
14
  } & {}>;
15
15
  readonly CLOUMN_DEAL: {
@@ -17,12 +17,11 @@ declare const _default: import("vue").DefineComponent<{
17
17
  colorText: (val: string | number | undefined) => string;
18
18
  colorPercentage: (val: string | number | undefined) => string;
19
19
  percentage: (val: string | number | undefined) => string;
20
- absPercentage: (val: string | number | undefined) => string;
21
20
  notProcessed: null;
22
21
  };
23
22
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
23
  readonly dealType: {
25
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
24
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
26
25
  readonly default: "";
27
26
  };
28
27
  readonly text: {
@@ -30,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
30
29
  readonly default: undefined;
31
30
  };
32
31
  }>>, {
32
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
33
33
  readonly text: string | number | undefined;
34
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
35
34
  }, {}>;
36
35
  export default _default;
@@ -30,6 +30,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
30
30
  /* TEXT */
31
31
  ));
32
32
  }
33
- var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/columnDeal.vue"]]);
33
+ var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/columnDeal.vue"]]);
34
34
 
35
35
  export { ColumnDeal as default };
@@ -26,7 +26,7 @@ export declare const elTableProps: {
26
26
  };
27
27
  export declare const columnDealProps: {
28
28
  readonly dealType: {
29
- readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
29
+ readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
30
30
  readonly default: "";
31
31
  };
32
32
  readonly text: {
@@ -17,9 +17,9 @@ declare const _default: import("vue").DefineComponent<{
17
17
  };
18
18
  }, {
19
19
  props: import("@vue/shared").LooseRequired<{
20
- readonly loading: boolean;
21
20
  readonly dataSource: unknown[];
22
21
  readonly tableColumn: import("./elTable").ElTableColumns[];
22
+ readonly loading: boolean;
23
23
  readonly headerColor: string;
24
24
  } & {}>;
25
25
  readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -653,7 +653,7 @@ declare const _default: import("vue").DefineComponent<{
653
653
  readonly convertKey: (data: any, key: string) => any;
654
654
  ColumnDeal: import("vue").DefineComponent<{
655
655
  readonly dealType: {
656
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
656
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
657
657
  readonly default: "";
658
658
  };
659
659
  readonly text: {
@@ -662,7 +662,7 @@ declare const _default: import("vue").DefineComponent<{
662
662
  };
663
663
  }, {
664
664
  props: import("@vue/shared").LooseRequired<{
665
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
665
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
666
666
  readonly text?: string | number | undefined;
667
667
  } & {}>;
668
668
  readonly CLOUMN_DEAL: {
@@ -670,12 +670,11 @@ declare const _default: import("vue").DefineComponent<{
670
670
  colorText: (val: string | number | undefined) => string;
671
671
  colorPercentage: (val: string | number | undefined) => string;
672
672
  percentage: (val: string | number | undefined) => string;
673
- absPercentage: (val: string | number | undefined) => string;
674
673
  notProcessed: null;
675
674
  };
676
675
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
677
676
  readonly dealType: {
678
- readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
677
+ readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
679
678
  readonly default: "";
680
679
  };
681
680
  readonly text: {
@@ -683,8 +682,8 @@ declare const _default: import("vue").DefineComponent<{
683
682
  readonly default: undefined;
684
683
  };
685
684
  }>>, {
685
+ readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
686
686
  readonly text: string | number | undefined;
687
- readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
688
687
  }, {}>;
689
688
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
690
689
  readonly dataSource: {
@@ -704,9 +703,9 @@ declare const _default: import("vue").DefineComponent<{
704
703
  readonly default: "#f0f0f0";
705
704
  };
706
705
  }>>, {
707
- readonly loading: boolean;
708
706
  readonly dataSource: unknown[];
709
707
  readonly tableColumn: import("./elTable").ElTableColumns[];
708
+ readonly loading: boolean;
710
709
  readonly headerColor: string;
711
710
  }, {}>;
712
711
  export default _default;
@@ -46,6 +46,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
46
46
  [$setup["vLoading"], $setup.props.loading]
47
47
  ]);
48
48
  }
49
- var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/elTable.vue"]]);
49
+ var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/elTable.vue"]]);
50
50
 
51
51
  export { elTable as default };
@@ -108,11 +108,11 @@ declare const _default: import("vue").DefineComponent<{
108
108
  };
109
109
  }, {
110
110
  props: import("@vue/shared").LooseRequired<{
111
+ readonly dataSource: unknown[];
111
112
  readonly loading: boolean;
112
113
  readonly pageSize: number;
113
114
  readonly total: number;
114
115
  readonly columns: TableColumns[];
115
- readonly dataSource: unknown[];
116
116
  readonly selectedKeys: (string | number)[];
117
117
  readonly actions: import("./HtTable").ActionItem[];
118
118
  readonly nowPage: number;
@@ -1817,11 +1817,11 @@ declare const _default: import("vue").DefineComponent<{
1817
1817
  onHandleSelectAll?: ((...args: any[]) => any) | undefined;
1818
1818
  onResizeColumn?: ((...args: any[]) => any) | undefined;
1819
1819
  }, {
1820
+ readonly dataSource: unknown[];
1820
1821
  readonly loading: boolean;
1821
1822
  readonly pageSize: number;
1822
1823
  readonly total: number;
1823
1824
  readonly columns: TableColumns[];
1824
- readonly dataSource: unknown[];
1825
1825
  readonly selectedKeys: (string | number)[];
1826
1826
  readonly actions: import("./HtTable").ActionItem[];
1827
1827
  readonly nowPage: number;
@@ -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 };
@@ -105,11 +105,11 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
105
105
  };
106
106
  }, {
107
107
  props: import("@vue/shared").LooseRequired<{
108
+ readonly dataSource: unknown[];
108
109
  readonly loading: boolean;
109
110
  readonly pageSize: number;
110
111
  readonly total: number;
111
112
  readonly columns: import("./HtTable").TableColumns[];
112
- readonly dataSource: unknown[];
113
113
  readonly selectedKeys: (string | number)[];
114
114
  readonly actions: import("./HtTable").ActionItem[];
115
115
  readonly nowPage: number;
@@ -1814,11 +1814,11 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1814
1814
  onHandleSelectAll?: ((...args: any[]) => any) | undefined;
1815
1815
  onResizeColumn?: ((...args: any[]) => any) | undefined;
1816
1816
  }, {
1817
+ readonly dataSource: unknown[];
1817
1818
  readonly loading: boolean;
1818
1819
  readonly pageSize: number;
1819
1820
  readonly total: number;
1820
1821
  readonly columns: import("./HtTable").TableColumns[];
1821
- readonly dataSource: unknown[];
1822
1822
  readonly selectedKeys: (string | number)[];
1823
1823
  readonly actions: import("./HtTable").ActionItem[];
1824
1824
  readonly nowPage: number;
@@ -52,7 +52,6 @@ export declare const CLOUMN_DEAL: {
52
52
  colorText: (val: number | string | undefined) => string;
53
53
  colorPercentage: (val: number | string | undefined) => string;
54
54
  percentage: (val: number | string | undefined) => string;
55
- absPercentage: (val: number | string | undefined) => string;
56
55
  notProcessed: null;
57
56
  };
58
57
  export declare const convertKey: (data: any, key: string) => any;
@@ -53,15 +53,11 @@ const basicText4 = (val) => {
53
53
  const percentage = (val) => {
54
54
  return val === "-" || val === void 0 ? "-" : (val * 100).toFixed(2) + "%";
55
55
  };
56
- const absPercentage = (val) => {
57
- return val === "-" || val === void 0 ? "-" : Math.abs(val * 100).toFixed(2) + "%";
58
- };
59
56
  const CLOUMN_DEAL = {
60
57
  basicText4,
61
58
  colorText: basicText4,
62
59
  colorPercentage: percentage,
63
60
  percentage,
64
- absPercentage,
65
61
  notProcessed: null
66
62
  };
67
63
  const convertKey = (data, key) => {
@@ -131,16 +131,7 @@ const setEchartTooltip = (options, props) => {
131
131
  ">
132
132
  </span>`;
133
133
  if (props.isReturn) {
134
- if (
135
- // params[i].seriesId === 'excess' ||
136
- params[i].seriesName === "\u7D2F\u8BA1\u8D85\u989D"
137
- ) {
138
- html += `<span style='color:${params[i].color}'>
139
- ${params[i].seriesName}</span>\uFF1A${params[i].value[1].toFixed(2)}%
140
- `;
141
- } else {
142
- 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
- }
134
+ 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`;
144
135
  } else {
145
136
  if (props.chartType === "category") {
146
137
  html += `<span style='color:${params[i].color}'>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",