hfn-components 0.6.3 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,6 +47,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
47
47
  readonly type: ObjectConstructor;
48
48
  readonly default: () => void;
49
49
  };
50
+ readonly xAxisObj: {
51
+ readonly type: ObjectConstructor;
52
+ readonly default: () => void;
53
+ };
50
54
  readonly tooltipUnit: {
51
55
  readonly type: StringConstructor;
52
56
  readonly default: "";
@@ -85,6 +89,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
85
89
  readonly floatNumber: number;
86
90
  readonly yAxisUnit: string;
87
91
  readonly yAxisObj: Record<string, any>;
92
+ readonly xAxisObj: Record<string, any>;
88
93
  readonly tooltipUnit: string;
89
94
  readonly watchResize: boolean;
90
95
  readonly showLegend: boolean;
@@ -153,6 +158,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
153
158
  readonly type: ObjectConstructor;
154
159
  readonly default: () => void;
155
160
  };
161
+ readonly xAxisObj: {
162
+ readonly type: ObjectConstructor;
163
+ readonly default: () => void;
164
+ };
156
165
  readonly tooltipUnit: {
157
166
  readonly type: StringConstructor;
158
167
  readonly default: "";
@@ -190,6 +199,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
190
199
  readonly floatNumber: number;
191
200
  readonly yAxisUnit: string;
192
201
  readonly yAxisObj: Record<string, any>;
202
+ readonly xAxisObj: Record<string, any>;
193
203
  readonly tooltipUnit: string;
194
204
  readonly watchResize: boolean;
195
205
  readonly showLegend: boolean;
@@ -49,6 +49,10 @@ export declare const chartProps: {
49
49
  readonly type: ObjectConstructor;
50
50
  readonly default: () => void;
51
51
  };
52
+ readonly xAxisObj: {
53
+ readonly type: ObjectConstructor;
54
+ readonly default: () => void;
55
+ };
52
56
  readonly tooltipUnit: {
53
57
  readonly type: StringConstructor;
54
58
  readonly default: "";
@@ -60,6 +60,12 @@ const chartProps = {
60
60
  default: () => {
61
61
  }
62
62
  },
63
+ // X轴对象
64
+ xAxisObj: {
65
+ type: Object,
66
+ default: () => {
67
+ }
68
+ },
63
69
  //tooltip单位
64
70
  tooltipUnit: {
65
71
  type: String,
@@ -54,6 +54,10 @@ declare const _default: import("vue").DefineComponent<{
54
54
  readonly type: ObjectConstructor;
55
55
  readonly default: () => void;
56
56
  };
57
+ readonly xAxisObj: {
58
+ readonly type: ObjectConstructor;
59
+ readonly default: () => void;
60
+ };
57
61
  readonly tooltipUnit: {
58
62
  readonly type: StringConstructor;
59
63
  readonly default: "";
@@ -92,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
92
96
  readonly floatNumber: number;
93
97
  readonly yAxisUnit: string;
94
98
  readonly yAxisObj: Record<string, any>;
99
+ readonly xAxisObj: Record<string, any>;
95
100
  readonly tooltipUnit: string;
96
101
  readonly watchResize: boolean;
97
102
  readonly showLegend: boolean;
@@ -160,6 +165,10 @@ declare const _default: import("vue").DefineComponent<{
160
165
  readonly type: ObjectConstructor;
161
166
  readonly default: () => void;
162
167
  };
168
+ readonly xAxisObj: {
169
+ readonly type: ObjectConstructor;
170
+ readonly default: () => void;
171
+ };
163
172
  readonly tooltipUnit: {
164
173
  readonly type: StringConstructor;
165
174
  readonly default: "";
@@ -197,6 +206,7 @@ declare const _default: import("vue").DefineComponent<{
197
206
  readonly floatNumber: number;
198
207
  readonly yAxisUnit: string;
199
208
  readonly yAxisObj: Record<string, any>;
209
+ readonly xAxisObj: Record<string, any>;
200
210
  readonly tooltipUnit: string;
201
211
  readonly watchResize: boolean;
202
212
  readonly showLegend: boolean;
@@ -85,6 +85,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
85
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
86
86
  ]);
87
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"]]);
88
+ var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/chart/src/HtChart.vue"]]);
89
89
 
90
90
  export { chart as default };
@@ -36,6 +36,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
36
36
  if (val && val.length > 0) {
37
37
  echartOptions.color = props.lineColor;
38
38
  if (myChart.value) {
39
+ lengedDeal();
39
40
  echartInit();
40
41
  }
41
42
  }
@@ -47,7 +48,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
47
48
  echartOptions.color = props.lineColor;
48
49
  }
49
50
  setEchartTitle(echartOptions, props);
50
- setEchartXAxis(echartOptions, props.chartType, props.xAxisData);
51
+ setEchartXAxis(echartOptions, props.chartType, props.xAxisData, props);
51
52
  setEchartYAxis(echartOptions, props);
52
53
  setEchartTooltip(echartOptions, props);
53
54
  lengedDeal();
@@ -25,11 +25,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
25
25
  key: string;
26
26
  }[]>;
27
27
  props: import("@vue/shared").LooseRequired<{
28
- readonly loading: boolean;
29
- readonly resizable: boolean;
30
28
  readonly dataSource: unknown[];
31
29
  readonly tableColumn: import("./src/elTable").ElTableColumns[];
30
+ readonly loading: boolean;
32
31
  readonly headerColor: string;
32
+ readonly resizable: boolean;
33
33
  } & {}>;
34
34
  wrapText: (text: string, charsPerLine?: number) => string;
35
35
  readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -718,6 +718,13 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
718
718
  readonly price_cnw: "累计净值";
719
719
  readonly price_cw_nav: "复权净值";
720
720
  readonly suspend_info: "停牌信息";
721
+ readonly industry: "行业名称";
722
+ readonly p4: "产品行业收益率";
723
+ readonly p1: "基准行业收益率";
724
+ readonly raa: "择时收益率";
725
+ readonly rss: "选股收益率";
726
+ readonly rin: "交互收益率";
727
+ readonly r_total: "超额收益率";
721
728
  };
722
729
  readonly convertKey: (data: any, key: string) => any;
723
730
  readonly TARGET_END_KEY: {
@@ -811,11 +818,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
811
818
  readonly default: true;
812
819
  };
813
820
  }>>, {
814
- readonly loading: boolean;
815
- readonly resizable: boolean;
816
821
  readonly dataSource: unknown[];
817
822
  readonly tableColumn: import("./src/elTable").ElTableColumns[];
823
+ readonly loading: boolean;
818
824
  readonly headerColor: string;
825
+ readonly resizable: boolean;
819
826
  }, {}>> & Record<string, any>;
