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,100 @@
|
|
|
1
|
+
import type { Component, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
export type ImageViewerAction = 'zoomIn' | 'zoomOut' | 'clockwise' | 'anticlockwise';
|
|
3
|
+
export type ImageViewerCrossorigin = 'anonymous' | 'use-credentials' | '';
|
|
4
|
+
export interface ImageViewerProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description preview link list.
|
|
7
|
+
*/
|
|
8
|
+
urlList?: string[];
|
|
9
|
+
/**
|
|
10
|
+
* @description preview backdrop z-index.
|
|
11
|
+
*/
|
|
12
|
+
zIndex?: number;
|
|
13
|
+
/**
|
|
14
|
+
* @description the initial preview image index, less than or equal to the length of `url-list`.
|
|
15
|
+
*/
|
|
16
|
+
initialIndex?: number;
|
|
17
|
+
/**
|
|
18
|
+
* @description whether preview is infinite.
|
|
19
|
+
*/
|
|
20
|
+
infinite?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @description whether user can emit close event when clicking backdrop.
|
|
23
|
+
*/
|
|
24
|
+
hideOnClickModal?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.
|
|
27
|
+
*/
|
|
28
|
+
teleported?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @description whether the image-viewer can be closed by pressing ESC.
|
|
31
|
+
*/
|
|
32
|
+
closeOnPressEscape?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* @description the zoom rate of the image viewer zoom event.
|
|
35
|
+
*/
|
|
36
|
+
zoomRate?: number;
|
|
37
|
+
/**
|
|
38
|
+
* @description preview image scale.
|
|
39
|
+
*/
|
|
40
|
+
scale?: number;
|
|
41
|
+
/**
|
|
42
|
+
* @description the min scale of the image viewer zoom event.
|
|
43
|
+
*/
|
|
44
|
+
minScale?: number;
|
|
45
|
+
/**
|
|
46
|
+
* @description the max scale of the image viewer zoom event.
|
|
47
|
+
*/
|
|
48
|
+
maxScale?: number;
|
|
49
|
+
/**
|
|
50
|
+
* @description show preview image progress content.
|
|
51
|
+
*/
|
|
52
|
+
showProgress?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* @description set HTML attribute: crossorigin.
|
|
55
|
+
*/
|
|
56
|
+
crossorigin?: ImageViewerCrossorigin;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Removed after 3.0.0, Use `ImageViewerProps` instead.
|
|
60
|
+
*/
|
|
61
|
+
export declare const imageViewerProps: {
|
|
62
|
+
readonly urlList: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
63
|
+
readonly zIndex: {
|
|
64
|
+
readonly type: import("vue").PropType<number>;
|
|
65
|
+
readonly required: false;
|
|
66
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
67
|
+
__epPropKey: true;
|
|
68
|
+
};
|
|
69
|
+
readonly initialIndex: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
70
|
+
readonly infinite: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
71
|
+
readonly hideOnClickModal: BooleanConstructor;
|
|
72
|
+
readonly teleported: BooleanConstructor;
|
|
73
|
+
readonly closeOnPressEscape: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
74
|
+
readonly zoomRate: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
|
|
75
|
+
readonly scale: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
|
|
76
|
+
readonly minScale: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
|
|
77
|
+
readonly maxScale: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
78
|
+
readonly showProgress: BooleanConstructor;
|
|
79
|
+
readonly crossorigin: {
|
|
80
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => ImageViewerCrossorigin) | (((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => ImageViewerCrossorigin)) | null)[], unknown, unknown>>;
|
|
81
|
+
readonly required: false;
|
|
82
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
83
|
+
__epPropKey: true;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Removed after 3.0.0, Use `ImageViewerProps` instead.
|
|
88
|
+
*/
|
|
89
|
+
export type ImageViewerPropsPublic = ExtractPublicPropTypes<typeof imageViewerProps>;
|
|
90
|
+
export declare const imageViewerEmits: {
|
|
91
|
+
close: () => boolean;
|
|
92
|
+
error: (evt: Event) => boolean;
|
|
93
|
+
switch: (index: number) => boolean;
|
|
94
|
+
rotate: (deg: number) => boolean;
|
|
95
|
+
};
|
|
96
|
+
export type ImageViewerEmits = typeof imageViewerEmits;
|
|
97
|
+
export interface ImageViewerMode {
|
|
98
|
+
name: string;
|
|
99
|
+
icon: Component;
|
|
100
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { isNumber as t } from "../../utils/types.js";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import "@vue/shared";
|
|
5
|
+
import { mutable as o } from "../../utils/typescript.js";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import { buildProps as i, definePropType as r } from "../../utils/vue/props/runtime.js";
|
|
8
|
+
import "vue";
|
|
9
|
+
i({
|
|
10
|
+
/**
|
|
11
|
+
* @description preview link list.
|
|
12
|
+
*/
|
|
13
|
+
urlList: {
|
|
14
|
+
type: r(Array),
|
|
15
|
+
default: () => o([])
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* @description preview backdrop z-index.
|
|
19
|
+
*/
|
|
20
|
+
zIndex: {
|
|
21
|
+
type: Number
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* @description the initial preview image index, less than or equal to the length of `url-list`.
|
|
25
|
+
*/
|
|
26
|
+
initialIndex: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 0
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* @description whether preview is infinite.
|
|
32
|
+
*/
|
|
33
|
+
infinite: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* @description whether user can emit close event when clicking backdrop.
|
|
39
|
+
*/
|
|
40
|
+
hideOnClickModal: Boolean,
|
|
41
|
+
/**
|
|
42
|
+
* @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.
|
|
43
|
+
*/
|
|
44
|
+
teleported: Boolean,
|
|
45
|
+
/**
|
|
46
|
+
* @description whether the image-viewer can be closed by pressing ESC.
|
|
47
|
+
*/
|
|
48
|
+
closeOnPressEscape: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* @description the zoom rate of the image viewer zoom event.
|
|
54
|
+
*/
|
|
55
|
+
zoomRate: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: 1.2
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* @description preview image scale.
|
|
61
|
+
*/
|
|
62
|
+
scale: {
|
|
63
|
+
type: Number,
|
|
64
|
+
default: 1
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* @description the min scale of the image viewer zoom event.
|
|
68
|
+
*/
|
|
69
|
+
minScale: {
|
|
70
|
+
type: Number,
|
|
71
|
+
default: 0.2
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* @description the max scale of the image viewer zoom event.
|
|
75
|
+
*/
|
|
76
|
+
maxScale: {
|
|
77
|
+
type: Number,
|
|
78
|
+
default: 7
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* @description show preview image progress content.
|
|
82
|
+
*/
|
|
83
|
+
showProgress: Boolean,
|
|
84
|
+
/**
|
|
85
|
+
* @description set HTML attribute: crossorigin.
|
|
86
|
+
*/
|
|
87
|
+
crossorigin: {
|
|
88
|
+
type: r(String)
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const f = {
|
|
92
|
+
close: () => !0,
|
|
93
|
+
error: (e) => e instanceof Event,
|
|
94
|
+
switch: (e) => t(e),
|
|
95
|
+
rotate: (e) => t(e)
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
f as imageViewerEmits
|
|
99
|
+
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpImageViewer from './EpImageViewer.vue';
|
|
3
|
+
/**
|
|
4
|
+
* image-viewer 自持 barrel(vendor-batch-4 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 本体为本地 SFC,焦点陷阱消费本地 `ElFocusTrap`。
|
|
7
|
+
* 保留 `setActiveItem` 暴露契约,不导出 `ElImageViewer` 别名。
|
|
8
|
+
*/
|
|
9
|
+
export declare const EpImageViewer: typeof _EpImageViewer & Plugin;
|
|
4
10
|
export default EpImageViewer;
|
|
11
|
+
export { imageViewerEmits, imageViewerProps } from './image-viewer';
|
|
12
|
+
export type { ImageViewerAction, ImageViewerCrossorigin, ImageViewerEmits, ImageViewerMode, ImageViewerProps, ImageViewerPropsPublic, } from './image-viewer';
|
|
13
|
+
export type { ImageViewerInstance } from './instance';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as e } from "../../utils/with-install.js";
|
|
2
|
+
import i from "./EpImageViewer.vue.js";
|
|
3
|
+
import { imageViewerEmits as a } from "./image-viewer.js";
|
|
4
|
+
const o = e(
|
|
5
|
+
i,
|
|
6
|
+
"ep-image-viewer"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
o as EpImageViewer,
|
|
10
|
+
a as imageViewerEmits
|
|
6
11
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { LinkProps } from './link';
|
|
2
|
+
declare var __VLS_9: {}, __VLS_11: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_9) => any;
|
|
5
|
+
} & {
|
|
6
|
+
icon?: (props: typeof __VLS_11) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
click: (evt: MouseEvent) => void;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{
|
|
11
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
underline: boolean | "always" | "never" | "hover";
|
|
14
|
+
type: "primary" | "success" | "warning" | "info" | "danger" | "default";
|
|
15
|
+
target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
|
|
16
|
+
href: string;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent as B, computed as l, openBlock as r, createElementBlock as m, normalizeClass as u, createBlock as c, unref as f, withCtx as E, resolveDynamicComponent as $, createCommentVNode as a, renderSlot as p } from "vue";
|
|
2
|
+
import { ElIcon as w } from "../icon/index.js";
|
|
3
|
+
import "../config-provider/index.js";
|
|
4
|
+
import { useNamespace as S } from "../../hooks/use-namespace/index.js";
|
|
5
|
+
import { isBoolean as v } from "../../utils/types.js";
|
|
6
|
+
import "lodash-unified";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import "@vue/shared";
|
|
9
|
+
import "@element-plus/icons-vue";
|
|
10
|
+
import "../../hooks/use-size/index.js";
|
|
11
|
+
import { useDeprecated as D } from "../../hooks/use-deprecated/index.js";
|
|
12
|
+
import "@popperjs/core";
|
|
13
|
+
import "../../hooks/use-z-index/index.js";
|
|
14
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
15
|
+
import "../../hooks/use-aria/index.js";
|
|
16
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
17
|
+
import "../../hooks/use-empty-values/index.js";
|
|
18
|
+
import { linkEmits as L } from "./link.js";
|
|
19
|
+
import { useGlobalConfig as N } from "../config-provider/src/hooks/use-global-config.js";
|
|
20
|
+
const T = ["href", "target"], Y = /* @__PURE__ */ B({
|
|
21
|
+
name: "EpLink",
|
|
22
|
+
__name: "EpLink",
|
|
23
|
+
props: {
|
|
24
|
+
type: { default: void 0 },
|
|
25
|
+
underline: { type: [Boolean, String], default: void 0 },
|
|
26
|
+
disabled: { type: Boolean },
|
|
27
|
+
href: { default: "" },
|
|
28
|
+
target: { default: "_self" },
|
|
29
|
+
icon: {}
|
|
30
|
+
},
|
|
31
|
+
emits: L,
|
|
32
|
+
setup(o, { emit: h }) {
|
|
33
|
+
const n = o, k = h, s = N("link");
|
|
34
|
+
D(
|
|
35
|
+
{
|
|
36
|
+
scope: "el-link",
|
|
37
|
+
from: "The underline option (boolean)",
|
|
38
|
+
replacement: "'always' | 'hover' | 'never'",
|
|
39
|
+
version: "3.0.0",
|
|
40
|
+
ref: "https://element-plus.org/en-US/component/link.html#underline"
|
|
41
|
+
},
|
|
42
|
+
l(() => v(n.underline))
|
|
43
|
+
);
|
|
44
|
+
const t = S("link"), b = l(() => {
|
|
45
|
+
var i;
|
|
46
|
+
const e = (i = s.value) == null ? void 0 : i.type;
|
|
47
|
+
return typeof e == "string" ? e : void 0;
|
|
48
|
+
}), y = l(() => {
|
|
49
|
+
var i;
|
|
50
|
+
const e = (i = s.value) == null ? void 0 : i.underline;
|
|
51
|
+
return typeof e == "boolean" || typeof e == "string" ? e : void 0;
|
|
52
|
+
}), d = l(() => v(n.underline) ? n.underline ? "hover" : "never" : n.underline ?? y.value ?? "hover"), g = l(() => [
|
|
53
|
+
t.b(),
|
|
54
|
+
t.m(n.type ?? b.value ?? "default"),
|
|
55
|
+
t.is("disabled", n.disabled),
|
|
56
|
+
t.is("underline", d.value === "always"),
|
|
57
|
+
t.is("hover-underline", d.value === "hover" && !n.disabled)
|
|
58
|
+
]);
|
|
59
|
+
function C(e) {
|
|
60
|
+
n.disabled || k("click", e);
|
|
61
|
+
}
|
|
62
|
+
return (e, i) => (r(), m("a", {
|
|
63
|
+
class: u(g.value),
|
|
64
|
+
href: o.disabled || !o.href ? void 0 : o.href,
|
|
65
|
+
target: o.disabled || !o.href ? void 0 : o.target,
|
|
66
|
+
onClick: C
|
|
67
|
+
}, [
|
|
68
|
+
o.icon ? (r(), c(f(w), { key: 0 }, {
|
|
69
|
+
default: E(() => [
|
|
70
|
+
(r(), c($(o.icon)))
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
})) : a("", !0),
|
|
74
|
+
e.$slots.default ? (r(), m("span", {
|
|
75
|
+
key: 1,
|
|
76
|
+
class: u(f(t).e("inner"))
|
|
77
|
+
}, [
|
|
78
|
+
p(e.$slots, "default")
|
|
79
|
+
], 2)) : a("", !0),
|
|
80
|
+
e.$slots.icon ? p(e.$slots, "icon", {}, void 0, void 0, 2) : a("", !0)
|
|
81
|
+
], 10, T));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
Y as default
|
|
86
|
+
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpLink from './EpLink.vue';
|
|
3
|
+
/**
|
|
4
|
+
* link 自持 barrel(vendor-batch-5 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 类型 / 下划线支持全局配置回退,图标消费本地 `ElIcon`。
|
|
7
|
+
* 不导出 `ElLink` 别名。
|
|
8
|
+
*/
|
|
9
|
+
export declare const EpLink: typeof _EpLink & Plugin;
|
|
4
10
|
export default EpLink;
|
|
11
|
+
export { linkEmits, linkProps } from './link';
|
|
12
|
+
export type { LinkConfigContext, LinkEmits, LinkProps, LinkPropsPublic, } from './link';
|
|
13
|
+
export type { LinkInstance } from './instance';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ElLink as n } from "element-plus";
|
|
2
1
|
import { withInstall as i } from "../../utils/with-install.js";
|
|
3
|
-
|
|
2
|
+
import o from "./EpLink.vue.js";
|
|
3
|
+
import { linkEmits as f } from "./link.js";
|
|
4
|
+
const r = i(o, "ep-link");
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
r as EpLink,
|
|
7
|
+
f as linkEmits
|
|
6
8
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { IconPropType } from '@element-plus/utils';
|
|
3
|
+
export interface LinkProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description type
|
|
6
|
+
*/
|
|
7
|
+
type?: 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'default';
|
|
8
|
+
/**
|
|
9
|
+
* @description when underlines should appear
|
|
10
|
+
*/
|
|
11
|
+
underline?: boolean | 'always' | 'never' | 'hover';
|
|
12
|
+
/**
|
|
13
|
+
* @description whether the component is disabled
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @description same as native hyperlink's `href`
|
|
18
|
+
*/
|
|
19
|
+
href?: string;
|
|
20
|
+
/**
|
|
21
|
+
* @description same as native hyperlink's `target`
|
|
22
|
+
*/
|
|
23
|
+
target?: '_blank' | '_parent' | '_self' | '_top' | (string & NonNullable<unknown>);
|
|
24
|
+
/**
|
|
25
|
+
* @description icon component
|
|
26
|
+
*/
|
|
27
|
+
icon?: IconPropType;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Removed after 3.0.0, Use `LinkProps` instead.
|
|
31
|
+
*/
|
|
32
|
+
export declare const linkProps: {
|
|
33
|
+
readonly type: import("@element-plus/utils").EpPropFinalized<StringConstructor, "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, undefined, boolean>;
|
|
34
|
+
readonly underline: import("@element-plus/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
|
|
35
|
+
readonly disabled: BooleanConstructor;
|
|
36
|
+
readonly href: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
37
|
+
readonly target: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | (((new (...args: any[]) => string) | (() => string)) | null)[], unknown, unknown, "_self", boolean>;
|
|
38
|
+
readonly icon: {
|
|
39
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
40
|
+
readonly required: false;
|
|
41
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
42
|
+
__epPropKey: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Removed after 3.0.0, Use `LinkProps` instead.
|
|
47
|
+
*/
|
|
48
|
+
export type LinkPropsPublic = ExtractPublicPropTypes<typeof linkProps>;
|
|
49
|
+
export declare const linkEmits: {
|
|
50
|
+
click: (evt: MouseEvent) => boolean;
|
|
51
|
+
};
|
|
52
|
+
export type LinkEmits = typeof linkEmits;
|
|
53
|
+
export interface LinkConfigContext {
|
|
54
|
+
type?: LinkProps['type'];
|
|
55
|
+
underline?: LinkProps['underline'];
|
|
56
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import { iconPropType as t } from "../../utils/vue/icon.js";
|
|
5
|
+
import "vue";
|
|
6
|
+
import { buildProps as r } from "../../utils/vue/props/runtime.js";
|
|
7
|
+
r({
|
|
8
|
+
/**
|
|
9
|
+
* @description type
|
|
10
|
+
*/
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
values: ["primary", "success", "warning", "info", "danger", "default"],
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* @description when underlines should appear
|
|
18
|
+
*/
|
|
19
|
+
underline: {
|
|
20
|
+
type: [Boolean, String],
|
|
21
|
+
values: [!0, !1, "always", "never", "hover"],
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* @description whether the component is disabled
|
|
26
|
+
*/
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
/**
|
|
29
|
+
* @description same as native hyperlink's `href`
|
|
30
|
+
*/
|
|
31
|
+
href: { type: String, default: "" },
|
|
32
|
+
/**
|
|
33
|
+
* @description same as native hyperlink's `target`
|
|
34
|
+
*/
|
|
35
|
+
target: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "_self"
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* @description icon component
|
|
41
|
+
*/
|
|
42
|
+
icon: {
|
|
43
|
+
type: t
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const s = {
|
|
47
|
+
click: (e) => e instanceof MouseEvent
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
s as linkEmits
|
|
51
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ResultProps } from './result';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
title?: (props: typeof __VLS_7) => any;
|
|
7
|
+
} & {
|
|
8
|
+
'sub-title'?: (props: typeof __VLS_9) => any;
|
|
9
|
+
} & {
|
|
10
|
+
extra?: (props: typeof __VLS_11) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<ResultProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ResultProps> & Readonly<{}>, {
|
|
13
|
+
icon: "primary" | "success" | "warning" | "info" | "error";
|
|
14
|
+
title: string;
|
|
15
|
+
subTitle: string;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as k, computed as C, openBlock as l, createElementBlock as i, normalizeClass as t, unref as n, createElementVNode as u, renderSlot as r, createBlock as $, resolveDynamicComponent as y, createCommentVNode as c, toDisplayString as p } from "vue";
|
|
2
|
+
import { useNamespace as E } 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 "../../hooks/use-size/index.js";
|
|
8
|
+
import "@popperjs/core";
|
|
9
|
+
import "../../hooks/use-z-index/index.js";
|
|
10
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
11
|
+
import "../../hooks/use-aria/index.js";
|
|
12
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
13
|
+
import "../../hooks/use-empty-values/index.js";
|
|
14
|
+
import { IconMap as d, IconComponentMap as f } from "./result.js";
|
|
15
|
+
const w = /* @__PURE__ */ k({
|
|
16
|
+
name: "EpResult",
|
|
17
|
+
__name: "EpResult",
|
|
18
|
+
props: {
|
|
19
|
+
title: { default: "" },
|
|
20
|
+
subTitle: { default: "" },
|
|
21
|
+
icon: { default: "info" }
|
|
22
|
+
},
|
|
23
|
+
setup(o) {
|
|
24
|
+
const v = o, s = E("result"), a = C(() => {
|
|
25
|
+
const e = v.icon, m = e && d[e] ? d[e] : "icon-info", b = f[m] || f["icon-info"];
|
|
26
|
+
return {
|
|
27
|
+
class: m,
|
|
28
|
+
component: b
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
return (e, m) => (l(), i("div", {
|
|
32
|
+
class: t(n(s).b())
|
|
33
|
+
}, [
|
|
34
|
+
u("div", {
|
|
35
|
+
class: t(n(s).e("icon"))
|
|
36
|
+
}, [
|
|
37
|
+
r(e.$slots, "icon", {}, () => [
|
|
38
|
+
a.value.component ? (l(), $(y(a.value.component), {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: t(a.value.class)
|
|
41
|
+
}, null, 8, ["class"])) : c("", !0)
|
|
42
|
+
])
|
|
43
|
+
], 2),
|
|
44
|
+
o.title || e.$slots.title ? (l(), i("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: t(n(s).e("title"))
|
|
47
|
+
}, [
|
|
48
|
+
r(e.$slots, "title", {}, () => [
|
|
49
|
+
u("p", null, p(o.title), 1)
|
|
50
|
+
])
|
|
51
|
+
], 2)) : c("", !0),
|
|
52
|
+
o.subTitle || e.$slots["sub-title"] ? (l(), i("div", {
|
|
53
|
+
key: 1,
|
|
54
|
+
class: t(n(s).e("subtitle"))
|
|
55
|
+
}, [
|
|
56
|
+
r(e.$slots, "sub-title", {}, () => [
|
|
57
|
+
u("p", null, p(o.subTitle), 1)
|
|
58
|
+
])
|
|
59
|
+
], 2)) : c("", !0),
|
|
60
|
+
e.$slots.extra ? (l(), i("div", {
|
|
61
|
+
key: 2,
|
|
62
|
+
class: t(n(s).e("extra"))
|
|
63
|
+
}, [
|
|
64
|
+
r(e.$slots, "extra")
|
|
65
|
+
], 2)) : c("", !0)
|
|
66
|
+
], 2));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
w as default
|
|
71
|
+
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpResult from './EpResult.vue';
|
|
3
|
+
/**
|
|
4
|
+
* result 自持 barrel(vendor-batch-5 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 类型图标映射随本体落到本地;图标继续来自独立图标包。
|
|
7
|
+
* 不导出 `ElResult` 别名。
|
|
8
|
+
*/
|
|
9
|
+
export declare const EpResult: typeof _EpResult & Plugin;
|
|
4
10
|
export default EpResult;
|
|
11
|
+
export { IconComponentMap, IconMap, resultProps } from './result';
|
|
12
|
+
export type { ResultProps, ResultPropsPublic, } from './result';
|
|
13
|
+
export type { ResultInstance } from './instance';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as o } from "../../utils/with-install.js";
|
|
2
|
+
import t from "./EpResult.vue.js";
|
|
3
|
+
import { IconComponentMap as s, IconMap as a } from "./result.js";
|
|
4
|
+
const m = o(
|
|
5
|
+
t,
|
|
6
|
+
"ep-result"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
m as EpResult,
|
|
10
|
+
s as IconComponentMap,
|
|
11
|
+
a as IconMap
|
|
6
12
|
};
|