hfn-components 0.7.4 → 0.7.5

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.
@@ -75,6 +75,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
75
75
  readonly type: import("vue").PropType<string[]>;
76
76
  readonly default: readonly [];
77
77
  };
78
+ readonly gridObj: {
79
+ readonly type: ObjectConstructor;
80
+ readonly default: null;
81
+ };
78
82
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
79
83
  readonly chartData: {
80
84
  readonly type: import("vue").PropType<any[]>;
@@ -152,6 +156,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
152
156
  readonly type: import("vue").PropType<string[]>;
153
157
  readonly default: readonly [];
154
158
  };
159
+ readonly gridObj: {
160
+ readonly type: ObjectConstructor;
161
+ readonly default: null;
162
+ };
155
163
  }>>, {
156
164
  readonly chartData: any[];
157
165
  readonly chartId: string;
@@ -172,6 +180,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
172
180
  readonly auxiliaryData: Record<string, any>;
173
181
  readonly downLoadAutn: boolean;
174
182
  readonly lineColor: string[];
183
+ readonly gridObj: Record<string, any>;
175
184
  }, {}>> & Record<string, any>;
176
185
  export default HtChart;
177
186
  export * from './src/HtChart';
@@ -77,5 +77,9 @@ export declare const chartProps: {
77
77
  readonly type: PropType<string[]>;
78
78
  readonly default: readonly [];
79
79
  };
80
+ readonly gridObj: {
81
+ readonly type: ObjectConstructor;
82
+ readonly default: null;
83
+ };
80
84
  };
81
85
  export type chartProp = ExtractPropTypes<typeof chartProps>;
@@ -93,6 +93,11 @@ const chartProps = {
93
93
  lineColor: {
94
94
  type: Array,
95
95
  default: []
96
+ },
97
+ // 图表样式
98
+ gridObj: {
99
+ type: Object,
100
+ default: null
96
101
  }
97
102
  };
98
103
 
@@ -81,6 +81,10 @@ declare const _default: import("vue").DefineComponent<{
81
81
  readonly type: import("vue").PropType<string[]>;
82
82
  readonly default: readonly [];
83
83
  };
84
+ readonly gridObj: {
85
+ readonly type: ObjectConstructor;
86
+ readonly default: null;
87
+ };
84
88
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
85
89
  readonly chartData: {
86
90
  readonly type: import("vue").PropType<any[]>;
@@ -158,6 +162,10 @@ declare const _default: import("vue").DefineComponent<{
158
162
  readonly type: import("vue").PropType<string[]>;
159
163
  readonly default: readonly [];
160
164
  };
165
+ readonly gridObj: {
166
+ readonly type: ObjectConstructor;
167
+ readonly default: null;
168
+ };
161
169
  }>>, {
162
170
  readonly chartData: any[];
163
171
  readonly chartId: string;
@@ -178,5 +186,6 @@ declare const _default: import("vue").DefineComponent<{
178
186
  readonly auxiliaryData: Record<string, any>;
179
187
  readonly downLoadAutn: boolean;
180
188
  readonly lineColor: string[];
189
+ readonly gridObj: Record<string, any>;
181
190
  }, {}>;
182
191
  export default _default;
@@ -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/cengzewei/Desktop/fof/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
  const myChart = shallowRef();
18
18
  const isEmpty = ref(false);
19
19
  const echartOptions = reactive(cloneDeep(BASIC_CHART_CONFIG));
20
+ echartOptions.grid = { ...echartOptions.grid, ...props.gridObj };
20
21
  watch(
21
22
  () => props.chartData,
22
23
  (val) => {
@@ -41,6 +41,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
41
41
  /* TEXT */
42
42
  ));
43
43
  }
44
- var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/htTable/src/columnDeal.vue"]]);
44
+ var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/cengzewei/Desktop/fof/component-library/packages/components/htTable/src/columnDeal.vue"]]);
45
45
 
46
46
  export { ColumnDeal as default };
@@ -211,6 +211,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
211
211
  ])) : createCommentVNode("v-if", true)
212
212
  ]);
213
213
  }
214
- var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/htTable/src/htTable.vue"]]);
214
+ var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/cengzewei/Desktop/fof/component-library/packages/components/htTable/src/htTable.vue"]]);
215
215
 
216
216
  export { elTable as default };
@@ -230,6 +230,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
230
230
  }, 8, ["modelValue"])
231
231
  ]);
232
232
  }
233
- var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/htTarget/src/htTarget.vue"]]);
233
+ var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/cengzewei/Desktop/fof/component-library/packages/components/htTarget/src/htTarget.vue"]]);
234
234
 
235
235
  export { htTarget as default };
@@ -31,6 +31,14 @@ export declare const HtPieChart: import("hfn-components/es/utils").SFCWithInstal
31
31
  readonly type: import("vue").PropType<string[]>;
32
32
  readonly default: readonly [];
33
33
  };
