hfn-components 0.2.6 → 0.2.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/component.ts +13 -0
- package/defaults.ts +5 -0
- package/index.ts +6 -0
- package/make-installer.ts +17 -0
- package/package.json +1 -1
- package/plugin.ts +1 -0
- package/dist/index.css +0 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
- package/es/component.d.ts +0 -3
- package/es/component.mjs +0 -10
- package/es/components/chart/index.d.ts +0 -171
- package/es/components/chart/index.mjs +0 -7
- package/es/components/chart/src/HtChart.d.ts +0 -65
- package/es/components/chart/src/HtChart.mjs +0 -77
- package/es/components/chart/src/HtChart.vue.d.ts +0 -177
- package/es/components/chart/src/HtChart.vue.mjs +0 -91
- package/es/components/chart/src/HtChart.vue2.mjs +0 -109
- package/es/components/chart/src/chartConfig.d.ts +0 -7
- package/es/components/chart/src/chartConfig.mjs +0 -88
- package/es/components/chart/style/index.d.ts +0 -1
- package/es/components/chart/style/index.mjs +0 -1
- package/es/components/elTable/index.d.ts +0 -770
- package/es/components/elTable/index.mjs +0 -7
- package/es/components/elTable/src/columnDeal.vue.d.ts +0 -38
- package/es/components/elTable/src/columnDeal.vue.mjs +0 -35
- package/es/components/elTable/src/columnDeal.vue2.mjs +0 -19
- package/es/components/elTable/src/elTable.d.ts +0 -38
- package/es/components/elTable/src/elTable.mjs +0 -30
- package/es/components/elTable/src/elTable.vue.d.ts +0 -769
- package/es/components/elTable/src/elTable.vue.mjs +0 -56
- package/es/components/elTable/src/elTable.vue2.mjs +0 -29
- package/es/components/htTarget/index.d.ts +0 -748
- package/es/components/htTarget/index.mjs +0 -6
- package/es/components/htTarget/src/htTarget.vue.d.ts +0 -747
- package/es/components/htTarget/src/htTarget.vue.mjs +0 -27
- package/es/components/htTarget/src/htTarget.vue2.mjs +0 -31
- package/es/components/index.d.ts +0 -3
- package/es/components/index.mjs +0 -5
- 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/constants/index.d.ts +0 -3
- package/es/constants/index.mjs +0 -3
- package/es/constants/key.d.ts +0 -1
- package/es/constants/key.mjs +0 -3
- package/es/constants/table.d.ts +0 -117
- package/es/constants/table.mjs +0 -140
- package/es/constants/target.d.ts +0 -4
- package/es/constants/target.mjs +0 -16
- package/es/css/index.css +0 -59
- package/es/defaults.d.ts +0 -4
- package/es/defaults.mjs +0 -7
- package/es/index.d.ts +0 -5
- package/es/index.mjs +0 -11
- package/es/make-installer.d.ts +0 -4
- package/es/make-installer.mjs +0 -14
- package/es/plugin.d.ts +0 -2
- package/es/plugin.mjs +0 -3
- package/es/utils/chart.d.ts +0 -7
- package/es/utils/chart.mjs +0 -172
- package/es/utils/common.d.ts +0 -3
- package/es/utils/common.mjs +0 -15
- package/es/utils/index.d.ts +0 -4
- package/es/utils/index.mjs +0 -4
- package/es/utils/table.d.ts +0 -2
- package/es/utils/table.mjs +0 -31
- package/es/utils/tool.d.ts +0 -2
- package/es/utils/tool.mjs +0 -42
- package/global.d.ts +0 -14
- package/theme-chalk/ht-chart.css +0 -1
- package/theme-chalk/index.css +0 -1
- package/theme-chalk/src/chart.scss +0 -53
- package/theme-chalk/src/index.scss +0 -1
package/es/constants/index.d.ts
DELETED
package/es/constants/index.mjs
DELETED
package/es/constants/key.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const INSTALLED_KEY: unique symbol;
|
package/es/constants/key.mjs
DELETED
package/es/constants/table.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
export declare const TABLE_KEY: {
|
|
2
|
-
readonly index: "序号";
|
|
3
|
-
readonly year: "年份";
|
|
4
|
-
readonly fundName: "基金名称";
|
|
5
|
-
readonly cucmulativeReturn: "区间收益";
|
|
6
|
-
readonly excessReturn: "超额区间收益";
|
|
7
|
-
readonly vol: "年化波动率";
|
|
8
|
-
readonly excessVol: "超额年化波动率";
|
|
9
|
-
readonly sharpeRatio: "夏普比率";
|
|
10
|
-
readonly excessSharpeRatio: "超额夏普比率";
|
|
11
|
-
readonly calmarRatio: "卡玛比率";
|
|
12
|
-
readonly excessCalmarRatio: "超额卡玛比率";
|
|
13
|
-
readonly sortinoRatio: "索提诺比率";
|
|
14
|
-
readonly excessSortinoRatio: "超额索提诺比率";
|
|
15
|
-
readonly downsideDev: "下行风险";
|
|
16
|
-
readonly excessDownsideDev: "超额下行风险";
|
|
17
|
-
readonly interval: "最大回撤起止区间";
|
|
18
|
-
readonly maxDrawdown: "最大回撤";
|
|
19
|
-
readonly excessMaxDrawdown: "超额最大回撤";
|
|
20
|
-
readonly maxDrawdownDays: "最大回撤回补期(天)";
|
|
21
|
-
readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
|
|
22
|
-
readonly maxNormalDays: "最长连续不创新高天数(天)";
|
|
23
|
-
readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
|
|
24
|
-
readonly annualReturn: "年化收益";
|
|
25
|
-
readonly excessAnnualReturn: "超额年化收益";
|
|
26
|
-
readonly corr: "相关系数";
|
|
27
|
-
readonly informationRatio: "信息比率";
|
|
28
|
-
readonly trackingError: "跟踪误差";
|
|
29
|
-
readonly alpha: "Alpha";
|
|
30
|
-
readonly beta: "Beta";
|
|
31
|
-
readonly skew: "偏度";
|
|
32
|
-
readonly kurt: "峰度";
|
|
33
|
-
readonly cVaR: "VaR(95%置信)";
|
|
34
|
-
readonly indexReturns: "同期指数收益";
|
|
35
|
-
readonly '01': "1月";
|
|
36
|
-
readonly '02': "2月";
|
|
37
|
-
readonly '03': "3月";
|
|
38
|
-
readonly '04': "4月";
|
|
39
|
-
readonly '05': "5月";
|
|
40
|
-
readonly '06': "6月";
|
|
41
|
-
readonly '07': "7月";
|
|
42
|
-
readonly '08': "8月";
|
|
43
|
-
readonly '09': "9月";
|
|
44
|
-
readonly '10': "10月";
|
|
45
|
-
readonly '11': "11月";
|
|
46
|
-
readonly '12': "12月";
|
|
47
|
-
readonly MonthlyPositiveRatio: "月胜率";
|
|
48
|
-
readonly all_year: "全年";
|
|
49
|
-
readonly deal_type: "交易类型";
|
|
50
|
-
readonly deal_apply_time: "申请时间";
|
|
51
|
-
readonly deal_time: "确认日期";
|
|
52
|
-
readonly amount: "确认净额";
|
|
53
|
-
readonly shares: "确认份额";
|
|
54
|
-
readonly price: "确认单位净值";
|
|
55
|
-
readonly bsfee: "交易费用";
|
|
56
|
-
readonly reward: "业绩报酬";
|
|
57
|
-
readonly ftype: "基金类型";
|
|
58
|
-
readonly strategy: "平台策略";
|
|
59
|
-
readonly weight_rate: "权重";
|
|
60
|
-
readonly price_nav: "单位净值";
|
|
61
|
-
readonly inital_purchase_date: "初始申购日期";
|
|
62
|
-
readonly price_date: "净值日期";
|
|
63
|
-
readonly clear_time: "清仓日期";
|
|
64
|
-
readonly price_change: "净值涨跌幅";
|
|
65
|
-
readonly price_source: "净值来源";
|
|
66
|
-
readonly hold_value: "持仓市值(元)";
|
|
67
|
-
readonly code: "备案号/代码";
|
|
68
|
-
readonly is_manage_change: "持仓期内经理变更";
|
|
69
|
-
readonly price_weighted: "持有单价";
|
|
70
|
-
readonly cost: "持仓成本(元)";
|
|
71
|
-
readonly cost_weighted: "持有成本(元)";
|
|
72
|
-
readonly position_return: "持仓收益(元)";
|
|
73
|
-
readonly profit_weighted: "持有收益(元)";
|
|
74
|
-
readonly rate: "持仓收益率";
|
|
75
|
-
readonly rate_weighted: "持有收益率";
|
|
76
|
-
readonly year_rate_position: "持仓年化收益率";
|
|
77
|
-
readonly year_rate_weighted: "持有年化收益率";
|
|
78
|
-
readonly cost_days: "持有天数";
|
|
79
|
-
readonly return_range: "区间投资收益(元)";
|
|
80
|
-
readonly cum_profit: "累计收益(元)";
|
|
81
|
-
readonly return_range_rate: "区间投资收益率";
|
|
82
|
-
readonly cum_rate: "累计收益率";
|
|
83
|
-
readonly year_rate_range: "区间投资年化收益率";
|
|
84
|
-
readonly year_rate_cum: "累计年化收益率";
|
|
85
|
-
readonly cost_accumulated: "累计成本(元)";
|
|
86
|
-
readonly cum_bsfee: "累计交易费用(元)";
|
|
87
|
-
readonly cum_subscription: "累计认申购(元)";
|
|
88
|
-
readonly cum_cash: "累计现金分红(元)";
|
|
89
|
-
readonly cum_redemption: "累计赎回(元)";
|
|
90
|
-
readonly cum_reward: "累计业绩报酬(元)";
|
|
91
|
-
readonly assets_type: "资产类别";
|
|
92
|
-
readonly values: "市值";
|
|
93
|
-
readonly values_ratio: "市值占比";
|
|
94
|
-
readonly type_name: "策略";
|
|
95
|
-
readonly fid_num: "产品数量";
|
|
96
|
-
readonly assets: "投资市值";
|
|
97
|
-
readonly assets_rate: "投资市值占比";
|
|
98
|
-
readonly range_return: "区间投资收益率";
|
|
99
|
-
readonly return_money: "区间投资收益(元)";
|
|
100
|
-
readonly range_year_return: "区间投资年化收益率";
|
|
101
|
-
readonly range_contribute: "组合净值贡献度";
|
|
102
|
-
readonly return_money_contribute: "组合收益贡献度";
|
|
103
|
-
readonly money_name: "金额(元)";
|
|
104
|
-
};
|
|
105
|
-
export declare const CLOUMN_DEAL: {
|
|
106
|
-
basicText4: (val: number | string | undefined) => string;
|
|
107
|
-
colorText: (val: number | string | undefined) => string;
|
|
108
|
-
colorPercentage: (val: number | string | undefined) => string;
|
|
109
|
-
percentage: (val: number | string | undefined) => string;
|
|
110
|
-
absPercentage: (val: number | string | undefined) => string;
|
|
111
|
-
thoundsandText2: (val: number | string | undefined) => string;
|
|
112
|
-
notProcessed: null;
|
|
113
|
-
other: null;
|
|
114
|
-
};
|
|
115
|
-
export declare const convertKey: (data: any, key: string) => any;
|
|
116
|
-
export type clounmKyeType = keyof typeof TABLE_KEY;
|
|
117
|
-
export type dealKeyType = keyof typeof CLOUMN_DEAL;
|
package/es/constants/table.mjs
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { splitK, dataHandle } from '../utils/tool.mjs';
|
|
2
|
-
|
|
3
|
-
const TABLE_KEY = {
|
|
4
|
-
index: "\u5E8F\u53F7",
|
|
5
|
-
year: "\u5E74\u4EFD",
|
|
6
|
-
fundName: "\u57FA\u91D1\u540D\u79F0",
|
|
7
|
-
cucmulativeReturn: "\u533A\u95F4\u6536\u76CA",
|
|
8
|
-
excessReturn: "\u8D85\u989D\u533A\u95F4\u6536\u76CA",
|
|
9
|
-
vol: "\u5E74\u5316\u6CE2\u52A8\u7387",
|
|
10
|
-
excessVol: "\u8D85\u989D\u5E74\u5316\u6CE2\u52A8\u7387",
|
|
11
|
-
sharpeRatio: "\u590F\u666E\u6BD4\u7387",
|
|
12
|
-
excessSharpeRatio: "\u8D85\u989D\u590F\u666E\u6BD4\u7387",
|
|
13
|
-
calmarRatio: "\u5361\u739B\u6BD4\u7387",
|
|
14
|
-
excessCalmarRatio: "\u8D85\u989D\u5361\u739B\u6BD4\u7387",
|
|
15
|
-
sortinoRatio: "\u7D22\u63D0\u8BFA\u6BD4\u7387",
|
|
16
|
-
excessSortinoRatio: "\u8D85\u989D\u7D22\u63D0\u8BFA\u6BD4\u7387",
|
|
17
|
-
downsideDev: "\u4E0B\u884C\u98CE\u9669",
|
|
18
|
-
excessDownsideDev: "\u8D85\u989D\u4E0B\u884C\u98CE\u9669",
|
|
19
|
-
interval: "\u6700\u5927\u56DE\u64A4\u8D77\u6B62\u533A\u95F4",
|
|
20
|
-
maxDrawdown: "\u6700\u5927\u56DE\u64A4",
|
|
21
|
-
excessMaxDrawdown: "\u8D85\u989D\u6700\u5927\u56DE\u64A4",
|
|
22
|
-
maxDrawdownDays: "\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09",
|
|
23
|
-
excessMaxDrawdownDays: "\u8D85\u989D\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09",
|
|
24
|
-
maxNormalDays: "\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
|
|
25
|
-
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
|
-
corr: "\u76F8\u5173\u7CFB\u6570",
|
|
29
|
-
informationRatio: "\u4FE1\u606F\u6BD4\u7387",
|
|
30
|
-
trackingError: "\u8DDF\u8E2A\u8BEF\u5DEE",
|
|
31
|
-
alpha: "Alpha",
|
|
32
|
-
beta: "Beta",
|
|
33
|
-
skew: "\u504F\u5EA6",
|
|
34
|
-
kurt: "\u5CF0\u5EA6",
|
|
35
|
-
cVaR: "VaR\uFF0895%\u7F6E\u4FE1\uFF09",
|
|
36
|
-
indexReturns: "\u540C\u671F\u6307\u6570\u6536\u76CA",
|
|
37
|
-
"01": "1\u6708",
|
|
38
|
-
"02": "2\u6708",
|
|
39
|
-
"03": "3\u6708",
|
|
40
|
-
"04": "4\u6708",
|
|
41
|
-
"05": "5\u6708",
|
|
42
|
-
"06": "6\u6708",
|
|
43
|
-
"07": "7\u6708",
|
|
44
|
-
"08": "8\u6708",
|
|
45
|
-
"09": "9\u6708",
|
|
46
|
-
"10": "10\u6708",
|
|
47
|
-
"11": "11\u6708",
|
|
48
|
-
"12": "12\u6708",
|
|
49
|
-
MonthlyPositiveRatio: "\u6708\u80DC\u7387",
|
|
50
|
-
all_year: "\u5168\u5E74",
|
|
51
|
-
// 交易记录
|
|
52
|
-
deal_type: "\u4EA4\u6613\u7C7B\u578B",
|
|
53
|
-
deal_apply_time: "\u7533\u8BF7\u65F6\u95F4",
|
|
54
|
-
deal_time: "\u786E\u8BA4\u65E5\u671F",
|
|
55
|
-
amount: "\u786E\u8BA4\u51C0\u989D",
|
|
56
|
-
shares: "\u786E\u8BA4\u4EFD\u989D",
|
|
57
|
-
price: "\u786E\u8BA4\u5355\u4F4D\u51C0\u503C",
|
|
58
|
-
bsfee: "\u4EA4\u6613\u8D39\u7528",
|
|
59
|
-
reward: "\u4E1A\u7EE9\u62A5\u916C",
|
|
60
|
-
// 持仓列表
|
|
61
|
-
ftype: "\u57FA\u91D1\u7C7B\u578B",
|
|
62
|
-
strategy: "\u5E73\u53F0\u7B56\u7565",
|
|
63
|
-
weight_rate: "\u6743\u91CD",
|
|
64
|
-
price_nav: "\u5355\u4F4D\u51C0\u503C",
|
|
65
|
-
inital_purchase_date: "\u521D\u59CB\u7533\u8D2D\u65E5\u671F",
|
|
66
|
-
price_date: "\u51C0\u503C\u65E5\u671F",
|
|
67
|
-
clear_time: "\u6E05\u4ED3\u65E5\u671F",
|
|
68
|
-
price_change: "\u51C0\u503C\u6DA8\u8DCC\u5E45",
|
|
69
|
-
price_source: "\u51C0\u503C\u6765\u6E90",
|
|
70
|
-
hold_value: "\u6301\u4ED3\u5E02\u503C\uFF08\u5143\uFF09",
|
|
71
|
-
code: "\u5907\u6848\u53F7/\u4EE3\u7801",
|
|
72
|
-
is_manage_change: "\u6301\u4ED3\u671F\u5185\u7ECF\u7406\u53D8\u66F4",
|
|
73
|
-
price_weighted: "\u6301\u6709\u5355\u4EF7",
|
|
74
|
-
cost: "\u6301\u4ED3\u6210\u672C\uFF08\u5143\uFF09",
|
|
75
|
-
cost_weighted: "\u6301\u6709\u6210\u672C\uFF08\u5143\uFF09",
|
|
76
|
-
position_return: "\u6301\u4ED3\u6536\u76CA\uFF08\u5143\uFF09",
|
|
77
|
-
profit_weighted: "\u6301\u6709\u6536\u76CA\uFF08\u5143\uFF09",
|
|
78
|
-
rate: "\u6301\u4ED3\u6536\u76CA\u7387",
|
|
79
|
-
rate_weighted: "\u6301\u6709\u6536\u76CA\u7387",
|
|
80
|
-
year_rate_position: "\u6301\u4ED3\u5E74\u5316\u6536\u76CA\u7387",
|
|
81
|
-
year_rate_weighted: "\u6301\u6709\u5E74\u5316\u6536\u76CA\u7387",
|
|
82
|
-
cost_days: "\u6301\u6709\u5929\u6570",
|
|
83
|
-
return_range: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\uFF08\u5143\uFF09",
|
|
84
|
-
cum_profit: "\u7D2F\u8BA1\u6536\u76CA\uFF08\u5143\uFF09",
|
|
85
|
-
return_range_rate: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\u7387",
|
|
86
|
-
cum_rate: "\u7D2F\u8BA1\u6536\u76CA\u7387",
|
|
87
|
-
year_rate_range: "\u533A\u95F4\u6295\u8D44\u5E74\u5316\u6536\u76CA\u7387",
|
|
88
|
-
year_rate_cum: "\u7D2F\u8BA1\u5E74\u5316\u6536\u76CA\u7387",
|
|
89
|
-
cost_accumulated: "\u7D2F\u8BA1\u6210\u672C\uFF08\u5143\uFF09",
|
|
90
|
-
cum_bsfee: "\u7D2F\u8BA1\u4EA4\u6613\u8D39\u7528\uFF08\u5143\uFF09",
|
|
91
|
-
cum_subscription: "\u7D2F\u8BA1\u8BA4\u7533\u8D2D\uFF08\u5143\uFF09",
|
|
92
|
-
cum_cash: "\u7D2F\u8BA1\u73B0\u91D1\u5206\u7EA2\uFF08\u5143\uFF09",
|
|
93
|
-
cum_redemption: "\u7D2F\u8BA1\u8D4E\u56DE\uFF08\u5143\uFF09",
|
|
94
|
-
cum_reward: "\u7D2F\u8BA1\u4E1A\u7EE9\u62A5\u916C\uFF08\u5143\uFF09",
|
|
95
|
-
// 资产配置
|
|
96
|
-
assets_type: "\u8D44\u4EA7\u7C7B\u522B",
|
|
97
|
-
values: "\u5E02\u503C",
|
|
98
|
-
values_ratio: "\u5E02\u503C\u5360\u6BD4",
|
|
99
|
-
// 底层配置
|
|
100
|
-
type_name: "\u7B56\u7565",
|
|
101
|
-
fid_num: "\u4EA7\u54C1\u6570\u91CF",
|
|
102
|
-
assets: "\u6295\u8D44\u5E02\u503C",
|
|
103
|
-
assets_rate: "\u6295\u8D44\u5E02\u503C\u5360\u6BD4",
|
|
104
|
-
// 收益明细
|
|
105
|
-
range_return: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\u7387",
|
|
106
|
-
return_money: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\uFF08\u5143\uFF09",
|
|
107
|
-
range_year_return: "\u533A\u95F4\u6295\u8D44\u5E74\u5316\u6536\u76CA\u7387",
|
|
108
|
-
range_contribute: "\u7EC4\u5408\u51C0\u503C\u8D21\u732E\u5EA6",
|
|
109
|
-
return_money_contribute: "\u7EC4\u5408\u6536\u76CA\u8D21\u732E\u5EA6",
|
|
110
|
-
// 月度收益
|
|
111
|
-
money_name: "\u91D1\u989D\uFF08\u5143\uFF09"
|
|
112
|
-
};
|
|
113
|
-
const basicText4 = (val) => {
|
|
114
|
-
return val === "-" || val === void 0 ? "-" : val.toFixed(4);
|
|
115
|
-
};
|
|
116
|
-
const percentage = (val) => {
|
|
117
|
-
return val === "-" || val === void 0 ? "-" : (val * 100).toFixed(2) + "%";
|
|
118
|
-
};
|
|
119
|
-
const absPercentage = (val) => {
|
|
120
|
-
return val === "-" || val === void 0 ? "-" : Math.abs(val * 100).toFixed(2) + "%";
|
|
121
|
-
};
|
|
122
|
-
const thoundsandText2 = (val) => {
|
|
123
|
-
return typeof val === "number" ? splitK(dataHandle(val, false, 2)) : "-";
|
|
124
|
-
};
|
|
125
|
-
const CLOUMN_DEAL = {
|
|
126
|
-
basicText4,
|
|
127
|
-
colorText: basicText4,
|
|
128
|
-
colorPercentage: percentage,
|
|
129
|
-
percentage,
|
|
130
|
-
absPercentage,
|
|
131
|
-
thoundsandText2,
|
|
132
|
-
notProcessed: null,
|
|
133
|
-
other: null
|
|
134
|
-
};
|
|
135
|
-
const convertKey = (data, key) => {
|
|
136
|
-
const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
137
|
-
return data[key] || data[newKey];
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export { CLOUMN_DEAL, TABLE_KEY, convertKey };
|
package/es/constants/target.d.ts
DELETED
package/es/constants/target.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const TARGET_HEAD_KEY = [
|
|
2
|
-
{ name: "\u672C\u5468", key: "thisWeek" },
|
|
3
|
-
{ name: "\u672C\u6708", key: "thisMonth" },
|
|
4
|
-
{ name: "\u8FD1\u4E00\u5468", key: "pastWeek" },
|
|
5
|
-
{ name: "\u8FD1\u4E00\u6708", key: "lastOneMonth" },
|
|
6
|
-
{ name: "\u8FD1\u4E09\u6708", key: "lastThreeMonth" },
|
|
7
|
-
{ name: "\u8FD1\u516D\u6708", key: "lastSixMonth" },
|
|
8
|
-
{ name: "\u8FD1\u4E00\u5E74", key: "lastOneYear" },
|
|
9
|
-
{ name: "\u8FD1\u4E24\u5E74", key: "lastTwoYear" },
|
|
10
|
-
{ name: "\u8FD1\u4E09\u5E74", key: "lastThreeYear" },
|
|
11
|
-
{ name: "\u8FD1\u4E94\u5E74", key: "lastFiveYear" },
|
|
12
|
-
{ name: "\u4ECA\u5E74\u4EE5\u6765", key: "ytd" },
|
|
13
|
-
{ name: "\u6210\u7ACB\u4EE5\u6765", key: "cucmulative" }
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export { TARGET_HEAD_KEY };
|
package/es/css/index.css
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
.echart-box {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
position: relative;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.echart-content {
|
|
10
|
-
flex: auto;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.echart-lenged {
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: auto;
|
|
16
|
-
margin-top: 6px;
|
|
17
|
-
padding-right: 22px;
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-wrap: wrap;
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
position: relative;
|
|
23
|
-
z-index: 999;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.bg-span {
|
|
27
|
-
display: inline-block;
|
|
28
|
-
width: 14px;
|
|
29
|
-
height: 2px;
|
|
30
|
-
margin-right: 6px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.bg-span-bar {
|
|
34
|
-
display: inline-block;
|
|
35
|
-
width: 16px;
|
|
36
|
-
height: 10px;
|
|
37
|
-
border-radius: 2px;
|
|
38
|
-
margin-right: 6px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.span-box {
|
|
42
|
-
margin-left: 5px;
|
|
43
|
-
margin-right: 6px;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.noData {
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
font-size: 16px;
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
align-items: center;
|
|
56
|
-
position: absolute;
|
|
57
|
-
bottom: 0px;
|
|
58
|
-
color: #ccc;
|
|
59
|
-
}
|
package/es/defaults.d.ts
DELETED
package/es/defaults.mjs
DELETED
package/es/index.d.ts
DELETED
package/es/index.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import installer from './defaults.mjs';
|
|
2
|
-
export { makeInstaller } from './make-installer.mjs';
|
|
3
|
-
export { HtElTable } from './components/elTable/index.mjs';
|
|
4
|
-
export { HtChart } from './components/chart/index.mjs';
|
|
5
|
-
export { HtTarget } from './components/htTarget/index.mjs';
|
|
6
|
-
export { columnDealProps, elTableProps } from './components/elTable/src/elTable.mjs';
|
|
7
|
-
export { chartProps } from './components/chart/src/HtChart.mjs';
|
|
8
|
-
|
|
9
|
-
const install = installer.install;
|
|
10
|
-
|
|
11
|
-
export { installer as default, install };
|
package/es/make-installer.d.ts
DELETED
package/es/make-installer.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { INSTALLED_KEY } from './constants/key.mjs';
|
|
2
|
-
|
|
3
|
-
const makeInstaller = (components = []) => {
|
|
4
|
-
const install = (app) => {
|
|
5
|
-
if (app[INSTALLED_KEY]) return;
|
|
6
|
-
app[INSTALLED_KEY] = true;
|
|
7
|
-
components.forEach((c) => app.use(c));
|
|
8
|
-
};
|
|
9
|
-
return {
|
|
10
|
-
install
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { makeInstaller };
|
package/es/plugin.d.ts
DELETED
package/es/plugin.mjs
DELETED
package/es/utils/chart.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { chartProp } from 'hfn-components/es/components/chart';
|
|
2
|
-
export type chartType = 'category' | 'time';
|
|
3
|
-
export declare const legendEnterOperate: (options: any, name: string) => void;
|
|
4
|
-
export declare const legendLeaveOperate: (options: any) => void;
|
|
5
|
-
export declare const setEchartXAxis: (options: any, type: chartType, xAxisData: string[]) => void;
|
|
6
|
-
export declare const setEchartYAxis: (options: any, props: chartProp) => void;
|
|
7
|
-
export declare const setEchartTooltip: (options: any, props: chartProp) => void;
|
package/es/utils/chart.mjs
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
const legendEnterOperate = (options, name) => {
|
|
2
|
-
options.series.forEach((series) => {
|
|
3
|
-
if (series.name === name) {
|
|
4
|
-
if (series.type === "line") {
|
|
5
|
-
if (series.lineStyle) {
|
|
6
|
-
series.lineStyle.opacity = 1;
|
|
7
|
-
} else {
|
|
8
|
-
series.lineStyle = {
|
|
9
|
-
opacity: 1
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
} else if (series.type === "bar") {
|
|
13
|
-
if (series.itemStyle) {
|
|
14
|
-
series.itemStyle.opacity = 1;
|
|
15
|
-
} else {
|
|
16
|
-
series.itemStyle = {
|
|
17
|
-
opacity: 1
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
if (series.type === "line") {
|
|
23
|
-
if (series.lineStyle) {
|
|
24
|
-
series.lineStyle.opacity = 0.1;
|
|
25
|
-
} else {
|
|
26
|
-
series.lineStyle = {
|
|
27
|
-
opacity: 0.1
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
} else if (series.type === "bar") {
|
|
31
|
-
if (series.itemStyle) {
|
|
32
|
-
series.itemStyle.opacity = 0.1;
|
|
33
|
-
} else {
|
|
34
|
-
series.itemStyle = {
|
|
35
|
-
opacity: 0.1
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
const legendLeaveOperate = (options) => {
|
|
43
|
-
options.series.forEach((series) => {
|
|
44
|
-
if (series.type === "line") {
|
|
45
|
-
if (series.lineStyle) {
|
|
46
|
-
series.lineStyle.opacity = 1;
|
|
47
|
-
} else {
|
|
48
|
-
series.lineStyle = {
|
|
49
|
-
opacity: 1
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
} else if (series.type === "bar") {
|
|
53
|
-
if (series.itemStyle) {
|
|
54
|
-
series.itemStyle.opacity = 1;
|
|
55
|
-
} else {
|
|
56
|
-
series.itemStyle = {
|
|
57
|
-
opacity: 1
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const setEchartXAxis = (options, type, xAxisData) => {
|
|
64
|
-
if (type === "category") {
|
|
65
|
-
const xAxis = [...xAxisData];
|
|
66
|
-
options.xAxis = {
|
|
67
|
-
type,
|
|
68
|
-
data: xAxis,
|
|
69
|
-
axisTick: {
|
|
70
|
-
alignWithLabel: true
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
} else if (type === "time") {
|
|
74
|
-
options.xAxis = {
|
|
75
|
-
type,
|
|
76
|
-
minInterval: 24 * 60 * 60 * 1e3,
|
|
77
|
-
axisLine: {
|
|
78
|
-
onZero: false
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const setEchartYAxis = (options, props) => {
|
|
84
|
-
options.yAxis = {
|
|
85
|
-
type: "value",
|
|
86
|
-
axisLabel: {
|
|
87
|
-
show: true,
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
89
|
-
formatter: function(val) {
|
|
90
|
-
return (props.yAxisUnit === "%" ? val > 0 ? "+" : "" : "") + parseFloat(val.toFixed(props.floatNumber)) + props.yAxisUnit;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
const setEchartTooltip = (options, props) => {
|
|
96
|
-
options.tooltip = {
|
|
97
|
-
trigger: "axis",
|
|
98
|
-
// tooltip提示框格式自定义
|
|
99
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
|
-
formatter: function(paramItems) {
|
|
101
|
-
let html = "";
|
|
102
|
-
if (Array.isArray(paramItems)) {
|
|
103
|
-
const params = paramItems.filter((item) => item.data !== void 0 && item.data !== null);
|
|
104
|
-
if (params.length === 0) return "";
|
|
105
|
-
if (props.chartType === "category") {
|
|
106
|
-
params.sort((a, b) => b.value - a.value);
|
|
107
|
-
} else {
|
|
108
|
-
params.sort((a, b) => {
|
|
109
|
-
if (Array.isArray(a.value) && Array.isArray(b.value)) {
|
|
110
|
-
return props.collation === "des" ? b.value[1] - a.value[1] : a.value[1] - b.value[1];
|
|
111
|
-
} else {
|
|
112
|
-
return 0;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
html += `<div>${props.chartType === "category" ? params[0].name : Array.isArray(params[0].value) ? params[0].value[0] : ""}</div>`;
|
|
117
|
-
if (params.length > 30) html += '<div style="display: flex;">';
|
|
118
|
-
const len = Math.ceil(params.length / 3);
|
|
119
|
-
for (let i = 0; i < params.length; i++) {
|
|
120
|
-
if ((i + 1) % len === 1 && params.length > 30) {
|
|
121
|
-
html += '<div style="display: flex; flex-direction: column;">';
|
|
122
|
-
}
|
|
123
|
-
if (params[i].value === void 0 || params[i].value === null) ; else {
|
|
124
|
-
html += '<div style="display: flex;align-items:center">';
|
|
125
|
-
html += `<span
|
|
126
|
-
style="display:inline-block;
|
|
127
|
-
margin-right:5px;
|
|
128
|
-
border-radius:10px;
|
|
129
|
-
width:10px;height:10px;
|
|
130
|
-
background-color:${params[i].color};
|
|
131
|
-
">
|
|
132
|
-
</span>`;
|
|
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
|
-
}
|
|
144
|
-
} else {
|
|
145
|
-
if (props.chartType === "category") {
|
|
146
|
-
html += `<span style='color:${params[i].color}'>
|
|
147
|
-
${params[i].seriesName.includes("series") ? params[i].name : params[i].seriesName}
|
|
148
|
-
</span>\uFF1A
|
|
149
|
-
${params[i].value.toFixed(props.floatNumber)}${props.tooltipUnit}
|
|
150
|
-
`;
|
|
151
|
-
} else {
|
|
152
|
-
html += `<span style='color:${params[i].color}'>${params[i].seriesName}</span>\uFF1A${params[i].value[1]?.toFixed(props.floatNumber)}${props.tooltipUnit}`;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
html += "</div>";
|
|
156
|
-
}
|
|
157
|
-
if ((i + 1) % len === 0 && params.length > 30) {
|
|
158
|
-
html += "</div>";
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (params.length > 30) html += "</div>";
|
|
162
|
-
}
|
|
163
|
-
return html;
|
|
164
|
-
},
|
|
165
|
-
textStyle: {
|
|
166
|
-
color: "rgba(0,0,0,0.7)"
|
|
167
|
-
// 设置文字颜色
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export { legendEnterOperate, legendLeaveOperate, setEchartTooltip, setEchartXAxis, setEchartYAxis };
|
package/es/utils/common.d.ts
DELETED
package/es/utils/common.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const withInstall = (main, extra) => {
|
|
2
|
-
main.install = (app) => {
|
|
3
|
-
for (const comp of [main, ...Object.values(extra ?? {})]) {
|
|
4
|
-
app.component(comp.name, comp);
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
if (extra) {
|
|
8
|
-
for (const [key, comp] of Object.entries(extra)) {
|
|
9
|
-
main[key] = comp;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return main;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { withInstall };
|
package/es/utils/index.d.ts
DELETED
package/es/utils/index.mjs
DELETED
package/es/utils/table.d.ts
DELETED