hfn-components 0.2.7 → 0.2.8
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.
- package/dist/index.css +1 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/component.d.ts +3 -0
- package/es/component.mjs +12 -0
- package/es/components/chart/index.d.ts +171 -0
- package/es/components/chart/index.mjs +7 -0
- package/es/components/chart/src/HtChart.d.ts +65 -0
- package/es/components/chart/src/HtChart.mjs +77 -0
- package/es/components/chart/src/HtChart.vue.d.ts +177 -0
- package/es/components/chart/src/HtChart.vue.mjs +90 -0
- package/es/components/chart/src/HtChart.vue2.mjs +109 -0
- package/es/components/chart/src/chartConfig.d.ts +7 -0
- package/es/components/chart/src/chartConfig.mjs +88 -0
- package/es/components/chart/style/index.d.ts +1 -0
- package/es/components/chart/style/index.mjs +1 -0
- package/es/components/elTable/index.d.ts +771 -0
- package/es/components/elTable/index.mjs +7 -0
- package/es/components/elTable/src/columnDeal.vue.d.ts +39 -0
- package/es/components/elTable/src/columnDeal.vue.mjs +35 -0
- package/es/components/elTable/src/columnDeal.vue2.mjs +20 -0
- package/es/components/elTable/src/elTable.d.ts +38 -0
- package/es/components/elTable/src/elTable.mjs +30 -0
- package/es/components/elTable/src/elTable.vue.d.ts +770 -0
- package/es/components/elTable/src/elTable.vue.mjs +56 -0
- package/es/components/elTable/src/elTable.vue2.mjs +30 -0
- package/es/components/htTarget/index.d.ts +1979 -0
- package/es/components/htTarget/index.mjs +6 -0
- package/es/components/htTarget/src/htTarget.d.ts +1 -0
- package/es/components/htTarget/src/htTarget.mjs +3 -0
- package/es/components/htTarget/src/htTarget.vue.d.ts +1978 -0
- package/es/components/htTarget/src/htTarget.vue.mjs +204 -0
- package/es/components/htTarget/src/htTarget.vue2.mjs +108 -0
- package/es/components/index.d.ts +4 -0
- package/es/components/index.mjs +7 -0
- package/es/components/pieChart/index.d.ts +107 -0
- package/es/components/pieChart/index.mjs +7 -0
- package/es/components/pieChart/src/HtPieChart.d.ts +40 -0
- package/es/components/pieChart/src/HtPieChart.mjs +47 -0
- package/es/components/pieChart/src/HtPieChart.vue.d.ts +106 -0
- package/es/components/pieChart/src/HtPieChart.vue.mjs +23 -0
- package/es/components/pieChart/src/HtPieChart.vue2.mjs +84 -0
- package/es/components/pieChart/style/index.d.ts +1 -0
- package/es/components/pieChart/style/index.mjs +1 -0
- package/es/components/table/HtTable.d.ts +142 -0
- package/es/components/table/HtTable.mjs +136 -0
- package/es/components/table/HtTable.vue.d.ts +1847 -0
- package/es/components/table/HtTable.vue.mjs +449 -0
- package/es/components/table/HtTable.vue2.mjs +124 -0
- package/es/components/table/index.d.ts +1845 -0
- package/es/components/table/index.mjs +7 -0
- package/es/constants/chartConfig.d.ts +8 -0
- package/es/constants/chartConfig.mjs +110 -0
- package/es/constants/index.d.ts +4 -0
- package/es/constants/index.mjs +4 -0
- package/es/constants/key.d.ts +1 -0
- package/es/constants/key.mjs +3 -0
- package/es/constants/table.d.ts +118 -0
- package/es/constants/table.mjs +144 -0
- package/es/constants/target.d.ts +20 -0
- package/es/constants/target.mjs +54 -0
- package/es/defaults.d.ts +4 -0
- package/es/defaults.mjs +7 -0
- package/es/index.d.ts +5 -0
- package/es/index.mjs +13 -0
- package/es/make-installer.d.ts +4 -0
- package/es/make-installer.mjs +15 -0
- package/es/plugin.d.ts +2 -0
- package/es/plugin.mjs +3 -0
- package/es/utils/chart.d.ts +7 -0
- package/es/utils/chart.mjs +172 -0
- package/es/utils/common.d.ts +3 -0
- package/es/utils/common.mjs +15 -0
- package/es/utils/index.d.ts +4 -0
- package/es/utils/index.mjs +4 -0
- package/es/utils/table.d.ts +2 -0
- package/es/utils/table.mjs +31 -0
- package/es/utils/tool.d.ts +2 -0
- package/es/utils/tool.mjs +42 -0
- package/global.d.ts +14 -0
- package/package.json +1 -1
- package/theme-chalk/ht-chart.css +1 -0
- package/theme-chalk/index.css +1 -0
- package/theme-chalk/src/chart.scss +58 -0
- package/theme-chalk/src/index.scss +1 -0
- package/component.ts +0 -13
- package/defaults.ts +0 -5
- package/index.ts +0 -6
- package/make-installer.ts +0 -17
- package/plugin.ts +0 -1
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}
|
package/es/component.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HtElTable } from './components/elTable/index.mjs';
|
|
2
|
+
import { HtChart } from './components/chart/index.mjs';
|
|
3
|
+
import { HtPieChart } from './components/pieChart/index.mjs';
|
|
4
|
+
|
|
5
|
+
var Components = [
|
|
6
|
+
// HtTable,
|
|
7
|
+
HtChart,
|
|
8
|
+
HtElTable,
|
|
9
|
+
HtPieChart
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export { Components as default };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
readonly chartData: {
|
|
3
|
+
readonly type: import("vue").PropType<any[]>;
|
|
4
|
+
readonly default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
readonly chartId: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
readonly chartType: {
|
|
11
|
+
readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
readonly xAxisData: {
|
|
15
|
+
readonly type: import("vue").PropType<string[]>;
|
|
16
|
+
readonly default: readonly [];
|
|
17
|
+
};
|
|
18
|
+
readonly collation: {
|
|
19
|
+
readonly type: StringConstructor;
|
|
20
|
+
readonly default: "des";
|
|
21
|
+
};
|
|
22
|
+
readonly isReturn: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: false;
|
|
25
|
+
};
|
|
26
|
+
readonly isPercent: {
|
|
27
|
+
readonly type: BooleanConstructor;
|
|
28
|
+
readonly default: false;
|
|
29
|
+
};
|
|
30
|
+
readonly floatNumber: {
|
|
31
|
+
readonly type: NumberConstructor;
|
|
32
|
+
readonly default: 4;
|
|
33
|
+
};
|
|
34
|
+
readonly titleText: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: "";
|
|
37
|
+
};
|
|
38
|
+
readonly yAxisUnit: {
|
|
39
|
+
readonly type: StringConstructor;
|
|
40
|
+
readonly default: "";
|
|
41
|
+
};
|
|
42
|
+
readonly tooltipUnit: {
|
|
43
|
+
readonly type: StringConstructor;
|
|
44
|
+
readonly default: "";
|
|
45
|
+
};
|
|
46
|
+
readonly watchResize: {
|
|
47
|
+
readonly type: BooleanConstructor;
|
|
48
|
+
readonly default: false;
|
|
49
|
+
};
|
|
50
|
+
readonly showLegend: {
|
|
51
|
+
readonly type: BooleanConstructor;
|
|
52
|
+
readonly default: true;
|
|
53
|
+
};
|
|
54
|
+
readonly downLoadAutn: {
|
|
55
|
+
readonly type: BooleanConstructor;
|
|
56
|
+
readonly default: false;
|
|
57
|
+
};
|
|
58
|
+
readonly lineColor: {
|
|
59
|
+
readonly type: import("vue").PropType<string[]>;
|
|
60
|
+
readonly default: readonly [];
|
|
61
|
+
};
|
|
62
|
+
}, {
|
|
63
|
+
props: import("@vue/shared").LooseRequired<{
|
|
64
|
+
readonly chartData: any[];
|
|
65
|
+
readonly chartId: string;
|
|
66
|
+
readonly chartType: import("hfn-components/es/utils").chartType;
|
|
67
|
+
readonly xAxisData: string[];
|
|
68
|
+
readonly collation: string;
|
|
69
|
+
readonly isReturn: boolean;
|
|
70
|
+
readonly isPercent: boolean;
|
|
71
|
+
readonly floatNumber: number;
|
|
72
|
+
readonly titleText: string;
|
|
73
|
+
readonly yAxisUnit: string;
|
|
74
|
+
readonly tooltipUnit: string;
|
|
75
|
+
readonly watchResize: boolean;
|
|
76
|
+
readonly showLegend: boolean;
|
|
77
|
+
readonly downLoadAutn: boolean;
|
|
78
|
+
readonly lineColor: string[];
|
|
79
|
+
} & {}>;
|
|
80
|
+
myChart: import("vue").ShallowRef<any>;
|
|
81
|
+
isEmpty: import("vue").Ref<boolean>;
|
|
82
|
+
echartOptions: any;
|
|
83
|
+
drawGraph: () => void;
|
|
84
|
+
lengedDeal: () => void;
|
|
85
|
+
echartInit: () => void;
|
|
86
|
+
chartResize: () => void;
|
|
87
|
+
allLegend: import("vue").Ref<import("./src/HtChart.vue").Legend[]>;
|
|
88
|
+
noData: import("vue").Ref<boolean>;
|
|
89
|
+
legendStatus: (item: import("./src/HtChart.vue").Legend, index: number) => void;
|
|
90
|
+
legendEnter: (index: number) => void;
|
|
91
|
+
legendLeave: () => void;
|
|
92
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
93
|
+
readonly chartData: {
|
|
94
|
+
readonly type: import("vue").PropType<any[]>;
|
|
95
|
+
readonly default: () => never[];
|
|
96
|
+
};
|
|
97
|
+
readonly chartId: {
|
|
98
|
+
readonly type: StringConstructor;
|
|
99
|
+
readonly default: "";
|
|
100
|
+
};
|
|
101
|
+
readonly chartType: {
|
|
102
|
+
readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
|
|
103
|
+
readonly default: "";
|
|
104
|
+
};
|
|
105
|
+
readonly xAxisData: {
|
|
106
|
+
readonly type: import("vue").PropType<string[]>;
|
|
107
|
+
readonly default: readonly [];
|
|
108
|
+
};
|
|
109
|
+
readonly collation: {
|
|
110
|
+
readonly type: StringConstructor;
|
|
111
|
+
readonly default: "des";
|
|
112
|
+
};
|
|
113
|
+
readonly isReturn: {
|
|
114
|
+
readonly type: BooleanConstructor;
|
|
115
|
+
readonly default: false;
|
|
116
|
+
};
|
|
117
|
+
readonly isPercent: {
|
|
118
|
+
readonly type: BooleanConstructor;
|
|
119
|
+
readonly default: false;
|
|
120
|
+
};
|
|
121
|
+
readonly floatNumber: {
|
|
122
|
+
readonly type: NumberConstructor;
|
|
123
|
+
readonly default: 4;
|
|
124
|
+
};
|
|
125
|
+
readonly titleText: {
|
|
126
|
+
readonly type: StringConstructor;
|
|
127
|
+
readonly default: "";
|
|
128
|
+
};
|
|
129
|
+
readonly yAxisUnit: {
|
|
130
|
+
readonly type: StringConstructor;
|
|
131
|
+
readonly default: "";
|
|
132
|
+
};
|
|
133
|
+
readonly tooltipUnit: {
|
|
134
|
+
readonly type: StringConstructor;
|
|
135
|
+
readonly default: "";
|
|
136
|
+
};
|
|
137
|
+
readonly watchResize: {
|
|
138
|
+
readonly type: BooleanConstructor;
|
|
139
|
+
readonly default: false;
|
|
140
|
+
};
|
|
141
|
+
readonly showLegend: {
|
|
142
|
+
readonly type: BooleanConstructor;
|
|
143
|
+
readonly default: true;
|
|
144
|
+
};
|
|
145
|
+
readonly downLoadAutn: {
|
|
146
|
+
readonly type: BooleanConstructor;
|
|
147
|
+
readonly default: false;
|
|
148
|
+
};
|
|
149
|
+
readonly lineColor: {
|
|
150
|
+
readonly type: import("vue").PropType<string[]>;
|
|
151
|
+
readonly default: readonly [];
|
|
152
|
+
};
|
|
153
|
+
}>>, {
|
|
154
|
+
readonly chartData: any[];
|
|
155
|
+
readonly chartId: string;
|
|
156
|
+
readonly chartType: import("hfn-components/es/utils").chartType;
|
|
157
|
+
readonly xAxisData: string[];
|
|
158
|
+
readonly collation: string;
|
|
159
|
+
readonly isReturn: boolean;
|
|
160
|
+
readonly isPercent: boolean;
|
|
161
|
+
readonly floatNumber: number;
|
|
162
|
+
readonly titleText: string;
|
|
163
|
+
readonly yAxisUnit: string;
|
|
164
|
+
readonly tooltipUnit: string;
|
|
165
|
+
readonly watchResize: boolean;
|
|
166
|
+
readonly showLegend: boolean;
|
|
167
|
+
readonly downLoadAutn: boolean;
|
|
168
|
+
readonly lineColor: string[];
|
|
169
|
+
}, {}>> & Record<string, any>;
|
|
170
|
+
export default HtChart;
|
|
171
|
+
export * from './src/HtChart';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { chartType } from 'hfn-components/es/utils';
|
|
3
|
+
export declare const chartProps: {
|
|
4
|
+
readonly chartData: {
|
|
5
|
+
readonly type: PropType<any[]>;
|
|
6
|
+
readonly default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
readonly chartId: {
|
|
9
|
+
readonly type: StringConstructor;
|
|
10
|
+
readonly default: "";
|
|
11
|
+
};
|
|
12
|
+
readonly chartType: {
|
|
13
|
+
readonly type: PropType<chartType>;
|
|
14
|
+
readonly default: "";
|
|
15
|
+
};
|
|
16
|
+
readonly xAxisData: {
|
|
17
|
+
readonly type: PropType<string[]>;
|
|
18
|
+
readonly default: readonly [];
|
|
19
|
+
};
|
|
20
|
+
readonly collation: {
|
|
21
|
+
readonly type: StringConstructor;
|
|
22
|
+
readonly default: "des";
|
|
23
|
+
};
|
|
24
|
+
readonly isReturn: {
|
|
25
|
+
readonly type: BooleanConstructor;
|
|
26
|
+
readonly default: false;
|
|
27
|
+
};
|
|
28
|
+
readonly isPercent: {
|
|
29
|
+
readonly type: BooleanConstructor;
|
|
30
|
+
readonly default: false;
|
|
31
|
+
};
|
|
32
|
+
readonly floatNumber: {
|
|
33
|
+
readonly type: NumberConstructor;
|
|
34
|
+
readonly default: 4;
|
|
35
|
+
};
|
|
36
|
+
readonly titleText: {
|
|
37
|
+
readonly type: StringConstructor;
|
|
38
|
+
readonly default: "";
|
|
39
|
+
};
|
|
40
|
+
readonly yAxisUnit: {
|
|
41
|
+
readonly type: StringConstructor;
|
|
42
|
+
readonly default: "";
|
|
43
|
+
};
|
|
44
|
+
readonly tooltipUnit: {
|
|
45
|
+
readonly type: StringConstructor;
|
|
46
|
+
readonly default: "";
|
|
47
|
+
};
|
|
48
|
+
readonly watchResize: {
|
|
49
|
+
readonly type: BooleanConstructor;
|
|
50
|
+
readonly default: false;
|
|
51
|
+
};
|
|
52
|
+
readonly showLegend: {
|
|
53
|
+
readonly type: BooleanConstructor;
|
|
54
|
+
readonly default: true;
|
|
55
|
+
};
|
|
56
|
+
readonly downLoadAutn: {
|
|
57
|
+
readonly type: BooleanConstructor;
|
|
58
|
+
readonly default: false;
|
|
59
|
+
};
|
|
60
|
+
readonly lineColor: {
|
|
61
|
+
readonly type: PropType<string[]>;
|
|
62
|
+
readonly default: readonly [];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export type chartProp = ExtractPropTypes<typeof chartProps>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const chartProps = {
|
|
2
|
+
//图表数据
|
|
3
|
+
chartData: {
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
type: Array,
|
|
6
|
+
default: () => []
|
|
7
|
+
},
|
|
8
|
+
//图表id
|
|
9
|
+
chartId: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
//图表类型
|
|
14
|
+
chartType: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
//是类目轴时x轴数据
|
|
19
|
+
xAxisData: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: []
|
|
22
|
+
},
|
|
23
|
+
collation: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "des"
|
|
26
|
+
},
|
|
27
|
+
//是否为收益率
|
|
28
|
+
isReturn: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
//是否有百分比
|
|
33
|
+
isPercent: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
//保留几位小数
|
|
38
|
+
floatNumber: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 4
|
|
41
|
+
},
|
|
42
|
+
//y轴文本
|
|
43
|
+
titleText: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
},
|
|
47
|
+
//Y轴单位
|
|
48
|
+
yAxisUnit: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
//tooltip单位
|
|
53
|
+
tooltipUnit: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: ""
|
|
56
|
+
},
|
|
57
|
+
//图表重新加载
|
|
58
|
+
watchResize: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
showLegend: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: true
|
|
65
|
+
},
|
|
66
|
+
//数据下载
|
|
67
|
+
downLoadAutn: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false
|
|
70
|
+
},
|
|
71
|
+
lineColor: {
|
|
72
|
+
type: Array,
|
|
73
|
+
default: []
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export { chartProps };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export interface Legend {
|
|
3
|
+
name: string;
|
|
4
|
+
lineType: string;
|
|
5
|
+
isShow: boolean;
|
|
6
|
+
color: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("vue").DefineComponent<{
|
|
9
|
+
readonly chartData: {
|
|
10
|
+
readonly type: import("vue").PropType<any[]>;
|
|
11
|
+
readonly default: () => never[];
|
|
12
|
+
};
|
|
13
|
+
readonly chartId: {
|
|
14
|
+
readonly type: StringConstructor;
|
|
15
|
+
readonly default: "";
|
|
16
|
+
};
|
|
17
|
+
readonly chartType: {
|
|
18
|
+
readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
|
|
19
|
+
readonly default: "";
|
|
20
|
+
};
|
|
21
|
+
readonly xAxisData: {
|
|
22
|
+
readonly type: import("vue").PropType<string[]>;
|
|
23
|
+
readonly default: readonly [];
|
|
24
|
+
};
|
|
25
|
+
readonly collation: {
|
|
26
|
+
readonly type: StringConstructor;
|
|
27
|
+
readonly default: "des";
|
|
28
|
+
};
|
|
29
|
+
readonly isReturn: {
|
|
30
|
+
readonly type: BooleanConstructor;
|
|
31
|
+
readonly default: false;
|
|
32
|
+
};
|
|
33
|
+
readonly isPercent: {
|
|
34
|
+
readonly type: BooleanConstructor;
|
|
35
|
+
readonly default: false;
|
|
36
|
+
};
|
|
37
|
+
readonly floatNumber: {
|
|
38
|
+
readonly type: NumberConstructor;
|
|
39
|
+
readonly default: 4;
|
|
40
|
+
};
|
|
41
|
+
readonly titleText: {
|
|
42
|
+
readonly type: StringConstructor;
|
|
43
|
+
readonly default: "";
|
|
44
|
+
};
|
|
45
|
+
readonly yAxisUnit: {
|
|
46
|
+
readonly type: StringConstructor;
|
|
47
|
+
readonly default: "";
|
|
48
|
+
};
|
|
49
|
+
readonly tooltipUnit: {
|
|
50
|
+
readonly type: StringConstructor;
|
|
51
|
+
readonly default: "";
|
|
52
|
+
};
|
|
53
|
+
readonly watchResize: {
|
|
54
|
+
readonly type: BooleanConstructor;
|
|
55
|
+
readonly default: false;
|
|
56
|
+
};
|
|
57
|
+
readonly showLegend: {
|
|
58
|
+
readonly type: BooleanConstructor;
|
|
59
|
+
readonly default: true;
|
|
60
|
+
};
|
|
61
|
+
readonly downLoadAutn: {
|
|
62
|
+
readonly type: BooleanConstructor;
|
|
63
|
+
readonly default: false;
|
|
64
|
+
};
|
|
65
|
+
readonly lineColor: {
|
|
66
|
+
readonly type: import("vue").PropType<string[]>;
|
|
67
|
+
readonly default: readonly [];
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
props: import("@vue/shared").LooseRequired<{
|
|
71
|
+
readonly chartData: any[];
|
|
72
|
+
readonly chartId: string;
|
|
73
|
+
readonly chartType: import("hfn-components/es/utils").chartType;
|
|
74
|
+
readonly xAxisData: string[];
|
|
75
|
+
readonly collation: string;
|
|
76
|
+
readonly isReturn: boolean;
|
|
77
|
+
readonly isPercent: boolean;
|
|
78
|
+
readonly floatNumber: number;
|
|
79
|
+
readonly titleText: string;
|
|
80
|
+
readonly yAxisUnit: string;
|
|
81
|
+
readonly tooltipUnit: string;
|
|
82
|
+
readonly watchResize: boolean;
|
|
83
|
+
readonly showLegend: boolean;
|
|
84
|
+
readonly downLoadAutn: boolean;
|
|
85
|
+
readonly lineColor: string[];
|
|
86
|
+
} & {}>;
|
|
87
|
+
myChart: import("vue").ShallowRef<any>;
|
|
88
|
+
isEmpty: Ref<boolean>;
|
|
89
|
+
echartOptions: any;
|
|
90
|
+
drawGraph: () => void;
|
|
91
|
+
lengedDeal: () => void;
|
|
92
|
+
echartInit: () => void;
|
|
93
|
+
chartResize: () => void;
|
|
94
|
+
allLegend: Ref<Legend[]>;
|
|
95
|
+
noData: Ref<boolean>;
|
|
96
|
+
legendStatus: (item: Legend, index: number) => void;
|
|
97
|
+
legendEnter: (index: number) => void;
|
|
98
|
+
legendLeave: () => void;
|
|
99
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
|
+
readonly chartData: {
|
|
101
|
+
readonly type: import("vue").PropType<any[]>;
|
|
102
|
+
readonly default: () => never[];
|
|
103
|
+
};
|
|
104
|
+
readonly chartId: {
|
|
105
|
+
readonly type: StringConstructor;
|
|
106
|
+
readonly default: "";
|
|
107
|
+
};
|
|
108
|
+
readonly chartType: {
|
|
109
|
+
readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
|
|
110
|
+
readonly default: "";
|
|
111
|
+
};
|
|
112
|
+
readonly xAxisData: {
|
|
113
|
+
readonly type: import("vue").PropType<string[]>;
|
|
114
|
+
readonly default: readonly [];
|
|
115
|
+
};
|
|
116
|
+
readonly collation: {
|
|
117
|
+
readonly type: StringConstructor;
|
|
118
|
+
readonly default: "des";
|
|
119
|
+
};
|
|
120
|
+
readonly isReturn: {
|
|
121
|
+
readonly type: BooleanConstructor;
|
|
122
|
+
readonly default: false;
|
|
123
|
+
};
|
|
124
|
+
readonly isPercent: {
|
|
125
|
+
readonly type: BooleanConstructor;
|
|
126
|
+
readonly default: false;
|
|
127
|
+
};
|
|
128
|
+
readonly floatNumber: {
|
|
129
|
+
readonly type: NumberConstructor;
|
|
130
|
+
readonly default: 4;
|
|
131
|
+
};
|
|
132
|
+
readonly titleText: {
|
|
133
|
+
readonly type: StringConstructor;
|
|
134
|
+
readonly default: "";
|
|
135
|
+
};
|
|
136
|
+
readonly yAxisUnit: {
|
|
137
|
+
readonly type: StringConstructor;
|
|
138
|
+
readonly default: "";
|
|
139
|
+
};
|
|
140
|
+
readonly tooltipUnit: {
|
|
141
|
+
readonly type: StringConstructor;
|
|
142
|
+
readonly default: "";
|
|
143
|
+
};
|
|
144
|
+
readonly watchResize: {
|
|
145
|
+
readonly type: BooleanConstructor;
|
|
146
|
+
readonly default: false;
|
|
147
|
+
};
|
|
148
|
+
readonly showLegend: {
|
|
149
|
+
readonly type: BooleanConstructor;
|
|
150
|
+
readonly default: true;
|
|
151
|
+
};
|
|
152
|
+
readonly downLoadAutn: {
|
|
153
|
+
readonly type: BooleanConstructor;
|
|
154
|
+
readonly default: false;
|
|
155
|
+
};
|
|
156
|
+
readonly lineColor: {
|
|
157
|
+
readonly type: import("vue").PropType<string[]>;
|
|
158
|
+
readonly default: readonly [];
|
|
159
|
+
};
|
|
160
|
+
}>>, {
|
|
161
|
+
readonly chartData: any[];
|
|
162
|
+
readonly chartId: string;
|
|
163
|
+
readonly chartType: import("hfn-components/es/utils").chartType;
|
|
164
|
+
readonly xAxisData: string[];
|
|
165
|
+
readonly collation: string;
|
|
166
|
+
readonly isReturn: boolean;
|
|
167
|
+
readonly isPercent: boolean;
|
|
168
|
+
readonly floatNumber: number;
|
|
169
|
+
readonly titleText: string;
|
|
170
|
+
readonly yAxisUnit: string;
|
|
171
|
+
readonly tooltipUnit: string;
|
|
172
|
+
readonly watchResize: boolean;
|
|
173
|
+
readonly showLegend: boolean;
|
|
174
|
+
readonly downLoadAutn: boolean;
|
|
175
|
+
readonly lineColor: string[];
|
|
176
|
+
}, {}>;
|
|
177
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import _sfc_main from './HtChart.vue2.mjs';
|
|
2
|
+
import { openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createCommentVNode, createElementVNode, toDisplayString } from 'vue';
|
|
3
|
+
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
+
|
|
5
|
+
const _hoisted_1 = { class: "echart-box" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "echart-lenged"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = ["onClick", "onMouseover"];
|
|
11
|
+
const _hoisted_4 = ["id"];
|
|
12
|
+
const _hoisted_5 = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "noData"
|
|
15
|
+
};
|
|
16
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
17
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
18
|
+
_ctx.showLegend && !$setup.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
19
|
+
(openBlock(true), createElementBlock(
|
|
20
|
+
Fragment,
|
|
21
|
+
null,
|
|
22
|
+
renderList($setup.allLegend, (item, index) => {
|
|
23
|
+
return openBlock(), createElementBlock("div", {
|
|
24
|
+
class: "span-box mb10",
|
|
25
|
+
key: index,
|
|
26
|
+
onClick: ($event) => $setup.legendStatus(item, index),
|
|
27
|
+
onMouseover: ($event) => $setup.legendEnter(index),
|
|
28
|
+
onMouseleave: _cache[0] || (_cache[0] = ($event) => $setup.legendLeave())
|
|
29
|
+
}, [
|
|
30
|
+
item.lineType === "line" ? (openBlock(), createElementBlock(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "bg-span",
|
|
35
|
+
style: normalizeStyle({ background: item.isShow ? item.color : "#ccc" })
|
|
36
|
+
},
|
|
37
|
+
null,
|
|
38
|
+
4
|
|
39
|
+
/* STYLE */
|
|
40
|
+
)) : createCommentVNode("v-if", true),
|
|
41
|
+
item.lineType === "bar" ? (openBlock(), createElementBlock(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
key: 1,
|
|
45
|
+
class: "bg-span-bar",
|
|
46
|
+
style: normalizeStyle({ background: item.isShow ? item.color : "#ccc" })
|
|
47
|
+
},
|
|
48
|
+
null,
|
|
49
|
+
4
|
|
50
|
+
/* STYLE */
|
|
51
|
+
)) : createCommentVNode("v-if", true),
|
|
52
|
+
createElementVNode(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
style: normalizeStyle({ color: item.isShow ? "#000" : "#ccc" })
|
|
56
|
+
},
|
|
57
|
+
toDisplayString(item.name),
|
|
58
|
+
5
|
|
59
|
+
/* TEXT, STYLE */
|
|
60
|
+
),
|
|
61
|
+
createCommentVNode(` <span
|
|
62
|
+
v-if="isLegend"
|
|
63
|
+
class="returnRatio"
|
|
64
|
+
:style="{ color: item.isShow ? (item.returnRatio > 0 ? 'red' : item.returnRatio < 0 ? 'green' : '#000') : '#ccc' }"
|
|
65
|
+
>
|
|
66
|
+
{{
|
|
67
|
+
item.name !== '\u57FA\u91D1\u89C4\u6A21' && item.name !== '\u603B\u5E02\u503C' && item.name !== '\u6D41\u901A\u5E02\u503C'
|
|
68
|
+
? item.returnRatio === ''
|
|
69
|
+
? ''
|
|
70
|
+
: item.returnRatio.toFixed(2) + (isPercent || specialPercent ? '%' : '')
|
|
71
|
+
: \`\${item.returnRatio}\${props.tooltipUnit}\`
|
|
72
|
+
}}
|
|
73
|
+
</span> `)
|
|
74
|
+
], 40, _hoisted_3);
|
|
75
|
+
}),
|
|
76
|
+
128
|
|
77
|
+
/* KEYED_FRAGMENT */
|
|
78
|
+
))
|
|
79
|
+
])) : createCommentVNode("v-if", true),
|
|
80
|
+
createElementVNode("div", {
|
|
81
|
+
class: "echart-content",
|
|
82
|
+
id: _ctx.chartId
|
|
83
|
+
}, null, 8, _hoisted_4),
|
|
84
|
+
createCommentVNode(" \u56FE\u4F8B\u5168\u7F6E\u7070\u76D2\u5B50 "),
|
|
85
|
+
$setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
|
|
86
|
+
]);
|
|
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"]]);
|
|
89
|
+
|
|
90
|
+
export { chart as default };
|