hfn-components 0.6.5 → 0.6.7
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 -1
- package/es/component.mjs +3 -3
- package/es/components/chart/index.d.ts +1 -35
- package/es/components/chart/index.mjs +1 -0
- package/es/components/chart/src/HtChart.vue.d.ts +1 -36
- package/es/components/chart/src/HtChart.vue.mjs +1 -1
- package/es/components/chart/src/HtChart.vue2.mjs +3 -0
- package/es/components/htTable/index.d.ts +252 -0
- package/es/components/htTable/index.mjs +8 -0
- package/es/components/htTable/src/columnDeal.vue.d.ts +41 -0
- package/es/components/{elTable → htTable}/src/columnDeal.vue.mjs +18 -14
- package/es/components/{elTable → htTable}/src/columnDeal.vue2.mjs +1 -1
- package/es/components/htTable/src/composables/index.d.ts +3 -0
- package/es/components/htTable/src/composables/index.mjs +3 -0
- package/es/components/htTable/src/composables/use-copy.d.ts +3 -0
- package/es/components/htTable/src/composables/use-copy.mjs +24 -0
- package/es/components/htTable/src/composables/use-pagination.d.ts +13 -0
- package/es/components/htTable/src/composables/use-pagination.mjs +33 -0
- package/es/components/htTable/src/composables/use-selection.d.ts +12 -0
- package/es/components/htTable/src/composables/use-selection.mjs +58 -0
- package/es/components/{elTable/src/elTable.d.ts → htTable/src/htTable.d.ts} +38 -7
- package/es/components/{elTable/src/elTable.mjs → htTable/src/htTable.mjs} +22 -4
- package/es/components/htTable/src/htTable.vue.d.ts +115 -0
- package/es/components/htTable/src/htTable.vue.mjs +216 -0
- package/es/components/htTable/src/htTable.vue2.mjs +84 -0
- package/es/components/htTarget/index.d.ts +7 -1987
- package/es/components/htTarget/index.mjs +1 -0
- package/es/components/htTarget/src/htTarget.vue.d.ts +5 -1985
- package/es/components/htTarget/src/htTarget.vue.mjs +54 -59
- package/es/components/htTarget/src/htTarget.vue2.mjs +26 -24
- package/es/components/index.d.ts +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/pieChart/index.d.ts +1 -27
- package/es/components/pieChart/index.mjs +1 -0
- package/es/components/pieChart/src/HtPieChart.vue.d.ts +1 -27
- package/es/components/pieChart/src/HtPieChart.vue.mjs +1 -1
- package/es/components/pieChart/src/HtPieChart.vue2.mjs +3 -0
- package/es/constants/icons.d.ts +1 -0
- package/es/constants/icons.mjs +3 -0
- package/es/constants/index.mjs +1 -1
- package/es/constants/table.d.ts +102 -83
- package/es/constants/table.mjs +73 -45
- package/es/constants/target.d.ts +166 -15
- package/es/hfn-components/component.d.ts +3 -0
- package/es/hfn-components/defaults.d.ts +4 -0
- package/es/hfn-components/index.d.ts +5 -0
- package/es/hfn-components/make-installer.d.ts +4 -0
- package/es/hfn-components/plugin.d.ts +2 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.mjs +1 -0
- package/es/icons/svg/empty-simple.svg.mjs +3 -0
- package/es/index.mjs +2 -2
- package/es/utils/index.mjs +1 -1
- package/es/utils/table.d.ts +11 -2
- package/es/utils/table.mjs +36 -26
- package/es/utils/tool.d.ts +1 -1
- package/es/utils/tool.mjs +8 -36
- package/package.json +6 -8
- package/theme-chalk/ht-table.css +1 -1
- package/theme-chalk/ht-target.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/table.scss +61 -4
- package/theme-chalk/src/target.scss +23 -3
- package/es/components/chart/src/chartConfig.d.ts +0 -7
- package/es/components/chart/src/chartConfig.mjs +0 -88
- package/es/components/elTable/index.d.ts +0 -828
- package/es/components/elTable/index.mjs +0 -7
- package/es/components/elTable/src/columnDeal.vue.d.ts +0 -65
- package/es/components/elTable/src/elTable.vue.d.ts +0 -827
- package/es/components/elTable/src/elTable.vue.mjs +0 -111
- package/es/components/elTable/src/elTable.vue2.mjs +0 -51
- package/es/components/table/HtTable.d.ts +0 -142
- package/es/components/table/HtTable.mjs +0 -136
- package/es/components/table/HtTable.vue.d.ts +0 -1847
- package/es/components/table/HtTable.vue.mjs +0 -449
- package/es/components/table/HtTable.vue2.mjs +0 -124
- package/es/components/table/index.d.ts +0 -1845
- package/es/components/table/index.mjs +0 -7
- package/es/css/index.css +0 -59
package/es/constants/table.mjs
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { thousandText4, thousandText2, absPercentage, percentage4, percentage, basicText4 } from '../utils/table.mjs';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const TABLE_KEY_BASE = {
|
|
4
4
|
index: "\u5E8F\u53F7",
|
|
5
5
|
year: "\u5E74\u4EFD",
|
|
6
|
-
fundName: "\u57FA\u91D1\u540D\u79F0"
|
|
6
|
+
fundName: "\u57FA\u91D1\u540D\u79F0"
|
|
7
|
+
};
|
|
8
|
+
const TABLE_KEY_COMMON = {
|
|
9
|
+
operation: "\u64CD\u4F5C"
|
|
10
|
+
};
|
|
11
|
+
const TABLE_KEY_RETURN = {
|
|
7
12
|
cucmulativeReturn: "\u533A\u95F4\u6536\u76CA",
|
|
8
13
|
excessReturn: "\u8D85\u989D\u533A\u95F4\u6536\u76CA",
|
|
14
|
+
annualReturn: "\u5E74\u5316\u6536\u76CA",
|
|
15
|
+
excessAnnualReturn: "\u8D85\u989D\u5E74\u5316\u6536\u76CA",
|
|
16
|
+
indexReturns: "\u540C\u671F\u6307\u6570\u6536\u76CA"
|
|
17
|
+
};
|
|
18
|
+
const TABLE_KEY_RISK = {
|
|
9
19
|
vol: "\u5E74\u5316\u6CE2\u52A8\u7387",
|
|
10
20
|
excessVol: "\u8D85\u989D\u5E74\u5316\u6CE2\u52A8\u7387",
|
|
11
21
|
sharpeRatio: "\u590F\u666E\u6BD4\u7387",
|
|
@@ -23,8 +33,6 @@ const TABLE_KEY = {
|
|
|
23
33
|
excessMaxDrawdownDays: "\u8D85\u989D\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09",
|
|
24
34
|
maxNormalDays: "\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
|
|
25
35
|
excessMaxNormalDays: "\u8D85\u989D\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
|
|
26
|
-
annualReturn: "\u5E74\u5316\u6536\u76CA",
|
|
27
|
-
excessAnnualReturn: "\u8D85\u989D\u5E74\u5316\u6536\u76CA",
|
|
28
36
|
corr: "\u76F8\u5173\u7CFB\u6570",
|
|
29
37
|
informationRatio: "\u4FE1\u606F\u6BD4\u7387",
|
|
30
38
|
trackingError: "\u8DDF\u8E2A\u8BEF\u5DEE",
|
|
@@ -32,8 +40,9 @@ const TABLE_KEY = {
|
|
|
32
40
|
beta: "Beta",
|
|
33
41
|
skew: "\u504F\u5EA6",
|
|
34
42
|
kurt: "\u5CF0\u5EA6",
|
|
35
|
-
cVaR: "VaR\uFF0895%\u7F6E\u4FE1\uFF09"
|
|
36
|
-
|
|
43
|
+
cVaR: "VaR\uFF0895%\u7F6E\u4FE1\uFF09"
|
|
44
|
+
};
|
|
45
|
+
const TABLE_KEY_MONTH = {
|
|
37
46
|
"01": "1\u6708",
|
|
38
47
|
"02": "2\u6708",
|
|
39
48
|
"03": "3\u6708",
|
|
@@ -47,8 +56,9 @@ const TABLE_KEY = {
|
|
|
47
56
|
"11": "11\u6708",
|
|
48
57
|
"12": "12\u6708",
|
|
49
58
|
MonthlyPositiveRatio: "\u6708\u80DC\u7387",
|
|
50
|
-
all_year: "\u5168\u5E74"
|
|
51
|
-
|
|
59
|
+
all_year: "\u5168\u5E74"
|
|
60
|
+
};
|
|
61
|
+
const TABLE_KEY_TRADE = {
|
|
52
62
|
deal_type: "\u4EA4\u6613\u7C7B\u578B",
|
|
53
63
|
deal_apply_time: "\u7533\u8BF7\u65F6\u95F4",
|
|
54
64
|
deal_time: "\u786E\u8BA4\u65E5\u671F",
|
|
@@ -56,8 +66,9 @@ const TABLE_KEY = {
|
|
|
56
66
|
shares: "\u786E\u8BA4\u4EFD\u989D",
|
|
57
67
|
price: "\u786E\u8BA4\u5355\u4F4D\u51C0\u503C",
|
|
58
68
|
bsfee: "\u4EA4\u6613\u8D39\u7528",
|
|
59
|
-
reward: "\u4E1A\u7EE9\u62A5\u916C"
|
|
60
|
-
|
|
69
|
+
reward: "\u4E1A\u7EE9\u62A5\u916C"
|
|
70
|
+
};
|
|
71
|
+
const TABLE_KEY_POSITION = {
|
|
61
72
|
ftype: "\u57FA\u91D1\u7C7B\u578B",
|
|
62
73
|
strategy: "\u5E73\u53F0\u7B56\u7565",
|
|
63
74
|
weight_rate: "\u6743\u91CD",
|
|
@@ -91,31 +102,32 @@ const TABLE_KEY = {
|
|
|
91
102
|
cum_subscription: "\u7D2F\u8BA1\u8BA4\u7533\u8D2D\uFF08\u5143\uFF09",
|
|
92
103
|
cum_cash: "\u7D2F\u8BA1\u73B0\u91D1\u5206\u7EA2\uFF08\u5143\uFF09",
|
|
93
104
|
cum_redemption: "\u7D2F\u8BA1\u8D4E\u56DE\uFF08\u5143\uFF09",
|
|
94
|
-
cum_reward: "\u7D2F\u8BA1\u4E1A\u7EE9\u62A5\u916C\uFF08\u5143\uFF09"
|
|
95
|
-
|
|
105
|
+
cum_reward: "\u7D2F\u8BA1\u4E1A\u7EE9\u62A5\u916C\uFF08\u5143\uFF09"
|
|
106
|
+
};
|
|
107
|
+
const TABLE_KEY_ASSETS = {
|
|
96
108
|
assets_type: "\u8D44\u4EA7\u7C7B\u522B",
|
|
97
109
|
values: "\u5E02\u503C",
|
|
98
|
-
values_ratio: "\u5E02\u503C\u5360\u6BD4"
|
|
99
|
-
|
|
110
|
+
values_ratio: "\u5E02\u503C\u5360\u6BD4"
|
|
111
|
+
};
|
|
112
|
+
const TABLE_KEY_FOF = {
|
|
100
113
|
type_name: "\u7B56\u7565",
|
|
101
114
|
fid_num: "\u4EA7\u54C1\u6570\u91CF",
|
|
102
115
|
assets: "\u6295\u8D44\u5E02\u503C",
|
|
103
116
|
assets_rate: "\u6295\u8D44\u5E02\u503C\u5360\u6BD4",
|
|
104
|
-
|
|
117
|
+
price_cnw: "\u7D2F\u8BA1\u51C0\u503C",
|
|
118
|
+
price_cw_nav: "\u590D\u6743\u51C0\u503C",
|
|
119
|
+
suspend_info: "\u505C\u724C\u4FE1\u606F"
|
|
120
|
+
};
|
|
121
|
+
const TABLE_KEY_DETAIL = {
|
|
105
122
|
range_return: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\u7387",
|
|
106
123
|
return_money: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\uFF08\u5143\uFF09",
|
|
107
124
|
range_year_return: "\u533A\u95F4\u6295\u8D44\u5E74\u5316\u6536\u76CA\u7387",
|
|
108
125
|
range_contribute: "\u7EC4\u5408\u51C0\u503C\u8D21\u732E\u5EA6",
|
|
109
126
|
return_money_contribute: "\u7EC4\u5408\u6536\u76CA\u8D21\u732E\u5EA6",
|
|
110
|
-
// 月度收益
|
|
111
127
|
money_name: "\u91D1\u989D\uFF08\u5143\uFF09",
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
price_cnw: "\u7D2F\u8BA1\u51C0\u503C",
|
|
116
|
-
price_cw_nav: "\u590D\u6743\u51C0\u503C",
|
|
117
|
-
suspend_info: "\u505C\u724C\u4FE1\u606F",
|
|
118
|
-
// 归因分析
|
|
128
|
+
range_date: "\u7EDF\u8BA1\u533A\u95F4"
|
|
129
|
+
};
|
|
130
|
+
const TABLE_KEY_ATTRIBUTION = {
|
|
119
131
|
industry: "\u884C\u4E1A\u540D\u79F0",
|
|
120
132
|
p4: "\u4EA7\u54C1\u884C\u4E1A\u6536\u76CA\u7387",
|
|
121
133
|
p1: "\u57FA\u51C6\u884C\u4E1A\u6536\u76CA\u7387",
|
|
@@ -124,23 +136,43 @@ const TABLE_KEY = {
|
|
|
124
136
|
rin: "\u4EA4\u4E92\u6536\u76CA\u7387",
|
|
125
137
|
r_total: "\u8D85\u989D\u6536\u76CA\u7387"
|
|
126
138
|
};
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
const TABLE_KEY_GMMANAGER = {
|
|
140
|
+
managerName: "\u7BA1\u7406\u4EBA\u540D\u79F0",
|
|
141
|
+
fundCompany: "\u57FA\u91D1\u516C\u53F8",
|
|
142
|
+
AUM: "\u7BA1\u7406\u89C4\u6A21",
|
|
143
|
+
AUMUnit: "\u7BA1\u7406\u89C4\u6A21(\u4EBF\u5143)",
|
|
144
|
+
FundsUM: "\u5728\u7BA1\u57FA\u91D1\u6570",
|
|
145
|
+
typeUM: "\u5728\u7BA1\u7C7B\u578B",
|
|
146
|
+
YoE: "\u4ECE\u4E1A\u5E74\u9650"
|
|
135
147
|
};
|
|
136
|
-
const
|
|
137
|
-
|
|
148
|
+
const TABLE_KEY_REPORT = {
|
|
149
|
+
reportName: "\u62A5\u544A\u540D\u79F0",
|
|
150
|
+
relatedManager: "\u5173\u8054\u7BA1\u7406\u4EBA",
|
|
151
|
+
reportAssociation: "\u62A5\u544A\u5173\u8054",
|
|
152
|
+
modifiedDate: "\u4FEE\u6539\u65E5\u671F",
|
|
153
|
+
creator: "\u521B\u5EFA\u4EBA",
|
|
154
|
+
createdDate: "\u65B0\u589E\u65E5\u671F",
|
|
155
|
+
createdUser: "\u65B0\u589E\u7528\u6237"
|
|
138
156
|
};
|
|
139
|
-
const
|
|
140
|
-
|
|
157
|
+
const MATERIAL_KEY = {
|
|
158
|
+
materialName: "\u8D44\u6599\u540D\u79F0",
|
|
159
|
+
materialAssociation: "\u8D44\u6599\u5173\u8054"
|
|
141
160
|
};
|
|
142
|
-
const
|
|
143
|
-
|
|
161
|
+
const TABLE_KEY = {
|
|
162
|
+
...TABLE_KEY_COMMON,
|
|
163
|
+
...TABLE_KEY_BASE,
|
|
164
|
+
...TABLE_KEY_RETURN,
|
|
165
|
+
...TABLE_KEY_RISK,
|
|
166
|
+
...TABLE_KEY_MONTH,
|
|
167
|
+
...TABLE_KEY_TRADE,
|
|
168
|
+
...TABLE_KEY_POSITION,
|
|
169
|
+
...TABLE_KEY_ASSETS,
|
|
170
|
+
...TABLE_KEY_FOF,
|
|
171
|
+
...TABLE_KEY_DETAIL,
|
|
172
|
+
...TABLE_KEY_ATTRIBUTION,
|
|
173
|
+
...TABLE_KEY_GMMANAGER,
|
|
174
|
+
...TABLE_KEY_REPORT,
|
|
175
|
+
...MATERIAL_KEY
|
|
144
176
|
};
|
|
145
177
|
const CLOUMN_DEAL = {
|
|
146
178
|
basicText4,
|
|
@@ -149,16 +181,12 @@ const CLOUMN_DEAL = {
|
|
|
149
181
|
percentage,
|
|
150
182
|
percentage4,
|
|
151
183
|
absPercentage,
|
|
152
|
-
|
|
153
|
-
|
|
184
|
+
thousandText2,
|
|
185
|
+
thousandText4,
|
|
154
186
|
notProcessed: null,
|
|
155
187
|
other: null,
|
|
156
188
|
customDeal: null,
|
|
157
189
|
customSlot: null
|
|
158
190
|
};
|
|
159
|
-
const convertKey = (data, key) => {
|
|
160
|
-
const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
161
|
-
return data[key] || data[newKey];
|
|
162
|
-
};
|
|
163
191
|
|
|
164
|
-
export { CLOUMN_DEAL, TABLE_KEY
|
|
192
|
+
export { CLOUMN_DEAL, TABLE_KEY };
|
package/es/constants/target.d.ts
CHANGED
|
@@ -1,15 +1,166 @@
|
|
|
1
|
-
export declare const TARGET_HEAD_KEY: {
|
|
2
|
-
name:
|
|
3
|
-
key:
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name:
|
|
12
|
-
key:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export declare const TARGET_HEAD_KEY: readonly [{
|
|
2
|
+
readonly name: "本周";
|
|
3
|
+
readonly key: "thisWeek";
|
|
4
|
+
}, {
|
|
5
|
+
readonly name: "本月";
|
|
6
|
+
readonly key: "thisMonth";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "近一周";
|
|
9
|
+
readonly key: "pastWeek";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "近一月";
|
|
12
|
+
readonly key: "lastOneMonth";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "近三月";
|
|
15
|
+
readonly key: "lastThreeMonth";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "近六月";
|
|
18
|
+
readonly key: "lastSixMonth";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "近一年";
|
|
21
|
+
readonly key: "lastOneYear";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "近两年";
|
|
24
|
+
readonly key: "lastTwoYear";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "近三年";
|
|
27
|
+
readonly key: "lastThreeYear";
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "近五年";
|
|
30
|
+
readonly key: "lastFiveYear";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "今年以来";
|
|
33
|
+
readonly key: "ytd";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "成立以来";
|
|
36
|
+
readonly key: "cucmulative";
|
|
37
|
+
}];
|
|
38
|
+
export declare const TARGET_END_KEY: readonly [{
|
|
39
|
+
readonly name: "收益";
|
|
40
|
+
readonly key: "return";
|
|
41
|
+
readonly dealType: "colorPercentage";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "年化收益";
|
|
44
|
+
readonly key: "yearReturn";
|
|
45
|
+
readonly dealType: "colorPercentage";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "超额收益";
|
|
48
|
+
readonly key: "excessReturn";
|
|
49
|
+
readonly dealType: "colorPercentage";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "超额年化收益";
|
|
52
|
+
readonly key: "excessYearReturn";
|
|
53
|
+
readonly dealType: "colorPercentage";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "年化波动率";
|
|
56
|
+
readonly key: "vol";
|
|
57
|
+
readonly dealType: "percentage";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "超额年化波动率";
|
|
60
|
+
readonly key: "excessVol";
|
|
61
|
+
readonly dealType: "percentage";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "夏普比率";
|
|
64
|
+
readonly key: "sharpeRatio";
|
|
65
|
+
readonly dealType: "basicText4";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "超额夏普比率";
|
|
68
|
+
readonly key: "excessSharpeRatio";
|
|
69
|
+
readonly dealType: "basicText4";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "卡玛比率";
|
|
72
|
+
readonly key: "calmarRatio";
|
|
73
|
+
readonly dealType: "basicText4";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "超额卡玛比率";
|
|
76
|
+
readonly key: "excessCalmarRatio";
|
|
77
|
+
readonly dealType: "basicText4";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "索提诺比率";
|
|
80
|
+
readonly key: "sortinoRatio";
|
|
81
|
+
readonly dealType: "basicText4";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "下行标准差";
|
|
84
|
+
readonly key: "downsideStd";
|
|
85
|
+
readonly dealType: "percentage";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "下行风险";
|
|
88
|
+
readonly key: "downsideDev";
|
|
89
|
+
readonly dealType: "percentage";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "最大回撤";
|
|
92
|
+
readonly key: "maxDrawdown";
|
|
93
|
+
readonly dealType: "percentage";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "超额最大回撤";
|
|
96
|
+
readonly key: "excessMaxDrawdown";
|
|
97
|
+
readonly dealType: "percentage";
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "最大回撤回补期(天)";
|
|
100
|
+
readonly key: "maxDrawdownDays";
|
|
101
|
+
readonly dealType: "notProcessed";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "Alpha";
|
|
104
|
+
readonly key: "alpha";
|
|
105
|
+
readonly dealType: "colorPercentage";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "Beta";
|
|
108
|
+
readonly key: "beta";
|
|
109
|
+
readonly dealType: "basicText4";
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "跟踪误差";
|
|
112
|
+
readonly key: "trackingError";
|
|
113
|
+
readonly dealType: "percentage";
|
|
114
|
+
}, {
|
|
115
|
+
readonly name: "信息比率";
|
|
116
|
+
readonly key: "informationRatio";
|
|
117
|
+
readonly dealType: "basicText4";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "偏度";
|
|
120
|
+
readonly key: "skew";
|
|
121
|
+
readonly dealType: "basicText4";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "峰度";
|
|
124
|
+
readonly key: "kurt";
|
|
125
|
+
readonly dealType: "basicText4";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "VaR(95%置信)";
|
|
128
|
+
readonly key: "cVaR";
|
|
129
|
+
readonly dealType: "basicText4";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "周胜率";
|
|
132
|
+
readonly key: "positiveRatio";
|
|
133
|
+
readonly dealType: "percentage";
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "月胜率";
|
|
136
|
+
readonly key: "monthlyPositiveRatio";
|
|
137
|
+
readonly dealType: "percentage";
|
|
138
|
+
}];
|
|
139
|
+
export declare const BASIC_KEY: readonly [{
|
|
140
|
+
readonly name: "净值日期";
|
|
141
|
+
readonly key: "priceDate";
|
|
142
|
+
readonly dealType: "notProcessed";
|
|
143
|
+
readonly type: "fund";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "单位净值";
|
|
146
|
+
readonly key: "nav";
|
|
147
|
+
readonly dealType: "basicText4";
|
|
148
|
+
readonly type: "fund";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "累计净值";
|
|
151
|
+
readonly key: "cumulativeNavWithdrawal";
|
|
152
|
+
readonly dealType: "basicText4";
|
|
153
|
+
readonly type: "fund";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "日期";
|
|
156
|
+
readonly key: "priceDate";
|
|
157
|
+
readonly dealType: "notProcessed";
|
|
158
|
+
readonly type: "index";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "指数点位";
|
|
161
|
+
readonly key: "priceNav";
|
|
162
|
+
readonly dealType: "basicText4";
|
|
163
|
+
readonly type: "index";
|
|
164
|
+
}];
|
|
165
|
+
export type TargetHeadKeyType = (typeof TARGET_HEAD_KEY)[number]['key'];
|
|
166
|
+
export type TargetEndKeyType = (typeof TARGET_END_KEY)[number]['key'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptySimple } from './svg/empty-simple.svg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptySimple } from './svg/empty-simple.svg.mjs';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var EmptySimple = "data:image/svg+xml,%3Csvg%20width%3D%2264%22%20height%3D%2241%22%20viewBox%3D%220%200%2064%2041%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%3Cg%20transform%3D%22translate%280%201%29%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cellipse%20fill%3D%22%23f5f5f5%22%20cx%3D%2232%22%20cy%3D%2233%22%20rx%3D%2232%22%20ry%3D%227%22%2F%3E%20%20%20%20%3Cg%20fill-rule%3D%22nonzero%22%20stroke%3D%22%23d9d9d9%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M55%2012.76L44.854%201.258C44.367.474%2043.656%200%2042.907%200H21.093c-.749%200-1.46.474-1.947%201.257L9%2012.761V22h46v-9.24z%22%2F%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M41.613%2015.931c0-1.605.994-2.93%202.227-2.931H55v18.137C55%2033.26%2053.68%2035%2052.05%2035h-40.1C10.32%2035%209%2033.259%209%2031.137V13h11.16c1.233%200%202.227%201.323%202.227%202.928v.022c0%201.605%201.005%202.901%202.237%202.901h14.752c1.232%200%202.237-1.308%202.237-2.913v-.007z%22%20fill%3D%22%23fafafa%22%2F%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
2
|
+
|
|
3
|
+
export { EmptySimple as default };
|
package/es/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import installer from './defaults.mjs';
|
|
2
2
|
export { makeInstaller } from './make-installer.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { HtTable } from './components/htTable/index.mjs';
|
|
4
4
|
export { HtChart } from './components/chart/index.mjs';
|
|
5
5
|
export { HtTarget } from './components/htTarget/index.mjs';
|
|
6
6
|
export { HtPieChart } from './components/pieChart/index.mjs';
|
|
7
|
-
export { columnDealProps, elTableProps } from './components/elTable/src/elTable.mjs';
|
|
8
7
|
export { chartProps } from './components/chart/src/HtChart.mjs';
|
|
8
|
+
export { columnDealProps, elTableProps } from './components/htTable/src/htTable.mjs';
|
|
9
9
|
export { pieProps } from './components/pieChart/src/HtPieChart.mjs';
|
|
10
10
|
|
|
11
11
|
const install = installer.install;
|
package/es/utils/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { withInstall } from './common.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { absPercentage, basicText4, convertKey, getTargetHeadWithYears, percentage, percentage4, thousandText2, thousandText4 } from './table.mjs';
|
|
3
3
|
export { dataHandle, splitK } from './tool.mjs';
|
|
4
4
|
export { legendEnterOperate, legendLeaveOperate, setEchartTitle, setEchartTooltip, setEchartXAxis, setEchartYAxis } from './chart.mjs';
|
package/es/utils/table.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const convertKey: (data: any, key: string) => any;
|
|
2
|
+
export declare const getTargetHeadWithYears: () => {
|
|
3
|
+
name: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const basicText4: (val: number | string | undefined) => string;
|
|
7
|
+
export declare const percentage: (val: number | string | undefined) => string;
|
|
8
|
+
export declare const percentage4: (val: number | string | undefined) => string;
|
|
9
|
+
export declare const absPercentage: (val: number | string | undefined) => string;
|
|
10
|
+
export declare const thousandText2: (val: number | string | undefined) => string;
|
|
11
|
+
export declare const thousandText4: (val: number | string | undefined) => string;
|
package/es/utils/table.mjs
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TARGET_HEAD_KEY } from '../constants/target.mjs';
|
|
2
|
+
import '../constants/chartConfig.mjs';
|
|
3
|
+
import { splitK, dataHandle } from './tool.mjs';
|
|
2
4
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (type.includes("percent")) {
|
|
7
|
-
val = val * 100;
|
|
8
|
-
}
|
|
9
|
-
const floatMatch = type.match(/float(\d+)/);
|
|
10
|
-
if (floatMatch) {
|
|
11
|
-
const precision = Number(floatMatch[1]);
|
|
12
|
-
val = val.toFixed(precision);
|
|
13
|
-
}
|
|
14
|
-
if (type.includes("splitK")) {
|
|
15
|
-
val = splitK(val);
|
|
16
|
-
}
|
|
17
|
-
if (type.includes("sign")) {
|
|
18
|
-
val = Number(val) > 0 ? "+" + val : val;
|
|
19
|
-
}
|
|
20
|
-
if (type.includes("percent")) {
|
|
21
|
-
val = val + "%";
|
|
22
|
-
}
|
|
23
|
-
return val;
|
|
5
|
+
const convertKey = (data, key) => {
|
|
6
|
+
const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
7
|
+
return data[key] || data[newKey];
|
|
24
8
|
};
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
const getTargetHeadWithYears = () => {
|
|
10
|
+
const head = [...TARGET_HEAD_KEY].map((item) => ({ name: item.name, key: item.key }));
|
|
11
|
+
let startYear = 2018;
|
|
12
|
+
const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
13
|
+
while (startYear <= nowYear) {
|
|
14
|
+
head.push({ name: `${startYear}`, key: `${startYear}` });
|
|
15
|
+
startYear++;
|
|
28
16
|
}
|
|
17
|
+
return head;
|
|
18
|
+
};
|
|
19
|
+
const isInvalid = (val) => {
|
|
20
|
+
return val === "-" || val === void 0 || val === null || val === "";
|
|
21
|
+
};
|
|
22
|
+
const basicText4 = (val) => {
|
|
23
|
+
return isInvalid(val) ? "-" : Number(val).toFixed(4);
|
|
24
|
+
};
|
|
25
|
+
const percentage = (val) => {
|
|
26
|
+
return isInvalid(val) ? "-" : (Number(val) * 100).toFixed(2) + "%";
|
|
27
|
+
};
|
|
28
|
+
const percentage4 = (val) => {
|
|
29
|
+
return isInvalid(val) ? "-" : (Number(val) * 100).toFixed(4) + "%";
|
|
30
|
+
};
|
|
31
|
+
const absPercentage = (val) => {
|
|
32
|
+
return isInvalid(val) ? "-" : Math.abs(Number(val) * 100).toFixed(2) + "%";
|
|
33
|
+
};
|
|
34
|
+
const thousandText2 = (val) => {
|
|
35
|
+
return isInvalid(val) ? "-" : splitK(dataHandle(Number(val), false, 2));
|
|
36
|
+
};
|
|
37
|
+
const thousandText4 = (val) => {
|
|
38
|
+
return isInvalid(val) ? "-" : splitK(dataHandle(Number(val), false, 4));
|
|
29
39
|
};
|
|
30
40
|
|
|
31
|
-
export {
|
|
41
|
+
export { absPercentage, basicText4, convertKey, getTargetHeadWithYears, percentage, percentage4, thousandText2, thousandText4 };
|
package/es/utils/tool.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function dataHandle(val: any, isPer: boolean, floatNum: number):
|
|
1
|
+
export declare function dataHandle(val: any, isPer: boolean, floatNum: number): string;
|
|
2
2
|
export declare function splitK(num: string | number): string;
|
package/es/utils/tool.mjs
CHANGED
|
@@ -1,42 +1,14 @@
|
|
|
1
1
|
function dataHandle(val, isPer, floatNum) {
|
|
2
|
-
|
|
3
|
-
if (isNaN(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (isPer) {
|
|
7
|
-
val = val * 100;
|
|
8
|
-
}
|
|
9
|
-
if (Number(val.toFixed(floatNum)) === 0) {
|
|
10
|
-
const a = 0;
|
|
11
|
-
return a.toFixed(floatNum);
|
|
12
|
-
} else {
|
|
13
|
-
return val.toFixed(floatNum);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
2
|
+
const num = parseFloat(val);
|
|
3
|
+
if (isNaN(num)) return "-";
|
|
4
|
+
const result = isPer ? num * 100 : num;
|
|
5
|
+
return result.toFixed(floatNum);
|
|
16
6
|
}
|
|
17
7
|
function splitK(num) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
const tempArr = [];
|
|
23
|
-
const revNumArr = String(num).split(".")[0].split("").reverse();
|
|
24
|
-
const mark = revNumArr[revNumArr.length - 1];
|
|
25
|
-
if (mark === "-") {
|
|
26
|
-
revNumArr.splice(-1, 1);
|
|
27
|
-
}
|
|
28
|
-
for (const i in revNumArr) {
|
|
29
|
-
tempArr.push(revNumArr[i]);
|
|
30
|
-
const index = parseFloat(i);
|
|
31
|
-
if ((index + 1) % 3 === 0 && Number(i) !== revNumArr.length - 1) {
|
|
32
|
-
tempArr.push(",");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (mark === "-") {
|
|
36
|
-
tempArr.push(mark);
|
|
37
|
-
}
|
|
38
|
-
const zs = tempArr.reverse().join("");
|
|
39
|
-
return decimal ? zs + "." + decimal : zs;
|
|
8
|
+
const str = String(num);
|
|
9
|
+
const [integer, decimal = "00"] = str.split(".");
|
|
10
|
+
const formatted = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
11
|
+
return `${formatted}.${decimal}`;
|
|
40
12
|
}
|
|
41
13
|
|
|
42
14
|
export { dataHandle, splitK };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hfn-components",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.
|
|
5
|
+
"main": "es/index.mjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
7
7
|
"types": "es/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"keywords": [],
|
|
12
12
|
"author": "",
|
|
13
13
|
"license": "ISC",
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"ant-design-vue": "3.2.20",
|
|
16
|
-
"@ant-design/icons-vue": "^7.0.1",
|
|
17
|
-
"element-plus": "^2.7.7"
|
|
18
|
-
},
|
|
19
14
|
"peerDependencies": {
|
|
15
|
+
"element-plus": "^2.7.7",
|
|
20
16
|
"vue": "^3.2.0",
|
|
21
17
|
"echarts": "^5.5.1",
|
|
22
|
-
"lodash.clonedeep": "^4.5.0"
|
|
18
|
+
"lodash.clonedeep": "^4.5.0",
|
|
19
|
+
"vue-draggable-plus": "^0.6.1",
|
|
20
|
+
"@element-plus/icons-vue": "^2.0.0"
|
|
23
21
|
}
|
|
24
22
|
}
|
package/theme-chalk/ht-table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ht-table-wrapper{display:flex;flex-direction:column;height:100%}.ht-table-wrapper .el-table{flex:1;min-height:0}.ht-table-wrapper .el-table__empty-text{line-height:normal}.ht-table-cell-copy{align-items:center;display:inline-flex;gap:4px;width:100%}.ht-table-cell-text{flex:none;max-width:calc(100% - 22px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ht-copy-icon{color:#909399;cursor:pointer;flex-shrink:0;font-size:14px;opacity:0;transition:opacity .2s}.ht-copy-icon:hover{color:#d70c19}.el-table__row:hover .ht-copy-icon{opacity:1}.ht-table-pagination{align-items:center;display:flex;justify-content:flex-end;padding:12px 0}.ht-table-wrapper .el-table__column-filter-trigger .el-icon svg{display:none}.ht-table-wrapper .el-table__column-filter-trigger .el-icon:after{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%23909399' d='M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z'/%3E%3C/svg%3E") no-repeat 50%;background-size:contain;content:"";display:inline-block;height:14px;width:14px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}
|
|
1
|
+
.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}.check_item{align-items:center;cursor:grab}.check_item:active{cursor:grabbing}.ghost{background:#f0f0f0;opacity:.5}.close-icon{cursor:pointer}.close-icon:hover{color:#909399!important}
|
package/theme-chalk/index.css
CHANGED
|
@@ -1 +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%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}.
|
|
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%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}.check_item{align-items:center;cursor:grab}.check_item:active{cursor:grabbing}.ghost{background:#f0f0f0;opacity:.5}.close-icon{cursor:pointer}.close-icon:hover{color:#909399!important}.ht-table-wrapper{display:flex;flex-direction:column;height:100%}.ht-table-wrapper .el-table{flex:1;min-height:0}.ht-table-wrapper .el-table__empty-text{line-height:normal}.ht-table-cell-copy{align-items:center;display:inline-flex;gap:4px;width:100%}.ht-table-cell-text{flex:none;max-width:calc(100% - 22px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ht-copy-icon{color:#909399;cursor:pointer;flex-shrink:0;font-size:14px;opacity:0;transition:opacity .2s}.ht-copy-icon:hover{color:#d70c19}.el-table__row:hover .ht-copy-icon{opacity:1}.ht-table-pagination{align-items:center;display:flex;justify-content:flex-end;padding:12px 0}.ht-table-wrapper .el-table__column-filter-trigger .el-icon svg{display:none}.ht-table-wrapper .el-table__column-filter-trigger .el-icon:after{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%23909399' d='M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z'/%3E%3C/svg%3E") no-repeat 50%;background-size:contain;content:"";display:inline-block;height:14px;width:14px}
|