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
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type SlotsType, type ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const imageCardProps: {
|
|
3
|
+
src: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
size: {
|
|
7
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
type: {
|
|
14
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
15
|
+
};
|
|
16
|
+
title: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
srcList: {
|
|
20
|
+
type: import("vue").PropType<string[]>;
|
|
21
|
+
};
|
|
22
|
+
fit: {
|
|
23
|
+
default: string;
|
|
24
|
+
type: import("vue").PropType<"" | "fill" | "contain" | "none" | "cover" | "scale-down">;
|
|
25
|
+
required: false;
|
|
26
|
+
validator: ((val: unknown) => boolean) | undefined;
|
|
27
|
+
__epPropKey: true;
|
|
28
|
+
};
|
|
29
|
+
hideOnClickModal: BooleanConstructor;
|
|
30
|
+
loading: {
|
|
31
|
+
readonly type: import("vue").PropType<"lazy" | "eager">;
|
|
32
|
+
readonly required: false;
|
|
33
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
34
|
+
__epPropKey: true;
|
|
35
|
+
};
|
|
36
|
+
lazy: BooleanConstructor;
|
|
37
|
+
scrollContainer: {
|
|
38
|
+
readonly type: import("vue").PropType<string | HTMLElement | undefined>;
|
|
39
|
+
readonly required: false;
|
|
40
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
|
+
__epPropKey: true;
|
|
42
|
+
};
|
|
43
|
+
previewSrcList: {
|
|
44
|
+
readonly type: import("vue").PropType<string[]>;
|
|
45
|
+
readonly required: false;
|
|
46
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
|
+
__epPropKey: true;
|
|
48
|
+
} & {
|
|
49
|
+
readonly default: () => [];
|
|
50
|
+
};
|
|
51
|
+
previewTeleported: BooleanConstructor;
|
|
52
|
+
zIndex: {
|
|
53
|
+
readonly type: import("vue").PropType<number>;
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
56
|
+
__epPropKey: true;
|
|
57
|
+
};
|
|
58
|
+
initialIndex: {
|
|
59
|
+
readonly type: import("vue").PropType<number>;
|
|
60
|
+
readonly required: false;
|
|
61
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
62
|
+
__epPropKey: true;
|
|
63
|
+
} & {
|
|
64
|
+
readonly default: 0;
|
|
65
|
+
};
|
|
66
|
+
infinite: {
|
|
67
|
+
readonly type: import("vue").PropType<boolean>;
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
|
+
__epPropKey: true;
|
|
71
|
+
} & {
|
|
72
|
+
readonly default: true;
|
|
73
|
+
};
|
|
74
|
+
closeOnPressEscape: {
|
|
75
|
+
readonly type: import("vue").PropType<boolean>;
|
|
76
|
+
readonly required: false;
|
|
77
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
78
|
+
__epPropKey: true;
|
|
79
|
+
} & {
|
|
80
|
+
readonly default: true;
|
|
81
|
+
};
|
|
82
|
+
zoomRate: {
|
|
83
|
+
readonly type: import("vue").PropType<number>;
|
|
84
|
+
readonly required: false;
|
|
85
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
86
|
+
__epPropKey: true;
|
|
87
|
+
} & {
|
|
88
|
+
readonly default: 1.2;
|
|
89
|
+
};
|
|
90
|
+
minScale: {
|
|
91
|
+
readonly type: import("vue").PropType<number>;
|
|
92
|
+
readonly required: false;
|
|
93
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
94
|
+
__epPropKey: true;
|
|
95
|
+
} & {
|
|
96
|
+
readonly default: 0.2;
|
|
97
|
+
};
|
|
98
|
+
maxScale: {
|
|
99
|
+
readonly type: import("vue").PropType<number>;
|
|
100
|
+
readonly required: false;
|
|
101
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
102
|
+
__epPropKey: true;
|
|
103
|
+
} & {
|
|
104
|
+
readonly default: 7;
|
|
105
|
+
};
|
|
106
|
+
showProgress: BooleanConstructor;
|
|
107
|
+
crossorigin: {
|
|
108
|
+
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
109
|
+
readonly required: false;
|
|
110
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
111
|
+
__epPropKey: true;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export type ImageCardProps = ExtractPropTypes<typeof imageCardProps>;
|
|
115
|
+
export declare const imageCardEmits: {
|
|
116
|
+
load: (evt: Event) => boolean;
|
|
117
|
+
error: (evt: Event) => boolean;
|
|
118
|
+
switch: (val: number) => boolean;
|
|
119
|
+
close: () => boolean;
|
|
120
|
+
show: () => boolean;
|
|
121
|
+
};
|
|
122
|
+
export type ImageCardEmits = typeof imageCardEmits;
|
|
123
|
+
export interface ImageCardSlots {
|
|
124
|
+
placeholder: {};
|
|
125
|
+
error: {};
|
|
126
|
+
viewer: {};
|
|
127
|
+
}
|
|
128
|
+
export declare const imageCardSlots: SlotsType<ImageCardSlots>;
|
|
129
|
+
export interface ImageCardExpose {
|
|
130
|
+
view: () => void;
|
|
131
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { imageEmits, imageProps } from 'element-plus';
|
|
2
|
+
import { mediaCardBaseProps } from '../media-card/media-card.api.js';
|
|
3
|
+
|
|
4
|
+
const imageCardProps = {
|
|
5
|
+
...imageProps,
|
|
6
|
+
fit: {
|
|
7
|
+
...imageProps.fit,
|
|
8
|
+
default: "cover"
|
|
9
|
+
},
|
|
10
|
+
...mediaCardBaseProps
|
|
11
|
+
};
|
|
12
|
+
const imageCardEmits = {
|
|
13
|
+
...imageEmits
|
|
14
|
+
};
|
|
15
|
+
const imageCardSlots = Object;
|
|
16
|
+
|
|
17
|
+
export { imageCardEmits, imageCardProps, imageCardSlots };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { type MediaCardBaseProps } from '../media-card/media-card.api';
|
|
3
|
-
export interface ImageCardProps extends Omit<MediaCardBaseProps, 'src'>, ImageProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const imageProps: {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
2
|
src: {
|
|
7
3
|
type: StringConstructor;
|
|
8
4
|
};
|
|
@@ -113,14 +109,142 @@ export declare const imageProps: {
|
|
|
113
109
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
114
110
|
__epPropKey: true;
|
|
115
111
|
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
112
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
113
|
+
load: (evt: Event) => boolean;
|
|
114
|
+
error: (evt: Event) => boolean;
|
|
115
|
+
switch: (val: number) => boolean;
|
|
116
|
+
close: () => boolean;
|
|
117
|
+
show: () => boolean;
|
|
118
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
119
|
+
src: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
};
|
|
122
|
+
size: {
|
|
123
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
124
|
+
default: string;
|
|
125
|
+
};
|
|
126
|
+
name: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
};
|
|
129
|
+
type: {
|
|
130
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
131
|
+
};
|
|
132
|
+
title: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
};
|
|
135
|
+
srcList: {
|
|
136
|
+
type: import("vue").PropType<string[]>;
|
|
137
|
+
};
|
|
138
|
+
fit: {
|
|
139
|
+
default: string;
|
|
140
|
+
type: import("vue").PropType<"" | "fill" | "contain" | "none" | "cover" | "scale-down">;
|
|
141
|
+
required: false;
|
|
142
|
+
validator: ((val: unknown) => boolean) | undefined;
|
|
143
|
+
__epPropKey: true;
|
|
144
|
+
};
|
|
145
|
+
hideOnClickModal: BooleanConstructor;
|
|
146
|
+
loading: {
|
|
147
|
+
readonly type: import("vue").PropType<"lazy" | "eager">;
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
150
|
+
__epPropKey: true;
|
|
151
|
+
};
|
|
152
|
+
lazy: BooleanConstructor;
|
|
153
|
+
scrollContainer: {
|
|
154
|
+
readonly type: import("vue").PropType<string | HTMLElement | undefined>;
|
|
155
|
+
readonly required: false;
|
|
156
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
157
|
+
__epPropKey: true;
|
|
158
|
+
};
|
|
159
|
+
previewSrcList: {
|
|
160
|
+
readonly type: import("vue").PropType<string[]>;
|
|
161
|
+
readonly required: false;
|
|
162
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
163
|
+
__epPropKey: true;
|
|
164
|
+
} & {
|
|
165
|
+
readonly default: () => [];
|
|
166
|
+
};
|
|
167
|
+
previewTeleported: BooleanConstructor;
|
|
168
|
+
zIndex: {
|
|
169
|
+
readonly type: import("vue").PropType<number>;
|
|
170
|
+
readonly required: false;
|
|
171
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
172
|
+
__epPropKey: true;
|
|
173
|
+
};
|
|
174
|
+
initialIndex: {
|
|
175
|
+
readonly type: import("vue").PropType<number>;
|
|
176
|
+
readonly required: false;
|
|
177
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
178
|
+
__epPropKey: true;
|
|
179
|
+
} & {
|
|
180
|
+
readonly default: 0;
|
|
181
|
+
};
|
|
182
|
+
infinite: {
|
|
183
|
+
readonly type: import("vue").PropType<boolean>;
|
|
184
|
+
readonly required: false;
|
|
185
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
186
|
+
__epPropKey: true;
|
|
187
|
+
} & {
|
|
188
|
+
readonly default: true;
|
|
189
|
+
};
|
|
190
|
+
closeOnPressEscape: {
|
|
191
|
+
readonly type: import("vue").PropType<boolean>;
|
|
192
|
+
readonly required: false;
|
|
193
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
194
|
+
__epPropKey: true;
|
|
195
|
+
} & {
|
|
196
|
+
readonly default: true;
|
|
197
|
+
};
|
|
198
|
+
zoomRate: {
|
|
199
|
+
readonly type: import("vue").PropType<number>;
|
|
200
|
+
readonly required: false;
|
|
201
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
202
|
+
__epPropKey: true;
|
|
203
|
+
} & {
|
|
204
|
+
readonly default: 1.2;
|
|
205
|
+
};
|
|
206
|
+
minScale: {
|
|
207
|
+
readonly type: import("vue").PropType<number>;
|
|
208
|
+
readonly required: false;
|
|
209
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
210
|
+
__epPropKey: true;
|
|
211
|
+
} & {
|
|
212
|
+
readonly default: 0.2;
|
|
213
|
+
};
|
|
214
|
+
maxScale: {
|
|
215
|
+
readonly type: import("vue").PropType<number>;
|
|
216
|
+
readonly required: false;
|
|
217
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
218
|
+
__epPropKey: true;
|
|
219
|
+
} & {
|
|
220
|
+
readonly default: 7;
|
|
221
|
+
};
|
|
222
|
+
showProgress: BooleanConstructor;
|
|
223
|
+
crossorigin: {
|
|
224
|
+
readonly type: import("vue").PropType<"" | "anonymous" | "use-credentials">;
|
|
225
|
+
readonly required: false;
|
|
226
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
227
|
+
__epPropKey: true;
|
|
228
|
+
};
|
|
229
|
+
}>> & Readonly<{
|
|
230
|
+
onShow?: (() => any) | undefined;
|
|
231
|
+
onSwitch?: ((val: number) => any) | undefined;
|
|
232
|
+
onClose?: (() => any) | undefined;
|
|
233
|
+
onError?: ((evt: Event) => any) | undefined;
|
|
234
|
+
onLoad?: ((evt: Event) => any) | undefined;
|
|
235
|
+
}>, {
|
|
236
|
+
infinite: boolean;
|
|
237
|
+
size: "large" | "small" | "middle" | "mini";
|
|
238
|
+
lazy: boolean;
|
|
239
|
+
closeOnPressEscape: boolean;
|
|
240
|
+
hideOnClickModal: boolean;
|
|
241
|
+
fit: "" | "fill" | "contain" | "none" | "cover" | "scale-down";
|
|
242
|
+
previewSrcList: string[];
|
|
243
|
+
previewTeleported: boolean;
|
|
244
|
+
initialIndex: number;
|
|
245
|
+
zoomRate: number;
|
|
246
|
+
minScale: number;
|
|
247
|
+
maxScale: number;
|
|
248
|
+
showProgress: boolean;
|
|
249
|
+
}, import("vue").SlotsType<import("./image-card.api").ImageCardSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
250
|
+
export default _default;
|
|
@@ -1,13 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, mergeProps, createVNode } from 'vue';
|
|
2
|
+
import { useLockscreen, ElImage } from 'element-plus';
|
|
3
|
+
import { imageCardSlots, imageCardEmits, imageCardProps } from './image-card.api.js';
|
|
4
|
+
import stdin_default$1 from './image-card.style.js';
|
|
5
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
var stdin_default = defineComponent({
|
|
8
|
+
name: "CoImageCard",
|
|
9
|
+
props: imageCardProps,
|
|
10
|
+
emits: imageCardEmits,
|
|
11
|
+
slots: imageCardSlots,
|
|
12
|
+
setup(props, {
|
|
13
|
+
slots,
|
|
14
|
+
expose
|
|
15
|
+
}) {
|
|
16
|
+
const {
|
|
17
|
+
prefixCls
|
|
18
|
+
} = useComponentConfig("image-card", props);
|
|
19
|
+
const {
|
|
20
|
+
hashId
|
|
21
|
+
} = stdin_default$1(prefixCls);
|
|
22
|
+
const imageRef = ref();
|
|
23
|
+
const mergedPreviewSrcList = computed(() => {
|
|
24
|
+
return props.srcList?.length ? props.srcList : props.previewSrcList?.length ? props.previewSrcList : props.src ? [props.src] : [];
|
|
25
|
+
});
|
|
26
|
+
expose({
|
|
27
|
+
view() {
|
|
28
|
+
imageRef.value?.$el.querySelector("img").click();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const viewerVisible = ref(false);
|
|
32
|
+
const onShow = () => {
|
|
33
|
+
viewerVisible.value = true;
|
|
34
|
+
};
|
|
35
|
+
const onClose = () => {
|
|
36
|
+
viewerVisible.value = false;
|
|
37
|
+
};
|
|
38
|
+
useLockscreen(viewerVisible);
|
|
39
|
+
const mergedProps = computed(() => {
|
|
40
|
+
return mergeProps(props, {
|
|
41
|
+
title: props.title || props.src,
|
|
42
|
+
class: [hashId.value, prefixCls.value, `is-${props.size}`],
|
|
43
|
+
previewSrcList: mergedPreviewSrcList.value,
|
|
44
|
+
previewTeleported: true,
|
|
45
|
+
onShow,
|
|
46
|
+
onClose,
|
|
47
|
+
ref: imageRef,
|
|
48
|
+
initialIndex: Math.max(mergedPreviewSrcList.value.indexOf(props.src), 0)
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
return () => {
|
|
52
|
+
return createVNode(ElImage, mergedProps.value, slots);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
12
56
|
|
|
13
|
-
export {
|
|
57
|
+
export { stdin_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './image-card';
|
|
1
|
+
export * from './image-card.api';
|
|
2
2
|
declare const _ImageCard: {
|
|
3
3
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
4
|
src: {
|
|
@@ -113,18 +113,16 @@ declare const _ImageCard: {
|
|
|
113
113
|
};
|
|
114
114
|
}>> & Readonly<{
|
|
115
115
|
onShow?: (() => any) | undefined;
|
|
116
|
-
onSwitch?: (() => any) | undefined;
|
|
116
|
+
onSwitch?: ((val: number) => any) | undefined;
|
|
117
117
|
onClose?: (() => any) | undefined;
|
|
118
|
-
onError?: (() => any) | undefined;
|
|
119
|
-
onLoad?: (() => any) | undefined;
|
|
120
|
-
}>, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
error: () => any;
|
|
127
|
-
load: () => any;
|
|
118
|
+
onError?: ((evt: Event) => any) | undefined;
|
|
119
|
+
onLoad?: ((evt: Event) => any) | undefined;
|
|
120
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
121
|
+
load: (evt: Event) => boolean;
|
|
122
|
+
error: (evt: Event) => boolean;
|
|
123
|
+
switch: (val: number) => boolean;
|
|
124
|
+
close: () => boolean;
|
|
125
|
+
show: () => boolean;
|
|
128
126
|
}, import("vue").PublicProps, {
|
|
129
127
|
infinite: boolean;
|
|
130
128
|
size: "large" | "small" | "middle" | "mini";
|
|
@@ -139,7 +137,7 @@ declare const _ImageCard: {
|
|
|
139
137
|
minScale: number;
|
|
140
138
|
maxScale: number;
|
|
141
139
|
showProgress: boolean;
|
|
142
|
-
}, true, {},
|
|
140
|
+
}, true, {}, import("vue").SlotsType<import("./image-card.api").ImageCardSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
143
141
|
P: {};
|
|
144
142
|
B: {};
|
|
145
143
|
D: {};
|
|
@@ -259,13 +257,11 @@ declare const _ImageCard: {
|
|
|
259
257
|
};
|
|
260
258
|
}>> & Readonly<{
|
|
261
259
|
onShow?: (() => any) | undefined;
|
|
262
|
-
onSwitch?: (() => any) | undefined;
|
|
260
|
+
onSwitch?: ((val: number) => any) | undefined;
|
|
263
261
|
onClose?: (() => any) | undefined;
|
|
264
|
-
onError?: (() => any) | undefined;
|
|
265
|
-
onLoad?: (() => any) | undefined;
|
|
266
|
-
}>, {
|
|
267
|
-
view: () => void;
|
|
268
|
-
}, {}, {}, {}, {
|
|
262
|
+
onError?: ((evt: Event) => any) | undefined;
|
|
263
|
+
onLoad?: ((evt: Event) => any) | undefined;
|
|
264
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
269
265
|
infinite: boolean;
|
|
270
266
|
size: "large" | "small" | "middle" | "mini";
|
|
271
267
|
lazy: boolean;
|
|
@@ -396,18 +392,16 @@ declare const _ImageCard: {
|
|
|
396
392
|
};
|
|
397
393
|
}>> & Readonly<{
|
|
398
394
|
onShow?: (() => any) | undefined;
|
|
399
|
-
onSwitch?: (() => any) | undefined;
|
|
395
|
+
onSwitch?: ((val: number) => any) | undefined;
|
|
400
396
|
onClose?: (() => any) | undefined;
|
|
401
|
-
onError?: (() => any) | undefined;
|
|
402
|
-
onLoad?: (() => any) | undefined;
|
|
403
|
-
}>, {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
error: () => any;
|
|
410
|
-
load: () => any;
|
|
397
|
+
onError?: ((evt: Event) => any) | undefined;
|
|
398
|
+
onLoad?: ((evt: Event) => any) | undefined;
|
|
399
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
400
|
+
load: (evt: Event) => boolean;
|
|
401
|
+
error: (evt: Event) => boolean;
|
|
402
|
+
switch: (val: number) => boolean;
|
|
403
|
+
close: () => boolean;
|
|
404
|
+
show: () => boolean;
|
|
411
405
|
}, string, {
|
|
412
406
|
infinite: boolean;
|
|
413
407
|
size: "large" | "small" | "middle" | "mini";
|
|
@@ -422,8 +416,6 @@ declare const _ImageCard: {
|
|
|
422
416
|
minScale: number;
|
|
423
417
|
maxScale: number;
|
|
424
418
|
showProgress: boolean;
|
|
425
|
-
}, {}, string,
|
|
426
|
-
$slots: import("./image-card").ImageCardSlots;
|
|
427
|
-
}) & import("vue").Plugin;
|
|
419
|
+
}, {}, string, import("vue").SlotsType<import("./image-card.api").ImageCardSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
428
420
|
export { _ImageCard as ImageCard };
|
|
429
421
|
export default _ImageCard;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../utils.js';
|
|
2
|
-
import stdin_default$1 from './image-card.
|
|
3
|
-
export {
|
|
2
|
+
import stdin_default$1 from './image-card.js';
|
|
3
|
+
export { imageCardEmits, imageCardProps, imageCardSlots } from './image-card.api.js';
|
|
4
4
|
|
|
5
5
|
const _ImageCard = withInstall(stdin_default$1);
|
|
6
6
|
var stdin_default = _ImageCard;
|
package/components/index.js
CHANGED
|
@@ -78,7 +78,7 @@ export { formListEmits, formListExposeKeys, formListProps, formListSlots } from
|
|
|
78
78
|
export { defaultMapSizeColNumber, formQueryContextSymbol, formQueryEmits, formQueryProps, formQuerySlots } from './form-query/form-query.api.js';
|
|
79
79
|
export { default as hljs } from 'highlight.js/lib/core';
|
|
80
80
|
export { addIconifyIcon, iconifyIconsSets } from './iconify-icon/iconify-icon.js';
|
|
81
|
-
export {
|
|
81
|
+
export { imageCardEmits, imageCardProps, imageCardSlots } from './image-card/image-card.api.js';
|
|
82
82
|
export { defaultInputNumberRangeProps } from './input-number-range/input-number-range.js';
|
|
83
83
|
export { defaultLongTextProps } from './long-text/long-text.js';
|
|
84
84
|
export { maskEmits } from './mask/mask.api.js';
|
package/components/mask/mask.js
CHANGED
|
@@ -6,7 +6,9 @@ import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
|
6
6
|
var stdin_default = defineComponent({
|
|
7
7
|
name: "CoMask",
|
|
8
8
|
emits: maskEmits,
|
|
9
|
-
setup(
|
|
9
|
+
setup(_, {
|
|
10
|
+
emit
|
|
11
|
+
}) {
|
|
10
12
|
const {
|
|
11
13
|
prefixCls
|
|
12
14
|
} = useComponentConfig("mask");
|
|
@@ -15,7 +17,8 @@ var stdin_default = defineComponent({
|
|
|
15
17
|
} = stdin_default$1(prefixCls);
|
|
16
18
|
return () => {
|
|
17
19
|
return createVNode("div", {
|
|
18
|
-
"class": [hashId.value, prefixCls.value]
|
|
20
|
+
"class": [hashId.value, prefixCls.value],
|
|
21
|
+
"onClick": event => emit("click", event)
|
|
19
22
|
}, null);
|
|
20
23
|
};
|
|
21
24
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, mergeProps, createVNode } from 'vue';
|
|
2
2
|
import { mediaCardSlots, mediaCardProps } from './media-card.api.js';
|
|
3
|
-
import stdin_default$
|
|
4
|
-
import stdin_default$
|
|
5
|
-
import stdin_default$
|
|
3
|
+
import stdin_default$5 from '../image-card/image-card.js';
|
|
4
|
+
import stdin_default$4 from '../video-card/video-card.js';
|
|
5
|
+
import stdin_default$3 from '../audio-card/audio-card.js';
|
|
6
6
|
import stdin_default$1 from '../file-card/file-card.js';
|
|
7
|
+
import stdin_default$2 from '../svga-card/svga-card.js';
|
|
7
8
|
import { getBasename } from '../../utils/path.js';
|
|
8
9
|
import { getFileType } from '../../utils/file.js';
|
|
9
10
|
|
|
@@ -37,14 +38,18 @@ var stdin_default = defineComponent({
|
|
|
37
38
|
return () => {
|
|
38
39
|
switch (mergedType.value) {
|
|
39
40
|
case "image":
|
|
40
|
-
return createVNode(stdin_default$
|
|
41
|
+
return createVNode(stdin_default$5, mergeProps(mergedProps.value, {
|
|
41
42
|
"ref": mediaRef
|
|
42
43
|
}), slots);
|
|
43
44
|
case "video":
|
|
44
|
-
return createVNode(stdin_default$
|
|
45
|
+
return createVNode(stdin_default$4, mergeProps(mergedProps.value, {
|
|
45
46
|
"ref": mediaRef
|
|
46
47
|
}), null);
|
|
47
48
|
case "audio":
|
|
49
|
+
return createVNode(stdin_default$3, mergeProps(mergedProps.value, {
|
|
50
|
+
"ref": mediaRef
|
|
51
|
+
}), null);
|
|
52
|
+
case "svga":
|
|
48
53
|
return createVNode(stdin_default$2, mergeProps(mergedProps.value, {
|
|
49
54
|
"ref": mediaRef
|
|
50
55
|
}), null);
|
|
@@ -5,3 +5,4 @@ export interface ComponentToken {
|
|
|
5
5
|
}
|
|
6
6
|
export declare const getMediaCardStyle: GenerateStyle<AliasToken, CSSObject>;
|
|
7
7
|
export declare const getMediaCardFileNameStyle: GenerateStyle<TokenWithCommonCls<AliasToken>, CSSObject>;
|
|
8
|
+
export declare const getMediaCardFileTypeStyle: GenerateStyle<TokenWithCommonCls<AliasToken>, CSSObject>;
|
|
@@ -64,5 +64,16 @@ const getMediaCardFileNameStyle = (token) => {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
+
const getMediaCardFileTypeStyle = (token) => {
|
|
68
|
+
const { componentCls } = token;
|
|
69
|
+
return {
|
|
70
|
+
[`${componentCls}-type`]: {
|
|
71
|
+
fontSize: "0.8em",
|
|
72
|
+
lineHeight: 1.12,
|
|
73
|
+
textAlign: "center",
|
|
74
|
+
color: token.colorPrimary
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
67
78
|
|
|
68
|
-
export { getMediaCardFileNameStyle, getMediaCardStyle };
|
|
79
|
+
export { getMediaCardFileNameStyle, getMediaCardFileTypeStyle, getMediaCardStyle };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export * from './media-viewer.api';
|
|
2
2
|
declare const _MediaViewer: {
|
|
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 _MediaViewer: {
|
|
|
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 _MediaViewer: {
|
|
|
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 _MediaViewer: {
|
|
|
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 _MediaViewer: {
|
|
|
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 _MediaViewer: {
|
|
|
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, {
|