vant 4.8.2 → 4.8.4
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/dropdown-menu/DropdownMenu.mjs +2 -2
- package/es/icon/index.css +1 -1
- package/es/image/Image.d.ts +6 -8
- package/es/image/index.d.ts +6 -6
- package/es/image/types.d.ts +3 -0
- package/es/image-preview/ImagePreview.d.ts +13 -0
- package/es/image-preview/ImagePreview.mjs +2 -0
- package/es/image-preview/ImagePreviewItem.d.ts +4 -0
- package/es/image-preview/ImagePreviewItem.mjs +7 -1
- 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/Notify.mjs +5 -8
- package/es/picker/PickerToolbar.mjs +10 -2
- package/es/tab/TabTitle.d.ts +1 -1
- package/es/tabs/index.css +1 -1
- package/es/text-ellipsis/TextEllipsis.mjs +11 -5
- package/es/toast/Toast.d.ts +3 -0
- package/es/toast/Toast.mjs +3 -2
- package/es/toast/index.d.ts +2 -0
- package/es/toast/types.d.ts +3 -2
- package/es/uploader/Uploader.d.ts +7 -8
- package/es/uploader/UploaderPreviewItem.d.ts +2 -3
- package/es/uploader/index.d.ts +5 -5
- package/es/utils/constant.d.ts +7 -7
- package/lib/dropdown-menu/DropdownMenu.js +1 -1
- package/lib/icon/index.css +1 -1
- package/lib/image/Image.d.ts +6 -8
- package/lib/image/index.d.ts +6 -6
- package/lib/image/types.d.ts +3 -0
- package/lib/image-preview/ImagePreview.d.ts +13 -0
- package/lib/image-preview/ImagePreview.js +2 -0
- package/lib/image-preview/ImagePreviewItem.d.ts +4 -0
- package/lib/image-preview/ImagePreviewItem.js +7 -1
- 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/Notify.js +3 -6
- package/lib/picker/PickerToolbar.js +10 -2
- package/lib/tab/TabTitle.d.ts +1 -1
- package/lib/tabs/index.css +1 -1
- package/lib/text-ellipsis/TextEllipsis.js +11 -5
- package/lib/toast/Toast.d.ts +3 -0
- package/lib/toast/Toast.js +3 -2
- package/lib/toast/index.d.ts +2 -0
- package/lib/toast/types.d.ts +3 -2
- package/lib/uploader/Uploader.d.ts +7 -8
- package/lib/uploader/UploaderPreviewItem.d.ts +2 -3
- package/lib/uploader/index.d.ts +5 -5
- package/lib/utils/constant.d.ts +7 -7
- package/lib/vant.cjs.js +39 -19
- package/lib/vant.es.js +40 -20
- package/lib/vant.js +45 -22
- package/lib/vant.min.js +6 -1
- package/lib/web-types.json +1 -1
- package/package.json +10 -9
@@ -46,6 +46,7 @@ const imagePreviewItemProps = {
|
|
46
46
|
rootHeight: (0, import_utils.makeRequiredProp)(Number),
|
47
47
|
disableZoom: Boolean,
|
48
48
|
doubleScale: Boolean,
|
49
|
+
closeOnClickImage: Boolean,
|
49
50
|
closeOnClickOverlay: Boolean
|
50
51
|
};
|
51
52
|
var stdin_default = (0, import_vue2.defineComponent)({
|
@@ -210,7 +211,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
210
211
|
};
|
211
212
|
const checkClose = (event) => {
|
212
213
|
var _a;
|
213
|
-
const
|
214
|
+
const swipeItemEl = (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
215
|
+
const imageEl = swipeItemEl.firstElementChild;
|
216
|
+
const isClickOverlay = event.target === swipeItemEl;
|
217
|
+
const isClickImage = imageEl == null ? void 0 : imageEl.contains(event.target);
|
218
|
+
if (!props.closeOnClickImage && isClickImage)
|
219
|
+
return;
|
214
220
|
if (!props.closeOnClickOverlay && isClickOverlay)
|
215
221
|
return;
|
216
222
|
emit("close");
|
@@ -52,6 +52,10 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
52
52
|
type: BooleanConstructor;
|
53
53
|
default: true;
|
54
54
|
};
|
55
|
+
closeOnClickImage: {
|
56
|
+
type: BooleanConstructor;
|
57
|
+
default: true;
|
58
|
+
};
|
55
59
|
closeOnClickOverlay: {
|
56
60
|
type: BooleanConstructor;
|
57
61
|
default: true;
|
@@ -114,6 +118,10 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
114
118
|
type: BooleanConstructor;
|
115
119
|
default: true;
|
116
120
|
};
|
121
|
+
closeOnClickImage: {
|
122
|
+
type: BooleanConstructor;
|
123
|
+
default: true;
|
124
|
+
};
|
117
125
|
closeOnClickOverlay: {
|
118
126
|
type: BooleanConstructor;
|
119
127
|
default: true;
|
@@ -145,6 +153,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
|
|
145
153
|
minZoom: string | number;
|
146
154
|
maxZoom: string | number;
|
147
155
|
doubleScale: boolean;
|
156
|
+
closeOnClickImage: boolean;
|
148
157
|
images: string[];
|
149
158
|
showIndex: boolean;
|
150
159
|
}, {}>>;
|