hfn-components 0.2.2 → 0.2.3
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 +5 -4
- package/es/components/elTable/src/columnDeal.vue.d.ts +5 -4
- package/es/components/elTable/src/elTable.d.ts +1 -1
- package/es/components/elTable/src/elTable.vue.d.ts +5 -4
- package/es/constants/table.d.ts +1 -0
- package/es/constants/table.mjs +4 -0
- package/es/utils/chart.mjs +1 -1
- package/package.json +1 -1
|
@@ -653,7 +653,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
653
653
|
readonly convertKey: (data: any, key: string) => any;
|
|
654
654
|
ColumnDeal: import("vue").DefineComponent<{
|
|
655
655
|
readonly dealType: {
|
|
656
|
-
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
656
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
657
657
|
readonly default: "";
|
|
658
658
|
};
|
|
659
659
|
readonly text: {
|
|
@@ -662,7 +662,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
662
662
|
};
|
|
663
663
|
}, {
|
|
664
664
|
props: import("@vue/shared").LooseRequired<{
|
|
665
|
-
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
665
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
|
|
666
666
|
readonly text?: string | number | undefined;
|
|
667
667
|
} & {}>;
|
|
668
668
|
readonly CLOUMN_DEAL: {
|
|
@@ -670,11 +670,12 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
670
670
|
colorText: (val: string | number | undefined) => string;
|
|
671
671
|
colorPercentage: (val: string | number | undefined) => string;
|
|
672
672
|
percentage: (val: string | number | undefined) => string;
|
|
673
|
+
absPercentage: (val: string | number | undefined) => string;
|
|
673
674
|
notProcessed: null;
|
|
674
675
|
};
|
|
675
676
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
676
677
|
readonly dealType: {
|
|
677
|
-
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
678
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
678
679
|
readonly default: "";
|
|
679
680
|
};
|
|
680
681
|
readonly text: {
|
|
@@ -683,7 +684,7 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
|
|
|
683
684
|
};
|
|
684
685
|
}>>, {
|
|
685
686
|
readonly text: string | number | undefined;
|
|
686
|
-
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
687
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
|
|
687
688
|
}, {}>;
|
|
688
689
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
689
690
|
readonly dataSource: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
readonly dealType: {
|
|
3
|
-
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
3
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
4
4
|
readonly default: "";
|
|
5
5
|
};
|
|
6
6
|
readonly text: {
|
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
11
|
props: import("@vue/shared").LooseRequired<{
|
|
12
|
-
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
12
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
|
|
13
13
|
readonly text?: string | number | undefined;
|
|
14
14
|
} & {}>;
|
|
15
15
|
readonly CLOUMN_DEAL: {
|
|
@@ -17,11 +17,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
colorText: (val: string | number | undefined) => string;
|
|
18
18
|
colorPercentage: (val: string | number | undefined) => string;
|
|
19
19
|
percentage: (val: string | number | undefined) => string;
|
|
20
|
+
absPercentage: (val: string | number | undefined) => string;
|
|
20
21
|
notProcessed: null;
|
|
21
22
|
};
|
|
22
23
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
24
|
readonly dealType: {
|
|
24
|
-
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
25
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
25
26
|
readonly default: "";
|
|
26
27
|
};
|
|
27
28
|
readonly text: {
|
|
@@ -30,6 +31,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
31
|
};
|
|
31
32
|
}>>, {
|
|
32
33
|
readonly text: string | number | undefined;
|
|
33
|
-
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
34
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
|
|
34
35
|
}, {}>;
|
|
35
36
|
export default _default;
|
|
@@ -26,7 +26,7 @@ export declare const elTableProps: {
|
|
|
26
26
|
};
|
|
27
27
|
export declare const columnDealProps: {
|
|
28
28
|
readonly dealType: {
|
|
29
|
-
readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
29
|
+
readonly type: PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
30
30
|
readonly default: "";
|
|
31
31
|
};
|
|
32
32
|
readonly text: {
|
|
@@ -653,7 +653,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
653
653
|
readonly convertKey: (data: any, key: string) => any;
|
|
654
654
|
ColumnDeal: import("vue").DefineComponent<{
|
|
655
655
|
readonly dealType: {
|
|
656
|
-
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
656
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
657
657
|
readonly default: "";
|
|
658
658
|
};
|
|
659
659
|
readonly text: {
|
|
@@ -662,7 +662,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
662
662
|
};
|
|
663
663
|
}, {
|
|
664
664
|
props: import("@vue/shared").LooseRequired<{
|
|
665
|
-
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
665
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
|
|
666
666
|
readonly text?: string | number | undefined;
|
|
667
667
|
} & {}>;
|
|
668
668
|
readonly CLOUMN_DEAL: {
|
|
@@ -670,11 +670,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
670
670
|
colorText: (val: string | number | undefined) => string;
|
|
671
671
|
colorPercentage: (val: string | number | undefined) => string;
|
|
672
672
|
percentage: (val: string | number | undefined) => string;
|
|
673
|
+
absPercentage: (val: string | number | undefined) => string;
|
|
673
674
|
notProcessed: null;
|
|
674
675
|
};
|
|
675
676
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
676
677
|
readonly dealType: {
|
|
677
|
-
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed">;
|
|
678
|
+
readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed">;
|
|
678
679
|
readonly default: "";
|
|
679
680
|
};
|
|
680
681
|
readonly text: {
|
|
@@ -683,7 +684,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
683
684
|
};
|
|
684
685
|
}>>, {
|
|
685
686
|
readonly text: string | number | undefined;
|
|
686
|
-
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "notProcessed";
|
|
687
|
+
readonly dealType: "basicText4" | "colorText" | "colorPercentage" | "percentage" | "absPercentage" | "notProcessed";
|
|
687
688
|
}, {}>;
|
|
688
689
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
689
690
|
readonly dataSource: {
|
package/es/constants/table.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export declare const CLOUMN_DEAL: {
|
|
|
52
52
|
colorText: (val: number | string | undefined) => string;
|
|
53
53
|
colorPercentage: (val: number | string | undefined) => string;
|
|
54
54
|
percentage: (val: number | string | undefined) => string;
|
|
55
|
+
absPercentage: (val: number | string | undefined) => string;
|
|
55
56
|
notProcessed: null;
|
|
56
57
|
};
|
|
57
58
|
export declare const convertKey: (data: any, key: string) => any;
|
package/es/constants/table.mjs
CHANGED
|
@@ -53,11 +53,15 @@ const basicText4 = (val) => {
|
|
|
53
53
|
const percentage = (val) => {
|
|
54
54
|
return val === "-" || val === void 0 ? "-" : (val * 100).toFixed(2) + "%";
|
|
55
55
|
};
|
|
56
|
+
const absPercentage = (val) => {
|
|
57
|
+
return val === "-" || val === void 0 ? "-" : Math.abs(val * 100).toFixed(2) + "%";
|
|
58
|
+
};
|
|
56
59
|
const CLOUMN_DEAL = {
|
|
57
60
|
basicText4,
|
|
58
61
|
colorText: basicText4,
|
|
59
62
|
colorPercentage: percentage,
|
|
60
63
|
percentage,
|
|
64
|
+
absPercentage,
|
|
61
65
|
notProcessed: null
|
|
62
66
|
};
|
|
63
67
|
const convertKey = (data, key) => {
|
package/es/utils/chart.mjs
CHANGED
|
@@ -136,7 +136,7 @@ const setEchartTooltip = (options, props) => {
|
|
|
136
136
|
params[i].seriesName === "\u7D2F\u8BA1\u8D85\u989D"
|
|
137
137
|
) {
|
|
138
138
|
html += `<span style='color:${params[i].color}'>
|
|
139
|
-
${params[i].seriesName}</span>\uFF1A${params[i].value[1]}%
|
|
139
|
+
${params[i].seriesName}</span>\uFF1A${params[i].value[1].toFixed(2)}%
|
|
140
140
|
`;
|
|
141
141
|
} else {
|
|
142
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`;
|