vant 4.8.5 → 4.8.7

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.
@@ -1,5 +1,6 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
2
  export type ActionSheetAction = {
3
+ icon?: string;
3
4
  name?: string;
4
5
  color?: string;
5
6
  subname?: string;
@@ -54,6 +54,14 @@ var stdin_default = defineComponent({
54
54
  }, [slots.cancel ? slots.cancel() : props.cancelText])];
55
55
  }
56
56
  };
57
+ const renderIcon = (action) => {
58
+ if (action.icon) {
59
+ return _createVNode(Icon, {
60
+ "class": bem("item-icon"),
61
+ "name": action.icon
62
+ }, null);
63
+ }
64
+ };
57
65
  const renderActionContent = (action, index) => {
58
66
  if (action.loading) {
59
67
  return _createVNode(Loading, {
@@ -102,7 +110,7 @@ var stdin_default = defineComponent({
102
110
  disabled
103
111
  }), className],
104
112
  "onClick": onClick
105
- }, [renderActionContent(action, index)]);
113
+ }, [renderIcon(action), renderActionContent(action, index)]);
106
114
  };
107
115
  const renderDescription = () => {
108
116
  if (props.description || slots.description) {
@@ -1 +1 @@
1
- :root,:host{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 48px;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: 22px;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: 22px}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:block;width:100%;padding:14px var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height)}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:20px var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}
1
+ :root,:host{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 48px;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-item-icon-size: 18px;--van-action-sheet-item-icon-margin-right: var(--van-padding-xs);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: 22px;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: 22px}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:14px var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__item-icon{font-size:var(--van-action-sheet-item-icon-size);margin-right:var(--van-action-sheet-item-icon-margin-right)}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{width:100%;margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height);overflow-wrap:break-word}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:20px var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}
@@ -23,6 +23,7 @@ export declare const imagePreviewProps: {
23
23
  type: BooleanConstructor;
24
24
  default: true;
25
25
  };
26
+ vertical: BooleanConstructor;
26
27
  closeable: BooleanConstructor;
