vant 4.0.8 → 4.0.9

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.
Files changed (46) hide show
  1. package/es/back-top/BackTop.d.ts +4 -0
  2. package/es/back-top/BackTop.mjs +2 -1
  3. package/es/back-top/index.d.ts +3 -0
  4. package/es/calendar/Calendar.mjs +1 -1
  5. package/es/calendar/CalendarMonth.mjs +4 -1
  6. package/es/image-preview/ImagePreview.mjs +13 -3
  7. package/es/image-preview/ImagePreviewItem.d.ts +3 -0
  8. package/es/image-preview/ImagePreviewItem.mjs +21 -9
  9. package/es/index.d.ts +1 -1
  10. package/es/index.mjs +1 -1
  11. package/es/locale/index.d.ts +1 -0
  12. package/es/locale/index.mjs +3 -1
  13. package/es/locale/lang/eo-EO.d.ts +62 -0
  14. package/es/locale/lang/eo-EO.mjs +64 -0
  15. package/es/locale/lang/it-IT.mjs +12 -12
  16. package/es/slider/Slider.d.ts +2 -2
  17. package/es/slider/index.d.ts +2 -2
  18. package/es/swipe/Swipe.d.ts +3 -1
  19. package/es/swipe/Swipe.mjs +10 -2
  20. package/es/swipe/index.d.ts +3 -1
  21. package/lib/back-top/BackTop.d.ts +4 -0
  22. package/lib/back-top/BackTop.js +2 -1
  23. package/lib/back-top/index.d.ts +3 -0
  24. package/lib/calendar/Calendar.js +1 -1
  25. package/lib/calendar/CalendarMonth.js +4 -1
  26. package/lib/image-preview/ImagePreview.js +13 -3
  27. package/lib/image-preview/ImagePreviewItem.d.ts +3 -0
  28. package/lib/image-preview/ImagePreviewItem.js +21 -9
  29. package/lib/index.d.ts +1 -1
  30. package/lib/index.js +1 -1
  31. package/lib/locale/index.d.ts +1 -0
  32. package/lib/locale/index.js +3 -1
  33. package/lib/locale/lang/eo-EO.d.ts +62 -0
  34. package/lib/locale/lang/eo-EO.js +83 -0
  35. package/lib/locale/lang/it-IT.js +12 -12
  36. package/lib/slider/Slider.d.ts +2 -2
  37. package/lib/slider/index.d.ts +2 -2
  38. package/lib/swipe/Swipe.d.ts +3 -1
  39. package/lib/swipe/Swipe.js +10 -2
  40. package/lib/swipe/index.d.ts +3 -1
  41. package/lib/vant.cjs.js +54 -18
  42. package/lib/vant.es.js +54 -18
  43. package/lib/vant.js +54 -18
  44. package/lib/vant.min.js +1 -1
  45. package/lib/web-types.json +1 -1
  46. package/package.json +1 -1
@@ -159,7 +159,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
159
159
  if (props.showMonthTitle) {
160
160
  return (0, import_vue.createVNode)("div", {
161
161
  "class": (0, import_utils3.bem)("month-title")
162
- }, [title.value]);
162
+ }, [slots["month-title"] ? slots["month-title"]({
163
+ date: props.date,
164
+ text: title.value
165
+ }) : title.value]);
163
166
  }
164
167
  };
165
168
  const renderMark = () => {
@@ -37,7 +37,7 @@ var import_swipe = require("../swipe");
37
37
  var import_popup = require("../popup");
38
38
  var import_ImagePreviewItem = __toESM(require("./ImagePreviewItem"));
39
39
  const [name, bem] = (0, import_utils.createNamespace)("image-preview");
40
- const popupProps = ["show", "transition", "overlayStyle", "closeOnPopstate", "teleport"];
40
+ const popupProps = ["show", "teleport", "transition", "overlayStyle", "closeOnPopstate"];
41
41
  const imagePreviewProps = {
42
42
  show: Boolean,
43
43
  loop: import_utils.truthProp,
@@ -72,7 +72,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
72
72
  const state = (0, import_vue2.reactive)({
73
73
  active: 0,
74
74
  rootWidth: 0,
75
- rootHeight: 0
75
+ rootHeight: 0,
76
+ disableZoom: false
76
77
  });
77
78
  const resize = () => {
78
79
  if (swipeRef.value) {
@@ -112,6 +113,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
112
113
  }, [slots.cover()]);
113
114
  }
114
115
  };
