hfn-components 0.1.4 → 0.1.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.
- package/es/components/elTable/index.d.ts +19 -0
- package/es/components/elTable/src/elTable.d.ts +4 -0
- package/es/components/elTable/src/elTable.mjs +4 -0
- package/es/components/elTable/src/elTable.vue.d.ts +19 -0
- package/es/components/elTable/src/elTable.vue.mjs +4 -3
- package/es/components/elTable/src/elTable.vue2.mjs +3 -1
- package/es/constants/index.mjs +1 -1
- package/es/constants/table.d.ts +9 -0
- package/es/constants/table.mjs +13 -1
- package/package.json +1 -1
|
@@ -11,11 +11,16 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
11
11
|
readonly type: BooleanConstructor;
|
|
12
12
|
readonly default: false;
|
|
13
13
|
};
|
|
14
|
+
readonly headerColor: {
|
|
15
|
+
readonly type: StringConstructor;
|
|
16
|
+
readonly default: "#f0f0f0";
|
|
17
|
+
};
|
|
14
18
|
}, {
|
|
15
19
|
props: import("@vue/shared").LooseRequired<{
|
|
16
20
|
readonly loading: boolean;
|
|
17
21
|
readonly dataSource: unknown[];
|
|
18
22
|
readonly tableColumn: import("./src/elTable").ElTableColumns[];
|
|
23
|
+
readonly headerColor: string;
|
|
19
24
|
} & {}>;
|
|
20
25
|
readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
21
26
|
data: {
|
|
@@ -617,6 +622,14 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
617
622
|
readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
|
|
618
623
|
readonly maxNormalDays: "最长连续不创新高天数(天)";
|
|
619
624
|
readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
|
|
625
|
+
readonly corr: "相关系数";
|
|
626
|
+
readonly informationRatio: "信息比率";
|
|
627
|
+
readonly trackingError: "跟踪误差";
|
|
628
|
+
readonly alpha: "Alpha";
|
|
629
|
+
readonly beta: "Beta";
|
|
630
|
+
readonly skew: "偏度";
|
|
631
|
+
readonly kurt: "峰度";
|
|
632
|
+
readonly cVaR: "VaR(95%置信)";
|
|
620
633
|
readonly '01': "1月";
|
|
621
634
|
readonly '02': "2月";
|
|
622
635
|
readonly '03': "3月";
|
|
@@ -632,6 +645,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
632
645
|
readonly MonthlyPositiveRatio: "月胜率";
|
|
633
646
|
readonly all_year: "全年";
|
|
634
647
|
};
|
|
648
|
+
readonly convertKey: (data: any, key: string) => any;
|
|
635
649
|
ColumnDeal: import("vue").DefineComponent<{
|
|
636
650
|
readonly dealType: {
|
|
637
651
|
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
@@ -679,10 +693,15 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
679
693
|
readonly type: BooleanConstructor;
|
|
680
694
|
readonly default: false;
|
|
681
695
|
};
|
|
696
|
+
readonly headerColor: {
|
|
697
|
+
readonly type: StringConstructor;
|
|
698
|
+
readonly default: "#f0f0f0";
|
|
699
|
+
};
|
|
682
700
|
}>>, {
|
|
683
701
|
readonly loading: boolean;
|
|
684
702
|
readonly dataSource: unknown[];
|
|
685
703
|
readonly tableColumn: import("./src/elTable").ElTableColumns[];
|
|
704
|
+
readonly headerColor: string;
|
|
686
705
|
}, {}>> & Record<string, any>;
|
|
687
706
|
export default HtElTable;
|
|
688
707
|
export * from './src/elTable';
|
|
@@ -18,6 +18,10 @@ export declare const elTableProps: {
|
|
|
18
18
|
readonly type: BooleanConstructor;
|
|
19
19
|
readonly default: false;
|
|
20
20
|
};
|
|
21
|
+
readonly headerColor: {
|
|
22
|
+
readonly type: StringConstructor;
|
|
23
|
+
readonly default: "#f0f0f0";
|
|
24
|
+
};
|
|
21
25
|
};
|
|
22
26
|
export declare const columnDealProps: {
|
|
23
27
|
readonly dealType: {
|
|
@@ -11,11 +11,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
readonly type: BooleanConstructor;
|
|
12
12
|
readonly default: false;
|
|
13
13
|
};
|
|
14
|
+
readonly headerColor: {
|
|
15
|
+
readonly type: StringConstructor;
|
|
16
|
+
readonly default: "#f0f0f0";
|
|
17
|
+
};
|
|
14
18
|
}, {
|
|
15
19
|
props: import("@vue/shared").LooseRequired<{
|
|
16
20
|
readonly loading: boolean;
|
|
17
21
|
readonly dataSource: unknown[];
|
|
18
22
|
readonly tableColumn: import("./elTable").ElTableColumns[];
|
|
23
|
+
readonly headerColor: string;
|
|
19
24
|
} & {}>;
|
|
20
25
|
readonly ElTable: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
21
26
|
data: {
|
|
@@ -617,6 +622,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
617
622
|
readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
|
|
618
623
|
readonly maxNormalDays: "最长连续不创新高天数(天)";
|
|
619
624
|
readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
|
|
625
|
+
readonly corr: "相关系数";
|
|
626
|
+
readonly informationRatio: "信息比率";
|
|
627
|
+
readonly trackingError: "跟踪误差";
|
|
628
|
+
readonly alpha: "Alpha";
|
|
629
|
+
readonly beta: "Beta";
|
|
630
|
+
readonly skew: "偏度";
|
|
631
|
+
readonly kurt: "峰度";
|
|
632
|
+
readonly cVaR: "VaR(95%置信)";
|
|
620
633
|
readonly '01': "1月";
|
|
621
634
|
readonly '02': "2月";
|
|
622
635
|
readonly '03': "3月";
|
|
@@ -632,6 +645,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
632
645
|
readonly MonthlyPositiveRatio: "月胜率";
|
|
633
646
|
readonly all_year: "全年";
|
|
634
647
|
};
|
|
648
|
+
readonly convertKey: (data: any, key: string) => any;
|
|
635
649
|
ColumnDeal: import("vue").DefineComponent<{
|
|
636
650
|
readonly dealType: {
|
|
637
651
|
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
@@ -679,9 +693,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
679
693
|
readonly type: BooleanConstructor;
|
|
680
694
|
readonly default: false;
|
|
681
695
|
};
|
|
696
|
+
readonly headerColor: {
|
|
697
|
+
readonly type: StringConstructor;
|
|
698
|
+
readonly default: "#f0f0f0";
|
|
699
|
+
};
|
|
682
700
|
}>>, {
|
|
683
701
|
readonly loading: boolean;
|
|
684
702
|
readonly dataSource: unknown[];
|
|
685
703
|
readonly tableColumn: import("./elTable").ElTableColumns[];
|
|
704
|
+
readonly headerColor: string;
|
|
686
705
|
}, {}>;
|
|
687
706
|
export default _default;
|
|
@@ -8,7 +8,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8
8
|
style: { "width": "100%" },
|
|
9
9
|
height: "100%",
|
|
10
10
|
"header-cell-style": {
|
|
11
|
-
background:
|
|
11
|
+
background: $setup.props.headerColor,
|
|
12
12
|
color: "#000",
|
|
13
13
|
"font-weight": 500,
|
|
14
14
|
"font-size": "12px"
|
|
@@ -20,6 +20,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20
20
|
null,
|
|
21
21
|
renderList($setup.props.tableColumn, (item) => {
|
|
22
22
|
return openBlock(), createBlock($setup["ElTableColumn"], {
|
|
23
|
+
resizable: "",
|
|
23
24
|
key: item.key,
|
|
24
25
|
prop: item.key,
|
|
25
26
|
label: $setup.TABLE_KEY[item.key],
|
|
@@ -28,7 +29,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
28
29
|
default: withCtx((scope) => [
|
|
29
30
|
createVNode($setup["ColumnDeal"], {
|
|
30
31
|
dealType: item.dealType,
|
|
31
|
-
text: scope.row
|
|
32
|
+
text: $setup.convertKey(scope.row, item.key)
|
|
32
33
|
}, null, 8, ["dealType", "text"])
|
|
33
34
|
]),
|
|
34
35
|
_: 2
|
|
@@ -41,7 +42,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41
42
|
]),
|
|
42
43
|
_: 1
|
|
43
44
|
/* STABLE */
|
|
44
|
-
}, 8, ["data"])), [
|
|
45
|
+
}, 8, ["data", "header-cell-style"])), [
|
|
45
46
|
[$setup["vLoading"], $setup.props.loading]
|
|
46
47
|
]);
|
|
47
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { ElTable, ElTableColumn, vLoading } from 'element-plus';
|
|
3
|
-
import { TABLE_KEY } from '../../../constants/table.mjs';
|
|
3
|
+
import { TABLE_KEY, convertKey } from '../../../constants/table.mjs';
|
|
4
4
|
import ColumnDeal from './columnDeal.vue.mjs';
|
|
5
5
|
import { elTableProps } from './elTable.mjs';
|
|
6
6
|
|
|
@@ -18,6 +18,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
return vLoading;
|
|
19
19
|
}, get TABLE_KEY() {
|
|
20
20
|
return TABLE_KEY;
|
|
21
|
+
}, get convertKey() {
|
|
22
|
+
return convertKey;
|
|
21
23
|
}, ColumnDeal };
|
|
22
24
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
23
25
|
return __returned__;
|
package/es/constants/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { INSTALLED_KEY } from './key.mjs';
|
|
2
|
-
export { CLOUMN_DEAL, TABLE_KEY } from './table.mjs';
|
|
2
|
+
export { CLOUMN_DEAL, TABLE_KEY, convertKey } from './table.mjs';
|
package/es/constants/table.d.ts
CHANGED
|
@@ -19,6 +19,14 @@ export declare const TABLE_KEY: {
|
|
|
19
19
|
readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
|
|
20
20
|
readonly maxNormalDays: "最长连续不创新高天数(天)";
|
|
21
21
|
readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
|
|
22
|
+
readonly corr: "相关系数";
|
|
23
|
+
readonly informationRatio: "信息比率";
|
|
24
|
+
readonly trackingError: "跟踪误差";
|
|
25
|
+
readonly alpha: "Alpha";
|
|
26
|
+
readonly beta: "Beta";
|
|
27
|
+
readonly skew: "偏度";
|
|
28
|
+
readonly kurt: "峰度";
|
|
29
|
+
readonly cVaR: "VaR(95%置信)";
|
|
22
30
|
readonly '01': "1月";
|
|
23
31
|
readonly '02': "2月";
|
|
24
32
|
readonly '03': "3月";
|
|
@@ -41,5 +49,6 @@ export declare const CLOUMN_DEAL: {
|
|
|
41
49
|
percentage: (val: number | string | undefined) => string;
|
|
42
50
|
notProcessed: null;
|
|
43
51
|
};
|
|
52
|
+
export declare const convertKey: (data: any, key: string) => any;
|
|
44
53
|
export type clounmKyeType = keyof typeof TABLE_KEY;
|
|
45
54
|
export type dealKeyType = keyof typeof CLOUMN_DEAL;
|
package/es/constants/table.mjs
CHANGED
|
@@ -19,6 +19,14 @@ const TABLE_KEY = {
|
|
|
19
19
|
excessMaxDrawdownDays: "\u8D85\u989D\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09",
|
|
20
20
|
maxNormalDays: "\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
|
|
21
21
|
excessMaxNormalDays: "\u8D85\u989D\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
|
|
22
|
+
corr: "\u76F8\u5173\u7CFB\u6570",
|
|
23
|
+
informationRatio: "\u4FE1\u606F\u6BD4\u7387",
|
|
24
|
+
trackingError: "\u8DDF\u8E2A\u8BEF\u5DEE",
|
|
25
|
+
alpha: "Alpha",
|
|
26
|
+
beta: "Beta",
|
|
27
|
+
skew: "\u504F\u5EA6",
|
|
28
|
+
kurt: "\u5CF0\u5EA6",
|
|
29
|
+
cVaR: "VaR\uFF0895%\u7F6E\u4FE1\uFF09",
|
|
22
30
|
"01": "1\u6708",
|
|
23
31
|
"02": "2\u6708",
|
|
24
32
|
"03": "3\u6708",
|
|
@@ -47,5 +55,9 @@ const CLOUMN_DEAL = {
|
|
|
47
55
|
percentage,
|
|
48
56
|
notProcessed: null
|
|
49
57
|
};
|
|
58
|
+
const convertKey = (data, key) => {
|
|
59
|
+
const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
60
|
+
return data[key] || data[newKey];
|
|
61
|
+
};
|
|
50
62
|
|
|
51
|
-
export { CLOUMN_DEAL, TABLE_KEY };
|
|
63
|
+
export { CLOUMN_DEAL, TABLE_KEY, convertKey };
|