hfn-components 0.6.4 → 0.6.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.
@@ -47,6 +47,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
47
47
  readonly type: ObjectConstructor;
48
48
  readonly default: () => void;
49
49
  };
50
+ readonly xAxisObj: {
51
+ readonly type: ObjectConstructor;
52
+ readonly default: () => void;
53
+ };
50
54
  readonly tooltipUnit: {
51
55
  readonly type: StringConstructor;
52
56
  readonly default: "";
@@ -85,6 +89,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
85
89
  readonly floatNumber: number;
86
90
  readonly yAxisUnit: string;
87
91
  readonly yAxisObj: Record<string, any>;
92
+ readonly xAxisObj: Record<string, any>;
88
93
  readonly tooltipUnit: string;
89
94
  readonly watchResize: boolean;
90
95
  readonly showLegend: boolean;
@@ -153,6 +158,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
153
158
  readonly type: ObjectConstructor;
154
159
  readonly default: () => void;
155
160
  };
161
+ readonly xAxisObj: {
162
+ readonly type: ObjectConstructor;
163
+ readonly default: () => void;
164
+ };
156
165
  readonly tooltipUnit: {
157
166
  readonly type: StringConstructor;
158
167
  readonly default: "";
@@ -190,6 +199,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
190
199
  readonly floatNumber: number;
191
200
  readonly yAxisUnit: string;
192
201
  readonly yAxisObj: Record<string, any>;
202
+ readonly xAxisObj: Record<string, any>;
193
203
  readonly tooltipUnit: string;
194
204
  readonly watchResize: boolean;
195
205
  readonly showLegend: boolean;
@@ -49,6 +49,10 @@ export declare const chartProps: {
49
49
  readonly type: ObjectConstructor;
50
50
  readonly default: () => void;
51
51
  };
52
+ readonly xAxisObj: {
53
+ readonly type: ObjectConstructor;
54
+ readonly default: () => void;
55
+ };
52
56
  readonly tooltipUnit: {
53
57
  readonly type: StringConstructor;
54
58
  readonly default: "";
@@ -60,6 +60,12 @@ const chartProps = {
60
60
  default: () => {
61
61
  }
62
62
  },
63
+ // X轴对象
64
+ xAxisObj: {
65
+ type: Object,
66
+ default: () => {
67
+ }
68
+ },
63
69
  //tooltip单位
64
70
  tooltipUnit: {
65
71
  type: String,
@@ -54,6 +54,10 @@ declare const _default: import("vue").DefineComponent<{
54
54
  readonly type: ObjectConstructor;
55
55
  readonly default: () => void;
56
56
  };
57
+ readonly xAxisObj: {
58
+ readonly type: ObjectConstructor;
59
+ readonly default: () => void;
60
+ };
57
61
  readonly tooltipUnit: {
58
62
  readonly type: StringConstructor;
59
63
  readonly default: "";
@@ -92,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
92
96
  readonly floatNumber: number;
93
97
  readonly yAxisUnit: string;
94
98
  readonly yAxisObj: Record<string, any>;
99
+ readonly xAxisObj: Record<string, any>;
95
100
  readonly tooltipUnit: string;
96
101
  readonly watchResize: boolean;
97
102
  readonly showLegend: boolean;
@@ -160,6 +165,10 @@ declare const _default: import("vue").DefineComponent<{
160
165
  readonly type: ObjectConstructor;
161
166
  readonly default: () => void;
162
167
  };
168
+ readonly xAxisObj: {
169
+ readonly type: ObjectConstructor;
170
+ readonly default: () => void;
171
+ };
163
172
  readonly tooltipUnit: {
164
173
  readonly type: StringConstructor;
165
174
  readonly default: "";
@@ -197,6 +206,7 @@ declare const _default: import("vue").DefineComponent<{
197
206
  readonly floatNumber: number;
198
207
  readonly yAxisUnit: string;
199
208
  readonly yAxisObj: Record<string, any>;
209
+ readonly xAxisObj: Record<string, any>;
200
210
  readonly tooltipUnit: string;
201
211
  readonly watchResize: boolean;
202
212
  readonly showLegend: boolean;
@@ -36,6 +36,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
36
36
  if (val && val.length > 0) {
37
37
  echartOptions.color = props.lineColor;
38
38
  if (myChart.value) {
39
+ lengedDeal();
39
40
  echartInit();
40
41
  }
41
42
  }
@@ -47,7 +48,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
47
48
  echartOptions.color = props.lineColor;
48
49
  }
49
50
  setEchartTitle(echartOptions, props);
50
- setEchartXAxis(echartOptions, props.chartType, props.xAxisData);
51
+ setEchartXAxis(echartOptions, props.chartType, props.xAxisData, props);
51
52
  setEchartYAxis(echartOptions, props);
52
53
  setEchartTooltip(echartOptions, props);
53
54
  lengedDeal();
@@ -25,11 +25,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
25
25
  key: string;
26
26
  }[]>;
27
27
  props: import("@vue/shared").LooseRequired<{
28
- readonly loading: boolean;
29
- readonly resizable: boolean;
30
28
  readonly dataSource: unknown[];
31
29
  readonly tableColumn: import("./src/elTable").ElTableColumns[];
30
+ readonly loading: boolean;
32
31
  readonly headerColor: string;
32
+ readonly resizable: boolean;
33
33
  } & {}>;
34
34
  wrapText: (text: string, charsPerLine?: number) => string;
35
35
  readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -818,11 +818,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
818
818
  readonly default: true;
819
819
  };
820
820
  }>>, {
821
- readonly loading: boolean;
822
- readonly resizable: boolean;
823
821
  readonly dataSource: unknown[];
824
822
  readonly tableColumn: import("./src/elTable").ElTableColumns[];
823
+ readonly loading: boolean;
825
824
  readonly headerColor: string;
825
+ readonly resizable: boolean;
826
826
  }, {}>> & Record<string, any>;
827
827
  export default HtElTable;
828
828
  export * from './src/elTable';
@@ -25,11 +25,11 @@ declare const _default: import("vue").DefineComponent<{
25
25
  key: string;
26
26
  }[]>;
27
27
  props: import("@vue/shared").LooseRequired<{
28
- readonly loading: boolean;
29
- readonly resizable: boolean;
30
28
  readonly dataSource: unknown[];
31
29
  readonly tableColumn: import("./elTable").ElTableColumns[];
30
+ readonly loading: boolean;
32
31
  readonly headerColor: string;
32
+ readonly resizable: boolean;
33
33
  } & {}>;
34
34
  wrapText: (text: string, charsPerLine?: number) => string;
35
35
  readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -818,10 +818,10 @@ declare const _default: import("vue").DefineComponent<{
818
818
  readonly default: true;
819
819
  };
820
820
  }>>, {
821
- readonly loading: boolean;
822
- readonly resizable: boolean;
823
821
  readonly dataSource: unknown[];
824
822
  readonly tableColumn: import("./elTable").ElTableColumns[];
823
+ readonly loading: boolean;
825
824
  readonly headerColor: string;
825
+ readonly resizable: boolean;
826
826
  }, {}>;
827
827
  export default _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;
@@ -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;
@@ -2,7 +2,7 @@ import type { chartProp } from 'hfn-components/es/components/chart';
2
2
  export type chartType = 'category' | 'time';
3
3
  export declare const legendEnterOperate: (options: any, name: string) => void;
4
4
  export declare const legendLeaveOperate: (options: any) => void;
5
- export declare const setEchartXAxis: (options: any, type: chartType, xAxisData: string[]) => void;
5
+ export declare const setEchartXAxis: (options: any, type: chartType, xAxisData: string[], props: chartProp) => void;
6
6
  export declare const setEchartYAxis: (options: any, props: chartProp) => void;
7
7
  export declare const setEchartTitle: (options: any, props: chartProp) => void;
8
8
  export declare const setEchartTooltip: (options: any, props: chartProp) => void;
@@ -60,7 +60,7 @@ const legendLeaveOperate = (options) => {
60
60
  }
61
61
  });
62
62
  };
63
- const setEchartXAxis = (options, type, xAxisData) => {
63
+ const setEchartXAxis = (options, type, xAxisData, props) => {
64
64
  if (type === "category") {
65
65
  const xAxis = [...xAxisData];
66
66
  options.xAxis = {
@@ -69,7 +69,8 @@ const setEchartXAxis = (options, type, xAxisData) => {
69
69
  boundaryGap: true,
70
70
  axisTick: {
71
71
  alignWithLabel: true
72
- }
72
+ },
73
+ ...props.xAxisObj
73
74
  };
74
75
  } else if (type === "time") {
75
76
  options.xAxis = {
@@ -77,7 +78,8 @@ const setEchartXAxis = (options, type, xAxisData) => {
77
78
  minInterval: 24 * 60 * 60 * 1e3,
78
79
  axisLine: {
79
80
  onZero: false
80
- }
81
+ },
82
+ ...props.xAxisObj
81
83
  };
82
84
  }
83
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",