116
+ const onDragStart = () => {
117
+ state.disableZoom = true;
118
+ };
119
+ const onDragEnd = () => {
120
+ state.disableZoom = false;
121
+ };
115
122
  const renderImages = () => (0, import_vue.createVNode)(import_swipe.Swipe, {
116
123
  "ref": swipeRef,
117
124
  "lazyRender": true,
@@ -121,7 +128,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
121
128
  "initialSwipe": props.startPosition,
122
129
  "showIndicators": props.showIndicators,
123
130
  "indicatorColor": "white",
124
- "onChange": setActive
131
+ "onChange": setActive,
132
+ "onDragEnd": onDragEnd,
133
+ "onDragStart": onDragStart
125
134
  }, {
126
135
  default: () => [props.images.map((image, index) => (0, import_vue.createVNode)(import_ImagePreviewItem.default, {
127
136
  "src": image,
@@ -131,6 +140,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
131
140
  "minZoom": props.minZoom,
132
141
  "rootWidth": state.rootWidth,
133
142
  "rootHeight": state.rootHeight,
143
+ "disableZoom": state.disableZoom,
134
144
  "onScale": emitScale,
135
145
  "onClose": emitClose,
136
146
  "onLongPress": () => emit("longPress", {
@@ -18,6 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  type: NumberConstructor;
19
19
  required: true;
20
20
  };
21
+ disableZoom: BooleanConstructor;
21
22
  }, () => 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<{
22
23
  src: StringConstructor;
23
24
  show: BooleanConstructor;
@@ -38,11 +39,13 @@ declare const _default: import("vue").DefineComponent<{
38
39
  type: NumberConstructor;
39
40
  required: true;
40
41
  };
42
+ disableZoom: BooleanConstructor;
41
43
  }>> & {
42
44
  onClose?: ((...args: any[]) => any) | undefined;
43
45
  onScale?: ((...args: any[]) => any) | undefined;
44
46
  onLongPress?: ((...args: any[]) => any) | undefined;
45
47
  }, {
46
48
  show: boolean;
49
+ disableZoom: boolean;
47
50
  }>;
48
51
  export default _default;
@@ -38,7 +38,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
38
38
  minZoom: (0, import_utils.makeRequiredProp)(import_utils.numericProp),
39
39
  maxZoom: (0, import_utils.makeRequiredProp)(import_utils.numericProp),
40
40
  rootWidth: (0, import_utils.makeRequiredProp)(Number),
41
- rootHeight: (0, import_utils.makeRequiredProp)(Number)
41
+ rootHeight: (0, import_utils.makeRequiredProp)(Number),
42
+ disableZoom: Boolean
42
43
  },
43
44
  emits: ["scale", "close", "longPress"],
44
45
  setup(props, {
@@ -133,18 +134,23 @@ var stdin_default = (0, import_vue2.defineComponent)({
133
134
  let startDistance;
134
135
  let doubleTapTimer;
135
136
  let touchStartTime;
137
+ let isImageMoved = false;
136
138
  const onTouchStart = (event) => {
137
139
  const {
138
140
  touches
139
141
  } = event;
142
+ fingerNum = touches.length;
143
+ if (fingerNum === 2 && props.disableZoom) {
144
+ return;
145
+ }
140
146
  const {
141
147
  offsetX
142
148
  } = touch;
143
149
  touch.start(event);
144
- fingerNum = touches.length;
145
150
  startMoveX = state.moveX;
146
151
  startMoveY = state.moveY;
147
152
  touchStartTime = Date.now();
153
+ isImageMoved = false;
148
154
  state.moving = fingerNum === 1 && state.scale !== 1;
149
155
  state.zooming = fingerNum === 2 && !offsetX.value;
150
156
  if (state.zooming) {
@@ -157,9 +163,6 @@ var stdin_default = (0, import_vue2.defineComponent)({
157
163
  touches
158
164
  } = event;
159
165
  touch.move(event);
160
- if (state.moving || state.zooming) {
161
- (0, import_utils.preventDefault)(event, true);
162
- }
163
166
  if (state.moving) {
164
167
  const {
165
168
  deltaX,
@@ -167,13 +170,22 @@ var stdin_default = (0, import_vue2.defineComponent)({
167
170
  } = touch;
168
171
  const moveX = deltaX.value + startMoveX;
169
172
  const moveY = deltaY.value + startMoveY;
173
+ if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved) {
174
+ state.moving = false;
175
+ return;
176
+ }
177
+ isImageMoved = true;
178
+ (0, import_utils.preventDefault)(event, true);
170
179
  state.moveX = (0, import_utils.clamp)(moveX, -maxMoveX.value, maxMoveX.value);
171
180
  state.moveY = (0, import_utils.clamp)(moveY, -maxMoveY.value, maxMoveY.value);
172
181
  }
173
- if (state.zooming && touches.length === 2) {
174
- const distance = getDistance(touches);
175
- const scale = startScale * distance / startDistance;
176
- setScale(scale);
182
+ if (state.zooming) {
183
+ (0, import_utils.preventDefault)(event, true);
184
+ if (touches.length === 2) {
185
+ const distance = getDistance(touches);
186
+ const scale = startScale * distance / startDistance;
187
+ setScale(scale);
188
+ }
177
189
  }
178
190
  };
179
191
  const checkTap = () => {
package/lib/index.d.ts CHANGED
@@ -98,4 +98,4 @@ declare namespace _default {
98
98
  }
99
99
  export default _default;
100
100
  export function install(app: any): void;
101
- export const version: "4.0.8";
101
+ export const version: "4.0.9";
package/lib/index.js CHANGED
@@ -210,7 +210,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
210
210
  __reExport(stdin_exports, require("./toast"), module.exports);
211
211
  __reExport(stdin_exports, require("./tree-select"), module.exports);
212
212
  __reExport(stdin_exports, require("./uploader"), module.exports);
213
- const version = "4.0.8";
213
+ const version = "4.0.9";
214
214
  function install(app) {
215
215
  const components = [
216
216
  import_action_bar.ActionBar,
@@ -4,4 +4,5 @@ export declare const Locale: {
4
4
  use(newLang: string, newMessages?: Message): void;
5
5
  add(newMessages?: Message): void;
6
6
  };
7
+ export declare const useCurrentLang: () => import("vue").Ref<string>;
7
8
  export default Locale;
@@ -24,7 +24,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
24
24
  var stdin_exports = {};
25
25
  __export(stdin_exports, {
26
26
  Locale: () => Locale,
27
- default: () => stdin_default
27
+ default: () => stdin_default,
28
+ useCurrentLang: () => useCurrentLang
28
29
  });
29
30
  module.exports = __toCommonJS(stdin_exports);
30
31
  var import_vue = require("vue");
@@ -46,4 +47,5 @@ const Locale = {
46
47
  (0, import_deep_assign.deepAssign)(messages, newMessages);
47
48
  }
48
49
  };
50
+ const useCurrentLang = () => lang;
49
51
  var stdin_default = Locale;
@@ -0,0 +1,62 @@
1
+ declare const _default: {
2
+ name: string;
3
+ tel: string;
4
+ save: string;
5
+ confirm: string;
6
+ cancel: string;
7
+ delete: string;
8
+ loading: string;
9
+ noCoupon: string;
10
+ nameEmpty: string;
11
+ addContact: string;
12
+ telInvalid: string;
13
+ vanCalendar: {
14
+ end: string;
15
+ start: string;
16
+ title: string;
17
+ weekdays: string[];
18
+ monthTitle: (year: number, month: number) => string;
19
+ rangePrompt: (maxRange: number) => string;
20
+ };
21
+ vanCascader: {
22
+ select: string;
23
+ };
24
+ vanPagination: {
25
+ prev: string;
26
+ next: string;
27
+ };
28
+ vanPullRefresh: {
29
+ pulling: string;
30
+ loosing: string;
31
+ };
32
+ vanSubmitBar: {
33
+ label: string;
34
+ };
35
+ vanCoupon: {
36
+ unlimited: string;
37
+ discount: (discount: number) => string;
38
+ condition: (condition: number) => string;
39
+ };
40
+ vanCouponCell: {
41
+ title: string;
42
+ count: (count: number) => string;
43
+ };
44
+ vanCouponList: {
45
+ exchange: string;
46
+ close: string;
47
+ enable: string;
48
+ disabled: string;
49
+ placeholder: string;
50
+ };
51
+ vanAddressEdit: {
52
+ area: string;
53
+ areaEmpty: string;
54
+ addressEmpty: string;
55
+ addressDetail: string;
56
+ defaultAddress: string;
57
+ };
58
+ vanAddressList: {
59
+ add: string;
60
+ };
61
+ };
62
+ export default _default;
@@ -0,0 +1,83 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ default: () => stdin_default
21
+ });
22
+ module.exports = __toCommonJS(stdin_exports);
23
+ var stdin_default = {
24
+ name: "Nomo",
25
+ tel: "Telefonnumero",
26
+ save: "Konservi",
27
+ confirm: "Konfirmi",
28
+ cancel: "Rezigni",
29
+ delete: "Forigi",
30
+ loading: "Bonvolu atendi...",
31
+ noCoupon: "Neniu kupono",
32
+ nameEmpty: "Plenigu la nomon",
33
+ addContact: "Aldoni kontakton",
34
+ telInvalid: "Nevalida telefonnumero",
35
+ vanCalendar: {
36
+ end: "Fino",
37
+ start: "Komenco",
38
+ title: "Kalendaro",
39
+ weekdays: ["Dim", "Lun", "Mar", "Mer", "\u0134a\u016D", "Ven", "Sab"],
40
+ monthTitle: (year, month) => `${year}/${month}`,
41
+ rangePrompt: (maxRange) => `Elektu maksimume ${maxRange} tagojn`
42
+ },
43
+ vanCascader: {
44
+ select: "Elekti"
45
+ },
46
+ vanPagination: {
47
+ prev: "Anta\u016Da",
48
+ next: "Sekva"
49
+ },
50
+ vanPullRefresh: {
51
+ pulling: "Tiri por refre\u015Digi...",
52
+ loosing: "Lasi por refre\u015Digi..."
53
+ },
54
+ vanSubmitBar: {
55
+ label: "Sumo:"
56
+ },
57
+ vanCoupon: {
58
+ unlimited: "Senlima",
59
+ discount: (discount) => `${discount * 10}%-a rabato`,
60
+ condition: (condition) => `Minimume ${condition}`
61
+ },
62
+ vanCouponCell: {
63
+ title: "Kupono",
64
+ count: (count) => `Vi havas ${count} kuponojn`
65
+ },
66
+ vanCouponList: {
67
+ exchange: "Inter\u015Dan\u011Di",
68
+ close: "Fermi",
69
+ enable: "Disponebla",
70
+ disabled: "Nedisponebla",
71
+ placeholder: "Kupon-kodo"
72
+ },
73
+ vanAddressEdit: {
74
+ area: "Areo",
75
+ areaEmpty: "Elektu ricevan areon",
76
+ addressEmpty: "La adreso ne povas esti malplena",
77
+ addressDetail: "Adreso",
78
+ defaultAddress: "Agordi kiel defa\u016Dltan adreson"
79
+ },
80
+ vanAddressList: {
81
+ add: "Aldoni novan adreson"
82
+ }
83
+ };
@@ -31,19 +31,19 @@ var stdin_default = {
31
31
  noCoupon: "Nessun coupon",
32
32
  nameEmpty: "Inserisci il nome",
33
33
  addContact: "Aggiungi contatto",
34
- telInvalid: "Numero di telefono errato",
34
+ telInvalid: "Numero di telefono non valido",
35
35
  vanCalendar: {
36
36
  end: "Fine",
37
37
  start: "Inizio",
38
38
  title: "Calendario",
39
39
  weekdays: [
40
- "domenica",
41
- "Lunedi",
42
- "Marted\xEC",
43
- "mercoled\xEC",
44
- "gioved\xEC",
45
- "venerd\xEC",
46
- "Sabato"
40
+ "dom",
41
+ "lun",
42
+ "mar",
43
+ "mer",
44
+ "gio",
45
+ "ven",
46
+ "sab"
47
47
  ],
48
48
  monthTitle: (year, month) => `${year}/${month}`,
49
49
  rangePrompt: (maxRange) => `Scegli non pi\xF9 di ${maxRange} giorni`
@@ -53,11 +53,11 @@ var stdin_default = {
53
53
  },
54
54
  vanPagination: {
55
55
  prev: "Precedente",
56
- next: "Avanti"
56
+ next: "Successivo"
57
57
  },
58
58
  vanPullRefresh: {
59
- pulling: "Tiri per aggiornare...",
60
- loosing: "Largo per rinfrescare..."
59
+ pulling: "Tira per aggiornare...",
60
+ loosing: "Rilascia per aggiornare..."
61
61
  },
62
62
  vanSubmitBar: {
63
63
  label: "Totale:"
@@ -68,7 +68,7 @@ var stdin_default = {
68
68
  condition: (condition) => `Almeno ${condition}`
69
69
  },
70
70
  vanCouponCell: {
71
- title: "Buono",
71
+ title: "Coupon",
72
72
  count: (count) => `Hai ${count} coupon`
73
73
  },
74
74
  vanCouponList: {
@@ -55,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
55
55
  type: PropType<SliderValue>;
56
56
  default: number;
57
57
  };
58
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "dragEnd" | "dragStart")[], "update:modelValue" | "change" | "dragEnd" | "dragStart", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
58
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "dragStart" | "dragEnd")[], "update:modelValue" | "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
59
59
  min: {
60
60
  type: (NumberConstructor | StringConstructor)[];
61
61
  default: number;
@@ -84,8 +84,8 @@ declare const _default: import("vue").DefineComponent<{
84
84
  }>> & {
85
85
  onChange?: ((...args: any[]) => any) | undefined;
86
86
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
87
- onDragEnd?: ((...args: any[]) => any) | undefined;
88
87
  onDragStart?: ((...args: any[]) => any) | undefined;
88
+ onDragEnd?: ((...args: any[]) => any) | undefined;
89
89
  }, {
90
90
  range: boolean;
91
91
  max: string | number;
@@ -24,7 +24,7 @@ export declare const Slider: import("../utils").WithInstall<import("vue").Define
24
24
  type: import("vue").PropType<number | [number, number]>;
25
25
  default: number;
26
26
  };
27
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "dragEnd" | "dragStart")[], "update:modelValue" | "change" | "dragEnd" | "dragStart", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "dragStart" | "dragEnd")[], "update:modelValue" | "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
28
28
  min: {
29
29
  type: (NumberConstructor | StringConstructor)[];
30
30
  default: number;
@@ -53,8 +53,8 @@ export declare const Slider: import("../utils").WithInstall<import("vue").Define
53
53
  }>> & {
54
54
  onChange?: ((...args: any[]) => any) | undefined;
55
55
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
56
- onDragEnd?: ((...args: any[]) => any) | undefined;
57
56
  onDragStart?: ((...args: any[]) => any) | undefined;
57
+ onDragEnd?: ((...args: any[]) => any) | undefined;
58
58
  }, {
59
59
  range: boolean;
60
60
  max: string | number;
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<{
71
71
  type: BooleanConstructor;
72
72
  default: true;
73
73
  };
74
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
74
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "dragStart" | "dragEnd")[], "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
75
75
  loop: {
76
76
  type: BooleanConstructor;
77
77
  default: true;
@@ -107,6 +107,8 @@ declare const _default: import("vue").DefineComponent<{
107
107
  };
108
108
  }>> & {
109
109
  onChange?: ((...args: any[]) => any) | undefined;
110
+ onDragStart?: ((...args: any[]) => any) | undefined;
111
+ onDragEnd?: ((...args: any[]) => any) | undefined;
110
112
  }, {
111
113
  autoplay: string | number;
112
114
  loop: boolean;
@@ -48,7 +48,7 @@ const SWIPE_KEY = Symbol(name);
48
48
  var stdin_default = (0, import_vue2.defineComponent)({
49
49
  name,
50
50
  props: swipeProps,
51
- emits: ["change"],
51
+ emits: ["change", "dragStart", "dragEnd"],
52
52
  setup(props, {
53
53
  emit,
54
54
  slots
@@ -63,6 +63,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
63
63
  active: 0,
64
64
  swiping: false
65
65
  });
66
+ let dragging = false;
66
67
  const touch = (0, import_use_touch.useTouch)();
67
68
  const {
68
69
  children,
@@ -233,9 +234,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
233
234
  const resize = () => initialize(state.active);
234
235
  let touchStartTime;
235
236
  const onTouchStart = (event) => {
236
- if (!props.touchable)
237
+ if (!props.touchable || event.touches.length > 1)
237
238
  return;
238
239
  touch.start(event);
240
+ dragging = false;
239
241
  touchStartTime = Date.now();
240
242
  stopAutoplay();
241
243
  correctPosition();
@@ -250,6 +252,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
250
252
  move({
251
253
  offset: delta.value
252
254
  });
255
+ if (!dragging) {
256
+ emit("dragStart");
257
+ dragging = true;
258
+ }
253
259
  }
254
260
  }
255
261
  }
@@ -278,7 +284,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
278
284
  pace: 0
279
285
  });
280
286
  }
287
+ dragging = false;
281
288
  state.swiping = false;
289
+ emit("dragEnd");
282
290
  autoplay();
283
291
  };
284
292
  const swipeTo = (index, options = {}) => {
@@ -33,7 +33,7 @@ export declare const Swipe: import("../utils").WithInstall<import("vue").DefineC
33
33
  type: BooleanConstructor;
34
34
  default: true;
35
35
  };
36
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "dragStart" | "dragEnd")[], "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
37
  loop: {
38
38
  type: BooleanConstructor;
39
39
  default: true;
@@ -69,6 +69,8 @@ export declare const Swipe: import("../utils").WithInstall<import("vue").DefineC
69
69
  };
70
70
  }>> & {
71
71
  onChange?: ((...args: any[]) => any) | undefined;
72
+ onDragStart?: ((...args: any[]) => any) | undefined;
73
+ onDragEnd?: ((...args: any[]) => any) | undefined;
72
74
  }, {
73
75
  autoplay: string | number;
74
76
  loop: boolean;