vant 3.5.0 → 3.5.1
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/es/calendar/Calendar.mjs +3 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/popup/Popup.mjs +1 -1
- package/es/pull-refresh/PullRefresh.d.ts +2 -1
- package/es/pull-refresh/PullRefresh.mjs +5 -1
- package/es/pull-refresh/index.d.ts +2 -1
- package/es/toast/function-call.d.ts +5 -6
- package/es/toast/types.d.ts +10 -1
- package/es/uploader/Uploader.d.ts +3 -3
- package/es/uploader/index.d.ts +2 -2
- package/lib/calendar/Calendar.js +3 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/popup/Popup.js +1 -1
- package/lib/pull-refresh/PullRefresh.d.ts +2 -1
- package/lib/pull-refresh/PullRefresh.js +5 -1
- package/lib/pull-refresh/index.d.ts +2 -1
- package/lib/toast/function-call.d.ts +5 -6
- package/lib/toast/types.d.ts +10 -1
- package/lib/uploader/Uploader.d.ts +3 -3
- package/lib/uploader/index.d.ts +2 -2
- package/lib/vant.cjs.js +10 -3
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +10 -3
- package/lib/vant.es.min.js +10 -3
- package/lib/vant.js +10 -3
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +526 -526
- package/vetur/tags.json +176 -176
- package/vetur/web-types.json +1581 -1572
package/es/calendar/Calendar.mjs
CHANGED
@@ -112,6 +112,9 @@ var stdin_default = defineComponent({
|
|
112
112
|
const months = computed(() => {
|
113
113
|
const months2 = [];
|
114
114
|
const cursor = new Date(props.minDate);
|
115
|
+
if (props.lazyRender && !props.show && props.poppable) {
|
116
|
+
return months2;
|
117
|
+
}
|
115
118
|
cursor.setDate(1);
|
116
119
|
do {
|
117
120
|
months2.push(new Date(cursor));
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -83,7 +83,7 @@ import { Tag } from "./tag/index.mjs";
|
|
83
83
|
import { Toast } from "./toast/index.mjs";
|
84
84
|
import { TreeSelect } from "./tree-select/index.mjs";
|
85
85
|
import { Uploader } from "./uploader/index.mjs";
|
86
|
-
const version = "3.5.
|
86
|
+
const version = "3.5.1";
|
87
87
|
function install(app) {
|
88
88
|
const components = [
|
89
89
|
ActionBar,
|
package/es/popup/Popup.mjs
CHANGED
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
type: (NumberConstructor | StringConstructor)[];
|
42
42
|
default: number;
|
43
43
|
};
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "refresh")[], "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "refresh")[], "update:modelValue" | "change" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
45
45
|
disabled: BooleanConstructor;
|
46
46
|
modelValue: BooleanConstructor;
|
47
47
|
headHeight: {
|
@@ -62,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
62
62
|
default: number;
|
63
63
|
};
|
64
64
|
}>> & {
|
65
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
65
66
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
66
67
|
onRefresh?: ((...args: any[]) => any) | undefined;
|
67
68
|
}, {
|
@@ -22,7 +22,7 @@ const pullRefreshProps = {
|
|
22
22
|
var stdin_default = defineComponent({
|
23
23
|
name,
|
24
24
|
props: pullRefreshProps,
|
25
|
-
emits: ["refresh", "update:modelValue"],
|
25
|
+
emits: ["change", "refresh", "update:modelValue"],
|
26
26
|
setup(props, {
|
27
27
|
emit,
|
28
28
|
slots
|
@@ -67,6 +67,10 @@ var stdin_default = defineComponent({
|
|
67
67
|
} else {
|
68
68
|
state.status = "loosing";
|
69
69
|
}
|
70
|
+
emit("change", {
|
71
|
+
status: state.status,
|
72
|
+
distance
|
73
|
+
});
|
70
74
|
};
|
71
75
|
const getStatusText = () => {
|
72
76
|
const {
|
@@ -18,7 +18,7 @@ export declare const PullRefresh: import("../utils").WithInstall<import("vue").D
|
|
18
18
|
type: (NumberConstructor | StringConstructor)[];
|
19
19
|
default: number;
|
20
20
|
};
|
21
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "refresh")[], "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
21
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "refresh")[], "update:modelValue" | "change" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
22
22
|
disabled: BooleanConstructor;
|
23
23
|
modelValue: BooleanConstructor;
|
24
24
|
headHeight: {
|
@@ -39,6 +39,7 @@ export declare const PullRefresh: import("../utils").WithInstall<import("vue").D
|
|
39
39
|
default: number;
|
40
40
|
};
|
41
41
|
}>> & {
|
42
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
42
43
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
43
44
|
onRefresh?: ((...args: any[]) => any) | undefined;
|
44
45
|
}, {
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { type App } from 'vue';
|
2
|
-
import {
|
3
|
-
|
4
|
-
declare function Toast(options?: string | ToastOptions): ComponentInstance;
|
2
|
+
import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
|
3
|
+
declare function Toast(options?: string | ToastOptions): ToastWrapperInstance;
|
5
4
|
declare namespace Toast {
|
6
|
-
var loading: (options: string | ToastOptions) =>
|
7
|
-
var success: (options: string | ToastOptions) =>
|
8
|
-
var fail: (options: string | ToastOptions) =>
|
5
|
+
var loading: (options: string | ToastOptions) => ToastWrapperInstance;
|
6
|
+
var success: (options: string | ToastOptions) => ToastWrapperInstance;
|
7
|
+
var fail: (options: string | ToastOptions) => ToastWrapperInstance;
|
9
8
|
var clear: (all?: boolean | undefined) => void;
|
10
9
|
var setDefaultOptions: {
|
11
10
|
(options: ToastOptions): void;
|
package/es/toast/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Toast } from './function-call';
|
2
|
-
import type { TeleportProps } from 'vue';
|
2
|
+
import type { ComponentPublicInstance, TeleportProps } from 'vue';
|
3
3
|
import type { LoadingType } from '../loading';
|
4
4
|
import type { Numeric } from '../utils';
|
5
5
|
export declare type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
|
@@ -31,3 +31,12 @@ declare module '@vue/runtime-core' {
|
|
31
31
|
$toast: typeof Toast;
|
32
32
|
}
|
33
33
|
}
|
34
|
+
export declare type ToastWrapperInstance = ComponentPublicInstance<{
|
35
|
+
message: Numeric;
|
36
|
+
}, {
|
37
|
+
clear: () => void;
|
38
|
+
/**
|
39
|
+
* @private
|
40
|
+
*/
|
41
|
+
open: (props: Record<string, any>) => void;
|
42
|
+
}>;
|
@@ -54,7 +54,7 @@ declare const uploaderProps: {
|
|
54
54
|
type: BooleanConstructor;
|
55
55
|
default: true;
|
56
56
|
};
|
57
|
-
previewOptions: PropType<ImagePreviewOptions
|
57
|
+
previewOptions: PropType<Partial<ImagePreviewOptions>>;
|
58
58
|
previewFullImage: {
|
59
59
|
type: BooleanConstructor;
|
60
60
|
default: true;
|
@@ -116,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
116
116
|
type: BooleanConstructor;
|
117
117
|
default: true;
|
118
118
|
};
|
119
|
-
previewOptions: PropType<ImagePreviewOptions
|
119
|
+
previewOptions: PropType<Partial<ImagePreviewOptions>>;
|
120
120
|
previewFullImage: {
|
121
121
|
type: BooleanConstructor;
|
122
122
|
default: true;
|
@@ -176,7 +176,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
176
176
|
type: BooleanConstructor;
|
177
177
|
default: true;
|
178
178
|
};
|
179
|
-
previewOptions: PropType<ImagePreviewOptions
|
179
|
+
previewOptions: PropType<Partial<ImagePreviewOptions>>;
|
180
180
|
previewFullImage: {
|
181
181
|
type: BooleanConstructor;
|
182
182
|
default: true;
|
package/es/uploader/index.d.ts
CHANGED
@@ -50,7 +50,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
50
50
|
type: BooleanConstructor;
|
51
51
|
default: true;
|
52
52
|
};
|
53
|
-
previewOptions: import("vue").PropType<import("..").ImagePreviewOptions
|
53
|
+
previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
|
54
54
|
previewFullImage: {
|
55
55
|
type: BooleanConstructor;
|
56
56
|
default: true;
|
@@ -110,7 +110,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
110
110
|
type: BooleanConstructor;
|
111
111
|
default: true;
|
112
112
|
};
|
113
|
-
previewOptions: import("vue").PropType<import("..").ImagePreviewOptions
|
113
|
+
previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
|
114
114
|
previewFullImage: {
|
115
115
|
type: BooleanConstructor;
|
116
116
|
default: true;
|
package/lib/calendar/Calendar.js
CHANGED
@@ -137,6 +137,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
137
137
|
const months = (0, import_vue2.computed)(() => {
|
138
138
|
const months2 = [];
|
139
139
|
const cursor = new Date(props.minDate);
|
140
|
+
if (props.lazyRender && !props.show && props.poppable) {
|
141
|
+
return months2;
|
142
|
+
}
|
140
143
|
cursor.setDate(1);
|
141
144
|
do {
|
142
145
|
months2.push(new Date(cursor));
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -194,7 +194,7 @@ __reExport(stdin_exports, require("./tag"), module.exports);
|
|
194
194
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
195
195
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
196
196
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
197
|
-
const version = "3.5.
|
197
|
+
const version = "3.5.1";
|
198
198
|
function install(app) {
|
199
199
|
const components = [
|
200
200
|
import_action_bar.ActionBar,
|
package/lib/popup/Popup.js
CHANGED
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
type: (NumberConstructor | StringConstructor)[];
|
42
42
|
default: number;
|
43
43
|
};
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "refresh")[], "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "refresh")[], "update:modelValue" | "change" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
45
45
|
disabled: BooleanConstructor;
|
46
46
|
modelValue: BooleanConstructor;
|
47
47
|
headHeight: {
|
@@ -62,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
62
62
|
default: number;
|
63
63
|
};
|
64
64
|
}>> & {
|
65
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
65
66
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
66
67
|
onRefresh?: ((...args: any[]) => any) | undefined;
|
67
68
|
}, {
|
@@ -44,7 +44,7 @@ const pullRefreshProps = {
|
|
44
44
|
var stdin_default = (0, import_vue2.defineComponent)({
|
45
45
|
name,
|
46
46
|
props: pullRefreshProps,
|
47
|
-
emits: ["refresh", "update:modelValue"],
|
47
|
+
emits: ["change", "refresh", "update:modelValue"],
|
48
48
|
setup(props, {
|
49
49
|
emit,
|
50
50
|
slots
|
@@ -89,6 +89,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
89
89
|
} else {
|
90
90
|
state.status = "loosing";
|
91
91
|
}
|
92
|
+
emit("change", {
|
93
|
+
status: state.status,
|
94
|
+
distance
|
95
|
+
});
|
92
96
|
};
|
93
97
|
const getStatusText = () => {
|
94
98
|
const {
|
@@ -18,7 +18,7 @@ export declare const PullRefresh: import("../utils").WithInstall<import("vue").D
|
|
18
18
|
type: (NumberConstructor | StringConstructor)[];
|
19
19
|
default: number;
|
20
20
|
};
|
21
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "refresh")[], "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
21
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "refresh")[], "update:modelValue" | "change" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
22
22
|
disabled: BooleanConstructor;
|
23
23
|
modelValue: BooleanConstructor;
|
24
24
|
headHeight: {
|
@@ -39,6 +39,7 @@ export declare const PullRefresh: import("../utils").WithInstall<import("vue").D
|
|
39
39
|
default: number;
|
40
40
|
};
|
41
41
|
}>> & {
|
42
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
42
43
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
43
44
|
onRefresh?: ((...args: any[]) => any) | undefined;
|
44
45
|
}, {
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { type App } from 'vue';
|
2
|
-
import {
|
3
|
-
|
4
|
-
declare function Toast(options?: string | ToastOptions): ComponentInstance;
|
2
|
+
import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
|
3
|
+
declare function Toast(options?: string | ToastOptions): ToastWrapperInstance;
|
5
4
|
declare namespace Toast {
|
6
|
-
var loading: (options: string | ToastOptions) =>
|
7
|
-
var success: (options: string | ToastOptions) =>
|
8
|
-
var fail: (options: string | ToastOptions) =>
|
5
|
+
var loading: (options: string | ToastOptions) => ToastWrapperInstance;
|
6
|
+
var success: (options: string | ToastOptions) => ToastWrapperInstance;
|
7
|
+
var fail: (options: string | ToastOptions) => ToastWrapperInstance;
|
9
8
|
var clear: (all?: boolean | undefined) => void;
|
10
9
|
var setDefaultOptions: {
|
11
10
|
(options: ToastOptions): void;
|
package/lib/toast/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Toast } from './function-call';
|
2
|
-
import type { TeleportProps } from 'vue';
|
2
|
+
import type { ComponentPublicInstance, TeleportProps } from 'vue';
|
3
3
|
import type { LoadingType } from '../loading';
|
4
4
|
import type { Numeric } from '../utils';
|
5
5
|
export declare type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
|
@@ -31,3 +31,12 @@ declare module '@vue/runtime-core' {
|
|
31
31
|
$toast: typeof Toast;
|
32
32
|
}
|
33
33
|
}
|
34
|
+
export declare type ToastWrapperInstance = ComponentPublicInstance<{
|
35
|
+
message: Numeric;
|
36
|
+
}, {
|
37
|
+
clear: () => void;
|
38
|
+
/**
|
39
|
+
* @private
|
40
|
+
*/
|
41
|
+
open: (props: Record<string, any>) => void;
|
42
|
+
}>;
|
@@ -54,7 +54,7 @@ declare const uploaderProps: {
|
|
54
54
|
type: BooleanConstructor;
|
55
55
|
default: true;
|
56
56
|
};
|
57
|
-
previewOptions: PropType<ImagePreviewOptions
|
57
|
+
previewOptions: PropType<Partial<ImagePreviewOptions>>;
|
58
58
|
previewFullImage: {
|
59
59
|
type: BooleanConstructor;
|
60
60
|
default: true;
|
@@ -116,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
116
116
|
type: BooleanConstructor;
|
117
117
|
default: true;
|
118
118
|
};
|
119
|
-
previewOptions: PropType<ImagePreviewOptions
|
119
|
+
previewOptions: PropType<Partial<ImagePreviewOptions>>;
|
120
120
|
previewFullImage: {
|
121
121
|
type: BooleanConstructor;
|
122
122
|
default: true;
|
@@ -176,7 +176,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
176
176
|
type: BooleanConstructor;
|
177
177
|
default: true;
|
178
178
|
};
|
179
|
-
previewOptions: PropType<ImagePreviewOptions
|
179
|
+
previewOptions: PropType<Partial<ImagePreviewOptions>>;
|
180
180
|
previewFullImage: {
|
181
181
|
type: BooleanConstructor;
|
182
182
|
default: true;
|
package/lib/uploader/index.d.ts
CHANGED
@@ -50,7 +50,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
50
50
|
type: BooleanConstructor;
|
51
51
|
default: true;
|
52
52
|
};
|
53
|
-
previewOptions: import("vue").PropType<import("..").ImagePreviewOptions
|
53
|
+
previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
|
54
54
|
previewFullImage: {
|
55
55
|
type: BooleanConstructor;
|
56
56
|
default: true;
|
@@ -110,7 +110,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
110
110
|
type: BooleanConstructor;
|
111
111
|
default: true;
|
112
112
|
};
|
113
|
-
previewOptions: import("vue").PropType<import("..").ImagePreviewOptions
|
113
|
+
previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
|
114
114
|
previewFullImage: {
|
115
115
|
type: BooleanConstructor;
|
116
116
|
default: true;
|
package/lib/vant.cjs.js
CHANGED
@@ -1301,7 +1301,7 @@ var stdin_default$1s = vue.defineComponent({
|
|
1301
1301
|
}
|
1302
1302
|
});
|
1303
1303
|
vue.onDeactivated(() => {
|
1304
|
-
if (props.show) {
|
1304
|
+
if (props.show && props.teleport) {
|
1305
1305
|
close();
|
1306
1306
|
shouldReopen = true;
|
1307
1307
|
}
|
@@ -4729,6 +4729,9 @@ var stdin_default$17 = vue.defineComponent({
|
|
4729
4729
|
const months = vue.computed(() => {
|
4730
4730
|
const months2 = [];
|
4731
4731
|
const cursor = new Date(props.minDate);
|
4732
|
+
if (props.lazyRender && !props.show && props.poppable) {
|
4733
|
+
return months2;
|
4734
|
+
}
|
4732
4735
|
cursor.setDate(1);
|
4733
4736
|
do {
|
4734
4737
|
months2.push(new Date(cursor));
|
@@ -11357,7 +11360,7 @@ const pullRefreshProps = {
|
|
11357
11360
|
var stdin_default$l = vue.defineComponent({
|
11358
11361
|
name: name$g,
|
11359
11362
|
props: pullRefreshProps,
|
11360
|
-
emits: ["refresh", "update:modelValue"],
|
11363
|
+
emits: ["change", "refresh", "update:modelValue"],
|
11361
11364
|
setup(props, {
|
11362
11365
|
emit,
|
11363
11366
|
slots
|
@@ -11402,6 +11405,10 @@ var stdin_default$l = vue.defineComponent({
|
|
11402
11405
|
} else {
|
11403
11406
|
state.status = "loosing";
|
11404
11407
|
}
|
11408
|
+
emit("change", {
|
11409
|
+
status: state.status,
|
11410
|
+
distance
|
11411
|
+
});
|
11405
11412
|
};
|
11406
11413
|
const getStatusText = () => {
|
11407
11414
|
const {
|
@@ -14558,7 +14565,7 @@ const Lazyload = {
|
|
14558
14565
|
});
|
14559
14566
|
}
|
14560
14567
|
};
|
14561
|
-
const version = "3.5.
|
14568
|
+
const version = "3.5.1";
|
14562
14569
|
function install(app) {
|
14563
14570
|
const components = [
|
14564
14571
|
ActionBar,
|