34
+ readonly isCustomTooltip: {
35
+ readonly type: BooleanConstructor;
36
+ readonly default: false;
37
+ };
38
+ readonly toolTipFuc: {
39
+ readonly type: FunctionConstructor;
40
+ readonly default: () => void;
41
+ };
34
42
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
35
43
  readonly chartData: {
36
44
  readonly type: import("vue").PropType<any[]>;
@@ -64,6 +72,14 @@ export declare const HtPieChart: import("hfn-components/es/utils").SFCWithInstal
64
72
  readonly type: import("vue").PropType<string[]>;
65
73
  readonly default: readonly [];
66
74
  };
75
+ readonly isCustomTooltip: {
76
+ readonly type: BooleanConstructor;
77
+ readonly default: false;
78
+ };
79
+ readonly toolTipFuc: {
80
+ readonly type: FunctionConstructor;
81
+ readonly default: () => void;
82
+ };
67
83
  }>>, {
68
84
  readonly chartData: any[];
69
85
  readonly chartId: string;
@@ -73,6 +89,8 @@ export declare const HtPieChart: import("hfn-components/es/utils").SFCWithInstal
73
89
  readonly legendData: Record<string, any>;
74
90
  readonly legendType: string;
75
91
  readonly legendFormatter: Function;
92
+ readonly isCustomTooltip: boolean;
93
+ readonly toolTipFuc: Function;
76
94
  }, {}>> & Record<string, any>;
77
95
  export default HtPieChart;
78
96
  export * from './src/HtPieChart';
@@ -32,5 +32,13 @@ export declare const pieProps: {
32
32
  readonly type: PropType<string[]>;
33
33
  readonly default: readonly [];
34
34
  };
35
+ readonly isCustomTooltip: {
36
+ readonly type: BooleanConstructor;
37
+ readonly default: false;
38
+ };
39
+ readonly toolTipFuc: {
40
+ readonly type: FunctionConstructor;
41
+ readonly default: () => void;
42
+ };
35
43
  };
36
44
  export type pieProps = ExtractPropTypes<typeof pieProps>;
@@ -36,6 +36,16 @@ const pieProps = {
36
36
  lineColor: {
37
37
  type: Array,
38
38
  default: []
39
+ },
40
+ // 自定义tooltip函数
41
+ isCustomTooltip: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ toolTipFuc: {
46
+ type: Function,
47
+ default: () => {
48
+ }
39
49
  }
40
50
  };
41
51
 
@@ -37,6 +37,14 @@ declare const _default: import("vue").DefineComponent<{
37
37
  readonly type: import("vue").PropType<string[]>;
38
38
  readonly default: readonly [];
39
39
  };
40
+ readonly isCustomTooltip: {
41
+ readonly type: BooleanConstructor;
42
+ readonly default: false;
43
+ };
44
+ readonly toolTipFuc: {
45
+ readonly type: FunctionConstructor;
46
+ readonly default: () => void;
47
+ };
40
48
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
49
  readonly chartData: {
42
50
  readonly type: import("vue").PropType<any[]>;
@@ -70,6 +78,14 @@ declare const _default: import("vue").DefineComponent<{
70
78
  readonly type: import("vue").PropType<string[]>;
71
79
  readonly default: readonly [];
72
80
  };
81
+ readonly isCustomTooltip: {
82
+ readonly type: BooleanConstructor;
83
+ readonly default: false;
84
+ };
85
+ readonly toolTipFuc: {
86
+ readonly type: FunctionConstructor;
87
+ readonly default: () => void;
88
+ };
73
89
  }>>, {
74
90
  readonly chartData: any[];
75
91
  readonly chartId: string;
@@ -79,5 +95,7 @@ declare const _default: import("vue").DefineComponent<{
79
95
  readonly legendData: Record<string, any>;
80
96
  readonly legendType: string;
81
97
  readonly legendFormatter: Function;
98
+ readonly isCustomTooltip: boolean;
99
+ readonly toolTipFuc: Function;
82
100
  }, {}>;
83
101
  export default _default;
@@ -56,6 +56,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
56
56
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
57
57
  ]);
58
58
  }
59
- var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
59
+ var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/cengzewei/Desktop/fof/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
60
60
 
61
61
  export { htPieChart as default };
@@ -64,16 +64,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
64
64
  });
65
65
  };
66
66
  const setEchartTooltip = () => {
67
+ const tooltip = function(params) {
68
+ let html;
69
+ html = `<div>${params.seriesName}</div>`;
70
+ html += `<span> ${params.name}:
71
+ ${params.data.percent ? (params.data.percent * 100).toFixed(props.floatNumber) : params.percent.toFixed(props.floatNumber)}%<span>`;
72
+ return html;
73
+ };
67
74
  echartOptions.tooltip = {
68
75
  trigger: "item",
69
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
70
- formatter: function(params) {
71
- let html;
72
- html = `<div>${params.seriesName}</div>`;
73
- html += `<span> ${params.name}:
74
- ${params.data.percent ? (params.data.percent * 100).toFixed(props.floatNumber) : params.percent.toFixed(props.floatNumber)}%<span>`;
75
- return html;
76
- }
76
+ formatter: props.isCustomTooltip ? props.toolTipFuc : tooltip
77
77
  };
78
78
  };
79
79
  const legendStatus = (item, index) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "",
5
5
  "main": "es/index.mjs",
6
6
  "module": "es/index.mjs",