vant 4.6.4-beta.1 → 4.6.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.
Files changed (42) hide show
  1. package/es/floating-panel/FloatingPanel.d.ts +13 -0
  2. package/es/floating-panel/FloatingPanel.mjs +2 -1
  3. package/es/floating-panel/index.d.ts +9 -0
  4. package/es/image-preview/ImagePreview.d.ts +13 -0
  5. package/es/image-preview/ImagePreview.mjs +2 -0
  6. package/es/image-preview/ImagePreviewItem.d.ts +3 -0
  7. package/es/image-preview/ImagePreviewItem.mjs +8 -3
  8. package/es/image-preview/function-call.mjs +1 -0
  9. package/es/image-preview/index.d.ts +9 -0
  10. package/es/image-preview/types.d.ts +1 -0
  11. package/es/index.d.ts +1 -1
  12. package/es/index.mjs +1 -1
  13. package/es/list/List.d.ts +7 -4
  14. package/es/list/List.mjs +5 -3
  15. package/es/list/index.d.ts +2 -0
  16. package/es/locale/lang/sr-RS.d.ts +63 -0
  17. package/es/locale/lang/sr-RS.mjs +73 -0
  18. package/es/text-ellipsis/TextEllipsis.mjs +7 -7
  19. package/lib/floating-panel/FloatingPanel.d.ts +13 -0
  20. package/lib/floating-panel/FloatingPanel.js +2 -1
  21. package/lib/floating-panel/index.d.ts +9 -0
  22. package/lib/image-preview/ImagePreview.d.ts +13 -0
  23. package/lib/image-preview/ImagePreview.js +2 -0
  24. package/lib/image-preview/ImagePreviewItem.d.ts +3 -0
  25. package/lib/image-preview/ImagePreviewItem.js +8 -3
  26. package/lib/image-preview/function-call.js +1 -0
  27. package/lib/image-preview/index.d.ts +9 -0
  28. package/lib/image-preview/types.d.ts +1 -0
  29. package/lib/index.d.ts +1 -1
  30. package/lib/index.js +1 -1
  31. package/lib/list/List.d.ts +7 -4
  32. package/lib/list/List.js +4 -2
  33. package/lib/list/index.d.ts +2 -0
  34. package/lib/locale/lang/sr-RS.d.ts +63 -0
  35. package/lib/locale/lang/sr-RS.js +92 -0
  36. package/lib/text-ellipsis/TextEllipsis.js +7 -7
  37. package/lib/vant.cjs.js +25 -14
  38. package/lib/vant.es.js +25 -14
  39. package/lib/vant.js +25 -14
  40. package/lib/vant.min.js +1 -1
  41. package/lib/web-types.json +1 -1
  42. package/package.json +3 -3
@@ -61,6 +61,7 @@ const imagePreviewProps = {
61
61
  startPosition: (0, import_utils.makeNumericProp)(0),
62
62
  showIndicators: Boolean,
63
63
  closeOnPopstate: import_utils.truthProp,
64
+ closeOnClickOverlay: import_utils.truthProp,
64
65
  closeIconPosition: (0, import_utils.makeStringProp)("top-right"),
65
66
  teleport: [String, Object]
66
67
  };
@@ -145,6 +146,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
145
146
  "rootWidth": state.rootWidth,
146
147
  "rootHeight": state.rootHeight,
147
148
  "disableZoom": state.disableZoom,
149
+ "closeOnClickOverlay": props.closeOnClickOverlay,
148
150
  "onScale": emitScale,
149
151
  "onClose": emitClose,
150
152
  "onLongPress": () => emit("longPress", {
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  required: true;
20
20
  };
21
21
  disableZoom: BooleanConstructor;
22
+ closeOnClickOverlay: BooleanConstructor;
22
23
  }, () => 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<{
23
24
  src: StringConstructor;
24
25
  show: BooleanConstructor;
@@ -40,12 +41,14 @@ declare const _default: import("vue").DefineComponent<{
40
41
  required: true;
41
42
  };
42
43
  disableZoom: BooleanConstructor;
44
+ closeOnClickOverlay: BooleanConstructor;
43
45
  }>> & {
44
46
  onClose?: ((...args: any[]) => any) | undefined;
45
47
  onScale?: ((...args: any[]) => any) | undefined;
46
48
  onLongPress?: ((...args: any[]) => any) | undefined;
47
49
  }, {
48
50
  show: boolean;
51
+ closeOnClickOverlay: boolean;
49
52
  disableZoom: boolean;
50
53
  }, {}>;