27
28
  showIndex: {
28
29
  type: BooleanConstructor;
@@ -91,6 +92,7 @@ declare const _default: import("vue").DefineComponent<{
91
92
  type: BooleanConstructor;
92
93
  default: true;
93
94
  };
95
+ vertical: BooleanConstructor;
94
96
  closeable: BooleanConstructor;
95
97
  showIndex: {
96
98
  type: BooleanConstructor;
@@ -157,6 +159,7 @@ declare const _default: import("vue").DefineComponent<{
157
159
  type: BooleanConstructor;
158
160
  default: true;
159
161
  };
162
+ vertical: BooleanConstructor;
160
163
  closeable: BooleanConstructor;
161
164
  showIndex: {
162
165
  type: BooleanConstructor;
@@ -212,6 +215,7 @@ declare const _default: import("vue").DefineComponent<{
212
215
  loop: boolean;
213
216
  overlay: boolean;
214
217
  show: boolean;
218
+ vertical: boolean;
215
219
  closeOnClickOverlay: boolean;
216
220
  closeIcon: string;
217
221
  closeable: boolean;
@@ -16,6 +16,7 @@ const imagePreviewProps = {
16
16
  minZoom: makeNumericProp(1 / 3),
17
17
  maxZoom: makeNumericProp(3),
18
18
  overlay: truthProp,
19
+ vertical: Boolean,
19
20
  closeable: Boolean,
20
21
  showIndex: truthProp,
21
22
  className: unknownProp,
@@ -99,6 +100,7 @@ var stdin_default = defineComponent({
99
100
  "lazyRender": true,
100
101
  "loop": props.loop,
101
102
  "class": bem("swipe"),
103
+ "vertical": props.vertical,
102
104
  "duration": props.swipeDuration,
103
105
  "initialSwipe": props.startPosition,
104
106
  "showIndicators": props.showIndicators,
@@ -124,6 +126,7 @@ var stdin_default = defineComponent({
124
126
  "doubleScale": props.doubleScale,
125
127
  "closeOnClickImage": props.closeOnClickImage,
126
128
  "closeOnClickOverlay": props.closeOnClickOverlay,
129
+ "vertical": props.vertical,
127
130
  "onScale": emitScale,
128
131
  "onClose": emitClose,
129
132
  "onLongPress": () => emit("longPress", {
@@ -23,6 +23,7 @@ declare const imagePreviewItemProps: {
23
23
  doubleScale: BooleanConstructor;
24
24
  closeOnClickImage: BooleanConstructor;
25
25
  closeOnClickOverlay: BooleanConstructor;
26
+ vertical: BooleanConstructor;
26
27
  };
27
28
  export type ImagePreviewItemProps = ExtractPropTypes<typeof imagePreviewItemProps>;
28
29
  declare const _default: import("vue").DefineComponent<{
@@ -49,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
49
50
  doubleScale: BooleanConstructor;
50
51
  closeOnClickImage: BooleanConstructor;
51
52
  closeOnClickOverlay: BooleanConstructor;
53
+ vertical: BooleanConstructor;
52
54
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "scale" | "longPress")[], "close" | "scale" | "longPress", import("vue").PublicProps, Readonly<ExtractPropTypes<{
53
55
  src: StringConstructor;
54
56
  show: BooleanConstructor;
@@ -73,12 +75,14 @@ declare const _default: import("vue").DefineComponent<{
73
75
  doubleScale: BooleanConstructor;
74
76
  closeOnClickImage: BooleanConstructor;
75
77
  closeOnClickOverlay: BooleanConstructor;
78
+ vertical: BooleanConstructor;
76
79
  }>> & {
77
80
  onClose?: ((...args: any[]) => any) | undefined;
78
81
  onScale?: ((...args: any[]) => any) | undefined;
79
82
  onLongPress?: ((...args: any[]) => any) | undefined;
80
83
  }, {
81
84
  show: boolean;
85
+ vertical: boolean;
82
86
  closeOnClickOverlay: boolean;
83
87
  disableZoom: boolean;
84
88
  doubleScale: boolean;
@@ -25,7 +25,8 @@ const imagePreviewItemProps = {
25
25
  disableZoom: Boolean,
26
26
  doubleScale: Boolean,
27
27
  closeOnClickImage: Boolean,
28
- closeOnClickOverlay: Boolean
28
+ closeOnClickOverlay: Boolean,
29
+ vertical: Boolean
29
30
  };
30
31
  var stdin_default = defineComponent({
31
32
  props: imagePreviewItemProps,
@@ -168,7 +169,7 @@ var stdin_default = defineComponent({
168
169
  } = touch;
169
170
  const moveX = deltaX.value + startMoveX;
170
171
  const moveY = deltaY.value + startMoveY;
171
- if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved && touch.isHorizontal()) {
172
+ if ((props.vertical ? touch.isVertical() && Math.abs(moveY) > maxMoveY.value : touch.isHorizontal() && Math.abs(moveX) > maxMoveX.value) && !isImageMoved) {
172
173
  state.moving = false;
173
174
  return;
174
175
  }
@@ -11,6 +11,7 @@ const defaultConfig = {
11
11
  onScale: void 0,
12
12
  onClose: void 0,
13
13
  onChange: void 0,
14
+ vertical: false,
14
15
  teleport: "body",
15
16
  className: "",
16
17
  showIndex: true,
@@ -21,6 +21,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
21
21
  type: BooleanConstructor;
22
22
  default: true;
23
23
  };
24
+ vertical: BooleanConstructor;
24
25
  closeable: BooleanConstructor;
25
26
  showIndex: {
26
27
  type: BooleanConstructor;
@@ -87,6 +88,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
87
88
  type: BooleanConstructor;
88
89
  default: true;
89
90
  };
91
+ vertical: BooleanConstructor;
90
92
  closeable: BooleanConstructor;
91
93
  showIndex: {
92
94
  type: BooleanConstructor;
@@ -142,6 +144,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
142
144
  loop: boolean;
143
145
  overlay: boolean;
144
146
  show: boolean;
147
+ vertical: boolean;
145
148
  closeOnClickOverlay: boolean;
146
149
  closeIcon: string;
147
150
  closeable: boolean;
@@ -9,6 +9,7 @@ export type ImagePreviewOptions = {
9
9
  images: string[];
10
10
  maxZoom?: number;
11
11
  minZoom?: number;
12
+ vertical?: boolean;
12
13
  teleport?: TeleportProps['to'];
13
14
  className?: unknown;
14
15
  showIndex?: boolean;
package/es/index.d.ts CHANGED
@@ -106,4 +106,4 @@ declare namespace _default {
106
106
  }
107
107
  export default _default;
108
108
  export function install(app: any): void;
109
- export const version: "4.8.5";
109
+ export const version: "4.8.7";
package/es/index.mjs CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
99
99
  import { TreeSelect } from "./tree-select/index.mjs";
100
100
  import { Uploader } from "./uploader/index.mjs";
101
101
  import { Watermark } from "./watermark/index.mjs";
102
- const version = "4.8.5";
102
+ const version = "4.8.7";
103
103
  function install(app) {
104
104
  const components = [
105
105
  ActionBar,
@@ -126,7 +126,9 @@ var stdin_default = defineComponent({
126
126
  watch(windowWidth, resize);
127
127
  onMounted(initialize);
128
128
  useExpose({
129
- resize
129
+ resize,
130
+ clear,
131
+ submit
130
132
  });
131
133
  return () => _createVNode("div", {
132
134
  "class": bem()
@@ -2,6 +2,8 @@ import type { ComponentPublicInstance } from 'vue';
2
2
  import type { SignatureProps } from './Signature';
3
3
  export type SignatureExpose = {
4
4
  resize: () => void;
5
+ clear: () => void;
6
+ submit: () => void;
5
7
  };
6
8
  export type SignatureInstance = ComponentPublicInstance<SignatureProps, SignatureExpose>;
7
9
  export type SignatureThemeVars = {
@@ -1,5 +1,6 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
2
  export type ActionSheetAction = {
3
+ icon?: string;
3
4
  name?: string;
4
5
  color?: string;
5
6
  subname?: string;
@@ -77,6 +77,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
77
77
  }, [slots.cancel ? slots.cancel() : props.cancelText])];
78
78
  }
79
79
  };
80
+ const renderIcon = (action) => {
81
+ if (action.icon) {
82
+ return (0, import_vue.createVNode)(import_icon.Icon, {
83
+ "class": bem("item-icon"),
84
+ "name": action.icon
85
+ }, null);
86
+ }
87
+ };
80
88
  const renderActionContent = (action, index) => {
81
89
  if (action.loading) {
82
90
  return (0, import_vue.createVNode)(import_loading.Loading, {
@@ -125,7 +133,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
125
133
  disabled
126
134
  }), className],
127
135
  "onClick": onClick
128
- }, [renderActionContent(action, index)]);
136
+ }, [renderIcon(action), renderActionContent(action, index)]);
129
137
  };
130
138
  const renderDescription = () => {
131
139
  if (props.description || slots.description) {
@@ -1 +1 @@
1
- :root,:host{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 48px;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: 22px;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: 22px}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:block;width:100%;padding:14px var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height)}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:20px var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}
1
+ :root,:host{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 48px;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-item-icon-size: 18px;--van-action-sheet-item-icon-margin-right: var(--van-padding-xs);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: 22px;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: 22px}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:14px var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__item-icon{font-size:var(--van-action-sheet-item-icon-size);margin-right:var(--van-action-sheet-item-icon-margin-right)}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{width:100%;margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height);overflow-wrap:break-word}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:20px var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}
@@ -23,6 +23,7 @@ export declare const imagePreviewProps: {
23
23
  type: BooleanConstructor;
24
24
  default: true;
25
25
  };
26
+ vertical: BooleanConstructor;
26
27
  closeable: BooleanConstructor;
27
28
  showIndex: {
28
29
  type: BooleanConstructor;
@@ -91,6 +92,7 @@ declare const _default: import("vue").DefineComponent<{
91
92
  type: BooleanConstructor;
92
93
  default: true;
93
94
  };
95
+ vertical: BooleanConstructor;
94
96
  closeable: BooleanConstructor;
95
97
  showIndex: {
96
98
  type: BooleanConstructor;
@@ -157,6 +159,7 @@ declare const _default: import("vue").DefineComponent<{
157
159
  type: BooleanConstructor;
158
160
  default: true;
159
161
  };
162
+ vertical: BooleanConstructor;
160
163
  closeable: BooleanConstructor;
161
164
  showIndex: {
162
165
  type: BooleanConstructor;
@@ -212,6 +215,7 @@ declare const _default: import("vue").DefineComponent<{
212
215
  loop: boolean;
213
216
  overlay: boolean;
214
217
  show: boolean;
218
+ vertical: boolean;
215
219
  closeOnClickOverlay: boolean;
216
220
  closeIcon: string;
217
221
  closeable: boolean;
@@ -49,6 +49,7 @@ const imagePreviewProps = {
49
49
  minZoom: (0, import_utils.makeNumericProp)(1 / 3),
50
50
  maxZoom: (0, import_utils.makeNumericProp)(3),
51
51
  overlay: import_utils.truthProp,
52
+ vertical: Boolean,
52
53
  closeable: Boolean,
53
54
  showIndex: import_utils.truthProp,
54
55
  className: import_utils.unknownProp,
@@ -132,6 +133,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
132
133
  "lazyRender": true,
133
134
  "loop": props.loop,
134
135
  "class": bem("swipe"),
136
+ "vertical": props.vertical,
135
137
  "duration": props.swipeDuration,
136
138
  "initialSwipe": props.startPosition,
137
139
  "showIndicators": props.showIndicators,
@@ -157,6 +159,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
157
159
  "doubleScale": props.doubleScale,
158
160
  "closeOnClickImage": props.closeOnClickImage,
159
161
  "closeOnClickOverlay": props.closeOnClickOverlay,
162
+ "vertical": props.vertical,
160
163
  "onScale": emitScale,
161
164
  "onClose": emitClose,
162
165
  "onLongPress": () => emit("longPress", {
@@ -23,6 +23,7 @@ declare const imagePreviewItemProps: {
23
23
  doubleScale: BooleanConstructor;
24
24
  closeOnClickImage: BooleanConstructor;
25
25
  closeOnClickOverlay: BooleanConstructor;
26
+ vertical: BooleanConstructor;
26
27
  };
27
28
  export type ImagePreviewItemProps = ExtractPropTypes<typeof imagePreviewItemProps>;
28
29
  declare const _default: import("vue").DefineComponent<{
@@ -49,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
49
50
  doubleScale: BooleanConstructor;
50
51
  closeOnClickImage: BooleanConstructor;
51
52
  closeOnClickOverlay: BooleanConstructor;
53
+ vertical: BooleanConstructor;
52
54
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "scale" | "longPress")[], "close" | "scale" | "longPress", import("vue").PublicProps, Readonly<ExtractPropTypes<{
53
55
  src: StringConstructor;
54
56
  show: BooleanConstructor;
@@ -73,12 +75,14 @@ declare const _default: import("vue").DefineComponent<{
73
75
  doubleScale: BooleanConstructor;
74
76
  closeOnClickImage: BooleanConstructor;
75
77
  closeOnClickOverlay: BooleanConstructor;
78
+ vertical: BooleanConstructor;
76
79
  }>> & {
77
80
  onClose?: ((...args: any[]) => any) | undefined;
78
81
  onScale?: ((...args: any[]) => any) | undefined;
79
82
  onLongPress?: ((...args: any[]) => any) | undefined;
80
83
  }, {
81
84
  show: boolean;
85
+ vertical: boolean;
82
86
  closeOnClickOverlay: boolean;
83
87
  disableZoom: boolean;
84
88
  doubleScale: boolean;
@@ -47,7 +47,8 @@ const imagePreviewItemProps = {
47
47
  disableZoom: Boolean,
48
48
  doubleScale: Boolean,
49
49
  closeOnClickImage: Boolean,
50
- closeOnClickOverlay: Boolean
50
+ closeOnClickOverlay: Boolean,
51
+ vertical: Boolean
51
52
  };
52
53
  var stdin_default = (0, import_vue2.defineComponent)({
53
54
  props: imagePreviewItemProps,
@@ -190,7 +191,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
190
191
  } = touch;
191
192
  const moveX = deltaX.value + startMoveX;
192
193
  const moveY = deltaY.value + startMoveY;
193
- if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved && touch.isHorizontal()) {
194
+ if ((props.vertical ? touch.isVertical() && Math.abs(moveY) > maxMoveY.value : touch.isHorizontal() && Math.abs(moveX) > maxMoveX.value) && !isImageMoved) {
194
195
  state.moving = false;
195
196
  return;
196
197
  }
@@ -43,6 +43,7 @@ const defaultConfig = {
43
43
  onScale: void 0,
44
44
  onClose: void 0,
45
45
  onChange: void 0,
46
+ vertical: false,
46
47
  teleport: "body",
47
48
  className: "",
48
49
  showIndex: true,
@@ -21,6 +21,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
21
21
  type: BooleanConstructor;
22
22
  default: true;
23
23
  };
24
+ vertical: BooleanConstructor;
24
25
  closeable: BooleanConstructor;
25
26
  showIndex: {
26
27
  type: BooleanConstructor;
@@ -87,6 +88,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
87
88
  type: BooleanConstructor;
88
89
  default: true;
89
90
  };
91
+ vertical: BooleanConstructor;
90
92
  closeable: BooleanConstructor;
91
93
  showIndex: {
92
94
  type: BooleanConstructor;
@@ -142,6 +144,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
142
144
  loop: boolean;
143
145
  overlay: boolean;
144
146
  show: boolean;
147
+ vertical: boolean;
145
148
  closeOnClickOverlay: boolean;
146
149
  closeIcon: string;
147
150
  closeable: boolean;
@@ -9,6 +9,7 @@ export type ImagePreviewOptions = {
9
9
  images: string[];
10
10
  maxZoom?: number;
11
11
  minZoom?: number;
12
+ vertical?: boolean;
12
13
  teleport?: TeleportProps['to'];
13
14
  className?: unknown;
14
15
  showIndex?: boolean;