hfn-components 0.6.6 → 0.6.8
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 -1
- package/es/components/chart/index.mjs +1 -0
- package/es/components/htTable/index.d.ts +135 -5
- package/es/components/htTable/index.mjs +1 -0
- package/es/components/htTable/src/columnDeal.vue.d.ts +1 -1
- package/es/components/htTable/src/columnDeal.vue.mjs +18 -11
- package/es/components/htTable/src/composables/index.d.ts +3 -0
- package/es/components/htTable/src/composables/index.mjs +3 -0
- package/es/components/htTable/src/composables/use-copy.d.ts +3 -0
- package/es/components/htTable/src/composables/use-copy.mjs +24 -0
- package/es/components/htTable/src/composables/use-pagination.d.ts +13 -0
- package/es/components/htTable/src/composables/use-pagination.mjs +33 -0
- package/es/components/htTable/src/composables/use-selection.d.ts +12 -0
- package/es/components/htTable/src/composables/use-selection.mjs +58 -0
- package/es/components/htTable/src/htTable.d.ts +37 -2
- package/es/components/htTable/src/htTable.mjs +22 -0
- package/es/components/htTable/src/htTable.vue.d.ts +57 -3
- package/es/components/htTable/src/htTable.vue.mjs +200 -95
- package/es/components/htTable/src/htTable.vue2.mjs +55 -25
- package/es/components/htTarget/index.mjs +1 -0
- package/es/components/htTarget/src/htTarget.vue.mjs +53 -58
- package/es/components/htTarget/src/htTarget.vue2.mjs +23 -24
- package/es/components/index.mjs +1 -1
- package/es/components/pieChart/index.mjs +1 -0
- package/es/constants/icons.d.ts +1 -0
- package/es/constants/icons.mjs +3 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.mjs +3 -1
- package/es/constants/table.d.ts +102 -83
- package/es/constants/table.mjs +73 -45
- package/es/constants/target.d.ts +166 -15
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.mjs +1 -0
- package/es/icons/svg/empty-simple.svg.mjs +3 -0
- package/es/index.mjs +1 -1
- package/es/utils/index.mjs +1 -1
- package/es/utils/table.d.ts +11 -2
- package/es/utils/table.mjs +36 -26
- package/es/utils/tool.d.ts +1 -1
- package/es/utils/tool.mjs +8 -36
- package/package.json +29 -3
- package/theme-chalk/ht-table.css +1 -1
- package/theme-chalk/ht-target.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/table.scss +61 -4
- package/theme-chalk/src/target.scss +23 -3
package/es/constants/target.d.ts
CHANGED
|
@@ -1,15 +1,166 @@
|
|
|
1
|
-
export declare const TARGET_HEAD_KEY: {
|
|
2
|
-
name:
|
|
3
|
-
key:
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name:
|
|
12
|
-
key:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export declare const TARGET_HEAD_KEY: readonly [{
|
|
2
|
+
readonly name: "本周";
|
|
3
|
+
readonly key: "thisWeek";
|
|
4
|
+
}, {
|
|
5
|
+
readonly name: "本月";
|
|
6
|
+
readonly key: "thisMonth";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "近一周";
|
|
9
|
+
readonly key: "pastWeek";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "近一月";
|
|
12
|
+
readonly key: "lastOneMonth";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "近三月";
|
|
15
|
+
readonly key: "lastThreeMonth";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "近六月";
|
|
18
|
+
readonly key: "lastSixMonth";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "近一年";
|
|
21
|
+
readonly key: "lastOneYear";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "近两年";
|
|
24
|
+
readonly key: "lastTwoYear";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "近三年";
|
|
27
|
+
readonly key: "lastThreeYear";
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "近五年";
|
|
30
|
+
readonly key: "lastFiveYear";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "今年以来";
|
|
33
|
+
readonly key: "ytd";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "成立以来";
|
|
36
|
+
readonly key: "cucmulative";
|
|
37
|
+
}];
|
|
38
|
+
export declare const TARGET_END_KEY: readonly [{
|
|
39
|
+
readonly name: "收益";
|
|
40
|
+
readonly key: "return";
|
|
41
|
+
readonly dealType: "colorPercentage";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "年化收益";
|
|
44
|
+
readonly key: "yearReturn";
|
|
45
|
+
readonly dealType: "colorPercentage";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "超额收益";
|
|
48
|
+
readonly key: "excessReturn";
|
|
49
|
+
readonly dealType: "colorPercentage";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "超额年化收益";
|
|
52
|
+
readonly key: "excessYearReturn";
|
|
53
|
+
readonly dealType: "colorPercentage";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "年化波动率";
|
|
56
|
+
readonly key: "vol";
|
|
57
|
+
readonly dealType: "percentage";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "超额年化波动率";
|
|
60
|
+
readonly key: "excessVol";
|
|
61
|
+
readonly dealType: "percentage";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "夏普比率";
|
|
64
|
+
readonly key: "sharpeRatio";
|
|
65
|
+
readonly dealType: "basicText4";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "超额夏普比率";
|
|
68
|
+
readonly key: "excessSharpeRatio";
|
|
69
|
+
readonly dealType: "basicText4";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "卡玛比率";
|
|
72
|
+
readonly key: "calmarRatio";
|
|
73
|
+
readonly dealType: "basicText4";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "超额卡玛比率";
|
|
76
|
+
readonly key: "excessCalmarRatio";
|
|
77
|
+
readonly dealType: "basicText4";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "索提诺比率";
|
|
80
|
+
readonly key: "sortinoRatio";
|
|
81
|
+
readonly dealType: "basicText4";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "下行标准差";
|
|
84
|
+
readonly key: "downsideStd";
|
|
85
|
+
readonly dealType: "percentage";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "下行风险";
|
|
88
|
+
readonly key: "downsideDev";
|
|
89
|
+
readonly dealType: "percentage";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "最大回撤";
|
|
92
|
+
readonly key: "maxDrawdown";
|
|
93
|
+
readonly dealType: "percentage";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "超额最大回撤";
|
|
96
|
+
readonly key: "excessMaxDrawdown";
|
|
97
|
+
readonly dealType: "percentage";
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "最大回撤回补期(天)";
|
|
100
|
+
readonly key: "maxDrawdownDays";
|
|
101
|
+
readonly dealType: "notProcessed";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "Alpha";
|
|
104
|
+
readonly key: "alpha";
|
|
105
|
+
readonly dealType: "colorPercentage";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "Beta";
|
|
108
|
+
readonly key: "beta";
|
|
109
|
+
readonly dealType: "basicText4";
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "跟踪误差";
|
|
112
|
+
readonly key: "trackingError";
|
|
113
|
+
readonly dealType: "percentage";
|
|
114
|
+
}, {
|
|
115
|
+
readonly name: "信息比率";
|
|
116
|
+
readonly key: "informationRatio";
|
|
117
|
+
readonly dealType: "basicText4";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "偏度";
|
|
120
|
+
readonly key: "skew";
|
|
121
|
+
readonly dealType: "basicText4";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "峰度";
|
|
124
|
+
readonly key: "kurt";
|
|
125
|
+
readonly dealType: "basicText4";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "VaR(95%置信)";
|
|
128
|
+
readonly key: "cVaR";
|
|
129
|
+
readonly dealType: "basicText4";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "周胜率";
|
|
132
|
+
readonly key: "positiveRatio";
|
|
133
|
+
readonly dealType: "percentage";
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "月胜率";
|
|
136
|
+
readonly key: "monthlyPositiveRatio";
|
|
137
|
+
readonly dealType: "percentage";
|
|
138
|
+
}];
|
|
139
|
+
export declare const BASIC_KEY: readonly [{
|
|
140
|
+
readonly name: "净值日期";
|
|
141
|
+
readonly key: "priceDate";
|
|
142
|
+
readonly dealType: "notProcessed";
|
|
143
|
+
readonly type: "fund";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "单位净值";
|
|
146
|
+
readonly key: "nav";
|
|
147
|
+
readonly dealType: "basicText4";
|
|
148
|
+
readonly type: "fund";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "累计净值";
|
|
151
|
+
readonly key: "cumulativeNavWithdrawal";
|
|
152
|
+
readonly dealType: "basicText4";
|
|
153
|
+
readonly type: "fund";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "日期";
|
|
156
|
+
readonly key: "priceDate";
|
|
157
|
+
readonly dealType: "notProcessed";
|
|
158
|
+
readonly type: "index";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "指数点位";
|
|
161
|
+
readonly key: "priceNav";
|
|
162
|
+
readonly dealType: "basicText4";
|
|
163
|
+
readonly type: "index";
|
|
164
|
+
}];
|
|
165
|
+
export type TargetHeadKeyType = (typeof TARGET_HEAD_KEY)[number]['key'];
|
|
166
|
+
export type TargetEndKeyType = (typeof TARGET_END_KEY)[number]['key'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptySimple } from './svg/empty-simple.svg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptySimple } from './svg/empty-simple.svg.mjs';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var EmptySimple = "data:image/svg+xml,%3Csvg%20width%3D%2264%22%20height%3D%2241%22%20viewBox%3D%220%200%2064%2041%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%3Cg%20transform%3D%22translate%280%201%29%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cellipse%20fill%3D%22%23f5f5f5%22%20cx%3D%2232%22%20cy%3D%2233%22%20rx%3D%2232%22%20ry%3D%227%22%2F%3E%20%20%20%20%3Cg%20fill-rule%3D%22nonzero%22%20stroke%3D%22%23d9d9d9%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M55%2012.76L44.854%201.258C44.367.474%2043.656%200%2042.907%200H21.093c-.749%200-1.46.474-1.947%201.257L9%2012.761V22h46v-9.24z%22%2F%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M41.613%2015.931c0-1.605.994-2.93%202.227-2.931H55v18.137C55%2033.26%2053.68%2035%2052.05%2035h-40.1C10.32%2035%209%2033.259%209%2031.137V13h11.16c1.233%200%202.227%201.323%202.227%202.928v.022c0%201.605%201.005%202.901%202.237%202.901h14.752c1.232%200%202.237-1.308%202.237-2.913v-.007z%22%20fill%3D%22%23fafafa%22%2F%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
2
|
+
|
|
3
|
+
export { EmptySimple as default };
|
package/es/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ export { HtTable } from './components/htTable/index.mjs';
|
|
|
4
4
|
export { HtChart } from './components/chart/index.mjs';
|
|
5
5
|
export { HtTarget } from './components/htTarget/index.mjs';
|
|
6
6
|
export { HtPieChart } from './components/pieChart/index.mjs';
|
|
7
|
-
export { columnDealProps, elTableProps } from './components/htTable/src/htTable.mjs';
|
|
8
7
|
export { chartProps } from './components/chart/src/HtChart.mjs';
|
|
8
|
+
export { columnDealProps, elTableProps } from './components/htTable/src/htTable.mjs';
|
|
9
9
|
export { pieProps } from './components/pieChart/src/HtPieChart.mjs';
|
|
10
10
|
|
|
11
11
|
const install = installer.install;
|
package/es/utils/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { withInstall } from './common.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { absPercentage, basicText4, convertKey, getTargetHeadWithYears, percentage, percentage4, thousandText2, thousandText4 } from './table.mjs';
|
|
3
3
|
export { dataHandle, splitK } from './tool.mjs';
|
|
4
4
|
export { legendEnterOperate, legendLeaveOperate, setEchartTitle, setEchartTooltip, setEchartXAxis, setEchartYAxis } from './chart.mjs';
|
package/es/utils/table.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const convertKey: (data: any, key: string) => any;
|
|
2
|
+
export declare const getTargetHeadWithYears: () => {
|
|
3
|
+
name: string;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const basicText4: (val: number | string | undefined) => string;
|
|
7
|
+
export declare const percentage: (val: number | string | undefined) => string;
|
|
8
|
+
export declare const percentage4: (val: number | string | undefined) => string;
|
|
9
|
+
export declare const absPercentage: (val: number | string | undefined) => string;
|
|
10
|
+
export declare const thousandText2: (val: number | string | undefined) => string;
|
|
11
|
+
export declare const thousandText4: (val: number | string | undefined) => string;
|
package/es/utils/table.mjs
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TARGET_HEAD_KEY } from '../constants/target.mjs';
|
|
2
|
+
import '../constants/chartConfig.mjs';
|
|
3
|
+
import { splitK, dataHandle } from './tool.mjs';
|
|
2
4
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (type.includes("percent")) {
|
|
7
|
-
val = val * 100;
|
|
8
|
-
}
|
|
9
|
-
const floatMatch = type.match(/float(\d+)/);
|
|
10
|
-
if (floatMatch) {
|
|
11
|
-
const precision = Number(floatMatch[1]);
|
|
12
|
-
val = val.toFixed(precision);
|
|
13
|
-
}
|
|
14
|
-
if (type.includes("splitK")) {
|
|
15
|
-
val = splitK(val);
|
|
16
|
-
}
|
|
17
|
-
if (type.includes("sign")) {
|
|
18
|
-
val = Number(val) > 0 ? "+" + val : val;
|
|
19
|
-
}
|
|
20
|
-
if (type.includes("percent")) {
|
|
21
|
-
val = val + "%";
|
|
22
|
-
}
|
|
23
|
-
return val;
|
|
5
|
+
const convertKey = (data, key) => {
|
|
6
|
+
const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
7
|
+
return data[key] || data[newKey];
|
|
24
8
|
};
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
const getTargetHeadWithYears = () => {
|
|
10
|
+
const head = [...TARGET_HEAD_KEY].map((item) => ({ name: item.name, key: item.key }));
|
|
11
|
+
let startYear = 2018;
|
|
12
|
+
const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
13
|
+
while (startYear <= nowYear) {
|
|
14
|
+
head.push({ name: `${startYear}`, key: `${startYear}` });
|
|
15
|
+
startYear++;
|
|
28
16
|
}
|
|
17
|
+
return head;
|
|
18
|
+
};
|
|
19
|
+
const isInvalid = (val) => {
|
|
20
|
+
return val === "-" || val === void 0 || val === null || val === "";
|
|
21
|
+
};
|
|
22
|
+
const basicText4 = (val) => {
|
|
23
|
+
return isInvalid(val) ? "-" : Number(val).toFixed(4);
|
|
24
|
+
};
|
|
25
|
+
const percentage = (val) => {
|
|
26
|
+
return isInvalid(val) ? "-" : (Number(val) * 100).toFixed(2) + "%";
|
|
27
|
+
};
|
|
28
|
+
const percentage4 = (val) => {
|
|
29
|
+
return isInvalid(val) ? "-" : (Number(val) * 100).toFixed(4) + "%";
|
|
30
|
+
};
|
|
31
|
+
const absPercentage = (val) => {
|
|
32
|
+
return isInvalid(val) ? "-" : Math.abs(Number(val) * 100).toFixed(2) + "%";
|
|
33
|
+
};
|
|
34
|
+
const thousandText2 = (val) => {
|
|
35
|
+
return isInvalid(val) ? "-" : splitK(dataHandle(Number(val), false, 2));
|
|
36
|
+
};
|
|
37
|
+
const thousandText4 = (val) => {
|
|
38
|
+
return isInvalid(val) ? "-" : splitK(dataHandle(Number(val), false, 4));
|
|
29
39
|
};
|
|
30
40
|
|
|
31
|
-
export {
|
|
41
|
+
export { absPercentage, basicText4, convertKey, getTargetHeadWithYears, percentage, percentage4, thousandText2, thousandText4 };
|
package/es/utils/tool.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function dataHandle(val: any, isPer: boolean, floatNum: number):
|
|
1
|
+
export declare function dataHandle(val: any, isPer: boolean, floatNum: number): string;
|
|
2
2
|
export declare function splitK(num: string | number): string;
|
package/es/utils/tool.mjs
CHANGED
|
@@ -1,42 +1,14 @@
|
|
|
1
1
|
function dataHandle(val, isPer, floatNum) {
|
|
2
|
-
|
|
3
|
-
if (isNaN(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (isPer) {
|
|
7
|
-
val = val * 100;
|
|
8
|
-
}
|
|
9
|
-
if (Number(val.toFixed(floatNum)) === 0) {
|
|
10
|
-
const a = 0;
|
|
11
|
-
return a.toFixed(floatNum);
|
|
12
|
-
} else {
|
|
13
|
-
return val.toFixed(floatNum);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
2
|
+
const num = parseFloat(val);
|
|
3
|
+
if (isNaN(num)) return "-";
|
|
4
|
+
const result = isPer ? num * 100 : num;
|
|
5
|
+
return result.toFixed(floatNum);
|
|
16
6
|
}
|
|
17
7
|
function splitK(num) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
const tempArr = [];
|
|
23
|
-
const revNumArr = String(num).split(".")[0].split("").reverse();
|
|
24
|
-
const mark = revNumArr[revNumArr.length - 1];
|
|
25
|
-
if (mark === "-") {
|
|
26
|
-
revNumArr.splice(-1, 1);
|
|
27
|
-
}
|
|
28
|
-
for (const i in revNumArr) {
|
|
29
|
-
tempArr.push(revNumArr[i]);
|
|
30
|
-
const index = parseFloat(i);
|
|
31
|
-
if ((index + 1) % 3 === 0 && Number(i) !== revNumArr.length - 1) {
|
|
32
|
-
tempArr.push(",");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (mark === "-") {
|
|
36
|
-
tempArr.push(mark);
|
|
37
|
-
}
|
|
38
|
-
const zs = tempArr.reverse().join("");
|
|
39
|
-
return decimal ? zs + "." + decimal : zs;
|
|
8
|
+
const str = String(num);
|
|
9
|
+
const [integer, decimal = "00"] = str.split(".");
|
|
10
|
+
const formatted = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
11
|
+
return `${formatted}.${decimal}`;
|
|
40
12
|
}
|
|
41
13
|
|
|
42
14
|
export { dataHandle, splitK };
|
package/package.json
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hfn-components",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.
|
|
5
|
+
"main": "es/index.mjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
7
7
|
"types": "es/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./es/index.d.ts",
|
|
11
|
+
"import": "./es/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"./es": {
|
|
14
|
+
"types": "./es/index.d.ts",
|
|
15
|
+
"import": "./es/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"./es/*": {
|
|
18
|
+
"types": "./es/*.d.ts",
|
|
19
|
+
"import": "./es/*.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./constants": {
|
|
22
|
+
"types": "./es/constants/index.d.ts",
|
|
23
|
+
"import": "./es/constants/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./utils": {
|
|
26
|
+
"types": "./es/utils/index.d.ts",
|
|
27
|
+
"import": "./es/utils/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./theme-chalk/index.css": "./theme-chalk/index.css",
|
|
30
|
+
"./dist/index.css": "./dist/index.css"
|
|
31
|
+
},
|
|
8
32
|
"scripts": {
|
|
9
33
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
34
|
},
|
|
@@ -15,6 +39,8 @@
|
|
|
15
39
|
"element-plus": "^2.7.7",
|
|
16
40
|
"vue": "^3.2.0",
|
|
17
41
|
"echarts": "^5.5.1",
|
|
18
|
-
"lodash.clonedeep": "^4.5.0"
|
|
42
|
+
"lodash.clonedeep": "^4.5.0",
|
|
43
|
+
"vue-draggable-plus": "^0.6.1",
|
|
44
|
+
"@element-plus/icons-vue": "^2.0.0"
|
|
19
45
|
}
|
|
20
46
|
}
|
package/theme-chalk/ht-table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ht-table-wrapper{display:flex;flex-direction:column;height:100%}.ht-table-wrapper .el-table{flex:1;min-height:0}.ht-table-wrapper .el-table__empty-text{line-height:normal}.ht-table-cell-copy{align-items:center;display:inline-flex;gap:4px;width:100%}.ht-table-cell-text{flex:none;max-width:calc(100% - 22px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ht-copy-icon{color:#909399;cursor:pointer;flex-shrink:0;font-size:14px;opacity:0;transition:opacity .2s}.ht-copy-icon:hover{color:#d70c19}.el-table__row:hover .ht-copy-icon{opacity:1}.ht-table-pagination{align-items:center;display:flex;justify-content:flex-end;padding:12px 0}.ht-table-wrapper .el-table__column-filter-trigger .el-icon svg{display:none}.ht-table-wrapper .el-table__column-filter-trigger .el-icon:after{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%23909399' d='M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z'/%3E%3C/svg%3E") no-repeat 50%;background-size:contain;content:"";display:inline-block;height:14px;width:14px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}
|
|
1
|
+
.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}.check_item{align-items:center;cursor:grab}.check_item:active{cursor:grabbing}.ghost{background:#f0f0f0;opacity:.5}.close-icon{cursor:pointer}.close-icon:hover{color:#909399!important}
|
package/theme-chalk/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}.
|
|
1
|
+
.echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{width:33.33%}.check_item,.factor_item{display:flex;margin-bottom:10px}.check_item{justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}.target-head{display:grid;grid:auto/repeat(5,1fr)}.flow-col{border-left:1px solid #e8e8e8;height:520px;overflow-y:auto;padding-left:10px}.check_item{align-items:center;cursor:grab}.check_item:active{cursor:grabbing}.ghost{background:#f0f0f0;opacity:.5}.close-icon{cursor:pointer}.close-icon:hover{color:#909399!important}.ht-table-wrapper{display:flex;flex-direction:column;height:100%}.ht-table-wrapper .el-table{flex:1;min-height:0}.ht-table-wrapper .el-table__empty-text{line-height:normal}.ht-table-cell-copy{align-items:center;display:inline-flex;gap:4px;width:100%}.ht-table-cell-text{flex:none;max-width:calc(100% - 22px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ht-copy-icon{color:#909399;cursor:pointer;flex-shrink:0;font-size:14px;opacity:0;transition:opacity .2s}.ht-copy-icon:hover{color:#d70c19}.el-table__row:hover .ht-copy-icon{opacity:1}.ht-table-pagination{align-items:center;display:flex;justify-content:flex-end;padding:12px 0}.ht-table-wrapper .el-table__column-filter-trigger .el-icon svg{display:none}.ht-table-wrapper .el-table__column-filter-trigger .el-icon:after{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%23909399' d='M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z'/%3E%3C/svg%3E") no-repeat 50%;background-size:contain;content:"";display:inline-block;height:14px;width:14px}
|
|
@@ -1,5 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.ht-table-wrapper {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
}
|
|
6
|
+
.ht-table-wrapper .el-table {
|
|
7
|
+
flex: 1;
|
|
8
|
+
min-height: 0;
|
|
9
|
+
}
|
|
10
|
+
.ht-table-wrapper .el-table__empty-text {
|
|
11
|
+
line-height: normal;
|
|
12
|
+
}
|
|
13
|
+
.ht-table-cell-copy {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 4px;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
.ht-table-cell-text {
|
|
20
|
+
flex: none;
|
|
21
|
+
max-width: calc(100% - 22px);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
.ht-copy-icon {
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transition: opacity 0.2s;
|
|
31
|
+
color: #909399;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
&:hover {
|
|
34
|
+
color: #d70c19;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.el-table__row:hover .ht-copy-icon {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
.ht-table-pagination {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: flex-end;
|
|
43
|
+
align-items: center;
|
|
44
|
+
padding: 12px 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 替换筛选图标为 Element Plus 的 Filter 漏斗图标
|
|
48
|
+
.ht-table-wrapper .el-table__column-filter-trigger .el-icon {
|
|
49
|
+
svg {
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
&::after {
|
|
53
|
+
content: '';
|
|
54
|
+
display: inline-block;
|
|
55
|
+
width: 14px;
|
|
56
|
+
height: 14px;
|
|
57
|
+
// 使用 data URI 内联 SVG,颜色设为 #909399
|
|
58
|
+
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%23909399' d='M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z'/%3E%3C/svg%3E")
|
|
59
|
+
no-repeat center;
|
|
60
|
+
background-size: contain;
|
|
61
|
+
}
|
|
5
62
|
}
|
|
@@ -27,13 +27,33 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.target-head {
|
|
30
|
-
display: grid;
|
|
31
|
-
grid: auto / repeat(5, 1fr)
|
|
30
|
+
display: grid;
|
|
31
|
+
grid: auto / repeat(5, 1fr);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.flow-col {
|
|
35
|
-
height: 520px;
|
|
35
|
+
height: 520px;
|
|
36
36
|
overflow-y: auto;
|
|
37
37
|
border-left: 1px solid #e8e8e8;
|
|
38
38
|
padding-left: 10px;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
.check_item {
|
|
42
|
+
cursor: grab;
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
.check_item:active {
|
|
46
|
+
cursor: grabbing;
|
|
47
|
+
}
|
|
48
|
+
/* 拖拽时的占位样式 */
|
|
49
|
+
.ghost {
|
|
50
|
+
opacity: 0.5;
|
|
51
|
+
background: #f0f0f0;
|
|
52
|
+
}
|
|
53
|
+
/* 关闭图标 */
|
|
54
|
+
.close-icon {
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
}
|
|
57
|
+
.close-icon:hover {
|
|
58
|
+
color: #909399 !important;
|
|
59
|
+
}
|