zartui 3.1.41 → 3.1.43
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/README.md +27 -27
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/media-picker/MediaPicker.d.ts +2 -1
- package/es/media-picker/MediaPicker.mjs +41 -14
- package/es/media-picker/index.d.ts +2 -1
- package/es/media-picker/type.d.ts +1 -1
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/media-picker/MediaPicker.d.ts +2 -1
- package/lib/media-picker/MediaPicker.js +41 -14
- package/lib/media-picker/index.d.ts +2 -1
- package/lib/media-picker/type.d.ts +1 -1
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +42 -15
- package/lib/zartui.es.js +42 -15
- package/lib/zartui.js +42 -15
- package/lib/zartui.min.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# ZartUI
|
|
2
|
-
|
|
3
|
-
[ZartUI](https://zartui.egova.com.cn) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
|
|
4
|
-
|
|
5
|
-
Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了ZartUI的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
|
|
6
|
-
|
|
7
|
-
## 特性
|
|
8
|
-
|
|
9
|
-
1)【组件重构】【组件审核】提供50多个高质量组件,覆盖移动端各类场景;
|
|
10
|
-
|
|
11
|
-
2)【UI重构】基于全新的视觉规范;
|
|
12
|
-
|
|
13
|
-
3)【在线网站】完善的文档、示例、演示效果;
|
|
14
|
-
|
|
15
|
-
4)支持主题定制、按需引入;
|
|
16
|
-
|
|
17
|
-
5)支持Vue3.0、TypeScript;
|
|
18
|
-
|
|
19
|
-
6)性能佳,组件平均体积小(min+gzip);
|
|
20
|
-
|
|
21
|
-
## 浏览器支持
|
|
22
|
-
|
|
23
|
-
ZartUI 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致)。
|
|
24
|
-
|
|
25
|
-
## 本地开发
|
|
26
|
-
|
|
27
|
-
推荐`node`版本 `>=18`。执行 `pnpm install` 安装依赖,然后进入 `packages/zartui` 执行 `pnpm dev` 启动本地开发环境。
|
|
1
|
+
# ZartUI
|
|
2
|
+
|
|
3
|
+
[ZartUI](https://zartui.egova.com.cn) 是数字政通基于 Vue 研发的一款面向政务场景的移动端组件库。
|
|
4
|
+
|
|
5
|
+
Zart(读音 /zɑːt/)的命名,灵感源自数字政通秉承的理念:让城市治理变得更智慧。Zart = zt + smart, zt是政通的首字母缩写,smart代表公司理念中的“智慧”,将smart中间的“ar”字母包裹于zt之间,体现了ZartUI的核心目标:追求极致的用户体验,致力于做灵活智能的组件库。
|
|
6
|
+
|
|
7
|
+
## 特性
|
|
8
|
+
|
|
9
|
+
1)【组件重构】【组件审核】提供50多个高质量组件,覆盖移动端各类场景;
|
|
10
|
+
|
|
11
|
+
2)【UI重构】基于全新的视觉规范;
|
|
12
|
+
|
|
13
|
+
3)【在线网站】完善的文档、示例、演示效果;
|
|
14
|
+
|
|
15
|
+
4)支持主题定制、按需引入;
|
|
16
|
+
|
|
17
|
+
5)支持Vue3.0、TypeScript;
|
|
18
|
+
|
|
19
|
+
6)性能佳,组件平均体积小(min+gzip);
|
|
20
|
+
|
|
21
|
+
## 浏览器支持
|
|
22
|
+
|
|
23
|
+
ZartUI 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致)。
|
|
24
|
+
|
|
25
|
+
## 本地开发
|
|
26
|
+
|
|
27
|
+
推荐`node`版本 `>=18`。执行 `pnpm install` 安装依赖,然后进入 `packages/zartui` 执行 `pnpm dev` 启动本地开发环境。
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -76,7 +76,7 @@ import { Timeline } from "./timeline/index.mjs";
|
|
|
76
76
|
import { Toast } from "./toast/index.mjs";
|
|
77
77
|
import { Uploader } from "./uploader/index.mjs";
|
|
78
78
|
import { Video } from "./video/index.mjs";
|
|
79
|
-
const version = "3.1.
|
|
79
|
+
const version = "3.1.43";
|
|
80
80
|
function install(app) {
|
|
81
81
|
const components = [
|
|
82
82
|
ActionSheet,
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { App } from 'vue';
|
|
2
|
-
|
|
3
|
-
declare type ListenEvent =
|
|
4
|
-
| 'scroll'
|
|
5
|
-
| 'wheel'
|
|
6
|
-
| 'mousewheel'
|
|
7
|
-
| 'resize'
|
|
8
|
-
| 'animationend'
|
|
9
|
-
| 'transitionend'
|
|
10
|
-
| 'touchmove';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line
|
|
13
|
-
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
-
|
|
15
|
-
declare type Filter = {
|
|
16
|
-
webp?: Callback;
|
|
17
|
-
progressive?: Callback;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
declare type Adapter = {
|
|
21
|
-
error?: Callback;
|
|
22
|
-
loaded?: Callback;
|
|
23
|
-
loading?: Callback;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export declare type LazyloadOptions = {
|
|
27
|
-
error?: string;
|
|
28
|
-
filter?: Filter;
|
|
29
|
-
silent?: boolean;
|
|
30
|
-
adapter?: Adapter;
|
|
31
|
-
loading?: string;
|
|
32
|
-
attempt?: number;
|
|
33
|
-
preLoad?: number;
|
|
34
|
-
observer?: boolean;
|
|
35
|
-
lazyImage?: boolean;
|
|
36
|
-
throttleWait?: number;
|
|
37
|
-
listenEvents?: ListenEvent[];
|
|
38
|
-
dispatchEvent?: boolean;
|
|
39
|
-
lazyComponent?: boolean;
|
|
40
|
-
observerOptions?: IntersectionObserverInit;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export declare const Lazyload: {
|
|
44
|
-
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
declare module '@vue/runtime-core' {
|
|
48
|
-
interface ComponentCustomProperties {
|
|
49
|
-
$Lazyload: {
|
|
50
|
-
$on: (event: string, handler: Callback) => void;
|
|
51
|
-
$off: (event: string, handler?: Callback) => void;
|
|
52
|
-
$once: (event: string, handler: Callback) => void;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare type ListenEvent =
|
|
4
|
+
| 'scroll'
|
|
5
|
+
| 'wheel'
|
|
6
|
+
| 'mousewheel'
|
|
7
|
+
| 'resize'
|
|
8
|
+
| 'animationend'
|
|
9
|
+
| 'transitionend'
|
|
10
|
+
| 'touchmove';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
+
|
|
15
|
+
declare type Filter = {
|
|
16
|
+
webp?: Callback;
|
|
17
|
+
progressive?: Callback;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
declare type Adapter = {
|
|
21
|
+
error?: Callback;
|
|
22
|
+
loaded?: Callback;
|
|
23
|
+
loading?: Callback;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare type LazyloadOptions = {
|
|
27
|
+
error?: string;
|
|
28
|
+
filter?: Filter;
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
adapter?: Adapter;
|
|
31
|
+
loading?: string;
|
|
32
|
+
attempt?: number;
|
|
33
|
+
preLoad?: number;
|
|
34
|
+
observer?: boolean;
|
|
35
|
+
lazyImage?: boolean;
|
|
36
|
+
throttleWait?: number;
|
|
37
|
+
listenEvents?: ListenEvent[];
|
|
38
|
+
dispatchEvent?: boolean;
|
|
39
|
+
lazyComponent?: boolean;
|
|
40
|
+
observerOptions?: IntersectionObserverInit;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export declare const Lazyload: {
|
|
44
|
+
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare module '@vue/runtime-core' {
|
|
48
|
+
interface ComponentCustomProperties {
|
|
49
|
+
$Lazyload: {
|
|
50
|
+
$on: (event: string, handler: Callback) => void;
|
|
51
|
+
$off: (event: string, handler?: Callback) => void;
|
|
52
|
+
$once: (event: string, handler: Callback) => void;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -162,7 +162,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
162
162
|
default: MediaSizeType;
|
|
163
163
|
};
|
|
164
164
|
mediaPlayerProps: PropType<Partial<MediaPlayerProps>>;
|
|
165
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "update:mediaList")[], "delete" | "update:mediaList", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
165
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "processing" | "update:mediaList")[], "delete" | "processing" | "update:mediaList", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
166
166
|
disabled: BooleanConstructor;
|
|
167
167
|
showTitle: BooleanConstructor;
|
|
168
168
|
useFileNameAsLabel: BooleanConstructor;
|
|
@@ -242,6 +242,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
242
242
|
mediaPlayerProps: PropType<Partial<MediaPlayerProps>>;
|
|
243
243
|
}>> & Readonly<{
|
|
244
244
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
245
|
+
onProcessing?: ((...args: any[]) => any) | undefined;
|
|
245
246
|
"onUpdate:mediaList"?: ((...args: any[]) => any) | undefined;
|
|
246
247
|
}>, {
|
|
247
248
|
title: string;
|
|
@@ -102,7 +102,7 @@ const mediaPickerProps = {
|
|
|
102
102
|
var stdin_default = defineComponent({
|
|
103
103
|
name,
|
|
104
104
|
props: mediaPickerProps,
|
|
105
|
-
emits: ["update:mediaList", "delete"],
|
|
105
|
+
emits: ["update:mediaList", "delete", "processing"],
|
|
106
106
|
setup(props, {
|
|
107
107
|
emit,
|
|
108
108
|
slots
|
|
@@ -120,6 +120,7 @@ var stdin_default = defineComponent({
|
|
|
120
120
|
const audioRecorderInputRef = ref();
|
|
121
121
|
const audioFileInputRef = ref();
|
|
122
122
|
const fileInputRef = ref();
|
|
123
|
+
const mediaListPlaceholder = ref([]);
|
|
123
124
|
const checkFileCountBeforeAdd = (mediaType) => {
|
|
124
125
|
if (props.mediaList.length === props.maxMediaCount) {
|
|
125
126
|
showFailToast("\u5DF2\u8FBE\u5230\u6587\u4EF6\u6700\u5927\u6570\u91CF\u9650\u5236");
|
|
@@ -329,11 +330,6 @@ var stdin_default = defineComponent({
|
|
|
329
330
|
return media;
|
|
330
331
|
});
|
|
331
332
|
});
|
|
332
|
-
showLoadingToast({
|
|
333
|
-
message: "\u5904\u7406\u4E2D...",
|
|
334
|
-
forbidClick: true,
|
|
335
|
-
duration: 0
|
|
336
|
-
});
|
|
337
333
|
return Promise.all(mediaList).then((medias) => {
|
|
338
334
|
const _medias = [];
|
|
339
335
|
medias.forEach((media) => {
|
|
@@ -343,7 +339,6 @@ var stdin_default = defineComponent({
|
|
|
343
339
|
});
|
|
344
340
|
return _medias;
|
|
345
341
|
}).finally(() => {
|
|
346
|
-
closeToast();
|
|
347
342
|
});
|
|
348
343
|
};
|
|
349
344
|
const transformImageFiles = (files) => {
|
|
@@ -402,11 +397,6 @@ var stdin_default = defineComponent({
|
|
|
402
397
|
});
|
|
403
398
|
promisesTodo.push(promise);
|
|
404
399
|
}
|
|
405
|
-
showLoadingToast({
|
|
406
|
-
message: "\u5904\u7406\u4E2D...",
|
|
407
|
-
forbidClick: true,
|
|
408
|
-
duration: 0
|
|
409
|
-
});
|
|
410
400
|
return Promise.all(promisesTodo).then((medias) => {
|
|
411
401
|
const _medias = [];
|
|
412
402
|
medias.forEach((media) => {
|
|
@@ -416,10 +406,28 @@ var stdin_default = defineComponent({
|
|
|
416
406
|
});
|
|
417
407
|
return _medias;
|
|
418
408
|
}).finally(() => {
|
|
419
|
-
closeToast();
|
|
420
409
|
});
|
|
421
410
|
};
|
|
422
411
|
const readFiles = (files) => {
|
|
412
|
+
emit("processing", true);
|
|
413
|
+
mediaListPlaceholder.value = files.map((file) => {
|
|
414
|
+
let type;
|
|
415
|
+
if (isAudioType(file)) {
|
|
416
|
+
type = "audio";
|
|
417
|
+
} else if (isVideoType(file)) {
|
|
418
|
+
type = "video";
|
|
419
|
+
} else if (isImageType(file)) {
|
|
420
|
+
type = "photo";
|
|
421
|
+
} else {
|
|
422
|
+
type = "file";
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
file,
|
|
426
|
+
message: "\u5904\u7406\u4E2D...",
|
|
427
|
+
status: "processing",
|
|
428
|
+
type
|
|
429
|
+
};
|
|
430
|
+
});
|
|
423
431
|
const notImages = files.filter((f) => !isImageType(f)).map((f) => transformNotImageFile(f));
|
|
424
432
|
let newMedias = [];
|
|
425
433
|
if (notImages.length > 0) {
|
|
@@ -442,6 +450,8 @@ var stdin_default = defineComponent({
|
|
|
442
450
|
newMedia.label = newMedia.originalName;
|
|
443
451
|
});
|
|
444
452
|
}
|
|
453
|
+
mediaListPlaceholder.value = [];
|
|
454
|
+
emit("processing", false);
|
|
445
455
|
emit("update:mediaList", [...props.mediaList, ...newMedias]);
|
|
446
456
|
if (props.afterRead) {
|
|
447
457
|
props.afterRead(newMedias);
|
|
@@ -618,7 +628,7 @@ var stdin_default = defineComponent({
|
|
|
618
628
|
status,
|
|
619
629
|
message
|
|
620
630
|
} = media;
|
|
621
|
-
if (status === "uploading" || status === "failed") {
|
|
631
|
+
if (status === "processing" || status === "uploading" || status === "failed") {
|
|
622
632
|
const MaskIcon = status === "failed" ? _createVNode(ZtIcon, {
|
|
623
633
|
"name": "close",
|
|
624
634
|
"class": bem("mask-icon")
|
|
@@ -753,6 +763,15 @@ var stdin_default = defineComponent({
|
|
|
753
763
|
showFailToast("\u6682\u4E0D\u652F\u6301\u6B64\u7C7B\u6587\u4EF6\u7684\u9884\u89C8");
|
|
754
764
|
}
|
|
755
765
|
});
|
|
766
|
+
const renderMediaListPlaceholder = () => {
|
|
767
|
+
return mediaListPlaceholder.value.map((media) => {
|
|
768
|
+
return _createVNode(ZtGridItem, {
|
|
769
|
+
"key": media.uniqueCode
|
|
770
|
+
}, {
|
|
771
|
+
default: () => [renderMediaThumbnail(media), renderMediaLabel(media), genThumbnailMask(media)]
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
};
|
|
756
775
|
const renderMediaList = () => props.mediaList.map((media, index) => {
|
|
757
776
|
const showDelete = media.deletable && media.status !== "uploading";
|
|
758
777
|
const deleteIcon = showDelete && _createVNode(DeleteIcon, {
|
|
@@ -804,6 +823,14 @@ var stdin_default = defineComponent({
|
|
|
804
823
|
"square": true,
|
|
805
824
|
"gutter": "4",
|
|
806
825
|
"class": bem("grid")
|
|
826
|
+
}, {
|
|
827
|
+
default: () => [renderMediaListPlaceholder()]
|
|
828
|
+
}), [[_vShow, mediaListPlaceholder.value.length]]), _withDirectives(_createVNode(ZtGrid, {
|
|
829
|
+
"column-num": "3",
|
|
830
|
+
"border": false,
|
|
831
|
+
"square": true,
|
|
832
|
+
"gutter": "4",
|
|
833
|
+
"class": bem("grid")
|
|
807
834
|
}, {
|
|
808
835
|
default: () => [renderMediaList()]
|
|
809
836
|
}), [[_vShow, props.mediaList.length]])]);
|
|
@@ -66,7 +66,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
66
66
|
default: import("./type").MediaSizeType;
|
|
67
67
|
};
|
|
68
68
|
mediaPlayerProps: import("vue").PropType<Partial<import("..").MediaPlayerProps>>;
|
|
69
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "update:mediaList")[], "delete" | "update:mediaList", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
69
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "processing" | "update:mediaList")[], "delete" | "processing" | "update:mediaList", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
70
70
|
disabled: BooleanConstructor;
|
|
71
71
|
showTitle: BooleanConstructor;
|
|
72
72
|
useFileNameAsLabel: BooleanConstructor;
|
|
@@ -136,6 +136,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
136
136
|
mediaPlayerProps: import("vue").PropType<Partial<import("..").MediaPlayerProps>>;
|
|
137
137
|
}>> & Readonly<{
|
|
138
138
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
139
|
+
onProcessing?: ((...args: any[]) => any) | undefined;
|
|
139
140
|
"onUpdate:mediaList"?: ((...args: any[]) => any) | undefined;
|
|
140
141
|
}>, {
|
|
141
142
|
title: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type MediaType = 'photo' | 'audio' | 'video' | 'file';
|
|
2
2
|
export type MediaAddType = 'take' | 'pick' | 'take_and_pick';
|
|
3
|
-
export type MediaUploadStatus = 'uploading' | 'done' | 'failed';
|
|
3
|
+
export type MediaUploadStatus = 'processing' | 'uploading' | 'done' | 'failed';
|
|
4
4
|
export type WxMediaType = 'camera' | 'album';
|
|
5
5
|
export type MediaSizeType = 'original' | 'compressed';
|
|
6
6
|
export type Media = {
|
package/es/vue-sfc-shim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line
|
|
3
|
-
import { DefineComponent } from 'vue';
|
|
4
|
-
const Component: DefineComponent;
|
|
5
|
-
export default Component;
|
|
6
|
-
}
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
const Component: DefineComponent;
|
|
5
|
+
export default Component;
|
|
6
|
+
}
|
package/es/vue-tsx-shim.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import 'vue';
|
|
2
|
-
|
|
3
|
-
type EventHandler = (...args: any[]) => void;
|
|
4
|
-
|
|
5
|
-
declare module 'vue' {
|
|
6
|
-
interface ComponentCustomProps {
|
|
7
|
-
id?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
tabindex?: number;
|
|
10
|
-
onClick?: EventHandler;
|
|
11
|
-
onTouchend?: EventHandler;
|
|
12
|
-
onTouchmove?: EventHandler;
|
|
13
|
-
onTouchstart?: EventHandler;
|
|
14
|
-
onTouchcancel?: EventHandler;
|
|
15
|
-
onTouchmovePassive?: EventHandler;
|
|
16
|
-
onTouchstartPassive?: EventHandler;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface HTMLAttributes {
|
|
20
|
-
onTouchmovePassive?: EventHandler;
|
|
21
|
-
onTouchstartPassive?: EventHandler;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import 'vue';
|
|
2
|
+
|
|
3
|
+
type EventHandler = (...args: any[]) => void;
|
|
4
|
+
|
|
5
|
+
declare module 'vue' {
|
|
6
|
+
interface ComponentCustomProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
tabindex?: number;
|
|
10
|
+
onClick?: EventHandler;
|
|
11
|
+
onTouchend?: EventHandler;
|
|
12
|
+
onTouchmove?: EventHandler;
|
|
13
|
+
onTouchstart?: EventHandler;
|
|
14
|
+
onTouchcancel?: EventHandler;
|
|
15
|
+
onTouchmovePassive?: EventHandler;
|
|
16
|
+
onTouchstartPassive?: EventHandler;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HTMLAttributes {
|
|
20
|
+
onTouchmovePassive?: EventHandler;
|
|
21
|
+
onTouchstartPassive?: EventHandler;
|
|
22
|
+
}
|
|
23
|
+
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -180,7 +180,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
|
|
|
180
180
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
181
181
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
182
182
|
__reExport(stdin_exports, require("./video"), module.exports);
|
|
183
|
-
const version = "3.1.
|
|
183
|
+
const version = "3.1.43";
|
|
184
184
|
function install(app) {
|
|
185
185
|
const components = [
|
|
186
186
|
import_action_sheet.ActionSheet,
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { App } from 'vue';
|
|
2
|
-
|
|
3
|
-
declare type ListenEvent =
|
|
4
|
-
| 'scroll'
|
|
5
|
-
| 'wheel'
|
|
6
|
-
| 'mousewheel'
|
|
7
|
-
| 'resize'
|
|
8
|
-
| 'animationend'
|
|
9
|
-
| 'transitionend'
|
|
10
|
-
| 'touchmove';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line
|
|
13
|
-
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
-
|
|
15
|
-
declare type Filter = {
|
|
16
|
-
webp?: Callback;
|
|
17
|
-
progressive?: Callback;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
declare type Adapter = {
|
|
21
|
-
error?: Callback;
|
|
22
|
-
loaded?: Callback;
|
|
23
|
-
loading?: Callback;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export declare type LazyloadOptions = {
|
|
27
|
-
error?: string;
|
|
28
|
-
filter?: Filter;
|
|
29
|
-
silent?: boolean;
|
|
30
|
-
adapter?: Adapter;
|
|
31
|
-
loading?: string;
|
|
32
|
-
attempt?: number;
|
|
33
|
-
preLoad?: number;
|
|
34
|
-
observer?: boolean;
|
|
35
|
-
lazyImage?: boolean;
|
|
36
|
-
throttleWait?: number;
|
|
37
|
-
listenEvents?: ListenEvent[];
|
|
38
|
-
dispatchEvent?: boolean;
|
|
39
|
-
lazyComponent?: boolean;
|
|
40
|
-
observerOptions?: IntersectionObserverInit;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export declare const Lazyload: {
|
|
44
|
-
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
declare module '@vue/runtime-core' {
|
|
48
|
-
interface ComponentCustomProperties {
|
|
49
|
-
$Lazyload: {
|
|
50
|
-
$on: (event: string, handler: Callback) => void;
|
|
51
|
-
$off: (event: string, handler?: Callback) => void;
|
|
52
|
-
$once: (event: string, handler: Callback) => void;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare type ListenEvent =
|
|
4
|
+
| 'scroll'
|
|
5
|
+
| 'wheel'
|
|
6
|
+
| 'mousewheel'
|
|
7
|
+
| 'resize'
|
|
8
|
+
| 'animationend'
|
|
9
|
+
| 'transitionend'
|
|
10
|
+
| 'touchmove';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
+
|
|
15
|
+
declare type Filter = {
|
|
16
|
+
webp?: Callback;
|
|
17
|
+
progressive?: Callback;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
declare type Adapter = {
|
|
21
|
+
error?: Callback;
|
|
22
|
+
loaded?: Callback;
|
|
23
|
+
loading?: Callback;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare type LazyloadOptions = {
|
|
27
|
+
error?: string;
|
|
28
|
+
filter?: Filter;
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
adapter?: Adapter;
|
|
31
|
+
loading?: string;
|
|
32
|
+
attempt?: number;
|
|
33
|
+
preLoad?: number;
|
|
34
|
+
observer?: boolean;
|
|
35
|
+
lazyImage?: boolean;
|
|
36
|
+
throttleWait?: number;
|
|
37
|
+
listenEvents?: ListenEvent[];
|
|
38
|
+
dispatchEvent?: boolean;
|
|
39
|
+
lazyComponent?: boolean;
|
|
40
|
+
observerOptions?: IntersectionObserverInit;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export declare const Lazyload: {
|
|
44
|
+
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare module '@vue/runtime-core' {
|
|
48
|
+
interface ComponentCustomProperties {
|
|
49
|
+
$Lazyload: {
|
|
50
|
+
$on: (event: string, handler: Callback) => void;
|
|
51
|
+
$off: (event: string, handler?: Callback) => void;
|
|
52
|
+
$once: (event: string, handler: Callback) => void;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -162,7 +162,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
162
162
|
default: MediaSizeType;
|
|
163
163
|
};
|
|
164
164
|
mediaPlayerProps: PropType<Partial<MediaPlayerProps>>;
|
|
165
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "update:mediaList")[], "delete" | "update:mediaList", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
165
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "processing" | "update:mediaList")[], "delete" | "processing" | "update:mediaList", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
166
166
|
disabled: BooleanConstructor;
|
|
167
167
|
showTitle: BooleanConstructor;
|
|
168
168
|
useFileNameAsLabel: BooleanConstructor;
|
|
@@ -242,6 +242,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
242
242
|
mediaPlayerProps: PropType<Partial<MediaPlayerProps>>;
|
|
243
243
|
}>> & Readonly<{
|
|
244
244
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
245
|
+
onProcessing?: ((...args: any[]) => any) | undefined;
|
|
245
246
|
"onUpdate:mediaList"?: ((...args: any[]) => any) | undefined;
|
|
246
247
|
}>, {
|
|
247
248
|
title: string;
|