hfn-components 0.0.9 → 0.1.1
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 -0
- package/es/component.mjs +2 -0
- package/es/components/chart/index.d.ts +151 -0
- package/es/components/chart/index.mjs +7 -0
- package/es/components/chart/src/HtChart.d.ts +57 -0
- package/es/components/chart/src/HtChart.mjs +77 -0
- package/es/components/chart/src/HtChart.vue.d.ts +157 -0
- package/es/components/chart/src/HtChart.vue.mjs +88 -0
- package/es/components/chart/src/HtChart.vue2.mjs +94 -0
- package/es/components/chart/src/chartConfig.d.ts +7 -0
- package/es/components/chart/src/chartConfig.mjs +88 -0
- package/es/components/chart/style/index.d.ts +1 -0
- package/es/components/elTable/index.d.ts +93 -35
- package/es/components/elTable/index.mjs +1 -1
- package/es/components/elTable/src/columnDeal.vue.d.ts +27 -15
- package/es/components/elTable/src/columnDeal.vue.mjs +2 -2
- package/es/components/elTable/src/columnDeal.vue2.mjs +2 -4
- package/es/components/elTable/src/elTable.d.ts +18 -2
- package/es/components/elTable/src/elTable.mjs +15 -1
- package/es/components/elTable/src/elTable.vue.d.ts +93 -35
- package/es/components/elTable/src/elTable.vue.mjs +15 -6
- package/es/components/elTable/src/elTable.vue2.mjs +6 -4
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +3 -1
- package/es/components/table/HtTable.d.ts +1 -1
- package/es/components/table/HtTable.vue.d.ts +6 -6
- package/es/components/table/HtTable.vue.mjs +8 -2
- package/es/components/table/HtTable.vue2.mjs +11 -15
- package/es/components/table/index.d.ts +6 -6
- package/es/constants/table.d.ts +45 -2
- package/es/constants/table.mjs +29 -4
- package/es/css/index.css +59 -0
- package/es/index.mjs +3 -1
- package/es/utils/chart.d.ts +7 -0
- package/es/utils/chart.mjs +163 -0
- package/es/utils/common.d.ts +1 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +1 -0
- package/es/utils/tool.mjs +1 -1
- package/global.d.ts +8 -9
- package/package.json +4 -2
- package/theme-chalk/ht-chart.css +1 -0
- package/theme-chalk/index.css +1 -0
- package/theme-chalk/src/chart.scss +53 -0
- package/theme-chalk/src/index.scss +1 -0
- package/es/components/button/HtButton.vue.d.ts +0 -19
- package/es/components/button/HtButton.vue.mjs +0 -16
- package/es/components/button/HtButton.vue2.mjs +0 -42
- package/es/components/button/index.d.ts +0 -20
- package/es/components/button/index.mjs +0 -6
- package/es/components/button/instance.d.ts +0 -2
- package/es/components/button/instance.mjs +0 -1
- package/es/components/eleTable/index.d.ts +0 -0
- package/es/components/eleTable/src/eleTable.d.ts +0 -0
- package/es/components/eleTable/src/eleTable.mjs +0 -1
- package/es/components/eleTable/src/eleTable.vue.mjs +0 -10
- /package/es/components/{eleTable → chart/style}/index.mjs +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as echarts from 'echarts/core';
|
|
2
|
+
export { echarts as default };
|
|
3
|
+
import { BarChart, LineChart } from 'echarts/charts';
|
|
4
|
+
import { TitleComponent, TooltipComponent, GridComponent, LegendComponent, DatasetComponent, TransformComponent } from 'echarts/components';
|
|
5
|
+
import { LabelLayout, UniversalTransition } from 'echarts/features';
|
|
6
|
+
import { CanvasRenderer } from 'echarts/renderers';
|
|
7
|
+
|
|
8
|
+
echarts.use([
|
|
9
|
+
TitleComponent,
|
|
10
|
+
TooltipComponent,
|
|
11
|
+
GridComponent,
|
|
12
|
+
LegendComponent,
|
|
13
|
+
DatasetComponent,
|
|
14
|
+
TransformComponent,
|
|
15
|
+
BarChart,
|
|
16
|
+
LineChart,
|
|
17
|
+
LabelLayout,
|
|
18
|
+
UniversalTransition,
|
|
19
|
+
CanvasRenderer
|
|
20
|
+
]);
|
|
21
|
+
const BASIC_CHART_CONFIG = {
|
|
22
|
+
title: {
|
|
23
|
+
text: "",
|
|
24
|
+
// top: '5%',
|
|
25
|
+
left: "0%",
|
|
26
|
+
textStyle: {
|
|
27
|
+
fontSize: 12,
|
|
28
|
+
color: "rgba(0,0,0,0.7)",
|
|
29
|
+
fontWeight: "normal"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
// 图例
|
|
33
|
+
legend: {
|
|
34
|
+
left: "0%",
|
|
35
|
+
show: false
|
|
36
|
+
},
|
|
37
|
+
xAxis: {},
|
|
38
|
+
yAxis: {},
|
|
39
|
+
grid: {
|
|
40
|
+
// top: '12%',
|
|
41
|
+
top: "8%",
|
|
42
|
+
left: "3%",
|
|
43
|
+
right: "3%",
|
|
44
|
+
bottom: "1%",
|
|
45
|
+
containLabel: true
|
|
46
|
+
},
|
|
47
|
+
// 线条颜色
|
|
48
|
+
color: [
|
|
49
|
+
"#C13431",
|
|
50
|
+
"#1E85D2",
|
|
51
|
+
"#FD984F",
|
|
52
|
+
"#63B9BB",
|
|
53
|
+
"#BBB162",
|
|
54
|
+
"#AE76C1",
|
|
55
|
+
"#5E92F6",
|
|
56
|
+
"#F5BC32",
|
|
57
|
+
"#DA8484",
|
|
58
|
+
"#41982E",
|
|
59
|
+
"#437095",
|
|
60
|
+
"#8060A7",
|
|
61
|
+
"#7D0A0D",
|
|
62
|
+
"#572AFF",
|
|
63
|
+
"#2BE8F8",
|
|
64
|
+
"#FF1493",
|
|
65
|
+
"#E066FF",
|
|
66
|
+
"#27408B",
|
|
67
|
+
"#5191A3",
|
|
68
|
+
"#D5634C",
|
|
69
|
+
"#92d6fd",
|
|
70
|
+
"#b92e2d",
|
|
71
|
+
"#187bc9",
|
|
72
|
+
"#90bae0",
|
|
73
|
+
"#187bc9",
|
|
74
|
+
"#0070C9",
|
|
75
|
+
"#5470c6",
|
|
76
|
+
"#91cc75",
|
|
77
|
+
"#fac858",
|
|
78
|
+
"#ee6666",
|
|
79
|
+
"#73c0de",
|
|
80
|
+
"#3ba272",
|
|
81
|
+
"#fc8452",
|
|
82
|
+
"#9a60b4",
|
|
83
|
+
"#ea7ccc"
|
|
84
|
+
],
|
|
85
|
+
series: []
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export { BASIC_CHART_CONFIG };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'hfn-components/es/theme-chalk/src/chart.scss';
|
|
@@ -7,8 +7,13 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
7
7
|
readonly type: import("vue").PropType<import("./src/elTable").ElTableColumns[]>;
|
|
8
8
|
readonly default: () => never[];
|
|
9
9
|
};
|
|
10
|
+
readonly loading: {
|
|
11
|
+
readonly type: BooleanConstructor;
|
|
12
|
+
readonly default: false;
|
|
13
|
+
};
|
|
10
14
|
}, {
|
|
11
15
|
props: import("@vue/shared").LooseRequired<{
|
|
16
|
+
readonly loading: boolean;
|
|
12
17
|
readonly dataSource: unknown[];
|
|
13
18
|
readonly tableColumn: import("./src/elTable").ElTableColumns[];
|
|
14
19
|
} & {}>;
|
|
@@ -18,14 +23,14 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
18
23
|
default: () => never[];
|
|
19
24
|
};
|
|
20
25
|
size: {
|
|
21
|
-
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "
|
|
26
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
22
27
|
readonly required: false;
|
|
23
28
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
24
29
|
__epPropKey: true;
|
|
25
30
|
};
|
|
26
|
-
width: (
|
|
27
|
-
height: (
|
|
28
|
-
maxHeight: (
|
|
31
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
32
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
33
|
+
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
29
34
|
fit: {
|
|
30
35
|
type: BooleanConstructor;
|
|
31
36
|
default: boolean;
|
|
@@ -49,7 +54,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
49
54
|
headerCellClassName: import("vue").PropType<import("element-plus").CellCls<any> | undefined>;
|
|
50
55
|
headerCellStyle: import("vue").PropType<import("element-plus").CellStyle<any> | undefined>;
|
|
51
56
|
highlightCurrentRow: BooleanConstructor;
|
|
52
|
-
currentRowKey: (
|
|
57
|
+
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
53
58
|
emptyText: StringConstructor;
|
|
54
59
|
expandRowKeys: import("vue").PropType<any[] | undefined>;
|
|
55
60
|
defaultExpandAll: BooleanConstructor;
|
|
@@ -125,7 +130,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
125
130
|
handleHeaderFooterMousewheel: (event: any, data: any) => void;
|
|
126
131
|
handleMouseLeave: () => void;
|
|
127
132
|
tableId: string;
|
|
128
|
-
tableSize: import("vue").ComputedRef<"" | "
|
|
133
|
+
tableSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
129
134
|
isHidden: import("vue").Ref<boolean>;
|
|
130
135
|
isEmpty: import("vue").ComputedRef<boolean>;
|
|
131
136
|
renderExpanded: import("vue").Ref<null>;
|
|
@@ -196,14 +201,14 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
196
201
|
default: () => never[];
|
|
197
202
|
};
|
|
198
203
|
size: {
|
|
199
|
-
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "
|
|
204
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
200
205
|
readonly required: false;
|
|
201
206
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
202
207
|
__epPropKey: true;
|
|
203
208
|
};
|
|
204
|
-
width: (
|
|
205
|
-
height: (
|
|
206
|
-
maxHeight: (
|
|
209
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
210
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
211
|
+
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
207
212
|
fit: {
|
|
208
213
|
type: BooleanConstructor;
|
|
209
214
|
default: boolean;
|
|
@@ -227,7 +232,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
227
232
|
headerCellClassName: import("vue").PropType<import("element-plus").CellCls<any> | undefined>;
|
|
228
233
|
headerCellStyle: import("vue").PropType<import("element-plus").CellStyle<any> | undefined>;
|
|
229
234
|
highlightCurrentRow: BooleanConstructor;
|
|
230
|
-
currentRowKey: (
|
|
235
|
+
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
231
236
|
emptyText: StringConstructor;
|
|
232
237
|
expandRowKeys: import("vue").PropType<any[] | undefined>;
|
|
233
238
|
defaultExpandAll: BooleanConstructor;
|
|
@@ -330,11 +335,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
330
335
|
property: StringConstructor;
|
|
331
336
|
prop: StringConstructor;
|
|
332
337
|
width: {
|
|
333
|
-
type: (
|
|
338
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
334
339
|
default: string;
|
|
335
340
|
};
|
|
336
341
|
minWidth: {
|
|
337
|
-
type: (
|
|
342
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
338
343
|
default: string;
|
|
339
344
|
};
|
|
340
345
|
renderHeader: import("vue").PropType<(data: {
|
|
@@ -392,11 +397,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
392
397
|
property: StringConstructor;
|
|
393
398
|
prop: StringConstructor;
|
|
394
399
|
width: {
|
|
395
|
-
type: (
|
|
400
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
396
401
|
default: string;
|
|
397
402
|
};
|
|
398
403
|
minWidth: {
|
|
399
|
-
type: (
|
|
404
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
400
405
|
default: string;
|
|
401
406
|
};
|
|
402
407
|
renderHeader: import("vue").PropType<(data: {
|
|
@@ -466,11 +471,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
466
471
|
property: StringConstructor;
|
|
467
472
|
prop: StringConstructor;
|
|
468
473
|
width: {
|
|
469
|
-
type: (
|
|
474
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
470
475
|
default: string;
|
|
471
476
|
};
|
|
472
477
|
minWidth: {
|
|
473
|
-
type: (
|
|
478
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
474
479
|
default: string;
|
|
475
480
|
};
|
|
476
481
|
renderHeader: import("vue").PropType<(data: {
|
|
@@ -528,11 +533,11 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
528
533
|
property: StringConstructor;
|
|
529
534
|
prop: StringConstructor;
|
|
530
535
|
width: {
|
|
531
|
-
type: (
|
|
536
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
532
537
|
default: string;
|
|
533
538
|
};
|
|
534
539
|
minWidth: {
|
|
535
|
-
type: (
|
|
540
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
536
541
|
default: string;
|
|
537
542
|
};
|
|
538
543
|
renderHeader: import("vue").PropType<(data: {
|
|
@@ -590,29 +595,77 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
590
595
|
reserveSelection: boolean;
|
|
591
596
|
filterMultiple: boolean;
|
|
592
597
|
}, {}>>;
|
|
598
|
+
readonly vLoading: import("vue").Directive<import("element-plus/es/components/loading/src/directive").ElementLoading, import("element-plus/es/components/loading/src/directive").LoadingBinding>;
|
|
599
|
+
readonly TABLE_KEY: {
|
|
600
|
+
readonly index: "序号";
|
|
601
|
+
readonly year: "年份";
|
|
602
|
+
readonly cucmulativeReturn: "区间收益";
|
|
603
|
+
readonly excessReturn: "超额区间收益";
|
|
604
|
+
readonly vol: "年化波动率";
|
|
605
|
+
readonly excessVol: "超额年化波动率";
|
|
606
|
+
readonly sharpeRatio: "夏普比率";
|
|
607
|
+
readonly excessSharpeRatio: "超额夏普比率";
|
|
608
|
+
readonly calmarRatio: "卡玛比率";
|
|
609
|
+
readonly excessCalmarRatio: "超额卡玛比率";
|
|
610
|
+
readonly sortinoRatio: "索提诺比率";
|
|
611
|
+
readonly excessSortinoRatio: "超额索提诺比率";
|
|
612
|
+
readonly downsideDev: "下行风险";
|
|
613
|
+
readonly excessDownsideDev: "超额下行风险";
|
|
614
|
+
readonly maxDrawdown: "最大回撤";
|
|
615
|
+
readonly excessMaxDrawdown: "超额最大回撤";
|
|
616
|
+
readonly maxDrawdownDays: "最大回撤回补期(天)";
|
|
617
|
+
readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
|
|
618
|
+
readonly maxNormalDays: "最长连续不创新高天数(天)";
|
|
619
|
+
readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
|
|
620
|
+
readonly '01': "1月";
|
|
621
|
+
readonly '02': "2月";
|
|
622
|
+
readonly '03': "3月";
|
|
623
|
+
readonly '04': "4月";
|
|
624
|
+
readonly '05': "5月";
|
|
625
|
+
readonly '06': "6月";
|
|
626
|
+
readonly '07': "7月";
|
|
627
|
+
readonly '08': "8月";
|
|
628
|
+
readonly '09': "9月";
|
|
629
|
+
readonly '10': "10月";
|
|
630
|
+
readonly '11': "11月";
|
|
631
|
+
readonly '12': "12月";
|
|
632
|
+
readonly MonthlyPositiveRatio: "月胜率";
|
|
633
|
+
readonly all_year: "全年";
|
|
634
|
+
};
|
|
593
635
|
ColumnDeal: import("vue").DefineComponent<{
|
|
594
|
-
dealType: {
|
|
595
|
-
type:
|
|
596
|
-
|
|
636
|
+
readonly dealType: {
|
|
637
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
638
|
+
readonly default: "";
|
|
597
639
|
};
|
|
598
|
-
text: {
|
|
599
|
-
type: (
|
|
600
|
-
|
|
640
|
+
readonly text: {
|
|
641
|
+
readonly type: import("vue").PropType<string | number | undefined>;
|
|
642
|
+
readonly default: undefined;
|
|
601
643
|
};
|
|
602
644
|
}, {
|
|
603
|
-
props:
|
|
604
|
-
|
|
645
|
+
props: import("@vue/shared").LooseRequired<{
|
|
646
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
647
|
+
readonly text?: string | number | undefined;
|
|
648
|
+
} & {}>;
|
|
649
|
+
readonly CLOUMN_DEAL: {
|
|
650
|
+
basicText4: (val: string | number | undefined) => string;
|
|
651
|
+
colorText: (val: string | number | undefined) => string;
|
|
652
|
+
colorPercentage: (val: string | number | undefined) => string;
|
|
653
|
+
percentage: (val: string | number | undefined) => string;
|
|
654
|
+
notProcessed: null;
|
|
655
|
+
};
|
|
605
656
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
606
|
-
dealType: {
|
|
607
|
-
type:
|
|
608
|
-
|
|
657
|
+
readonly dealType: {
|
|
658
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
659
|
+
readonly default: "";
|
|
609
660
|
};
|
|
610
|
-
text: {
|
|
611
|
-
type: (
|
|
612
|
-
|
|
661
|
+
readonly text: {
|
|
662
|
+
readonly type: import("vue").PropType<string | number | undefined>;
|
|
663
|
+
readonly default: undefined;
|
|
613
664
|
};
|
|
614
|
-
}>>, {
|
|
615
|
-
|
|
665
|
+
}>>, {
|
|
666
|
+
readonly text: string | number | undefined;
|
|
667
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
668
|
+
}, {}>;
|
|
616
669
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
617
670
|
readonly dataSource: {
|
|
618
671
|
readonly type: ArrayConstructor;
|
|
@@ -622,7 +675,12 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
622
675
|
readonly type: import("vue").PropType<import("./src/elTable").ElTableColumns[]>;
|
|
623
676
|
readonly default: () => never[];
|
|
624
677
|
};
|
|
678
|
+
readonly loading: {
|
|
679
|
+
readonly type: BooleanConstructor;
|
|
680
|
+
readonly default: false;
|
|
681
|
+
};
|
|
625
682
|
}>>, {
|
|
683
|
+
readonly loading: boolean;
|
|
626
684
|
readonly dataSource: unknown[];
|
|
627
685
|
readonly tableColumn: import("./src/elTable").ElTableColumns[];
|
|
628
686
|
}, {}>> & Record<string, any>;
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
dealType: {
|
|
3
|
-
type:
|
|
4
|
-
|
|
2
|
+
readonly dealType: {
|
|
3
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
4
|
+
readonly default: "";
|
|
5
5
|
};
|
|
6
|
-
text: {
|
|
7
|
-
type: (
|
|
8
|
-
|
|
6
|
+
readonly text: {
|
|
7
|
+
readonly type: import("vue").PropType<string | number | undefined>;
|
|
8
|
+
readonly default: undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
|
-
props:
|
|
12
|
-
|
|
11
|
+
props: import("@vue/shared").LooseRequired<{
|
|
12
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
13
|
+
readonly text?: string | number | undefined;
|
|
14
|
+
} & {}>;
|
|
15
|
+
readonly CLOUMN_DEAL: {
|
|
16
|
+
basicText4: (val: string | number | undefined) => string;
|
|
17
|
+
colorText: (val: string | number | undefined) => string;
|
|
18
|
+
colorPercentage: (val: string | number | undefined) => string;
|
|
19
|
+
percentage: (val: string | number | undefined) => string;
|
|
20
|
+
notProcessed: null;
|
|
21
|
+
};
|
|
13
22
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
-
dealType: {
|
|
15
|
-
type:
|
|
16
|
-
|
|
23
|
+
readonly dealType: {
|
|
24
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
25
|
+
readonly default: "";
|
|
17
26
|
};
|
|
18
|
-
text: {
|
|
19
|
-
type: (
|
|
20
|
-
|
|
27
|
+
readonly text: {
|
|
28
|
+
readonly type: import("vue").PropType<string | number | undefined>;
|
|
29
|
+
readonly default: undefined;
|
|
21
30
|
};
|
|
22
|
-
}>>, {
|
|
31
|
+
}>>, {
|
|
32
|
+
readonly text: string | number | undefined;
|
|
33
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
34
|
+
}, {}>;
|
|
23
35
|
export default _default;
|
|
@@ -18,14 +18,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18
18
|
{
|
|
19
19
|
style: normalizeStyle({ color: $setup.props.text > 0 ? "red" : $setup.props.text < 0 ? "green" : "" })
|
|
20
20
|
},
|
|
21
|
-
toDisplayString($setup.CLOUMN_DEAL[$setup.props.dealType]($setup.props.text)),
|
|
21
|
+
toDisplayString($setup.props.text !== void 0 ? $setup.CLOUMN_DEAL[$setup.props.dealType]($setup.props.text) : "-"),
|
|
22
22
|
5
|
|
23
23
|
/* TEXT, STYLE */
|
|
24
24
|
)
|
|
25
25
|
])) : (openBlock(), createElementBlock(
|
|
26
26
|
"div",
|
|
27
27
|
_hoisted_3,
|
|
28
|
-
toDisplayString($setup.CLOUMN_DEAL[$setup.props.dealType]($setup.props.text)),
|
|
28
|
+
toDisplayString($setup.props.text !== void 0 ? $setup.CLOUMN_DEAL[$setup.props.dealType]($setup.props.text) : "-"),
|
|
29
29
|
1
|
|
30
30
|
/* TEXT */
|
|
31
31
|
));
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { CLOUMN_DEAL } from '../../../constants/table.mjs';
|
|
3
|
+
import { columnDealProps } from './elTable.mjs';
|
|
3
4
|
|
|
4
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "columnDeal",
|
|
6
|
-
props:
|
|
7
|
-
dealType: { type: String, required: true },
|
|
8
|
-
text: { type: [String, Number], required: true }
|
|
9
|
-
},
|
|
7
|
+
props: columnDealProps,
|
|
10
8
|
setup(__props, { expose: __expose }) {
|
|
11
9
|
__expose();
|
|
12
10
|
const props = __props;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { clounmKyeType, dealKeyType } from 'hfn-components/es/constants';
|
|
2
3
|
export interface ElTableColumns {
|
|
3
|
-
key:
|
|
4
|
-
dealType:
|
|
4
|
+
key: clounmKyeType;
|
|
5
|
+
dealType: dealKeyType;
|
|
5
6
|
width: string | number;
|
|
6
7
|
}
|
|
7
8
|
export declare const elTableProps: {
|
|
@@ -13,5 +14,20 @@ export declare const elTableProps: {
|
|
|
13
14
|
readonly type: PropType<ElTableColumns[]>;
|
|
14
15
|
readonly default: () => never[];
|
|
15
16
|
};
|
|
17
|
+
readonly loading: {
|
|
18
|
+
readonly type: BooleanConstructor;
|
|
19
|
+
readonly default: false;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const columnDealProps: {
|
|
23
|
+
readonly dealType: {
|
|
24
|
+
readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
25
|
+
readonly default: "";
|
|
26
|
+
};
|
|
27
|
+
readonly text: {
|
|
28
|
+
readonly type: PropType<string | number | undefined>;
|
|
29
|
+
readonly default: undefined;
|
|
30
|
+
};
|
|
16
31
|
};
|
|
17
32
|
export type ElTableProps = ExtractPropTypes<typeof elTableProps>;
|
|
33
|
+
export type ColumnDealProps = ExtractPropTypes<typeof columnDealProps>;
|
|
@@ -6,7 +6,21 @@ const elTableProps = {
|
|
|
6
6
|
tableColumn: {
|
|
7
7
|
type: Array,
|
|
8
8
|
default: () => []
|
|
9
|
+
},
|
|
10
|
+
loading: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const columnDealProps = {
|
|
16
|
+
dealType: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
type: [String, Number],
|
|
22
|
+
default: void 0
|
|
9
23
|
}
|
|
10
24
|
};
|
|
11
25
|
|
|
12
|
-
export { elTableProps };
|
|
26
|
+
export { columnDealProps, elTableProps };
|