ep-craft 0.1.35 → 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/breadcrumb/EpBreadcrumb.vue.d.ts +15 -0
- package/dist/components/breadcrumb/EpBreadcrumb.vue.js +41 -0
- package/dist/components/breadcrumb/EpBreadcrumb2.vue.js +4 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb.js +21 -0
- package/dist/components/breadcrumb/constants.d.ts +3 -0
- package/dist/components/breadcrumb/constants.js +4 -0
- package/dist/components/breadcrumb/index.d.ts +20 -2
- package/dist/components/breadcrumb/index.js +10 -4
- package/dist/components/breadcrumb/instance.d.ts +2 -0
- package/dist/components/breadcrumb-item/EpBreadcrumbItem.vue.d.ts +15 -0
- package/dist/components/breadcrumb-item/EpBreadcrumbItem.vue.js +58 -0
- package/dist/components/breadcrumb-item/EpBreadcrumbItem2.vue.js +4 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +23 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.js +19 -0
- package/dist/components/breadcrumb-item/index.d.ts +11 -2
- package/dist/components/breadcrumb-item/index.js +8 -4
- package/dist/components/breadcrumb-item/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/col/EpCol.vue.d.ts +24 -0
- package/dist/components/col/EpCol.vue.js +61 -0
- package/dist/components/col/EpCol2.vue.js +4 -0
- package/dist/components/col/col.d.ts +71 -0
- package/dist/components/col/col.js +79 -0
- package/dist/components/col/index.d.ts +10 -2
- package/dist/components/col/index.js +5 -4
- package/dist/components/collapse/EpCollapse.vue.d.ts +27 -0
- package/dist/components/collapse/EpCollapse.vue.js +30 -0
- package/dist/components/collapse/EpCollapse2.vue.js +4 -0
- package/dist/components/collapse/collapse.d.ts +47 -0
- package/dist/components/collapse/collapse.js +46 -0
- package/dist/components/collapse/constants.d.ts +7 -0
- package/dist/components/collapse/constants.js +4 -0
- package/dist/components/collapse/index.d.ts +21 -2
- package/dist/components/collapse/index.js +11 -3
- package/dist/components/collapse/instance.d.ts +2 -0
- package/dist/components/collapse/use-collapse-item.d.ts +21 -0
- package/dist/components/collapse/use-collapse-item.js +66 -0
- package/dist/components/collapse/use-collapse.d.ts +9 -0
- package/dist/components/collapse/use-collapse.js +72 -0
- package/dist/components/collapse-item/EpCollapseItem.vue.d.ts +27 -0
- package/dist/components/collapse-item/EpCollapseItem.vue.js +102 -0
- package/dist/components/collapse-item/EpCollapseItem2.vue.js +4 -0
- package/dist/components/collapse-item/collapse-item.d.ts +34 -0
- package/dist/components/collapse-item/collapse-item.js +34 -0
- package/dist/components/collapse-item/index.d.ts +11 -2
- package/dist/components/collapse-item/index.js +8 -4
- package/dist/components/collapse-item/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 +1 -1
- package/dist/components/dropdown/src/dropdown-item2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown-menu2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown2.vue.js +1 -1
- 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/image/EpImage.vue.d.ts +63 -0
- package/dist/components/image/EpImage.vue.js +207 -0
- package/dist/components/image/EpImage2.vue.js +4 -0
- package/dist/components/image/image.d.ts +132 -0
- package/dist/components/image/image.js +132 -0
- package/dist/components/image/index.d.ts +11 -2
- package/dist/components/image/index.js +9 -4
- package/dist/components/image/instance.d.ts +2 -0
- package/dist/components/image-viewer/EpImageViewer.vue.d.ts +61 -0
- package/dist/components/image-viewer/EpImageViewer.vue.js +421 -0
- package/dist/components/image-viewer/EpImageViewer2.vue.js +4 -0
- package/dist/components/image-viewer/image-viewer.d.ts +100 -0
- package/dist/components/image-viewer/image-viewer.js +99 -0
- package/dist/components/image-viewer/index.d.ts +11 -2
- package/dist/components/image-viewer/index.js +9 -4
- package/dist/components/image-viewer/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 +1 -1
- 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/row/EpRow.vue.d.ts +17 -0
- package/dist/components/row/EpRow.vue.js +50 -0
- package/dist/components/row/EpRow2.vue.js +4 -0
- package/dist/components/row/constants.d.ts +5 -0
- package/dist/components/row/constants.js +4 -0
- package/dist/components/row/index.d.ts +12 -2
- package/dist/components/row/index.js +7 -4
- package/dist/components/row/row.d.ts +41 -0
- package/dist/components/row/row.js +49 -0
- package/dist/components/skeleton/EpSkeleton.vue.d.ts +24 -0
- package/dist/components/skeleton/EpSkeleton.vue.js +56 -0
- package/dist/components/skeleton/EpSkeleton2.vue.js +4 -0
- package/dist/components/skeleton/index.d.ts +16 -2
- package/dist/components/skeleton/index.js +9 -3
- package/dist/components/skeleton/skeleton.d.ts +53 -0
- package/dist/components/skeleton/skeleton.js +39 -0
- package/dist/components/skeleton-item/EpSkeletonItem.vue.d.ts +5 -0
- package/dist/components/skeleton-item/EpSkeletonItem.vue.js +31 -0
- package/dist/components/skeleton-item/EpSkeletonItem2.vue.js +4 -0
- package/dist/components/skeleton-item/index.d.ts +8 -2
- package/dist/components/skeleton-item/index.js +7 -3
- package/dist/components/skeleton-item/skeleton-item.d.ts +19 -0
- package/dist/components/skeleton-item/skeleton-item.js +26 -0
- 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/components/timeline/index.d.ts +21 -2
- package/dist/components/timeline/index.js +10 -3
- package/dist/components/timeline/instance.d.ts +2 -0
- package/dist/components/timeline/timeline.d.ts +20 -0
- package/dist/components/timeline/timeline.js +53 -0
- package/dist/components/timeline/tokens.d.ts +7 -0
- package/dist/components/timeline/tokens.js +4 -0
- package/dist/components/timeline-item/EpTimelineItem.vue.d.ts +21 -0
- package/dist/components/timeline-item/EpTimelineItem.vue.js +94 -0
- package/dist/components/timeline-item/EpTimelineItem2.vue.js +4 -0
- package/dist/components/timeline-item/index.d.ts +12 -2
- package/dist/components/timeline-item/index.js +7 -3
- package/dist/components/timeline-item/instance.d.ts +2 -0
- package/dist/components/timeline-item/timeline-item.d.ts +63 -0
- package/dist/components/timeline-item/timeline-item.js +64 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-throttle-render/index.d.ts +7 -0
- package/dist/hooks/use-throttle-render/index.js +31 -0
- package/dist/utils/vue/vnode.js +32 -22
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +33 -3
- package/package.json +1 -1
|
@@ -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
|
+
});
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpTimeline from './timeline';
|
|
3
|
+
import _EpTimelineItem from '../timeline-item/EpTimelineItem.vue';
|
|
4
|
+
/**
|
|
5
|
+
* timeline 自持 barrel(vendor-batch-4 产出)。
|
|
6
|
+
*
|
|
7
|
+
* 父组件保留 `.ts` defineComponent 形态(上游无 SFC),以 `flattedChildren`
|
|
8
|
+
* 展开默认插槽并支持 reverse。`.TimelineItem` 是对外公开面的一部分,
|
|
9
|
+
* 此处挂载**未安装本体**,与上游形态一致。
|
|
10
|
+
* 不导出 `ElTimeline` / `ElTimelineItem` 别名。
|
|
11
|
+
*/
|
|
12
|
+
export declare const EpTimeline: typeof _EpTimeline & Plugin & {
|
|
13
|
+
TimelineItem: typeof _EpTimelineItem;
|
|
14
|
+
};
|
|
4
15
|
export default EpTimeline;
|
|
16
|
+
export { TIMELINE_INJECTION_KEY } from './tokens';
|
|
17
|
+
export { timelineProps } from './timeline';
|
|
18
|
+
export { timelineItemProps } from '../timeline-item';
|
|
19
|
+
export type { TimelineProps, TimelinePropsPublic } from './timeline';
|
|
20
|
+
export type { TimelineProvider } from './tokens';
|
|
21
|
+
export type { TimelineInstance } from './instance';
|
|
22
|
+
export type { TimelineItemProps, TimelineItemPropsPublic, } from '../timeline-item';
|
|
23
|
+
export type { TimelineItemInstance } from '../timeline-item/instance';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { ElTimeline as e } from "element-plus";
|
|
2
1
|
import { withInstall as i } from "../../utils/with-install.js";
|
|
3
|
-
|
|
2
|
+
import e from "./timeline.js";
|
|
3
|
+
import { timelineProps as f } from "./timeline.js";
|
|
4
|
+
import m from "../timeline-item/EpTimelineItem.vue.js";
|
|
5
|
+
import "../timeline-item/index.js";
|
|
6
|
+
const p = Object.assign(
|
|
7
|
+
i(e, "ep-timeline"),
|
|
8
|
+
{ TimelineItem: m }
|
|
9
|
+
);
|
|
4
10
|
export {
|
|
5
|
-
|
|
11
|
+
p as EpTimeline,
|
|
12
|
+
f as timelineProps
|
|
6
13
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
export declare const timelineProps: {
|
|
3
|
+
readonly mode: import("@element-plus/utils").EpPropFinalized<StringConstructor, "alternate" | "alternate-reverse" | "end" | "start", unknown, "start", boolean>;
|
|
4
|
+
readonly reverse: BooleanConstructor;
|
|
5
|
+
};
|
|
6
|
+
export type TimelineProps = ExtractPropTypes<typeof timelineProps>;
|
|
7
|
+
export type TimelinePropsPublic = ExtractPublicPropTypes<typeof timelineProps>;
|
|
8
|
+
declare const Timeline: import("vue").DefineComponent<ExtractPropTypes<{
|
|
9
|
+
readonly mode: import("@element-plus/utils").EpPropFinalized<StringConstructor, "alternate" | "alternate-reverse" | "end" | "start", unknown, "start", boolean>;
|
|
10
|
+
readonly reverse: BooleanConstructor;
|
|
11
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
14
|
+
readonly mode: import("@element-plus/utils").EpPropFinalized<StringConstructor, "alternate" | "alternate-reverse" | "end" | "start", unknown, "start", boolean>;
|
|
15
|
+
readonly reverse: BooleanConstructor;
|
|
16
|
+
}>> & Readonly<{}>, {
|
|
17
|
+
readonly reverse: boolean;
|
|
18
|
+
readonly mode: import("@element-plus/utils").EpPropMergeType<StringConstructor, "alternate" | "alternate-reverse" | "end" | "start", unknown>;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default Timeline;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent as n, provide as p, computed as a, h as l } from "vue";
|
|
2
|
+
import { useNamespace as d } from "../../hooks/use-namespace/index.js";
|
|
3
|
+
import "@vue/shared";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import { buildProps as s } from "../../utils/vue/props/runtime.js";
|
|
8
|
+
import { flattedChildren as u } from "../../utils/vue/vnode.js";
|
|
9
|
+
import "../../hooks/use-size/index.js";
|
|
10
|
+
import "@popperjs/core";
|
|
11
|
+
import "../../hooks/use-z-index/index.js";
|
|
12
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
13
|
+
import "../../hooks/use-aria/index.js";
|
|
14
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
15
|
+
import "../../hooks/use-empty-values/index.js";
|
|
16
|
+
import { TIMELINE_INJECTION_KEY as f } from "./tokens.js";
|
|
17
|
+
const c = s({
|
|
18
|
+
/**
|
|
19
|
+
* @description relative position of timeline and content
|
|
20
|
+
*/
|
|
21
|
+
mode: {
|
|
22
|
+
type: String,
|
|
23
|
+
values: ["start", "alternate", "alternate-reverse", "end"],
|
|
24
|
+
default: "start"
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* @description whether reverse order
|
|
28
|
+
*/
|
|
29
|
+
reverse: Boolean
|
|
30
|
+
}), L = n({
|
|
31
|
+
name: "EpTimeline",
|
|
32
|
+
props: c,
|
|
33
|
+
setup(r, { slots: e }) {
|
|
34
|
+
const t = d("timeline");
|
|
35
|
+
p(f, { props: r, slots: e });
|
|
36
|
+
const o = a(() => [t.b(), t.is(r.mode)]);
|
|
37
|
+
return () => {
|
|
38
|
+
var m;
|
|
39
|
+
const i = u(
|
|
40
|
+
((m = e.default) == null ? void 0 : m.call(e)) ?? []
|
|
41
|
+
);
|
|
42
|
+
return l(
|
|
43
|
+
"ul",
|
|
44
|
+
{ class: o.value },
|
|
45
|
+
r.reverse ? i.reverse() : i
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
L as default,
|
|
52
|
+
c as timelineProps
|
|
53
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TimelineItemProps } from './timeline-item';
|
|
2
|
+
declare var __VLS_9: {}, __VLS_11: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
dot?: (props: typeof __VLS_9) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: typeof __VLS_11) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<TimelineItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
|
|
9
|
+
size: "normal" | "large";
|
|
10
|
+
color: string;
|
|
11
|
+
type: "primary" | "success" | "warning" | "danger" | "info" | "";
|
|
12
|
+
placement: "top" | "bottom";
|
|
13
|
+
timestamp: string;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defineComponent as k, inject as E, computed as c, openBlock as l, createElementBlock as i, normalizeClass as m, createElementVNode as r, unref as o, normalizeStyle as h, createBlock as d, withCtx as I, resolveDynamicComponent as C, createCommentVNode as s, renderSlot as p, toDisplayString as u } from "vue";
|
|
2
|
+
import { ElIcon as N } from "../icon/index.js";
|
|
3
|
+
import { useNamespace as T } from "../../hooks/use-namespace/index.js";
|
|
4
|
+
import "@vue/shared";
|
|
5
|
+
import "lodash-unified";
|
|
6
|
+
import "@vueuse/core";
|
|
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
|
+
import { TIMELINE_INJECTION_KEY as B } from "../timeline/tokens.js";
|
|
16
|
+
const q = /* @__PURE__ */ k({
|
|
17
|
+
name: "EpTimelineItem",
|
|
18
|
+
__name: "EpTimelineItem",
|
|
19
|
+
props: {
|
|
20
|
+
timestamp: { default: "" },
|
|
21
|
+
hideTimestamp: { type: Boolean },
|
|
22
|
+
center: { type: Boolean },
|
|
23
|
+
placement: { default: "bottom" },
|
|
24
|
+
type: { default: "" },
|
|
25
|
+
color: { default: "" },
|
|
26
|
+
size: { default: "normal" },
|
|
27
|
+
icon: {},
|
|
28
|
+
hollow: { type: Boolean }
|
|
29
|
+
},
|
|
30
|
+
setup(t) {
|
|
31
|
+
const a = t, { props: f } = E(
|
|
32
|
+
B
|
|
33
|
+
), e = T("timeline-item"), y = c(() => [
|
|
34
|
+
e.e("node"),
|
|
35
|
+
e.em("node", a.size || ""),
|
|
36
|
+
e.em("node", a.type || ""),
|
|
37
|
+
e.is("hollow", a.hollow)
|
|
38
|
+
]), v = c(() => [
|
|
39
|
+
e.b(),
|
|
40
|
+
{ [e.e("center")]: a.center },
|
|
41
|
+
e.is(f.mode)
|
|
42
|
+
]);
|
|
43
|
+
return (n, b) => (l(), i("li", {
|
|
44
|
+
class: m(v.value)
|
|
45
|
+
}, [
|
|
46
|
+
r("div", {
|
|
47
|
+
class: m(o(e).e("tail"))
|
|
48
|
+
}, null, 2),
|
|
49
|
+
n.$slots.dot ? s("", !0) : (l(), i("div", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: m(y.value),
|
|
52
|
+
style: h({
|
|
53
|
+
backgroundColor: t.color
|
|
54
|
+
})
|
|
55
|
+
}, [
|
|
56
|
+
t.icon ? (l(), d(o(N), {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: m(o(e).e("icon"))
|
|
59
|
+
}, {
|
|
60
|
+
default: I(() => [
|
|
61
|
+
(l(), d(C(t.icon)))
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["class"])) : s("", !0)
|
|
65
|
+
], 6)),
|
|
66
|
+
n.$slots.dot ? (l(), i("div", {
|
|
67
|
+
key: 1,
|
|
68
|
+
class: m(o(e).e("dot"))
|
|
69
|
+
}, [
|
|
70
|
+
p(n.$slots, "dot")
|
|
71
|
+
], 2)) : s("", !0),
|
|
72
|
+
r("div", {
|
|
73
|
+
class: m(o(e).e("wrapper"))
|
|
74
|
+
}, [
|
|
75
|
+
!t.hideTimestamp && t.placement === "top" ? (l(), i("div", {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: m([o(e).e("timestamp"), o(e).is("top")])
|
|
78
|
+
}, u(t.timestamp), 3)) : s("", !0),
|
|
79
|
+
r("div", {
|
|
80
|
+
class: m(o(e).e("content"))
|
|
81
|
+
}, [
|
|
82
|
+
p(n.$slots, "default")
|
|
83
|
+
], 2),
|
|
84
|
+
!t.hideTimestamp && t.placement === "bottom" ? (l(), i("div", {
|
|
85
|
+
key: 1,
|
|
86
|
+
class: m([o(e).e("timestamp"), o(e).is("bottom")])
|
|
87
|
+
}, u(t.timestamp), 3)) : s("", !0)
|
|
88
|
+
], 2)
|
|
89
|
+
], 2));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
q as default
|
|
94
|
+
};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpTimelineItem from './EpTimelineItem.vue';
|
|
3
|
+
/**
|
|
4
|
+
* timeline-item 自持 barrel(vendor-batch-4 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 子项通过 `../timeline/tokens` 的字符串键 `TIMELINE_INJECTION_KEY`
|
|
7
|
+
* 注入父上下文(保留上游字符串键,不改语义)。
|
|
8
|
+
* 不导出 `ElTimelineItem` 别名。
|
|
9
|
+
*/
|
|
10
|
+
export declare const EpTimelineItem: typeof _EpTimelineItem & Plugin;
|
|
4
11
|
export default EpTimelineItem;
|
|
12
|
+
export { timelineItemProps } from './timeline-item';
|
|
13
|
+
export type { TimelineItemProps, TimelineItemPropsPublic, } from './timeline-item';
|
|
14
|
+
export type { TimelineItemInstance } from './instance';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { ElTimelineItem as e } from "element-plus";
|
|
2
1
|
import { withInstall as i } from "../../utils/with-install.js";
|
|
3
|
-
|
|
2
|
+
import m from "./EpTimelineItem.vue.js";
|
|
3
|
+
import "./timeline-item.js";
|
|
4
|
+
const p = i(
|
|
5
|
+
m,
|
|
6
|
+
"ep-timeline-item"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
p as EpTimelineItem
|
|
6
10
|
};
|