hfn-components 0.2.5 → 0.2.6

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.
@@ -0,0 +1,27 @@
1
+ import _sfc_main from './htTarget.vue2.mjs';
2
+ import { openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode } from 'vue';
3
+ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
4
+
5
+ const _hoisted_1 = { class: "dialog-footer" };
6
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7
+ return openBlock(), createElementBlock("div", null, [
8
+ createVNode($setup["ElDialog"], null, {
9
+ footer: withCtx(() => [
10
+ createElementVNode("div", _hoisted_1, [
11
+ createVNode($setup["ElButton"], { type: "primary" }, {
12
+ default: withCtx(() => [
13
+ createTextVNode(" Confirm ")
14
+ ]),
15
+ _: 1
16
+ /* STABLE */
17
+ })
18
+ ])
19
+ ]),
20
+ _: 1
21
+ /* STABLE */
22
+ })
23
+ ]);
24
+ }
25
+ var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/htTarget/src/htTarget.vue"]]);
26
+
27
+ export { htTarget as default };
@@ -0,0 +1,31 @@
1
+ import { defineComponent, ref, onMounted } from 'vue';
2
+ import { ElDialog, ElButton } from 'element-plus';
3
+ import { TARGET_HEAD_KEY } from '../../../constants/target.mjs';
4
+
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "htTarget",
7
+ setup(__props, { expose: __expose }) {
8
+ __expose();
9
+ const targetHead = ref(TARGET_HEAD_KEY);
10
+ onMounted(() => {
11
+ let startYear = 2018;
12
+ const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
13
+ while (startYear <= nowYear) {
14
+ targetHead.value.push({
15
+ name: `${startYear}`,
16
+ key: `${startYear}`
17
+ });
18
+ startYear++;
19
+ }
20
+ });
21
+ const __returned__ = { targetHead, get ElDialog() {
22
+ return ElDialog;
23
+ }, get ElButton() {
24
+ return ElButton;
25
+ } };
26
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
27
+ return __returned__;
28
+ }
29
+ });
30
+
31
+ export { _sfc_main as default };
@@ -1,2 +1,3 @@
1
1
  export * from './elTable';
2
2
  export * from './chart';
3
+ export * from './htTarget';
@@ -1,4 +1,5 @@
1
1
  export { HtElTable } from './elTable/index.mjs';
2
2
  export { HtChart } from './chart/index.mjs';
3
+ export { HtTarget } from './htTarget/index.mjs';
3
4
  export { columnDealProps, elTableProps } from './elTable/src/elTable.mjs';
4
5
  export { chartProps } from './chart/src/HtChart.mjs';