820
827
  export default HtElTable;
821
828
  export * from './src/elTable';
@@ -37,6 +37,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
37
37
  /* TEXT */
38
38
  ));
39
39
  }
40
- var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/columnDeal.vue"]]);
40
+ var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/columnDeal.vue"]]);
41
41
 
42
42
  export { ColumnDeal as default };
@@ -25,11 +25,11 @@ declare const _default: import("vue").DefineComponent<{
25
25
  key: string;
26
26
  }[]>;
27
27
  props: import("@vue/shared").LooseRequired<{
28
- readonly loading: boolean;
29
- readonly resizable: boolean;
30
28
  readonly dataSource: unknown[];
31
29
  readonly tableColumn: import("./elTable").ElTableColumns[];
30
+ readonly loading: boolean;
32
31
  readonly headerColor: string;
32
+ readonly resizable: boolean;
33
33
  } & {}>;
34
34
  wrapText: (text: string, charsPerLine?: number) => string;
35
35
  readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -718,6 +718,13 @@ declare const _default: import("vue").DefineComponent<{
718
718
  readonly price_cnw: "累计净值";
719
719
  readonly price_cw_nav: "复权净值";
720
720
  readonly suspend_info: "停牌信息";
721
+ readonly industry: "行业名称";
722
+ readonly p4: "产品行业收益率";
723
+ readonly p1: "基准行业收益率";
724
+ readonly raa: "择时收益率";
725
+ readonly rss: "选股收益率";
726
+ readonly rin: "交互收益率";
727
+ readonly r_total: "超额收益率";
721
728
  };
