ep-craft 0.1.36 → 0.1.37
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/components/avatar/EpAvatar.vue.d.ts +20 -0
- package/dist/components/avatar/EpAvatar.vue.js +72 -0
- package/dist/components/avatar/EpAvatar2.vue.js +4 -0
- package/dist/components/avatar/avatar.d.ts +68 -0
- package/dist/components/avatar/avatar.js +59 -0
- package/dist/components/avatar/constants.d.ts +7 -0
- package/dist/components/avatar/constants.js +6 -0
- package/dist/components/avatar/index.d.ts +13 -2
- package/dist/components/avatar/index.js +8 -3
- package/dist/components/avatar/instance.d.ts +2 -0
- package/dist/components/badge/EpBadge.vue.d.ts +28 -0
- package/dist/components/badge/EpBadge.vue.js +75 -0
- package/dist/components/badge/EpBadge2.vue.js +4 -0
- package/dist/components/badge/badge.d.ts +67 -0
- package/dist/components/badge/badge.js +69 -0
- package/dist/components/badge/index.d.ts +11 -2
- package/dist/components/badge/index.js +8 -4
- package/dist/components/badge/instance.d.ts +2 -0
- package/dist/components/card/EpCard.vue.d.ts +22 -0
- package/dist/components/card/EpCard.vue.js +64 -0
- package/dist/components/card/EpCard2.vue.js +4 -0
- package/dist/components/card/card.d.ts +51 -0
- package/dist/components/card/card.js +49 -0
- package/dist/components/card/index.d.ts +11 -2
- package/dist/components/card/index.js +5 -4
- package/dist/components/card/instance.d.ts +2 -0
- package/dist/components/countdown/EpCountdown.vue.d.ts +28 -0
- package/dist/components/countdown/EpCountdown.vue.js +71 -0
- package/dist/components/countdown/EpCountdown2.vue.js +4 -0
- package/dist/components/countdown/countdown.d.ts +48 -0
- package/dist/components/countdown/countdown.js +50 -0
- package/dist/components/countdown/index.d.ts +11 -2
- package/dist/components/countdown/index.js +9 -4
- package/dist/components/countdown/instance.d.ts +2 -0
- package/dist/components/countdown/utils.d.ts +3 -0
- package/dist/components/countdown/utils.js +40 -0
- package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +2 -2
- package/dist/components/dropdown/src/dropdown-item2.vue.js +2 -2
- package/dist/components/dropdown/src/dropdown-menu2.vue.js +2 -2
- package/dist/components/dropdown/src/dropdown2.vue.js +2 -2
- package/dist/components/empty/EpEmpty.vue.d.ts +20 -0
- package/dist/components/empty/EpEmpty.vue.js +62 -0
- package/dist/components/empty/EpEmpty2.vue.js +4 -0
- package/dist/components/empty/empty.d.ts +27 -0
- package/dist/components/empty/empty.js +26 -0
- package/dist/components/empty/img-empty.vue.d.ts +2 -0
- package/dist/components/empty/img-empty.vue.js +141 -0
- package/dist/components/empty/img-empty2.vue.js +4 -0
- package/dist/components/empty/index.d.ts +11 -2
- package/dist/components/empty/index.js +8 -4
- package/dist/components/empty/instance.d.ts +2 -0
- package/dist/components/link/EpLink.vue.d.ts +24 -0
- package/dist/components/link/EpLink.vue.js +86 -0
- package/dist/components/link/EpLink2.vue.js +4 -0
- package/dist/components/link/index.d.ts +11 -2
- package/dist/components/link/index.js +5 -3
- package/dist/components/link/instance.d.ts +2 -0
- package/dist/components/link/link.d.ts +56 -0
- package/dist/components/link/link.js +51 -0
- package/dist/components/result/EpResult.vue.d.ts +23 -0
- package/dist/components/result/EpResult.vue.js +71 -0
- package/dist/components/result/EpResult2.vue.js +4 -0
- package/dist/components/result/index.d.ts +11 -2
- package/dist/components/result/index.js +10 -4
- package/dist/components/result/instance.d.ts +2 -0
- package/dist/components/result/result.d.ts +35 -0
- package/dist/components/result/result.js +47 -0
- package/dist/components/roving-focus-group/index.js +2 -2
- package/dist/components/roving-focus-group/src/roving-focus-group.vue.js +11 -19
- package/dist/components/roving-focus-group/src/roving-focus-group2.vue.js +19 -11
- package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +18 -76
- package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +76 -18
- package/dist/components/space/index.d.ts +15 -2
- package/dist/components/space/index.js +23 -4
- package/dist/components/space/instance.d.ts +2 -0
- package/dist/components/space/item.d.ts +29 -0
- package/dist/components/space/item.js +30 -0
- package/dist/components/space/space.d.ts +92 -0
- package/dist/components/space/space.js +182 -0
- package/dist/components/space/use-space.d.ts +7 -0
- package/dist/components/space/use-space.js +47 -0
- package/dist/components/statistic/EpStatistic.vue.d.ts +28 -0
- package/dist/components/statistic/EpStatistic.vue.js +82 -0
- package/dist/components/statistic/EpStatistic2.vue.js +4 -0
- package/dist/components/statistic/index.d.ts +11 -2
- package/dist/components/statistic/index.js +8 -4
- package/dist/components/statistic/instance.d.ts +2 -0
- package/dist/components/statistic/statistic.d.ts +58 -0
- package/dist/components/statistic/statistic.js +59 -0
- package/dist/utils/vue/vnode.js +32 -22
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +16 -3
- package/package.json +1 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { isVNode as S, defineComponent as P, renderSlot as T, createVNode as s, createTextVNode as A, Comment as L } from "vue";
|
|
2
|
+
import { isNumber as y } from "../../utils/types.js";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { isArray as c, isString as C } from "@vue/shared";
|
|
6
|
+
import { componentSizes as O } from "../../constants/size.js";
|
|
7
|
+
import "@element-plus/icons-vue";
|
|
8
|
+
import { buildProps as z, definePropType as u } from "../../utils/vue/props/runtime.js";
|
|
9
|
+
import { PatchFlags as i, isFragment as g, isValidElementNode as V } from "../../utils/vue/vnode.js";
|
|
10
|
+
import E from "./item.js";
|
|
11
|
+
import { useSpace as Y } from "./use-space.js";
|
|
12
|
+
const j = z({
|
|
13
|
+
/**
|
|
14
|
+
* @description Placement direction
|
|
15
|
+
*/
|
|
16
|
+
direction: {
|
|
17
|
+
type: String,
|
|
18
|
+
values: ["horizontal", "vertical"],
|
|
19
|
+
default: "horizontal"
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* @description Classname
|
|
23
|
+
*/
|
|
24
|
+
class: {
|
|
25
|
+
type: u([
|
|
26
|
+
String,
|
|
27
|
+
Object,
|
|
28
|
+
Array
|
|
29
|
+
]),
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* @description Extra style rules
|
|
34
|
+
*/
|
|
35
|
+
style: {
|
|
36
|
+
type: u([String, Array, Object, Boolean]),
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* @description Controls the alignment of items
|
|
41
|
+
*/
|
|
42
|
+
alignment: {
|
|
43
|
+
type: u(String),
|
|
44
|
+
default: "center"
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* @description Prefix for space-items
|
|
48
|
+
*/
|
|
49
|
+
prefixCls: {
|
|
50
|
+
type: String
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* @description Spacer
|
|
54
|
+
*/
|
|
55
|
+
spacer: {
|
|
56
|
+
type: u([Object, String, Number, Array]),
|
|
57
|
+
default: null,
|
|
58
|
+
validator: (e) => S(e) || y(e) || C(e)
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* @description Auto wrapping
|
|
62
|
+
*/
|
|
63
|
+
wrap: Boolean,
|
|
64
|
+
/**
|
|
65
|
+
* @description Whether to fill the container
|
|
66
|
+
*/
|
|
67
|
+
fill: Boolean,
|
|
68
|
+
/**
|
|
69
|
+
* @description Ratio of fill
|
|
70
|
+
*/
|
|
71
|
+
fillRatio: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 100
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* @description Spacing size
|
|
77
|
+
*/
|
|
78
|
+
size: {
|
|
79
|
+
type: [String, Array, Number],
|
|
80
|
+
values: O,
|
|
81
|
+
validator: (e) => y(e) || c(e) && e.length === 2 && e.every(y)
|
|
82
|
+
}
|
|
83
|
+
}), G = P({
|
|
84
|
+
name: "EpSpace",
|
|
85
|
+
props: j,
|
|
86
|
+
setup(e, { slots: b }) {
|
|
87
|
+
const { classes: v, containerStyle: N, itemStyle: f } = Y(e);
|
|
88
|
+
function d(n, a = "", t = []) {
|
|
89
|
+
const { prefixCls: l } = e;
|
|
90
|
+
return n.forEach((o, m) => {
|
|
91
|
+
g(o) ? c(o.children) && o.children.forEach((r, p) => {
|
|
92
|
+
g(r) && c(r.children) ? d(
|
|
93
|
+
r.children,
|
|
94
|
+
`${a + p}-`,
|
|
95
|
+
t
|
|
96
|
+
) : S(r) && (r == null ? void 0 : r.type) === L ? t.push(r) : t.push(
|
|
97
|
+
s(
|
|
98
|
+
E,
|
|
99
|
+
{
|
|
100
|
+
style: f.value,
|
|
101
|
+
prefixCls: l,
|
|
102
|
+
key: `nested-${a + p}`
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
default: () => [r]
|
|
106
|
+
},
|
|
107
|
+
i.PROPS | i.STYLE,
|
|
108
|
+
["style", "prefixCls"]
|
|
109
|
+
)
|
|
110
|
+
);
|
|
111
|
+
}) : V(o) && t.push(
|
|
112
|
+
s(
|
|
113
|
+
E,
|
|
114
|
+
{
|
|
115
|
+
style: f.value,
|
|
116
|
+
prefixCls: l,
|
|
117
|
+
key: `LoopKey${a + m}`
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
default: () => [o]
|
|
121
|
+
},
|
|
122
|
+
i.PROPS | i.STYLE,
|
|
123
|
+
["style", "prefixCls"]
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
}), t;
|
|
127
|
+
}
|
|
128
|
+
return () => {
|
|
129
|
+
const { spacer: n, direction: a } = e, t = T(b, "default", { key: 0 }, () => []);
|
|
130
|
+
if ((t.children ?? []).length === 0) return null;
|
|
131
|
+
if (c(t.children)) {
|
|
132
|
+
let l = d(t.children);
|
|
133
|
+
if (n) {
|
|
134
|
+
const o = l.length - 1;
|
|
135
|
+
l = l.reduce(
|
|
136
|
+
(m, r, p) => {
|
|
137
|
+
const h = [...m, r];
|
|
138
|
+
return p !== o && h.push(
|
|
139
|
+
s(
|
|
140
|
+
"span",
|
|
141
|
+
// adding width 100% for vertical alignment,
|
|
142
|
+
// when the spacer inherit the width from the
|
|
143
|
+
// parent, this span's width was not set, so space
|
|
144
|
+
// might disappear
|
|
145
|
+
{
|
|
146
|
+
style: [
|
|
147
|
+
f.value,
|
|
148
|
+
a === "vertical" ? "width: 100%" : null
|
|
149
|
+
],
|
|
150
|
+
key: p
|
|
151
|
+
},
|
|
152
|
+
[
|
|
153
|
+
// if spacer is already a valid vnode, then append it to the current
|
|
154
|
+
// span element.
|
|
155
|
+
// otherwise, treat it as string.
|
|
156
|
+
S(n) ? n : A(n, i.TEXT)
|
|
157
|
+
],
|
|
158
|
+
i.STYLE
|
|
159
|
+
)
|
|
160
|
+
), h;
|
|
161
|
+
},
|
|
162
|
+
[]
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
return s(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
class: v.value,
|
|
169
|
+
style: N.value
|
|
170
|
+
},
|
|
171
|
+
l,
|
|
172
|
+
i.STYLE | i.CLASS
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
return t.children;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
export {
|
|
180
|
+
G as default,
|
|
181
|
+
j as spaceProps
|
|
182
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SpaceProps } from './space';
|
|
2
|
+
import type { StyleValue } from 'vue';
|
|
3
|
+
export declare function useSpace(props: SpaceProps): {
|
|
4
|
+
classes: import("vue").ComputedRef<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => import("@element-plus/utils").Arrayable<string | Record<string, boolean>>) | (((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => import("@element-plus/utils").Arrayable<string | Record<string, boolean>>)) | null)[], unknown, unknown>[]>;
|
|
5
|
+
containerStyle: import("vue").ComputedRef<StyleValue>;
|
|
6
|
+
itemStyle: import("vue").ComputedRef<StyleValue>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { computed as m, ref as s, watchEffect as d } from "vue";
|
|
2
|
+
import { isNumber as h } from "../../utils/types.js";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { isArray as z } from "@vue/shared";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import { useNamespace as S } from "../../hooks/use-namespace/index.js";
|
|
8
|
+
import "../../hooks/use-size/index.js";
|
|
9
|
+
import "@popperjs/core";
|
|
10
|
+
import "../../hooks/use-z-index/index.js";
|
|
11
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
12
|
+
import "../../hooks/use-aria/index.js";
|
|
13
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
14
|
+
import "../../hooks/use-empty-values/index.js";
|
|
15
|
+
const c = {
|
|
16
|
+
small: 8,
|
|
17
|
+
default: 12,
|
|
18
|
+
large: 16
|
|
19
|
+
};
|
|
20
|
+
function R(e) {
|
|
21
|
+
const n = S("space"), u = m(() => [n.b(), n.m(e.direction), e.class]), i = s(0), a = s(0), f = m(() => {
|
|
22
|
+
const t = e.wrap || e.fill ? { flexWrap: "wrap" } : {}, r = {
|
|
23
|
+
alignItems: e.alignment
|
|
24
|
+
}, o = {
|
|
25
|
+
rowGap: `${a.value}px`,
|
|
26
|
+
columnGap: `${i.value}px`
|
|
27
|
+
};
|
|
28
|
+
return [t, r, o, e.style];
|
|
29
|
+
}), p = m(() => e.fill ? { flexGrow: 1, minWidth: `${e.fillRatio}%` } : {});
|
|
30
|
+
return d(() => {
|
|
31
|
+
const { size: t = "small", wrap: r, direction: o, fill: v } = e;
|
|
32
|
+
if (z(t)) {
|
|
33
|
+
const [l = 0, w = 0] = t;
|
|
34
|
+
i.value = l, a.value = w;
|
|
35
|
+
} else {
|
|
36
|
+
let l;
|
|
37
|
+
h(t) ? l = t : l = c[t || "small"] || c.small, (r || v) && o === "horizontal" ? i.value = a.value = l : o === "horizontal" ? (i.value = l, a.value = 0) : (a.value = l, i.value = 0);
|
|
38
|
+
}
|
|
39
|
+
}), {
|
|
40
|
+
classes: u,
|
|
41
|
+
containerStyle: f,
|
|
42
|
+
itemStyle: p
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
R as useSpace
|
|
47
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { StatisticProps } from './statistic';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
title?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
prefix?: (props: typeof __VLS_3) => any;
|
|
7
|
+
} & {
|
|
8
|
+
suffix?: (props: typeof __VLS_5) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<StatisticProps, {
|
|
11
|
+
/**
|
|
12
|
+
* @description current display value
|
|
13
|
+
*/
|
|
14
|
+
displayValue: import("vue").ComputedRef<string | number | import("dayjs").Dayjs>;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StatisticProps> & Readonly<{}>, {
|
|
16
|
+
value: number | import("dayjs").Dayjs;
|
|
17
|
+
precision: number;
|
|
18
|
+
decimalSeparator: string;
|
|
19
|
+
groupSeparator: string;
|
|
20
|
+
valueStyle: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as g, computed as $, openBlock as o, createElementBlock as s, normalizeClass as r, unref as a, renderSlot as c, createTextVNode as b, toDisplayString as n, createCommentVNode as d, createElementVNode as u, normalizeStyle as k } from "vue";
|
|
2
|
+
import { useNamespace as E } from "../../hooks/use-namespace/index.js";
|
|
3
|
+
import { isNumber as B } from "../../utils/types.js";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import { isFunction as V } from "@vue/shared";
|
|
7
|
+
import "@element-plus/icons-vue";
|
|
8
|
+
import "../../hooks/use-size/index.js";
|
|
9
|
+
import "@popperjs/core";
|
|
10
|
+
import "../../hooks/use-z-index/index.js";
|
|
11
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
12
|
+
import "../../hooks/use-aria/index.js";
|
|
13
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
14
|
+
import "../../hooks/use-empty-values/index.js";
|
|
15
|
+
const J = /* @__PURE__ */ g({
|
|
16
|
+
name: "EpStatistic",
|
|
17
|
+
__name: "EpStatistic",
|
|
18
|
+
props: {
|
|
19
|
+
decimalSeparator: { default: "." },
|
|
20
|
+
groupSeparator: { default: "," },
|
|
21
|
+
precision: { default: 0 },
|
|
22
|
+
formatter: {},
|
|
23
|
+
value: { default: 0 },
|
|
24
|
+
prefix: {},
|
|
25
|
+
suffix: {},
|
|
26
|
+
title: {},
|
|
27
|
+
valueStyle: { type: [Boolean, null, String, Object, Array], default: void 0 }
|
|
28
|
+
},
|
|
29
|
+
setup(t, { expose: v }) {
|
|
30
|
+
const y = t, i = E("statistic"), S = $(() => {
|
|
31
|
+
const { value: e, formatter: m, precision: p, decimalSeparator: x, groupSeparator: N } = y;
|
|
32
|
+
if (V(m)) return m(e);
|
|
33
|
+
if (!B(e) || Number.isNaN(e)) return e;
|
|
34
|
+
let [f, l = ""] = String(e).split(".");
|
|
35
|
+
return l = l.padEnd(p, "0").slice(0, p > 0 ? p : 0), f = f.replace(/\B(?=(\d{3})+(?!\d))/g, N), [f, l].join(l ? x : "");
|
|
36
|
+
});
|
|
37
|
+
return v({
|
|
38
|
+
/**
|
|
39
|
+
* @description current display value
|
|
40
|
+
*/
|
|
41
|
+
displayValue: S
|
|
42
|
+
}), (e, m) => (o(), s("div", {
|
|
43
|
+
class: r(a(i).b())
|
|
44
|
+
}, [
|
|
45
|
+
e.$slots.title || t.title ? (o(), s("div", {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: r(a(i).e("head"))
|
|
48
|
+
}, [
|
|
49
|
+
c(e.$slots, "title", {}, () => [
|
|
50
|
+
b(n(t.title), 1)
|
|
51
|
+
])
|
|
52
|
+
], 2)) : d("", !0),
|
|
53
|
+
u("div", {
|
|
54
|
+
class: r(a(i).e("content"))
|
|
55
|
+
}, [
|
|
56
|
+
e.$slots.prefix || t.prefix ? (o(), s("div", {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: r(a(i).e("prefix"))
|
|
59
|
+
}, [
|
|
60
|
+
c(e.$slots, "prefix", {}, () => [
|
|
61
|
+
u("span", null, n(t.prefix), 1)
|
|
62
|
+
])
|
|
63
|
+
], 2)) : d("", !0),
|
|
64
|
+
u("span", {
|
|
65
|
+
class: r(a(i).e("number")),
|
|
66
|
+
style: k(t.valueStyle)
|
|
67
|
+
}, n(S.value), 7),
|
|
68
|
+
e.$slots.suffix || t.suffix ? (o(), s("div", {
|
|
69
|
+
key: 1,
|
|
70
|
+
class: r(a(i).e("suffix"))
|
|
71
|
+
}, [
|
|
72
|
+
c(e.$slots, "suffix", {}, () => [
|
|
73
|
+
u("span", null, n(t.suffix), 1)
|
|
74
|
+
])
|
|
75
|
+
], 2)) : d("", !0)
|
|
76
|
+
], 2)
|
|
77
|
+
], 2));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
J as default
|
|
82
|
+
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpStatistic from './EpStatistic.vue';
|
|
3
|
+
/**
|
|
4
|
+
* statistic 自持 barrel(vendor-batch-5 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 本体为本地 SFC,格式化、精度、千分位与插槽行为沿用上游语义。
|
|
7
|
+
* 保留 `displayValue` 暴露契约,不导出 `ElStatistic` 别名。
|
|
8
|
+
*/
|
|
9
|
+
export declare const EpStatistic: typeof _EpStatistic & Plugin;
|
|
4
10
|
export default EpStatistic;
|
|
11
|
+
export { statisticProps } from './statistic';
|
|
12
|
+
export type { StatisticProps, StatisticPropsPublic } from './statistic';
|
|
13
|
+
export type { StatisticInstance } from './instance';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as t } from "../../utils/with-install.js";
|
|
2
|
+
import i from "./EpStatistic.vue.js";
|
|
3
|
+
import "./statistic.js";
|
|
4
|
+
const r = t(
|
|
5
|
+
i,
|
|
6
|
+
"ep-statistic"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
r as EpStatistic
|
|
6
10
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes, StyleValue } from 'vue';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
export interface StatisticProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description Setting the decimal point
|
|
6
|
+
*/
|
|
7
|
+
decimalSeparator?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @description Sets the thousandth identifier
|
|
10
|
+
*/
|
|
11
|
+
groupSeparator?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description numerical precision
|
|
14
|
+
*/
|
|
15
|
+
precision?: number;
|
|
16
|
+
/**
|
|
17
|
+
* @description Custom numerical presentation
|
|
18
|
+
*/
|
|
19
|
+
formatter?: (...args: any[]) => string | number;
|
|
20
|
+
/**
|
|
21
|
+
* @description Numerical content
|
|
22
|
+
*/
|
|
23
|
+
value?: number | Dayjs;
|
|
24
|
+
/**
|
|
25
|
+
* @description Sets the prefix of a number
|
|
26
|
+
*/
|
|
27
|
+
prefix?: string;
|
|
28
|
+
/**
|
|
29
|
+
* @description Sets the suffix of a number
|
|
30
|
+
*/
|
|
31
|
+
suffix?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @description Numeric titles
|
|
34
|
+
*/
|
|
35
|
+
title?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @description Styles numeric values
|
|
38
|
+
*/
|
|
39
|
+
valueStyle?: StyleValue;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Removed after 3.0.0, Use `StatisticProps` instead.
|
|
43
|
+
*/
|
|
44
|
+
export declare const statisticProps: {
|
|
45
|
+
readonly decimalSeparator: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, ".", boolean>;
|
|
46
|
+
readonly groupSeparator: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, ",", boolean>;
|
|
47
|
+
readonly precision: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
48
|
+
readonly formatter: FunctionConstructor;
|
|
49
|
+
readonly value: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => number | Dayjs) | (() => number | Dayjs) | (((new (...args: any[]) => number | Dayjs) | (() => number | Dayjs)) | null)[], unknown, unknown, 0, boolean>;
|
|
50
|
+
readonly prefix: StringConstructor;
|
|
51
|
+
readonly suffix: StringConstructor;
|
|
52
|
+
readonly title: StringConstructor;
|
|
53
|
+
readonly valueStyle: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Removed after 3.0.0, Use `StatisticProps` instead.
|
|
57
|
+
*/
|
|
58
|
+
export type StatisticPropsPublic = ExtractPublicPropTypes<typeof statisticProps>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import "@element-plus/icons-vue";
|
|
5
|
+
import { buildProps as e, definePropType as t } from "../../utils/vue/props/runtime.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
e({
|
|
8
|
+
/**
|
|
9
|
+
* @description Setting the decimal point
|
|
10
|
+
*/
|
|
11
|
+
decimalSeparator: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "."
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* @description Sets the thousandth identifier
|
|
17
|
+
*/
|
|
18
|
+
groupSeparator: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ","
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* @description numerical precision
|
|
24
|
+
*/
|
|
25
|
+
precision: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 0
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @description Custom numerical presentation
|
|
31
|
+
*/
|
|
32
|
+
formatter: Function,
|
|
33
|
+
/**
|
|
34
|
+
* @description Numerical content
|
|
35
|
+
*/
|
|
36
|
+
value: {
|
|
37
|
+
type: t([Number, Object]),
|
|
38
|
+
default: 0
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* @description Sets the prefix of a number
|
|
42
|
+
*/
|
|
43
|
+
prefix: String,
|
|
44
|
+
/**
|
|
45
|
+
* @description Sets the suffix of a number
|
|
46
|
+
*/
|
|
47
|
+
suffix: String,
|
|
48
|
+
/**
|
|
49
|
+
* @description Numeric titles
|
|
50
|
+
*/
|
|
51
|
+
title: String,
|
|
52
|
+
/**
|
|
53
|
+
* @description Styles numeric values
|
|
54
|
+
*/
|
|
55
|
+
valueStyle: {
|
|
56
|
+
type: t([String, Object, Array, Boolean]),
|
|
57
|
+
default: void 0
|
|
58
|
+
}
|
|
59
|
+
});
|
package/dist/utils/vue/vnode.js
CHANGED
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isArray as u, hasOwn as
|
|
1
|
+
import { isVNode as n, Comment as t, Fragment as S } from "vue";
|
|
2
|
+
import { isArray as u, hasOwn as m, camelize as N } from "@vue/shared";
|
|
3
3
|
import "lodash-unified";
|
|
4
|
-
import { debugWarn as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { debugWarn as A } from "../error.js";
|
|
5
|
+
const f = "utils/vue/vnode";
|
|
6
|
+
var L = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(L || {});
|
|
7
|
+
function _(e) {
|
|
8
|
+
return n(e) && e.type === S;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
10
|
+
function i(e) {
|
|
11
|
+
return n(e) && e.type === t;
|
|
12
|
+
}
|
|
13
|
+
function C(e) {
|
|
14
|
+
return n(e) && !_(e) && !i(e);
|
|
15
|
+
}
|
|
16
|
+
const Y = (e) => {
|
|
17
|
+
if (!n(e))
|
|
18
|
+
return A(f, "[getNormalizedProps] must be a VNode"), {};
|
|
19
|
+
const p = e.props || {}, E = (n(e.type) ? e.type.props : void 0) || {}, r = {};
|
|
20
|
+
return Object.keys(E).forEach((o) => {
|
|
21
|
+
m(E[o], "default") && (r[o] = E[o].default);
|
|
15
22
|
}), Object.keys(p).forEach((o) => {
|
|
16
|
-
|
|
17
|
-
}),
|
|
18
|
-
},
|
|
19
|
-
const p = u(
|
|
20
|
-
return p.forEach((
|
|
23
|
+
r[N(o)] = p[o];
|
|
24
|
+
}), r;
|
|
25
|
+
}, T = (e) => {
|
|
26
|
+
const p = u(e) ? e : [e], E = [];
|
|
27
|
+
return p.forEach((r) => {
|
|
21
28
|
var o;
|
|
22
|
-
u(
|
|
23
|
-
}),
|
|
29
|
+
u(r) ? E.push(...T(r)) : n(r) && ((o = r.component) != null && o.subTree) ? E.push(r, ...T(r.component.subTree)) : n(r) && u(r.children) ? E.push(...T(r.children)) : n(r) && r.shapeFlag === 2 ? E.push(...T(r.type())) : E.push(r);
|
|
30
|
+
}), E;
|
|
24
31
|
};
|
|
25
32
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
L as PatchFlags,
|
|
34
|
+
T as flattedChildren,
|
|
35
|
+
Y as getNormalizedProps,
|
|
36
|
+
i as isComment,
|
|
37
|
+
_ as isFragment,
|
|
38
|
+
C as isValidElementNode
|
|
29
39
|
};
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* 不等于本体已自持**——此限定只描述登记时的过渡态:对应 vendor 切片尚未把本体
|
|
15
15
|
* 落到本地时,登记只是止血;本体落地后(见下方「本体已自持」组)才名副其实。
|
|
16
16
|
*/
|
|
17
|
-
export declare const vendoredComponents: readonly ["Affix", "Alert", "Anchor", "AnchorLink", "Button", "CheckTag", "Tag", "Menu", "MenuItem", "MenuItemGroup", "SubMenu", "Tabs", "TabPane", "Radio", "RadioButton", "RadioGroup", "Input", "InputNumber", "Option", "OptionGroup", "Pagination", "Select", "SelectV2", "DatePicker", "DatePickerPanel", "TimePicker", "Aside", "Container", "Footer", "Header", "Main", "CollapseTransition", "ConfigProvider", "Form", "FormItem", "Icon", "Popper", "Tooltip", "Autocomplete", "Scrollbar", "Backtop", "Checkbox", "CheckboxButton", "CheckboxGroup", "Table", "TableColumn", "Upload", "Progress", "Divider", "Popover", "Dropdown", "DropdownItem", "DropdownMenu", "ButtonGroup", "Tree", "TreeSelect", "Text", "Switch", "Segmented", "Steps", "Step", "Rate", "TimeSelect", "Descriptions", "DescriptionsItem", "Carousel", "CarouselItem", "Transfer", "Mention", "Tour", "TourStep", "Slider", "ColorPicker", "Cascader", "CascaderPanel", "Collapse", "CollapseItem", "Breadcrumb", "BreadcrumbItem", "Row", "Col", "Timeline", "TimelineItem", "Skeleton", "SkeletonItem", "Image", "ImageViewer"];
|
|
17
|
+
export declare const vendoredComponents: readonly ["Affix", "Alert", "Anchor", "AnchorLink", "Button", "CheckTag", "Tag", "Menu", "MenuItem", "MenuItemGroup", "SubMenu", "Tabs", "TabPane", "Radio", "RadioButton", "RadioGroup", "Input", "InputNumber", "Option", "OptionGroup", "Pagination", "Select", "SelectV2", "DatePicker", "DatePickerPanel", "TimePicker", "Aside", "Container", "Footer", "Header", "Main", "CollapseTransition", "ConfigProvider", "Form", "FormItem", "Icon", "Popper", "Tooltip", "Autocomplete", "Scrollbar", "Backtop", "Checkbox", "CheckboxButton", "CheckboxGroup", "Table", "TableColumn", "Upload", "Progress", "Divider", "Popover", "Dropdown", "DropdownItem", "DropdownMenu", "ButtonGroup", "Tree", "TreeSelect", "Text", "Switch", "Segmented", "Steps", "Step", "Rate", "TimeSelect", "Descriptions", "DescriptionsItem", "Carousel", "CarouselItem", "Transfer", "Mention", "Tour", "TourStep", "Slider", "ColorPicker", "Cascader", "CascaderPanel", "Collapse", "CollapseItem", "Breadcrumb", "BreadcrumbItem", "Row", "Col", "Timeline", "TimelineItem", "Skeleton", "SkeletonItem", "Image", "ImageViewer", "Link", "Space", "Badge", "Card", "Empty", "Result", "Avatar", "Statistic", "Countdown"];
|
|
18
18
|
export type VendoredComponentName = (typeof vendoredComponents)[number];
|
|
19
19
|
export declare const isVendored: (name: string) => boolean;
|
|
@@ -173,9 +173,22 @@ const o = [
|
|
|
173
173
|
"Skeleton",
|
|
174
174
|
"SkeletonItem",
|
|
175
175
|
"Image",
|
|
176
|
-
"ImageViewer"
|
|
177
|
-
|
|
176
|
+
"ImageViewer",
|
|
177
|
+
// 本体已自持(vendor-batch-5 产出,跳过 gen 包装)
|
|
178
|
+
// 登记须先于 barrel 重写,否则 gen 会把入口模块覆盖回包装态。
|
|
179
|
+
// 本切片 9 个组件均为纯搬运;唯一组件间依赖是 Countdown → Statistic,
|
|
180
|
+
// 故 Statistic 先行落地。AvatarGroup 不在本库公开面,不登记、不搬运。
|
|
181
|
+
"Link",
|
|
182
|
+
"Space",
|
|
183
|
+
"Badge",
|
|
184
|
+
"Card",
|
|
185
|
+
"Empty",
|
|
186
|
+
"Result",
|
|
187
|
+
"Avatar",
|
|
188
|
+
"Statistic",
|
|
189
|
+
"Countdown"
|
|
190
|
+
], t = (e) => o.includes(e);
|
|
178
191
|
export {
|
|
179
|
-
|
|
192
|
+
t as isVendored,
|
|
180
193
|
o as vendoredComponents
|
|
181
194
|
};
|