51
54
  export default _default;
@@ -44,7 +44,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
44
44
  maxZoom: (0, import_utils.makeRequiredProp)(import_utils.numericProp),
45
45
  rootWidth: (0, import_utils.makeRequiredProp)(Number),
46
46
  rootHeight: (0, import_utils.makeRequiredProp)(Number),
47
- disableZoom: Boolean
47
+ disableZoom: Boolean,
48
+ closeOnClickOverlay: Boolean
48
49
  },
49
50
  emits: ["scale", "close", "longPress"],
50
51
  setup(props, {
@@ -204,7 +205,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
204
205
  }
205
206
  }
206
207
  };
207
- const checkTap = () => {
208
+ const checkTap = (event) => {
209
+ var _a;
208
210
  if (fingerNum > 1) {
209
211
  return;
210
212
  }
@@ -221,6 +223,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
221
223
  doubleTapTimer = null;
222
224
  toggleScale();
223
225
  } else {
226
+ if (!props.closeOnClickOverlay && event.target === ((_a = swipeItem.value) == null ? void 0 : _a.$el)) {
227
+ return;
228
+ }
224
229
  doubleTapTimer = setTimeout(() => {
225
230
  emit("close");
226
231
  doubleTapTimer = null;
@@ -258,7 +263,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
258
263
  }
259
264
  }
260
265
  (0, import_utils.preventDefault)(event, stopPropagation);
261
- checkTap();
266
+ checkTap(event);
262
267
  touch.reset();
263
268
  };
264
269
  const resize = () => {
@@ -56,6 +56,7 @@ const defaultConfig = {
56
56
  swipeDuration: 300,
57
57
  showIndicators: false,
58
58
  closeOnPopstate: true,
59
+ closeOnClickOverlay: true,
59
60
  closeIconPosition: "top-right"
60
61
  };
61
62
  function initInstance() {
@@ -48,6 +48,10 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
48
48
  type: BooleanConstructor;
49
49
  default: true;
50
50
  };
51
+ closeOnClickOverlay: {
52
+ type: BooleanConstructor;
53
+ default: true;
54
+ };
51
55
  closeIconPosition: {
52
56
  type: import("vue").PropType<import("..").PopupCloseIconPosition>;
53
57
  default: import("..").PopupCloseIconPosition;
@@ -102,6 +106,10 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
102
106
  type: BooleanConstructor;
103
107
  default: true;
104
108
  };
109
+ closeOnClickOverlay: {
110
+ type: BooleanConstructor;
111
+ default: true;
112
+ };
105
113
  closeIconPosition: {
106
114
  type: import("vue").PropType<import("..").PopupCloseIconPosition>;
107
115
  default: import("..").PopupCloseIconPosition;
@@ -118,6 +126,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
118
126
  loop: boolean;
119
127
  overlay: boolean;
120
128
  show: boolean;
129
+ closeOnClickOverlay: boolean;
121
130
  closeIcon: string;
122
131
  closeable: boolean;
123
132
  closeOnPopstate: boolean;
@@ -22,6 +22,7 @@ export type ImagePreviewOptions = {
22
22
  showIndicators?: boolean;
23
23
  closeOnPopstate?: boolean;
24
24
  closeIconPosition?: PopupCloseIconPosition;
25
+ closeOnClickOverlay?: boolean;
25
26
  onClose?(): void;
26
27
  onScale?(args: {
27
28
  scale: number;
package/lib/index.d.ts CHANGED
@@ -105,4 +105,4 @@ declare namespace _default {
105
105
  }
106
106
  export default _default;
107
107
  export function install(app: any): void;
108
- export const version: "4.6.4-beta.1";
108
+ export const version: "4.6.4";
package/lib/index.js CHANGED
@@ -224,7 +224,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
224
224
  __reExport(stdin_exports, require("./tree-select"), module.exports);
225
225
  __reExport(stdin_exports, require("./uploader"), module.exports);
226
226
  __reExport(stdin_exports, require("./watermark"), module.exports);
227
- const version = "4.6.4-beta.1";
227
+ const version = "4.6.4";
228
228
  function install(app) {
229
229
  const components = [
230
230
  import_action_bar.ActionBar,
@@ -1,4 +1,4 @@
1
- import { type ExtractPropTypes } from 'vue';
1
+ import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import type { ListDirection } from './types';
3
3
  export declare const listProps: {
4
4
  error: BooleanConstructor;
@@ -9,9 +9,10 @@ export declare const listProps: {
9
9
  loading: BooleanConstructor;
10
10
  disabled: BooleanConstructor;
11
11
  finished: BooleanConstructor;
12
+ scroller: PropType<Element>;
12
13
  errorText: StringConstructor;
13
14
  direction: {
14
- type: import("vue").PropType<ListDirection>;
15
+ type: PropType<ListDirection>;
15
16
  default: ListDirection;
16
17
  };
17
18
  loadingText: StringConstructor;
@@ -31,9 +32,10 @@ declare const _default: import("vue").DefineComponent<{
31
32
  loading: BooleanConstructor;
32
33
  disabled: BooleanConstructor;
33
34
  finished: BooleanConstructor;
35
+ scroller: PropType<Element>;
34
36
  errorText: StringConstructor;
35
37
  direction: {
36
- type: import("vue").PropType<ListDirection>;
38
+ type: PropType<ListDirection>;
37
39
  default: ListDirection;
38
40
  };
39
41
  loadingText: StringConstructor;
@@ -51,9 +53,10 @@ declare const _default: import("vue").DefineComponent<{
51
53
  loading: BooleanConstructor;
52
54
  disabled: BooleanConstructor;
53
55
  finished: BooleanConstructor;
56
+ scroller: PropType<Element>;
54
57
  errorText: StringConstructor;
55
58
  direction: {
56
- type: import("vue").PropType<ListDirection>;
59
+ type: PropType<ListDirection>;
57
60
  default: ListDirection;
58
61
  };
59
62
  loadingText: StringConstructor;
package/lib/list/List.js CHANGED
@@ -35,6 +35,7 @@ const listProps = {
35
35
  loading: Boolean,
36
36
  disabled: Boolean,
37
37
  finished: Boolean,
38
+ scroller: Object,
38
39
  errorText: String,
39
40
  direction: (0, import_utils.makeStringProp)("down"),
40
41
  loadingText: String,
@@ -54,6 +55,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
54
55
  const placeholder = (0, import_vue2.ref)();
55
56
  const tabStatus = (0, import_use_tab_status.useTabStatus)();
56
57
  const scrollParent = (0, import_use.useScrollParent)(root);
58
+ const scroller = (0, import_vue2.computed)(() => props.scroller || scrollParent.value);
57
59
  const check = () => {
58
60
  (0, import_vue2.nextTick)(() => {
59
61
  if (loading.value || props.finished || props.disabled || props.error || // skip check when inside an inactive tab
@@ -64,7 +66,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
64
66
  direction
65
67
  } = props;
66
68
  const offset = +props.offset;
67
- const scrollParentRect = (0, import_use.useRect)(scrollParent);
69
+ const scrollParentRect = (0, import_use.useRect)(scroller);
68
70
  if (!scrollParentRect.height || (0, import_utils.isHidden)(root)) {
69
71
  return;
70
72
  }
@@ -140,7 +142,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
140
142
  check
141
143
  });
142
144
  (0, import_use.useEventListener)("scroll", check, {
143
- target: scrollParent,
145
+ target: scroller,
144
146
  passive: true
145
147
  });
146
148
  return () => {
@@ -8,6 +8,7 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
8
8
  loading: BooleanConstructor;
9
9
  disabled: BooleanConstructor;
10
10
  finished: BooleanConstructor;
11
+ scroller: import("vue").PropType<Element>;
11
12
  errorText: StringConstructor;
12
13
  direction: {
13
14
  type: import("vue").PropType<import("./types").ListDirection>;
@@ -28,6 +29,7 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
28
29
  loading: BooleanConstructor;
29
30
  disabled: BooleanConstructor;
30
31
  finished: BooleanConstructor;
32
+ scroller: import("vue").PropType<Element>;
31
33
  errorText: StringConstructor;
32
34
  direction: {
33
35
  type: import("vue").PropType<import("./types").ListDirection>;
@@ -0,0 +1,63 @@
1
+ declare const _default: {
2
+ name: string;
3
+ tel: string;
4
+ save: string;
5
+ clear: string;
6
+ cancel: string;
7
+ confirm: string;
8
+ delete: string;
9
+ loading: string;
10
+ noCoupon: string;
11
+ nameEmpty: string;
12
+ addContact: string;
13
+ telInvalid: string;
14
+ vanCalendar: {
15
+ end: string;
16
+ start: string;
17
+ title: string;
18
+ weekdays: string[];
19
+ monthTitle: (year: number, month: number) => string;
20
+ rangePrompt: (maxRange: number) => string;
21
+ };
22
+ vanCascader: {
23
+ select: string;
24
+ };
25
+ vanPagination: {
26
+ prev: string;
27
+ next: string;
28
+ };
29
+ vanPullRefresh: {
30
+ pulling: string;
31
+ loosing: string;
32
+ };
33
+ vanSubmitBar: {
34
+ label: string;
35
+ };
36
+ vanCoupon: {
37
+ unlimited: string;
38
+ discount: (discount: number) => string;
39
+ condition: (condition: number) => string;
40
+ };
41
+ vanCouponCell: {
42
+ title: string;
43
+ count: (count: number) => string;
44
+ };
45
+ vanCouponList: {
46
+ exchange: string;
47
+ close: string;
48
+ enable: string;
49
+ disabled: string;
50
+ placeholder: string;
51
+ };
52
+ vanAddressEdit: {
53
+ area: string;
54
+ areaEmpty: string;
55
+ addressEmpty: string;
56
+ addressDetail: string;
57
+ defaultAddress: string;
58
+ };
59
+ vanAddressList: {
60
+ add: string;
61
+ };
62
+ };
63
+ export default _default;
@@ -0,0 +1,92 @@
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: "Ime i prezime",
25
+ tel: "Broj telefona",
26
+ save: "Sa\u010Duvaj",
27
+ clear: "Prazno",
28
+ cancel: "Otka\u017Ei",
29
+ confirm: "Potvrdi",
30
+ delete: "Brisanje",
31
+ loading: "U\u010Ditavanje...",
32
+ noCoupon: "Jo\u0161 nema kupona",
33
+ nameEmpty: "Molimo unesite ime",
34
+ addContact: "Dodaj kontakte",
35
+ telInvalid: "Molimo unesite broj telefona",
36
+ vanCalendar: {
37
+ end: "Zavr\u0161etak",
38
+ start: "Po\u010Detak",
39
+ title: "Izaberite Datum",
40
+ weekdays: [
41
+ "Nedelja",
42
+ "Ponedeljak",
43
+ "Utorak",
44
+ "Sreda",
45
+ "\u010Cetvrtak",
46
+ "Petak",
47
+ "Subota"
48
+ ],
49
+ monthTitle: (year, month) => `${year}/${month}`,
50
+ rangePrompt: (maxRange) => `Izaberite do ${maxRange} dana`
51
+ },
52
+ vanCascader: {
53
+ select: "Molimo izaberite "
54
+ },
55
+ vanPagination: {
56
+ prev: "Prethodna strana",
57
+ next: "Sledec\u0301a strana"
58
+ },
59
+ vanPullRefresh: {
60
+ pulling: "Prevucite nadole da osve\u017Eite...",
61
+ loosing: "Otpustite da osve\u017Eite..."
62
+ },
63
+ vanSubmitBar: {
64
+ label: "Ukupno:"
65
+ },
66
+ vanCoupon: {
67
+ unlimited: "No threshold",
68
+ discount: (discount) => `${discount} puta`,
69
+ condition: (condition) => `Dostupno za preko ${condition} juana`
70
+ },
71
+ vanCouponCell: {
72
+ title: "Kupon",
73
+ count: (count) => `Dostupan ${count}`
74
+ },
75
+ vanCouponList: {
76
+ exchange: "Razmeni",
77
+ close: "Ne koristi",
78
+ enable: "Iskoristi",
79
+ disabled: "Nedostupno",
80
+ placeholder: "Unesite promo kod"
81
+ },
82
+ vanAddressEdit: {
83
+ area: "Region",
84
+ areaEmpty: "Molimo odaberite region",
85
+ addressEmpty: "Molimo upi\u0161ite adresu",
86
+ addressDetail: "Adresa",
87
+ defaultAddress: "Postavi kao podrazumevanu adresu za isporuku"
88
+ },
89
+ vanAddressList: {
90
+ add: "Dodaj adresu"
91
+ }
92
+ };
@@ -45,7 +45,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
45
45
  const expanded = (0, import_vue2.ref)(false);
46
46
  const hasAction = (0, import_vue2.ref)(false);
47
47
  const root = (0, import_vue2.ref)();
48
- const actionText = (0, import_vue2.computed)(() => expanded.value ? props.expandText : props.collapseText);
48
+ const actionText = (0, import_vue2.computed)(() => expanded.value ? props.collapseText : props.expandText);
49
49
  const pxToNum = (value) => {
50
50
  if (!value)
51
51
  return 0;
@@ -87,7 +87,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
87
87
  }
88
88
  return dots + content.slice(right, end);
89
89
  }
90
- const middle2 = Math.round(left + right >> 1);
90
+ const middle2 = Math.round((left + right) / 2);
91
91
  if (position === "end") {
92
92
  container2.innerText = content.slice(0, middle2) + dots + actionText.value;
93
93
  } else {
@@ -108,11 +108,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
108
108
  };
109
109
  const middleTail = (leftPart, rightPart) => {
110
110
  if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) {
111
- return content.slice(0, leftPart[1]) + dots + content.slice(rightPart[1], end);
111
+ return content.slice(0, leftPart[0]) + dots + content.slice(rightPart[1], end);
112
112
  }
113
- const leftMiddle = Math.floor(leftPart[0] + leftPart[1] >> 1);
114
- const rightMiddle = Math.ceil(rightPart[0] + rightPart[1] >> 1);
115
- container2.innerText = props.content.slice(0, leftMiddle) + props.dots + actionText.value + props.dots + props.content.slice(rightMiddle, end);
113
+ const leftMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
114
+ const rightMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
115
+ container2.innerText = props.content.slice(0, leftMiddle) + props.dots + props.content.slice(rightMiddle, end) + props.expandText;
116
116
  if (container2.offsetHeight >= maxHeight2) {
117
117
  return middleTail([leftPart[0], leftMiddle], [rightMiddle, rightPart[1]]);
118
118
  }
@@ -147,7 +147,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
147
147
  const renderAction = () => (0, import_vue.createVNode)("span", {
148
148
  "class": bem("action"),
149
149
  "onClick": onClickAction
150
- }, [expanded.value ? props.collapseText : props.expandText]);
150
+ }, [actionText.value]);
151
151
  (0, import_vue2.onMounted)(calcEllipsised);
152
152
  (0, import_vue2.watch)(() => [props.content, props.rows, props.position], calcEllipsised);
153
153
  (0, import_use.useEventListener)("resize", calcEllipsised);
package/lib/vant.cjs.js CHANGED
@@ -9887,6 +9887,7 @@ const floatingPanelProps = {
9887
9887
  anchors: makeArrayProp(),
9888
9888
  duration: makeNumericProp(0.2),
9889
9889
  contentDraggable: truthProp,
9890
+ lockScroll: truthProp,
9890
9891
  safeAreaInsetBottom: truthProp
9891
9892
  };
9892
9893
  const [name$H, bem$H] = createNamespace("floating-panel");
@@ -9969,7 +9970,7 @@ var stdin_default$Q = vue.defineComponent({
9969
9970
  }, {
9970
9971
  immediate: true
9971
9972
  });
9972
- useLockScroll(rootRef, () => true);
9973
+ useLockScroll(rootRef, () => props2.lockScroll);
9973
9974
  use.useEventListener("touchmove", onTouchmove, {
9974
9975
  target: rootRef
9975
9976
  });
@@ -10186,7 +10187,8 @@ var stdin_default$N = vue.defineComponent({
10186
10187
  maxZoom: makeRequiredProp(numericProp),
10187
10188
  rootWidth: makeRequiredProp(Number),
10188
10189
  rootHeight: makeRequiredProp(Number),
10189
- disableZoom: Boolean
10190
+ disableZoom: Boolean,
10191
+ closeOnClickOverlay: Boolean
10190
10192
  },
10191
10193
  emits: ["scale", "close", "longPress"],
10192
10194
  setup(props2, {
@@ -10346,7 +10348,8 @@ var stdin_default$N = vue.defineComponent({
10346
10348
  }
10347
10349
  }
10348
10350
  };
10349
- const checkTap = () => {
10351
+ const checkTap = (event) => {
10352
+ var _a;
10350
10353
  if (fingerNum > 1) {
10351
10354
  return;
10352
10355
  }
@@ -10363,6 +10366,9 @@ var stdin_default$N = vue.defineComponent({
10363
10366
  doubleTapTimer = null;
10364
10367
  toggleScale();
10365
10368
  } else {
10369
+ if (!props2.closeOnClickOverlay && event.target === ((_a = swipeItem.value) == null ? void 0 : _a.$el)) {
10370
+ return;
10371
+ }
10366
10372
  doubleTapTimer = setTimeout(() => {
10367
10373
  emit("close");
10368
10374
  doubleTapTimer = null;
@@ -10400,7 +10406,7 @@ var stdin_default$N = vue.defineComponent({
10400
10406
  }
10401
10407
  }
10402
10408
  preventDefault(event, stopPropagation2);
10403
- checkTap();
10409
+ checkTap(event);
10404
10410
  touch.reset();
10405
10411
  };
10406
10412
  const resize = () => {
@@ -10497,6 +10503,7 @@ const imagePreviewProps = {
10497
10503
  startPosition: makeNumericProp(0),
10498
10504
  showIndicators: Boolean,
10499
10505
  closeOnPopstate: truthProp,
10506
+ closeOnClickOverlay: truthProp,
10500
10507
  closeIconPosition: makeStringProp("top-right"),
10501
10508
  teleport: [String, Object]
10502
10509
  };
@@ -10581,6 +10588,7 @@ var stdin_default$M = vue.defineComponent({
10581
10588
  "rootWidth": state.rootWidth,
10582
10589
  "rootHeight": state.rootHeight,
10583
10590
  "disableZoom": state.disableZoom,
10591
+ "closeOnClickOverlay": props2.closeOnClickOverlay,
10584
10592
  "onScale": emitScale,
10585
10593
  "onClose": emitClose,
10586
10594
  "onLongPress": () => emit("longPress", {
@@ -10663,6 +10671,7 @@ const defaultConfig = {
10663
10671
  swipeDuration: 300,
10664
10672
  showIndicators: false,
10665
10673
  closeOnPopstate: true,
10674
+ closeOnClickOverlay: true,
10666
10675
  closeIconPosition: "top-right"
10667
10676
  };
10668
10677
  function initInstance$1() {
@@ -11001,6 +11010,7 @@ const listProps = {
11001
11010
  loading: Boolean,
11002
11011
  disabled: Boolean,
11003
11012
  finished: Boolean,
11013
+ scroller: Object,
11004
11014
  errorText: String,
11005
11015
  direction: makeStringProp("down"),
11006
11016
  loadingText: String,
@@ -11020,6 +11030,7 @@ var stdin_default$J = vue.defineComponent({
11020
11030
  const placeholder = vue.ref();
11021
11031
  const tabStatus = useTabStatus();
11022
11032
  const scrollParent = use.useScrollParent(root);
11033
+ const scroller = vue.computed(() => props2.scroller || scrollParent.value);
11023
11034
  const check = () => {
11024
11035
  vue.nextTick(() => {
11025
11036
  if (loading.value || props2.finished || props2.disabled || props2.error || // skip check when inside an inactive tab
@@ -11030,7 +11041,7 @@ var stdin_default$J = vue.defineComponent({
11030
11041
  direction
11031
11042
  } = props2;
11032
11043
  const offset = +props2.offset;
11033
- const scrollParentRect = use.useRect(scrollParent);
11044
+ const scrollParentRect = use.useRect(scroller);
11034
11045
  if (!scrollParentRect.height || isHidden(root)) {
11035
11046
  return;
11036
11047
  }
@@ -11106,7 +11117,7 @@ var stdin_default$J = vue.defineComponent({
11106
11117
  check
11107
11118
  });
11108
11119
  use.useEventListener("scroll", check, {
11109
- target: scrollParent,
11120
+ target: scroller,
11110
11121
  passive: true
11111
11122
  });
11112
11123
  return () => {
@@ -14624,7 +14635,7 @@ var stdin_default$9 = vue.defineComponent({
14624
14635
  const expanded = vue.ref(false);
14625
14636
  const hasAction = vue.ref(false);
14626
14637
  const root = vue.ref();
14627
- const actionText = vue.computed(() => expanded.value ? props2.expandText : props2.collapseText);
14638
+ const actionText = vue.computed(() => expanded.value ? props2.collapseText : props2.expandText);
14628
14639
  const pxToNum = (value) => {
14629
14640
  if (!value)
14630
14641
  return 0;
@@ -14666,7 +14677,7 @@ var stdin_default$9 = vue.defineComponent({
14666
14677
  }
14667
14678
  return dots + content.slice(right, end);
14668
14679
  }
14669
- const middle2 = Math.round(left + right >> 1);
14680
+ const middle2 = Math.round((left + right) / 2);
14670
14681
  if (position === "end") {
14671
14682
  container2.innerText = content.slice(0, middle2) + dots + actionText.value;
14672
14683
  } else {
@@ -14687,11 +14698,11 @@ var stdin_default$9 = vue.defineComponent({
14687
14698
  };
14688
14699
  const middleTail = (leftPart, rightPart) => {
14689
14700
  if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) {
14690
- return content.slice(0, leftPart[1]) + dots + content.slice(rightPart[1], end);
14701
+ return content.slice(0, leftPart[0]) + dots + content.slice(rightPart[1], end);
14691
14702
  }
14692
- const leftMiddle = Math.floor(leftPart[0] + leftPart[1] >> 1);
14693
- const rightMiddle = Math.ceil(rightPart[0] + rightPart[1] >> 1);
14694
- container2.innerText = props2.content.slice(0, leftMiddle) + props2.dots + actionText.value + props2.dots + props2.content.slice(rightMiddle, end);
14703
+ const leftMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
14704
+ const rightMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
14705
+ container2.innerText = props2.content.slice(0, leftMiddle) + props2.dots + props2.content.slice(rightMiddle, end) + props2.expandText;
14695
14706
  if (container2.offsetHeight >= maxHeight2) {
14696
14707
  return middleTail([leftPart[0], leftMiddle], [rightMiddle, rightPart[1]]);
14697
14708
  }
@@ -14726,7 +14737,7 @@ var stdin_default$9 = vue.defineComponent({
14726
14737
  const renderAction = () => vue.createVNode("span", {
14727
14738
  "class": bem$3("action"),
14728
14739
  "onClick": onClickAction
14729
- }, [expanded.value ? props2.collapseText : props2.expandText]);
14740
+ }, [actionText.value]);
14730
14741
  vue.onMounted(calcEllipsised);
14731
14742
  vue.watch(() => [props2.content, props2.rows, props2.position], calcEllipsised);
14732
14743
  use.useEventListener("resize", calcEllipsised);
@@ -16387,7 +16398,7 @@ const Lazyload = {
16387
16398
  });
16388
16399
  }
16389
16400
  };
16390
- const version = "4.6.4-beta.1";
16401
+ const version = "4.6.4";
16391
16402
  function install(app) {
16392
16403
  const components = [
16393
16404
  ActionBar,