722
729
  readonly convertKey: (data: any, key: string) => any;
723
730
  readonly TARGET_END_KEY: {
@@ -811,10 +818,10 @@ declare const _default: import("vue").DefineComponent<{
811
818
  readonly default: true;
812
819
  };
813
820
  }>>, {
814
- readonly loading: boolean;
815
- readonly resizable: boolean;
816
821
  readonly dataSource: unknown[];
817
822
  readonly tableColumn: import("./elTable").ElTableColumns[];
823
+ readonly loading: boolean;
818
824
  readonly headerColor: string;
825
+ readonly resizable: boolean;
819
826
  }, {}>;
820
827
  export default _default;
@@ -106,6 +106,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
106
106
  [$setup["vLoading"], $setup.props.loading]
107
107
  ]);
108
108
  }
109
- var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/elTable.vue"]]);
109
+ var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/elTable.vue"]]);
110
110
 
111
111
  export { elTable as default };
@@ -235,6 +235,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
235
235
  }, 8, ["modelValue"])
236
236
  ]);
237
237
  }
238
- var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/htTarget/src/htTarget.vue"]]);
238
+ var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/htTarget/src/htTarget.vue"]]);
239
239
 
240
240
  export { htTarget as default };
@@ -56,6 +56,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
56
56
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
57
57
  ]);
58
58
  }
59
- var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
59
+ var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
60
60
 
61
61
  export { htPieChart as default };
@@ -108,11 +108,11 @@ declare const _default: import("vue").DefineComponent<{
108
108
  };
