cosey 0.5.16 → 0.6.0
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/components/audio-card/audio-card.api.d.ts +3 -6
- package/components/audio-card/audio-card.d.ts +6 -12
- package/components/audio-card/index.d.ts +9 -18
- package/components/audio-viewer/audio-viewer.api.d.ts +3 -6
- package/components/audio-viewer/audio-viewer.d.ts +6 -12
- package/components/audio-viewer/audio-viewer.js +12 -67
- package/components/audio-viewer/index.d.ts +9 -18
- package/components/close/close.js +5 -2
- package/components/components.d.ts +5 -1
- package/components/components.js +2 -0
- package/components/editor/components/toolbar/toolbar.js +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.vue.d.ts +11 -1
- package/components/icon/icon.vue.js +13 -8
- package/components/icon/index.d.ts +5 -1
- package/components/image-card/image-card.api.d.ts +131 -0
- package/components/image-card/image-card.api.js +17 -0
- package/components/image-card/image-card.d.ts +140 -16
- package/components/image-card/image-card.js +55 -11
- package/components/image-card/index.d.ts +25 -33
- package/components/image-card/index.js +2 -2
- package/components/index.js +1 -1
- package/components/mask/mask.js +5 -2
- package/components/media-card/media-card.js +10 -5
- package/components/media-card/media-card.style.d.ts +1 -0
- package/components/media-card/media-card.style.js +12 -1
- package/components/media-viewer/index.d.ts +9 -18
- package/components/media-viewer/media-viewer-dialog.api.d.ts +21 -0
- package/components/media-viewer/media-viewer-dialog.api.js +17 -0
- package/components/media-viewer/media-viewer-dialog.d.ts +31 -0
- package/components/media-viewer/media-viewer-dialog.js +82 -0
- package/components/{video-viewer/video-viewer.style.js → media-viewer/media-viewer-dialog.style.js} +8 -6
- package/components/media-viewer/media-viewer.api.d.ts +6 -12
- package/components/media-viewer/media-viewer.api.js +4 -14
- package/components/media-viewer/media-viewer.d.ts +6 -12
- package/components/svga-card/index.d.ts +136 -0
- package/components/svga-card/index.js +8 -0
- package/components/svga-card/svga-card.api.d.ts +41 -0
- package/components/svga-card/svga-card.api.js +13 -0
- package/components/svga-card/svga-card.d.ts +73 -0
- package/components/svga-card/svga-card.js +56 -0
- package/components/svga-card/svga-card.style.js +17 -0
- package/components/svga-viewer/index.d.ts +80 -0
- package/components/svga-viewer/index.js +7 -0
- package/components/svga-viewer/svga-viewer.api.d.ts +25 -0
- package/components/svga-viewer/svga-viewer.api.js +11 -0
- package/components/svga-viewer/svga-viewer.d.ts +38 -0
- package/components/svga-viewer/svga-viewer.js +55 -0
- package/components/transition/index.d.ts +3 -3
- package/components/transition/transition.d.ts +1 -1
- package/components/transition-group/index.d.ts +9 -9
- package/components/transition-group/transition-group.api.d.ts +2 -2
- package/components/transition-group/transition-group.d.ts +5 -5
- package/components/upload/upload-item.d.ts +3 -0
- package/components/upload/upload-item.js +23 -4
- package/components/upload/upload.api.d.ts +1 -0
- package/components/upload/upload.api.js +2 -1
- package/components/upload/upload.style.js +19 -2
- package/components/video-card/index.d.ts +9 -18
- package/components/video-card/video-card.api.d.ts +3 -6
- package/components/video-card/video-card.d.ts +6 -12
- package/components/video-card/video-card.js +3 -2
- package/components/video-viewer/index.d.ts +9 -18
- package/components/video-viewer/video-viewer.api.d.ts +3 -6
- package/components/video-viewer/video-viewer.api.js +2 -2
- package/components/video-viewer/video-viewer.d.ts +6 -12
- package/components/video-viewer/video-viewer.js +13 -68
- package/layout/layout-tabbar/layout-tabbar.vue.js +1 -1
- package/package.json +3 -1
- package/components/audio-viewer/audio-viewer.style.js +0 -19
- package/components/image-card/image-card.vue.d.ts +0 -260
- package/components/image-card/image-card.vue.js +0 -64
- /package/components/{audio-viewer/audio-viewer.style.d.ts → media-viewer/media-viewer-dialog.style.d.ts} +0 -0
- /package/components/{video-viewer/video-viewer.style.d.ts → svga-card/svga-card.style.d.ts} +0 -0
|
@@ -13,7 +13,8 @@ var stdin_default = defineComponent({
|
|
|
13
13
|
emits: videoCardEmits,
|
|
14
14
|
setup(props, {
|
|
15
15
|
emit,
|
|
16
|
-
attrs
|
|
16
|
+
attrs,
|
|
17
|
+
expose
|
|
17
18
|
}) {
|
|
18
19
|
const {
|
|
19
20
|
prefixCls
|
|
@@ -31,7 +32,7 @@ var stdin_default = defineComponent({
|
|
|
31
32
|
viewerVisible.value = false;
|
|
32
33
|
emit("close");
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
expose({
|
|
35
36
|
view() {
|
|
36
37
|
openViewer();
|
|
37
38
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export * from './video-viewer';
|
|
2
2
|
declare const _VideoViewer: {
|
|
3
3
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
src: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
4
7
|
teleported: {
|
|
5
8
|
type: BooleanConstructor;
|
|
6
9
|
};
|
|
7
|
-
zIndex: {
|
|
8
|
-
type: NumberConstructor;
|
|
9
|
-
};
|
|
10
10
|
closeOnPressEscape: {
|
|
11
11
|
type: BooleanConstructor;
|
|
12
12
|
default: boolean;
|
|
@@ -14,9 +14,6 @@ declare const _VideoViewer: {
|
|
|
14
14
|
hideOnClickModal: {
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
};
|
|
17
|
-
src: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
};
|
|
20
17
|
}>> & Readonly<{
|
|
21
18
|
onClose?: (() => any) | undefined;
|
|
22
19
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -33,12 +30,12 @@ declare const _VideoViewer: {
|
|
|
33
30
|
M: {};
|
|
34
31
|
Defaults: {};
|
|
35
32
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
src: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
36
|
teleported: {
|
|
37
37
|
type: BooleanConstructor;
|
|
38
38
|
};
|
|
39
|
-
zIndex: {
|
|
40
|
-
type: NumberConstructor;
|
|
41
|
-
};
|
|
42
39
|
closeOnPressEscape: {
|
|
43
40
|
type: BooleanConstructor;
|
|
44
41
|
default: boolean;
|
|
@@ -46,9 +43,6 @@ declare const _VideoViewer: {
|
|
|
46
43
|
hideOnClickModal: {
|
|
47
44
|
type: BooleanConstructor;
|
|
48
45
|
};
|
|
49
|
-
src: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
};
|
|
52
46
|
}>> & Readonly<{
|
|
53
47
|
onClose?: (() => any) | undefined;
|
|
54
48
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
@@ -60,12 +54,12 @@ declare const _VideoViewer: {
|
|
|
60
54
|
__isTeleport?: never;
|
|
61
55
|
__isSuspense?: never;
|
|
62
56
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
57
|
+
src: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
};
|
|
63
60
|
teleported: {
|
|
64
61
|
type: BooleanConstructor;
|
|
65
62
|
};
|
|
66
|
-
zIndex: {
|
|
67
|
-
type: NumberConstructor;
|
|
68
|
-
};
|
|
69
63
|
closeOnPressEscape: {
|
|
70
64
|
type: BooleanConstructor;
|
|
71
65
|
default: boolean;
|
|
@@ -73,9 +67,6 @@ declare const _VideoViewer: {
|
|
|
73
67
|
hideOnClickModal: {
|
|
74
68
|
type: BooleanConstructor;
|
|
75
69
|
};
|
|
76
|
-
src: {
|
|
77
|
-
type: StringConstructor;
|
|
78
|
-
};
|
|
79
70
|
}>> & Readonly<{
|
|
80
71
|
onClose?: (() => any) | undefined;
|
|
81
72
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type SlotsType, type ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare const videoViewerProps: {
|
|
3
|
+
src: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
3
6
|
teleported: {
|
|
4
7
|
type: BooleanConstructor;
|
|
5
8
|
};
|
|
6
|
-
zIndex: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
};
|
|
9
9
|
closeOnPressEscape: {
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
default: boolean;
|
|
@@ -13,9 +13,6 @@ export declare const videoViewerProps: {
|
|
|
13
13
|
hideOnClickModal: {
|
|
14
14
|
type: BooleanConstructor;
|
|
15
15
|
};
|
|
16
|
-
src: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
};
|
|
19
16
|
};
|
|
20
17
|
export type VideoViewerProps = ExtractPropTypes<typeof videoViewerProps>;
|
|
21
18
|
export interface VideoViewerSlots {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { mediaViewerBaseProps } from '../media-viewer/media-viewer.api.js';
|
|
1
|
+
import { mediaViewerBaseProps, mediaViewerBaseEmits } from '../media-viewer/media-viewer.api.js';
|
|
2
2
|
|
|
3
3
|
const videoViewerProps = {
|
|
4
4
|
...mediaViewerBaseProps
|
|
5
5
|
};
|
|
6
6
|
const videoViewerSlots = Object;
|
|
7
7
|
const videoViewerEmits = {
|
|
8
|
-
|
|
8
|
+
...mediaViewerBaseEmits
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { videoViewerEmits, videoViewerProps, videoViewerSlots };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
src: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
2
5
|
teleported: {
|
|
3
6
|
type: BooleanConstructor;
|
|
4
7
|
};
|
|
5
|
-
zIndex: {
|
|
6
|
-
type: NumberConstructor;
|
|
7
|
-
};
|
|
8
8
|
closeOnPressEscape: {
|
|
9
9
|
type: BooleanConstructor;
|
|
10
10
|
default: boolean;
|
|
@@ -12,18 +12,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
hideOnClickModal: {
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
};
|
|
15
|
-
src: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
};
|
|
18
15
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
16
|
close: () => boolean;
|
|
20
17
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
src: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
21
|
teleported: {
|
|
22
22
|
type: BooleanConstructor;
|
|
23
23
|
};
|
|
24
|
-
zIndex: {
|
|
25
|
-
type: NumberConstructor;
|
|
26
|
-
};
|
|
27
24
|
closeOnPressEscape: {
|
|
28
25
|
type: BooleanConstructor;
|
|
29
26
|
default: boolean;
|
|
@@ -31,9 +28,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
31
28
|
hideOnClickModal: {
|
|
32
29
|
type: BooleanConstructor;
|
|
33
30
|
};
|
|
34
|
-
src: {
|
|
35
|
-
type: StringConstructor;
|
|
36
|
-
};
|
|
37
31
|
}>> & Readonly<{
|
|
38
32
|
onClose?: (() => any) | undefined;
|
|
39
33
|
}>, {
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
2
|
-
import { useZIndex } from 'element-plus';
|
|
3
|
-
import ElTeleport from 'element-plus/es/components/teleport/index';
|
|
4
|
-
import ElFocusTrap from 'element-plus/es/components/focus-trap/index';
|
|
1
|
+
import { defineComponent, ref, onMounted, onBeforeUnmount, createVNode, mergeProps } from 'vue';
|
|
5
2
|
import { videoViewerEmits, videoViewerSlots, videoViewerProps } from './video-viewer.api.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import stdin_default$1 from './video-viewer.style.js';
|
|
9
|
-
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
3
|
+
import { MediaViewerDialog } from '../media-viewer/media-viewer-dialog.js';
|
|
4
|
+
import { omit } from 'lodash-es';
|
|
10
5
|
|
|
11
6
|
var stdin_default = defineComponent({
|
|
12
7
|
name: "CoVideoViewer",
|
|
@@ -16,31 +11,7 @@ var stdin_default = defineComponent({
|
|
|
16
11
|
setup(props, {
|
|
17
12
|
emit
|
|
18
13
|
}) {
|
|
19
|
-
const
|
|
20
|
-
prefixCls
|
|
21
|
-
} = useComponentConfig("video-viewer");
|
|
22
|
-
const {
|
|
23
|
-
hashId
|
|
24
|
-
} = stdin_default$1(prefixCls);
|
|
25
|
-
const {
|
|
26
|
-
nextZIndex
|
|
27
|
-
} = useZIndex();
|
|
28
|
-
const wrapper = ref();
|
|
29
|
-
const zIndex = ref(props.zIndex ?? nextZIndex());
|
|
30
|
-
function onFocusoutPrevented(event) {
|
|
31
|
-
if (event.detail?.focusReason === "pointer") {
|
|
32
|
-
event.preventDefault();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function onCloseRequested() {
|
|
36
|
-
if (props.closeOnPressEscape) {
|
|
37
|
-
hide();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function hide() {
|
|
41
|
-
emit("close");
|
|
42
|
-
}
|
|
43
|
-
const videoRef = useTemplateRef("video");
|
|
14
|
+
const videoRef = ref();
|
|
44
15
|
onMounted(() => {
|
|
45
16
|
videoRef.value?.play();
|
|
46
17
|
});
|
|
@@ -48,41 +19,15 @@ var stdin_default = defineComponent({
|
|
|
48
19
|
videoRef.value?.pause();
|
|
49
20
|
});
|
|
50
21
|
return () => {
|
|
51
|
-
return createVNode(
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"ref": "wrapper",
|
|
61
|
-
"tabindex": -1,
|
|
62
|
-
"class": [hashId.value, prefixCls.value],
|
|
63
|
-
"style": {
|
|
64
|
-
zIndex: zIndex.value
|
|
65
|
-
}
|
|
66
|
-
}, [createVNode(ElFocusTrap, {
|
|
67
|
-
"loop": true,
|
|
68
|
-
"trapped": true,
|
|
69
|
-
"focus-trap-el": wrapper,
|
|
70
|
-
"focus-start-el": "container",
|
|
71
|
-
"onFocusout-prevented": onFocusoutPrevented,
|
|
72
|
-
"onRelease-requested": onCloseRequested
|
|
73
|
-
}, {
|
|
74
|
-
default: () => [createVNode(_Mask, {
|
|
75
|
-
"onClick": () => props.hideOnClickModal && hide()
|
|
76
|
-
}, null), createVNode(_Close, {
|
|
77
|
-
"onClick": () => hide()
|
|
78
|
-
}, null), createVNode("video", {
|
|
79
|
-
"ref": "video",
|
|
80
|
-
"controls": true,
|
|
81
|
-
"src": props.src,
|
|
82
|
-
"class": `${prefixCls.value}-video`
|
|
83
|
-
}, null)]
|
|
84
|
-
})])]
|
|
85
|
-
})]
|
|
22
|
+
return createVNode(MediaViewerDialog, mergeProps(omit(props, "src"), {
|
|
23
|
+
"onClose": () => emit("close")
|
|
24
|
+
}), {
|
|
25
|
+
default: () => [createVNode("video", {
|
|
26
|
+
"ref": videoRef,
|
|
27
|
+
"controls": true,
|
|
28
|
+
"src": props.src,
|
|
29
|
+
"style": "width: 100%; height: 100%; background-color: black"
|
|
30
|
+
}, null)]
|
|
86
31
|
});
|
|
87
32
|
};
|
|
88
33
|
}
|
|
@@ -5,10 +5,10 @@ import { useLayoutStore } from '../../store/layout.js';
|
|
|
5
5
|
import stdin_default$2 from './reload.vue.js';
|
|
6
6
|
import stdin_default$1 from './style/index.js';
|
|
7
7
|
import { useI18n } from 'vue-i18n';
|
|
8
|
-
import { useToken } from '../../components/theme/util/useToken.js';
|
|
9
8
|
import { ContextMenu as _ContextMenu, ContextMenuItem as _ContextMenuItem } from '../../components/context-menu/index.js';
|
|
10
9
|
import { useLocale } from '../../hooks/useLocale.js';
|
|
11
10
|
import { useComponentConfig } from '../../components/config-provider/config-provider.api.js';
|
|
11
|
+
import { useToken } from '../../components/theme/util/useToken.js';
|
|
12
12
|
import { Icon as _Icon } from '../../components/icon/index.js';
|
|
13
13
|
|
|
14
14
|
var stdin_default = /* @__PURE__ */defineComponent({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cosey",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "基于 Vue3 + vite 的后台管理系统框架",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"pinia": "^3.0.2",
|
|
37
37
|
"quill": "^2.0.3",
|
|
38
38
|
"stylis": "^4.3.6",
|
|
39
|
+
"svga": "^2.1.1",
|
|
39
40
|
"vue": "^3.5.21",
|
|
40
41
|
"vue-i18n": "^11.1.10",
|
|
41
42
|
"vue-router": "^4.5.0"
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"pinia": "^3.0.2",
|
|
68
69
|
"quill": "^2.0.3",
|
|
69
70
|
"stylis": "^4.3.6",
|
|
71
|
+
"svga": "^2.1.1",
|
|
70
72
|
"vue": "^3.5.21",
|
|
71
73
|
"vue-i18n": "^11.1.10",
|
|
72
74
|
"vue-router": "^4.5.0"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getSimpleStyleHook } from '../theme/getSimpleStyleHook.js';
|
|
2
|
-
|
|
3
|
-
var stdin_default = getSimpleStyleHook("CoAudioViewer", (token) => {
|
|
4
|
-
const { componentCls } = token;
|
|
5
|
-
return {
|
|
6
|
-
[componentCls]: {
|
|
7
|
-
position: "fixed",
|
|
8
|
-
inset: 0,
|
|
9
|
-
display: "flex",
|
|
10
|
-
justifyContent: "center",
|
|
11
|
-
alignItems: "center",
|
|
12
|
-
"&:focus": {
|
|
13
|
-
outline: "none"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export { stdin_default as default };
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { type ImageCardSlots } from './image-card';
|
|
2
|
-
type __VLS_Slots = ImageCardSlots;
|
|
3
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
-
src: {
|
|
5
|
-
type: StringConstructor;
|
|
6
|
-
};
|
|
7
|
-
size: {
|
|
8
|
-
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
name: {
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
};
|
|
14
|
-
type: {
|
|
15
|
-
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
16
|
-
};
|
|
17
|
-
title: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
};
|
|
20
|
-
srcList: {
|
|
21
|
-
type: import("vue").PropType<string[]>;
|
|
22
|
-
};
|
|
23
|
-
fit: {
|
|
24
|
-
default: string;
|
|
25
|
-
type: import("vue").PropType<"" | "fill" | "contain" | "none" | "cover" | "scale-down">;
|
|
26
|
-
required: false;
|
|
27
|
-
validator: ((val: unknown) => boolean) | undefined;
|
|
28
|
-
__epPropKey: true;
|
|
29
|
-
};
|
|
30
|
-
hideOnClickModal: BooleanConstructor;
|
|
31
|
-
loading: {
|
|
32
|
-
readonly type: import("vue").PropType<"lazy" | "eager">;
|
|
33
|
-
readonly required: false;
|
|
34
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
|
-
__epPropKey: true;
|
|
36
|
-
};
|
|
37
|
-
lazy: BooleanConstructor;
|
|
38
|
-
scrollContainer: {
|
|
39
|
-
readonly type: import("vue").PropType<string | HTMLElement | undefined>;
|
|
40
|
-
readonly required: false;
|
|
41
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
42
|
-
__epPropKey: true;
|
|
43
|
-
};
|
|
44
|
-
previewSrcList: {
|
|
45
|
-
readonly type: import("vue").PropType<string[]>;
|
|
46
|
-
readonly required: false;
|
|
47
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
48
|
-
__epPropKey: true;
|
|
49
|
-
} & {
|
|
50
|
-
readonly default: () => [];
|
|
51
|
-
};
|
|
52
|
-
previewTeleported: BooleanConstructor;
|
|
53
|
-
zIndex: {
|
|
54
|
-
readonly type: import("vue").PropType<number>;
|
|
55
|
-
readonly required: false;
|
|
56
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
57
|
-
__epPropKey: true;
|
|
58
|
-
};
|
|
59
|
-
initialIndex: {
|
|
60
|
-
readonly type: import("vue").PropType<number>;
|
|
61
|
-
readonly required: false;
|
|
62
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
63
|
-
__epPropKey: true;
|
|
64
|
-
} & {
|
|
65
|
-
readonly default: 0;
|
|
66
|
-
};
|
|
67
|
-
infinite: {
|
|
68
|
-
readonly type: import("vue").PropType<boolean>;
|
|
69
|
-
readonly required: false;
|
|
70
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
71
|
-
__epPropKey: true;
|
|
72
|
-
} & {
|
|
73
|
-
readonly default: true;
|
|
74
|
-
};
|
|
75
|
-
closeOnPressEscape: {
|
|
76
|
-
readonly type: import("vue").PropType<boolean>;
|
|
77
|
-
readonly required: false;
|
|
78
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
79
|
-
__epPropKey: true;
|
|
80
|
-
} & {
|
|
81
|
-
readonly default: true;
|
|
82
|
-
};
|
|
83
|
-
zoomRate: {
|
|
84
|
-
readonly type: import("vue").PropType<number>;
|
|
85
|
-
readonly required: false;
|
|
86
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
87
|
-
__epPropKey: true;
|
|
88
|
-
} & {
|
|
89
|
-
readonly default: 1.2;
|
|
90
|
-
};
|
|
91
|
-
minScale: {
|
|
92
|
-
readonly type: import("vue").PropType<number>;
|
|
93
|
-
readonly required: false;
|
|
94
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
95
|
-
__epPropKey: true;
|
|
96
|
-
} & {
|
|
97
|
-
readonly default: 0.2;
|
|
98
|
-
};
|
|
99
|
-
maxScale: {
|
|
100
|
-
readonly type: import("vue").PropType<number>;
|
|
101
|
-
readonly required: false;
|
|
102
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
103
|
-
__epPropKey: true;
|
|
104
|
-
} & {
|
|
105
|
-
readonly default: 7;
|
|
106
|
-
};
|
|
107
|
-
showProgress: BooleanConstructor;
|
|
108
|
-
crossorigin: {
|
|
109
|
-
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
110
|
-
readonly required: false;
|
|
111
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
112
|
-
__epPropKey: true;
|
|
113
|
-
};
|
|
114
|
-
}>, {
|
|
115
|
-
view: () => void;
|
|
116
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
117
|
-
show: () => any;
|
|
118
|
-
switch: () => any;
|
|
119
|
-
close: () => any;
|
|
120
|
-
error: () => any;
|
|
121
|
-
load: () => any;
|
|
122
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
-
src: {
|
|
124
|
-
type: StringConstructor;
|
|
125
|
-
};
|
|
126
|
-
size: {
|
|
127
|
-
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
128
|
-
default: string;
|
|
129
|
-
};
|
|
130
|
-
name: {
|
|
131
|
-
type: StringConstructor;
|
|
132
|
-
};
|
|
133
|
-
type: {
|
|
134
|
-
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
135
|
-
};
|
|
136
|
-
title: {
|
|
137
|
-
type: StringConstructor;
|
|
138
|
-
};
|
|
139
|
-
srcList: {
|
|
140
|
-
type: import("vue").PropType<string[]>;
|
|
141
|
-
};
|
|
142
|
-
fit: {
|
|
143
|
-
default: string;
|
|
144
|
-
type: import("vue").PropType<"" | "fill" | "contain" | "none" | "cover" | "scale-down">;
|
|
145
|
-
required: false;
|
|
146
|
-
validator: ((val: unknown) => boolean) | undefined;
|
|
147
|
-
__epPropKey: true;
|
|
148
|
-
};
|
|
149
|
-
hideOnClickModal: BooleanConstructor;
|
|
150
|
-
loading: {
|
|
151
|
-
readonly type: import("vue").PropType<"lazy" | "eager">;
|
|
152
|
-
readonly required: false;
|
|
153
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
154
|
-
__epPropKey: true;
|
|
155
|
-
};
|
|
156
|
-
lazy: BooleanConstructor;
|
|
157
|
-
scrollContainer: {
|
|
158
|
-
readonly type: import("vue").PropType<string | HTMLElement | undefined>;
|
|
159
|
-
readonly required: false;
|
|
160
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
161
|
-
__epPropKey: true;
|
|
162
|
-
};
|
|
163
|
-
previewSrcList: {
|
|
164
|
-
readonly type: import("vue").PropType<string[]>;
|
|
165
|
-
readonly required: false;
|
|
166
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
167
|
-
__epPropKey: true;
|
|
168
|
-
} & {
|
|
169
|
-
readonly default: () => [];
|
|
170
|
-
};
|
|
171
|
-
previewTeleported: BooleanConstructor;
|
|
172
|
-
zIndex: {
|
|
173
|
-
readonly type: import("vue").PropType<number>;
|
|
174
|
-
readonly required: false;
|
|
175
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
176
|
-
__epPropKey: true;
|
|
177
|
-
};
|
|
178
|
-
initialIndex: {
|
|
179
|
-
readonly type: import("vue").PropType<number>;
|
|
180
|
-
readonly required: false;
|
|
181
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
182
|
-
__epPropKey: true;
|
|
183
|
-
} & {
|
|
184
|
-
readonly default: 0;
|
|
185
|
-
};
|
|
186
|
-
infinite: {
|
|
187
|
-
readonly type: import("vue").PropType<boolean>;
|
|
188
|
-
readonly required: false;
|
|
189
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
190
|
-
__epPropKey: true;
|
|
191
|
-
} & {
|
|
192
|
-
readonly default: true;
|
|
193
|
-
};
|
|
194
|
-
closeOnPressEscape: {
|
|
195
|
-
readonly type: import("vue").PropType<boolean>;
|
|
196
|
-
readonly required: false;
|
|
197
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
198
|
-
__epPropKey: true;
|
|
199
|
-
} & {
|
|
200
|
-
readonly default: true;
|
|
201
|
-
};
|
|
202
|
-
zoomRate: {
|
|
203
|
-
readonly type: import("vue").PropType<number>;
|
|
204
|
-
readonly required: false;
|
|
205
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
206
|
-
__epPropKey: true;
|
|
207
|
-
} & {
|
|
208
|
-
readonly default: 1.2;
|
|
209
|
-
};
|
|
210
|
-
minScale: {
|
|
211
|
-
readonly type: import("vue").PropType<number>;
|
|
212
|
-
readonly required: false;
|
|
213
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
214
|
-
__epPropKey: true;
|
|
215
|
-
} & {
|
|
216
|
-
readonly default: 0.2;
|
|
217
|
-
};
|
|
218
|
-
maxScale: {
|
|
219
|
-
readonly type: import("vue").PropType<number>;
|
|
220
|
-
readonly required: false;
|
|
221
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
222
|
-
__epPropKey: true;
|
|
223
|
-
} & {
|
|
224
|
-
readonly default: 7;
|
|
225
|
-
};
|
|
226
|
-
showProgress: BooleanConstructor;
|
|
227
|
-
crossorigin: {
|
|
228
|
-
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
229
|
-
readonly required: false;
|
|
230
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
231
|
-
__epPropKey: true;
|
|
232
|
-
};
|
|
233
|
-
}>> & Readonly<{
|
|
234
|
-
onShow?: (() => any) | undefined;
|
|
235
|
-
onSwitch?: (() => any) | undefined;
|
|
236
|
-
onClose?: (() => any) | undefined;
|
|
237
|
-
onError?: (() => any) | undefined;
|
|
238
|
-
onLoad?: (() => any) | undefined;
|
|
239
|
-
}>, {
|
|
240
|
-
infinite: boolean;
|
|
241
|
-
size: "large" | "small" | "middle" | "mini";
|
|
242
|
-
lazy: boolean;
|
|
243
|
-
closeOnPressEscape: boolean;
|
|
244
|
-
hideOnClickModal: boolean;
|
|
245
|
-
fit: "" | "fill" | "contain" | "none" | "cover" | "scale-down";
|
|
246
|
-
previewSrcList: string[];
|
|
247
|
-
previewTeleported: boolean;
|
|
248
|
-
initialIndex: number;
|
|
249
|
-
zoomRate: number;
|
|
250
|
-
minScale: number;
|
|
251
|
-
maxScale: number;
|
|
252
|
-
showProgress: boolean;
|
|
253
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
254
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
255
|
-
export default _default;
|
|
256
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
257
|
-
new (): {
|
|
258
|
-
$slots: S;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useSlots, ref, computed, mergeProps, createBlock, openBlock, resolveDynamicComponent, unref, createVNode } from 'vue';
|
|
2
|
-
import { imageProps } from './image-card.js';
|
|
3
|
-
import { useLockscreen, ElImage } from 'element-plus';
|
|
4
|
-
import stdin_default$1 from './image-card.style.js';
|
|
5
|
-
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
6
|
-
import { defineTemplate } from '../../utils/vue.js';
|
|
7
|
-
|
|
8
|
-
var stdin_default = /* @__PURE__ */defineComponent({
|
|
9
|
-
...{
|
|
10
|
-
name: "CoImageCard"
|
|
11
|
-
},
|
|
12
|
-
__name: "image-card",
|
|
13
|
-
props: imageProps,
|
|
14
|
-
emits: ["load", "error", "switch", "close", "show"],
|
|
15
|
-
setup(__props, {
|
|
16
|
-
expose: __expose
|
|
17
|
-
}) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const slots = useSlots();
|
|
20
|
-
const {
|
|
21
|
-
prefixCls
|
|
22
|
-
} = useComponentConfig("image-card", props);
|
|
23
|
-
const {
|
|
24
|
-
hashId
|
|
25
|
-
} = stdin_default$1(prefixCls);
|
|
26
|
-
const imageRef = ref();
|
|
27
|
-
const mergedPreviewSrcList = computed(() => {
|
|
28
|
-
return props.srcList?.length ? props.srcList : props.previewSrcList?.length ? props.previewSrcList : props.src ? [props.src] : [];
|
|
29
|
-
});
|
|
30
|
-
__expose({
|
|
31
|
-
view() {
|
|
32
|
-
imageRef.value?.$el.querySelector("img").click();
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const viewerVisible = ref(false);
|
|
36
|
-
const onShow = () => {
|
|
37
|
-
viewerVisible.value = true;
|
|
38
|
-
};
|
|
39
|
-
const onClose = () => {
|
|
40
|
-
viewerVisible.value = false;
|
|
41
|
-
};
|
|
42
|
-
useLockscreen(viewerVisible);
|
|
43
|
-
const mergedProps = computed(() => {
|
|
44
|
-
return mergeProps(props, {
|
|
45
|
-
title: props.title || props.src,
|
|
46
|
-
class: [hashId.value, prefixCls.value, `is-${props.size}`],
|
|
47
|
-
previewSrcList: mergedPreviewSrcList.value,
|
|
48
|
-
previewTeleported: true,
|
|
49
|
-
onShow,
|
|
50
|
-
onClose,
|
|
51
|
-
ref: imageRef,
|
|
52
|
-
initialIndex: Math.max(mergedPreviewSrcList.value.indexOf(props.src), 0)
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
const template = defineTemplate(() => {
|
|
56
|
-
return createVNode(ElImage, mergedProps.value, slots);
|
|
57
|
-
});
|
|
58
|
-
return (_ctx, _cache) => {
|
|
59
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(template)));
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export { stdin_default as default };
|
|
File without changes
|
|
File without changes
|