vant 4.7.0 → 4.7.2
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 +4 -1
- package/es/cell-group/CellGroup.mjs +2 -1
- package/es/composables/use-scope-id.d.ts +3 -0
- package/es/composables/use-scope-id.mjs +9 -0
- package/es/dialog/function-call.d.ts +15 -0
- package/es/floating-panel/FloatingPanel.mjs +2 -2
- package/es/floating-panel/index.css +1 -1
- package/es/icon/index.css +1 -1
- package/es/image-preview/ImagePreview.d.ts +13 -0
- package/es/image-preview/ImagePreview.mjs +2 -0
- package/es/image-preview/ImagePreviewItem.d.ts +3 -0
- package/es/image-preview/ImagePreviewItem.mjs +16 -11
- package/es/image-preview/function-call.d.ts +3 -0
- package/es/image-preview/function-call.mjs +1 -0
- package/es/image-preview/index.d.ts +9 -0
- package/es/image-preview/types.d.ts +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/notify/function-call.d.ts +12 -0
- package/es/popover/Popover.mjs +2 -1
- package/es/popup/Popup.mjs +7 -5
- package/es/signature/Signature.mjs +34 -36
- package/es/swipe/Swipe.mjs +1 -1
- package/es/swipe/index.css +1 -1
- package/es/toast/function-call.d.ts +26 -0
- package/es/uploader/Uploader.mjs +12 -3
- package/lib/cell-group/CellGroup.js +2 -1
- package/lib/composables/use-scope-id.d.ts +3 -0
- package/lib/composables/use-scope-id.js +28 -0
- package/lib/dialog/function-call.d.ts +15 -0
- package/lib/floating-panel/FloatingPanel.js +2 -2
- package/lib/floating-panel/index.css +1 -1
- package/lib/icon/index.css +1 -1
- package/lib/image-preview/ImagePreview.d.ts +13 -0
- package/lib/image-preview/ImagePreview.js +2 -0
- package/lib/image-preview/ImagePreviewItem.d.ts +3 -0
- package/lib/image-preview/ImagePreviewItem.js +16 -11
- package/lib/image-preview/function-call.d.ts +3 -0
- package/lib/image-preview/function-call.js +1 -0
- package/lib/image-preview/index.d.ts +9 -0
- package/lib/image-preview/types.d.ts +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/notify/function-call.d.ts +12 -0
- package/lib/popover/Popover.js +2 -1
- package/lib/popup/Popup.js +6 -4
- package/lib/signature/Signature.js +33 -35
- package/lib/swipe/Swipe.js +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/toast/function-call.d.ts +26 -0
- package/lib/uploader/Uploader.js +11 -2
- package/lib/vant.cjs.js +79 -58
- package/lib/vant.es.js +79 -58
- package/lib/vant.js +79 -58
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +2 -2
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
required: true;
|
20
20
|
};
|
21
21
|
disableZoom: BooleanConstructor;
|
22
|
+
doubleScale: BooleanConstructor;
|
22
23
|
closeOnClickOverlay: BooleanConstructor;
|
23
24
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "scale" | "longPress")[], "close" | "scale" | "longPress", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
24
25
|
src: StringConstructor;
|
@@ -41,6 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
42
|
required: true;
|
42
43
|
};
|
43
44
|
disableZoom: BooleanConstructor;
|
45
|
+
doubleScale: BooleanConstructor;
|
44
46
|
closeOnClickOverlay: BooleanConstructor;
|
45
47
|
}>> & {
|
46
48
|
onClose?: ((...args: any[]) => any) | undefined;
|
@@ -50,5 +52,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
50
52
|
show: boolean;
|
51
53
|
closeOnClickOverlay: boolean;
|
52
54
|
disableZoom: boolean;
|
55
|
+
doubleScale: boolean;
|
53
56
|
}, {}>;
|
54
57
|
export default _default;
|
@@ -45,6 +45,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
45
45
|
rootWidth: (0, import_utils.makeRequiredProp)(Number),
|
46
46
|
rootHeight: (0, import_utils.makeRequiredProp)(Number),
|
47
47
|
disableZoom: Boolean,
|
48
|
+
doubleScale: Boolean,
|
48
49
|
closeOnClickOverlay: Boolean
|
49
50
|
},
|
50
51
|
emits: ["scale", "close", "longPress"],
|
@@ -218,18 +219,22 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
218
219
|
const TAP_TIME = 250;
|
219
220
|
if (offsetX.value < import_utils.TAP_OFFSET && offsetY.value < import_utils.TAP_OFFSET) {
|
220
221
|
if (deltaTime < TAP_TIME) {
|
221
|
-
if (
|
222
|
-
|
223
|
-
|
224
|
-
toggleScale();
|
225
|
-
} else {
|
226
|
-
if (!props.closeOnClickOverlay && event.target === ((_a = swipeItem.value) == null ? void 0 : _a.$el)) {
|
227
|
-
return;
|
228
|
-
}
|
229
|
-
doubleTapTimer = setTimeout(() => {
|
230
|
-
emit("close");
|
222
|
+
if (props.doubleScale) {
|
223
|
+
if (doubleTapTimer) {
|
224
|
+
clearTimeout(doubleTapTimer);
|
231
225
|
doubleTapTimer = null;
|
232
|
-
|
226
|
+
toggleScale();
|
227
|
+
} else {
|
228
|
+
if (!props.closeOnClickOverlay && event.target === ((_a = swipeItem.value) == null ? void 0 : _a.$el)) {
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
doubleTapTimer = setTimeout(() => {
|
232
|
+
emit("close");
|
233
|
+
doubleTapTimer = null;
|
234
|
+
}, TAP_TIME);
|
235
|
+
}
|
236
|
+
} else {
|
237
|
+
emit("close");
|
233
238
|
}
|
234
239
|
} else if (deltaTime > import_utils.LONG_PRESS_START_TIME) {
|
235
240
|
emit("longPress");
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { ComponentInstance } from '../utils';
|
2
2
|
import type { ImagePreviewOptions } from './types';
|
3
|
+
/**
|
4
|
+
* Display a full-screen image preview component
|
5
|
+
*/
|
3
6
|
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) => ComponentInstance | undefined;
|
@@ -33,6 +33,10 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
33
33
|
};
|
34
34
|
transition: StringConstructor;
|
35
35
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
36
|
+
doubleScale: {
|
37
|
+
type: BooleanConstructor;
|
38
|
+
default: true;
|
39
|
+
};
|
36
40
|
overlayClass: import("vue").PropType<unknown>;
|
37
41
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
38
42
|
swipeDuration: {
|
@@ -91,6 +95,10 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
91
95
|
};
|
92
96
|
transition: StringConstructor;
|
93
97
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
98
|
+
doubleScale: {
|
99
|
+
type: BooleanConstructor;
|
100
|
+
default: true;
|
101
|
+
};
|
94
102
|
overlayClass: import("vue").PropType<unknown>;
|
95
103
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
96
104
|
swipeDuration: {
|
@@ -136,6 +144,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
136
144
|
startPosition: string | number;
|
137
145
|
minZoom: string | number;
|
138
146
|
maxZoom: string | number;
|
147
|
+
doubleScale: boolean;
|
139
148
|
images: string[];
|
140
149
|
showIndex: boolean;
|
141
150
|
}, {}>>;
|