109
109
  }, {
110
110
  props: import("@vue/shared").LooseRequired<{
111
+ readonly dataSource: unknown[];
111
112
  readonly loading: boolean;
112
113
  readonly pageSize: number;
113
114
  readonly total: number;
114
115
  readonly columns: TableColumns[];
115
- readonly dataSource: unknown[];
116
116
  readonly selectedKeys: (string | number)[];
117
117
  readonly actions: import("./HtTable").ActionItem[];
118
118
  readonly nowPage: number;
@@ -1817,11 +1817,11 @@ declare const _default: import("vue").DefineComponent<{
1817
1817
  onHandleSelectAll?: ((...args: any[]) => any) | undefined;
1818
1818
  onResizeColumn?: ((...args: any[]) => any) | undefined;
1819
1819
  }, {
1820
+ readonly dataSource: unknown[];
1820
1821
  readonly loading: boolean;
1821
1822
  readonly pageSize: number;
1822
1823
  readonly total: number;
1823
1824
  readonly columns: TableColumns[];
1824
- readonly dataSource: unknown[];
1825
1825
  readonly selectedKeys: (string | number)[];
1826
1826
  readonly actions: import("./HtTable").ActionItem[];
1827
1827
  readonly nowPage: number;
@@ -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 };
@@ -105,11 +105,11 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
105
105
  };
106
106
  }, {
107
107
  props: import("@vue/shared").LooseRequired<{
108
+ readonly dataSource: unknown[];
108
109
  readonly loading: boolean;
109
110
  readonly pageSize: number;
110
111
  readonly total: number;
111
112
  readonly columns: import("./HtTable").TableColumns[];
112
- readonly dataSource: unknown[];
113
113
  readonly selectedKeys: (string | number)[];
114
114
  readonly actions: import("./HtTable").ActionItem[];
115
115
  readonly nowPage: number;
@@ -1814,11 +1814,11 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1814
1814
  onHandleSelectAll?: ((...args: any[]) => any) | undefined;
1815
1815
  onResizeColumn?: ((...args: any[]) => any) | undefined;
1816
1816
  }, {
1817
+ readonly dataSource: unknown[];
1817
1818
  readonly loading: boolean;
1818
1819
  readonly pageSize: number;
1819
1820
  readonly total: number;
1820
1821
  readonly columns: import("./HtTable").TableColumns[];
1821
- readonly dataSource: unknown[];
1822
1822
  readonly selectedKeys: (string | number)[];
1823
1823
  readonly actions: import("./HtTable").ActionItem[];
1824
1824
  readonly nowPage: number;
@@ -105,6 +105,13 @@ export declare const TABLE_KEY: {
105
105
  readonly price_cnw: "累计净值";
106
106
  readonly price_cw_nav: "复权净值";
107
107
  readonly suspend_info: "停牌信息";
108
+ readonly industry: "行业名称";
109
+ readonly p4: "产品行业收益率";
110
+ readonly p1: "基准行业收益率";
111
+ readonly raa: "择时收益率";
112
+ readonly rss: "选股收益率";
113
+ readonly rin: "交互收益率";
114
+ readonly r_total: "超额收益率";
108
115
  };
109
116
  export declare const CLOUMN_DEAL: {
110
117
  basicText4: (val: number | string | undefined) => string;
@@ -114,7 +114,15 @@ const TABLE_KEY = {
114
114
  // 持仓概览-fof底层
115
115
  price_cnw: "\u7D2F\u8BA1\u51C0\u503C",
116
116
  price_cw_nav: "\u590D\u6743\u51C0\u503C",
117
- suspend_info: "\u505C\u724C\u4FE1\u606F"
117
+ suspend_info: "\u505C\u724C\u4FE1\u606F",
118
+ // 归因分析
119
+ industry: "\u884C\u4E1A\u540D\u79F0",
120
+ p4: "\u4EA7\u54C1\u884C\u4E1A\u6536\u76CA\u7387",
121
+ p1: "\u57FA\u51C6\u884C\u4E1A\u6536\u76CA\u7387",
122
+ raa: "\u62E9\u65F6\u6536\u76CA\u7387",
123
+ rss: "\u9009\u80A1\u6536\u76CA\u7387",
124
+ rin: "\u4EA4\u4E92\u6536\u76CA\u7387",
125
+ r_total: "\u8D85\u989D\u6536\u76CA\u7387"
118
126
  };
119
127
  const basicText4 = (val) => {
120
128
  return typeof val !== "number" ? "-" : val.toFixed(4);
@@ -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
+ }
@@ -2,7 +2,7 @@ import type { chartProp } from 'hfn-components/es/components/chart';
2
2
  export type chartType = 'category' | 'time';
3
3
  export declare const legendEnterOperate: (options: any, name: string) => void;
4
4
  export declare const legendLeaveOperate: (options: any) => void;
5
- export declare const setEchartXAxis: (options: any, type: chartType, xAxisData: string[]) => void;
5
+ export declare const setEchartXAxis: (options: any, type: chartType, xAxisData: string[], props: chartProp) => void;
6
6
  export declare const setEchartYAxis: (options: any, props: chartProp) => void;
7
7
  export declare const setEchartTitle: (options: any, props: chartProp) => void;
8
8
  export declare const setEchartTooltip: (options: any, props: chartProp) => void;
@@ -60,7 +60,7 @@ const legendLeaveOperate = (options) => {
60
60
  }
61
61
  });
62
62
  };
63
- const setEchartXAxis = (options, type, xAxisData) => {
63
+ const setEchartXAxis = (options, type, xAxisData, props) => {
64
64
  if (type === "category") {
65
65
  const xAxis = [...xAxisData];
66
66
  options.xAxis = {
@@ -69,7 +69,8 @@ const setEchartXAxis = (options, type, xAxisData) => {
69
69
  boundaryGap: true,
70
70
  axisTick: {
71
71
  alignWithLabel: true
72
- }
72
+ },
73
+ ...props.xAxisObj
73
74
  };
74
75
  } else if (type === "time") {
75
76
  options.xAxis = {
@@ -77,7 +78,8 @@ const setEchartXAxis = (options, type, xAxisData) => {
77
78
  minInterval: 24 * 60 * 60 * 1e3,
78
79
  axisLine: {
79
80
  onZero: false
80
- }
81
+ },
82
+ ...props.xAxisObj
81
83
  };
82
84
  }
83
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",