hfn-components 0.2.6 → 0.2.7
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/component.ts +13 -0
- package/defaults.ts +5 -0
- package/index.ts +6 -0
- package/make-installer.ts +17 -0
- package/package.json +1 -1
- package/plugin.ts +1 -0
- package/dist/index.css +0 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
- package/es/component.d.ts +0 -3
- package/es/component.mjs +0 -10
- package/es/components/chart/index.d.ts +0 -171
- package/es/components/chart/index.mjs +0 -7
- package/es/components/chart/src/HtChart.d.ts +0 -65
- package/es/components/chart/src/HtChart.mjs +0 -77
- package/es/components/chart/src/HtChart.vue.d.ts +0 -177
- package/es/components/chart/src/HtChart.vue.mjs +0 -91
- package/es/components/chart/src/HtChart.vue2.mjs +0 -109
- package/es/components/chart/src/chartConfig.d.ts +0 -7
- package/es/components/chart/src/chartConfig.mjs +0 -88
- package/es/components/chart/style/index.d.ts +0 -1
- package/es/components/chart/style/index.mjs +0 -1
- package/es/components/elTable/index.d.ts +0 -770
- package/es/components/elTable/index.mjs +0 -7
- package/es/components/elTable/src/columnDeal.vue.d.ts +0 -38
- package/es/components/elTable/src/columnDeal.vue.mjs +0 -35
- package/es/components/elTable/src/columnDeal.vue2.mjs +0 -19
- package/es/components/elTable/src/elTable.d.ts +0 -38
- package/es/components/elTable/src/elTable.mjs +0 -30
- package/es/components/elTable/src/elTable.vue.d.ts +0 -769
- package/es/components/elTable/src/elTable.vue.mjs +0 -56
- package/es/components/elTable/src/elTable.vue2.mjs +0 -29
- package/es/components/htTarget/index.d.ts +0 -748
- package/es/components/htTarget/index.mjs +0 -6
- package/es/components/htTarget/src/htTarget.vue.d.ts +0 -747
- package/es/components/htTarget/src/htTarget.vue.mjs +0 -27
- package/es/components/htTarget/src/htTarget.vue2.mjs +0 -31
- package/es/components/index.d.ts +0 -3
- package/es/components/index.mjs +0 -5
- package/es/components/table/HtTable.d.ts +0 -142
- package/es/components/table/HtTable.mjs +0 -136
- package/es/components/table/HtTable.vue.d.ts +0 -1847
- package/es/components/table/HtTable.vue.mjs +0 -449
- package/es/components/table/HtTable.vue2.mjs +0 -124
- package/es/components/table/index.d.ts +0 -1845
- package/es/components/table/index.mjs +0 -7
- package/es/constants/index.d.ts +0 -3
- package/es/constants/index.mjs +0 -3
- package/es/constants/key.d.ts +0 -1
- package/es/constants/key.mjs +0 -3
- package/es/constants/table.d.ts +0 -117
- package/es/constants/table.mjs +0 -140
- package/es/constants/target.d.ts +0 -4
- package/es/constants/target.mjs +0 -16
- package/es/css/index.css +0 -59
- package/es/defaults.d.ts +0 -4
- package/es/defaults.mjs +0 -7
- package/es/index.d.ts +0 -5
- package/es/index.mjs +0 -11
- package/es/make-installer.d.ts +0 -4
- package/es/make-installer.mjs +0 -14
- package/es/plugin.d.ts +0 -2
- package/es/plugin.mjs +0 -3
- package/es/utils/chart.d.ts +0 -7
- package/es/utils/chart.mjs +0 -172
- package/es/utils/common.d.ts +0 -3
- package/es/utils/common.mjs +0 -15
- package/es/utils/index.d.ts +0 -4
- package/es/utils/index.mjs +0 -4
- package/es/utils/table.d.ts +0 -2
- package/es/utils/table.mjs +0 -31
- package/es/utils/tool.d.ts +0 -2
- package/es/utils/tool.mjs +0 -42
- package/global.d.ts +0 -14
- package/theme-chalk/ht-chart.css +0 -1
- package/theme-chalk/index.css +0 -1
- package/theme-chalk/src/chart.scss +0 -53
- package/theme-chalk/src/index.scss +0 -1
package/es/utils/table.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { splitK } from './tool.mjs';
|
|
2
|
-
|
|
3
|
-
const handleData = (value, type) => {
|
|
4
|
-
if (isNaN(parseFloat(value))) return "-";
|
|
5
|
-
let val = parseFloat(value);
|
|
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;
|
|
24
|
-
};
|
|
25
|
-
const handleText = (value, type) => {
|
|
26
|
-
if (type === "name") {
|
|
27
|
-
return value;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { handleData, handleText };
|
package/es/utils/tool.d.ts
DELETED
package/es/utils/tool.mjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function dataHandle(val, isPer, floatNum) {
|
|
2
|
-
val = parseFloat(val);
|
|
3
|
-
if (isNaN(val)) {
|
|
4
|
-
return "-";
|
|
5
|
-
} else {
|
|
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
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function splitK(num) {
|
|
18
|
-
let decimal = String(num).split(".")[1] || "";
|
|
19
|
-
if (decimal === "") {
|
|
20
|
-
decimal = "00";
|
|
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;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { dataHandle, splitK };
|
package/global.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// declare module '*.vue' {
|
|
2
|
-
// import { defineComponent } from 'vue'
|
|
3
|
-
// const componentOptions:ReturnType<typeof defineComponent>
|
|
4
|
-
// export default componentOptions
|
|
5
|
-
// }
|
|
6
|
-
|
|
7
|
-
declare module '@vue/runtime-core' {
|
|
8
|
-
export interface GlobalComponents {
|
|
9
|
-
HtTable: (typeof import('hfn-components'))['HtTable']
|
|
10
|
-
}
|
|
11
|
-
interface ComponentCustomProperties {
|
|
12
|
-
// 你可以在这里添加自定义属性
|
|
13
|
-
}
|
|
14
|
-
}
|
package/theme-chalk/ht-chart.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;height:100%;justify-content:center;position:absolute;width:100%}
|
package/theme-chalk/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;height:100%;justify-content:center;position:absolute;width:100%}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
.echart-box {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
position: relative;
|
|
7
|
-
}
|
|
8
|
-
.echart-content {
|
|
9
|
-
flex: auto;
|
|
10
|
-
}
|
|
11
|
-
.echart-lenged {
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: auto;
|
|
14
|
-
margin-top: 6px;
|
|
15
|
-
padding-right: 22px;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-wrap: wrap;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
position: relative;
|
|
21
|
-
z-index: 999;
|
|
22
|
-
}
|
|
23
|
-
.bg-span {
|
|
24
|
-
display: inline-block;
|
|
25
|
-
width: 14px;
|
|
26
|
-
height: 2px;
|
|
27
|
-
margin-right: 6px;
|
|
28
|
-
}
|
|
29
|
-
.bg-span-bar {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
width: 16px;
|
|
32
|
-
height: 10px;
|
|
33
|
-
border-radius: 2px;
|
|
34
|
-
margin-right: 6px;
|
|
35
|
-
}
|
|
36
|
-
.span-box {
|
|
37
|
-
margin-left: 5px;
|
|
38
|
-
margin-right: 6px;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
}
|
|
43
|
-
.noData {
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
font-size: 16px;
|
|
47
|
-
display: flex;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
align-items: center;
|
|
50
|
-
position: absolute;
|
|
51
|
-
bottom: 0px;
|
|
52
|
-
color: #ccc;
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@use './chart.scss';
|