@@ -1588,7 +1588,7 @@ declare const _default: import("vue").DefineComponent<{
1588
1588
  disabled: BooleanConstructor;
1589
1589
  danger: BooleanConstructor;
1590
1590
  title: {
1591
- type: (BooleanConstructor | StringConstructor)[];
1591
+ type: (StringConstructor | BooleanConstructor)[];
1592
1592
  default: any;
1593
1593
  };
1594
1594
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1603,7 +1603,7 @@ declare const _default: import("vue").DefineComponent<{
1603
1603
  disabled: BooleanConstructor;
1604
1604
  danger: BooleanConstructor;
1605
1605
  title: {
1606
- type: (BooleanConstructor | StringConstructor)[];
1606
+ type: (StringConstructor | BooleanConstructor)[];
1607
1607
  default: any;
1608
1608
  };
1609
1609
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1674,7 +1674,7 @@ declare const _default: import("vue").DefineComponent<{
1674
1674
  disabled: BooleanConstructor;
1675
1675
  danger: BooleanConstructor;
1676
1676
  title: {
1677
- type: (BooleanConstructor | StringConstructor)[];
1677
+ type: (StringConstructor | BooleanConstructor)[];
1678
1678
  default: any;
1679
1679
  };
1680
1680
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1689,7 +1689,7 @@ declare const _default: import("vue").DefineComponent<{
1689
1689
  disabled: BooleanConstructor;
1690
1690
  danger: BooleanConstructor;
1691
1691
  title: {
1692
- type: (BooleanConstructor | StringConstructor)[];
1692
+ type: (StringConstructor | BooleanConstructor)[];
1693
1693
  default: any;
1694
1694
  };
1695
1695
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -444,6 +444,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
444
444
  /* STABLE_FRAGMENT */
445
445
  );
446
446
  }
447
- var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/table/HtTable.vue"]]);
447
+ var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/table/HtTable.vue"]]);
448
448
 
449
449
  export { Table as default };
@@ -1585,7 +1585,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1585
1585
  disabled: BooleanConstructor;
1586
1586
  danger: BooleanConstructor;
1587
1587
  title: {
1588
- type: (BooleanConstructor | StringConstructor)[];
1588
+ type: (StringConstructor | BooleanConstructor)[];
1589
1589
  default: any;
1590
1590
  };
1591
1591
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1600,7 +1600,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1600
1600
  disabled: BooleanConstructor;
1601
1601
  danger: BooleanConstructor;
1602
1602
  title: {
1603
- type: (BooleanConstructor | StringConstructor)[];
1603
+ type: (StringConstructor | BooleanConstructor)[];
1604
1604
  default: any;
1605
1605
  };
1606
1606
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1671,7 +1671,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1671
1671
  disabled: BooleanConstructor;
1672
1672
  danger: BooleanConstructor;
1673
1673
  title: {
1674
- type: (BooleanConstructor | StringConstructor)[];
1674
+ type: (StringConstructor | BooleanConstructor)[];
1675
1675
  default: any;
1676
1676
  };
1677
1677
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1686,7 +1686,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1686
1686
  disabled: BooleanConstructor;
1687
1687
  danger: BooleanConstructor;
1688
1688
  title: {
1689
- type: (BooleanConstructor | StringConstructor)[];
1689
+ type: (StringConstructor | BooleanConstructor)[];
1690
1690
  default: any;
1691
1691
  };
1692
1692
  icon: import("vue-types").VueTypeValidableDef<any>;
@@ -1,2 +1,3 @@
1
1
  export * from './key';
2
2
  export * from './table';
3
+ export * from './target';
@@ -1,2 +1,3 @@
1
1
  export { INSTALLED_KEY } from './key.mjs';
2
2
  export { CLOUMN_DEAL, TABLE_KEY, convertKey } from './table.mjs';
3
+ export { TARGET_HEAD_KEY } from './target.mjs';
@@ -46,6 +46,61 @@ export declare const TABLE_KEY: {
46
46
  readonly '12': "12月";
47
47
  readonly MonthlyPositiveRatio: "月胜率";
48
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: "金额(元)";
49
104
  };
50
105
  export declare const CLOUMN_DEAL: {
51
106
  basicText4: (val: number | string | undefined) => string;
@@ -53,6 +108,7 @@ export declare const CLOUMN_DEAL: {
53
108
  colorPercentage: (val: number | string | undefined) => string;
54
109
  percentage: (val: number | string | undefined) => string;
55
110
  absPercentage: (val: number | string | undefined) => string;
111
+ thoundsandText2: (val: number | string | undefined) => string;
56
112
  notProcessed: null;
57
113
  other: null;
58
114
  };
@@ -1,3 +1,5 @@
1
+ import { splitK, dataHandle } from '../utils/tool.mjs';
2
+
1
3
  const TABLE_KEY = {
2
4
  index: "\u5E8F\u53F7",
3
5
  year: "\u5E74\u4EFD",
@@ -45,7 +47,68 @@ const TABLE_KEY = {
45
47
  "11": "11\u6708",
46
48
  "12": "12\u6708",
47
49
  MonthlyPositiveRatio: "\u6708\u80DC\u7387",
48
- all_year: "\u5168\u5E74"
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"
49
112
  };
50
113
  const basicText4 = (val) => {
51
114
  return val === "-" || val === void 0 ? "-" : val.toFixed(4);
@@ -56,12 +119,16 @@ const percentage = (val) => {
56
119
  const absPercentage = (val) => {
57
120
  return val === "-" || val === void 0 ? "-" : Math.abs(val * 100).toFixed(2) + "%";
58
121
  };
122
+ const thoundsandText2 = (val) => {
123
+ return typeof val === "number" ? splitK(dataHandle(val, false, 2)) : "-";
124
+ };
59
125
  const CLOUMN_DEAL = {
60
126
  basicText4,
61
127
  colorText: basicText4,
62
128
  colorPercentage: percentage,
63
129
  percentage,
64
130
  absPercentage,
131
+ thoundsandText2,
65
132
  notProcessed: null,
66
133
  other: null
67
134
  };
@@ -0,0 +1,4 @@
1
+ export declare const TARGET_HEAD_KEY: {
2
+ name: string;
3
+ key: string;
4
+ }[];
@@ -0,0 +1,16 @@
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 };
@@ -0,0 +1,59 @@
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/index.mjs CHANGED
@@ -2,6 +2,7 @@ import installer from './defaults.mjs';
2
2
  export { makeInstaller } from './make-installer.mjs';
3
3
  export { HtElTable } from './components/elTable/index.mjs';
4
4
  export { HtChart } from './components/chart/index.mjs';
5
+ export { HtTarget } from './components/htTarget/index.mjs';
5
6
  export { columnDealProps, elTableProps } from './components/elTable/src/elTable.mjs';
6
7
  export { chartProps } from './components/chart/src/HtChart.mjs';
7
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",
@@ -11,7 +11,7 @@
11
11
  "keywords": [],
12
12
  "author": "",
13
13
  "license": "ISC",
14
- "devDependencies":{
14
+ "devDependencies": {
15
15
  "ant-design-vue": "3.2.20",
16
16
  "@ant-design/icons-vue": "^7.0.1",
17
17
  "element-plus": "^2.7.7"