vant 4.9.17 → 4.9.19

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 (48) hide show
  1. package/README.md +2 -0
  2. package/es/button/index.css +1 -1
  3. package/es/dialog/Dialog.d.ts +4 -0
  4. package/es/dialog/Dialog.mjs +3 -2
  5. package/es/dialog/function-call.mjs +2 -1
  6. package/es/dialog/index.d.ts +3 -0
  7. package/es/dialog/types.d.ts +2 -0
  8. package/es/floating-bubble/FloatingBubble.d.ts +5 -5
  9. package/es/floating-bubble/FloatingBubble.mjs +14 -9
  10. package/es/floating-bubble/index.d.ts +3 -3
  11. package/es/floating-bubble/types.d.ts +4 -0
  12. package/es/index.d.ts +1 -1
  13. package/es/index.mjs +1 -1
  14. package/es/overlay/Overlay.mjs +5 -3
  15. package/es/picker/Picker.mjs +2 -1
  16. package/es/picker/utils.mjs +1 -1
  17. package/es/signature/Signature.mjs +3 -2
  18. package/es/swipe-cell/SwipeCell.mjs +4 -4
  19. package/es/tabbar-item/TabbarItem.mjs +1 -1
  20. package/es/tabs/Tabs.mjs +2 -3
  21. package/es/watermark/Watermark.mjs +15 -18
  22. package/lib/button/index.css +1 -1
  23. package/lib/dialog/Dialog.d.ts +4 -0
  24. package/lib/dialog/Dialog.js +3 -2
  25. package/lib/dialog/function-call.js +2 -1
  26. package/lib/dialog/index.d.ts +3 -0
  27. package/lib/dialog/types.d.ts +2 -0
  28. package/lib/floating-bubble/FloatingBubble.d.ts +5 -5
  29. package/lib/floating-bubble/FloatingBubble.js +13 -8
  30. package/lib/floating-bubble/index.d.ts +3 -3
  31. package/lib/floating-bubble/types.d.ts +4 -0
  32. package/lib/index.css +1 -1
  33. package/lib/index.d.ts +1 -1
  34. package/lib/index.js +1 -1
  35. package/lib/overlay/Overlay.js +4 -2
  36. package/lib/picker/Picker.js +2 -1
  37. package/lib/picker/utils.js +1 -1
  38. package/lib/signature/Signature.js +3 -2
  39. package/lib/swipe-cell/SwipeCell.js +4 -4
  40. package/lib/tabbar-item/TabbarItem.js +1 -1
  41. package/lib/tabs/Tabs.js +2 -3
  42. package/lib/vant.cjs.js +51 -44
  43. package/lib/vant.es.js +53 -46
  44. package/lib/vant.js +68 -62
  45. package/lib/vant.min.js +2 -2
  46. package/lib/watermark/Watermark.js +14 -17
  47. package/lib/web-types.json +1 -1
  48. package/package.json +9 -9
package/lib/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.9.17";
109
+ export const version: "4.9.19";
package/lib/index.js CHANGED
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
226
226
  __reExport(stdin_exports, require("./tree-select"), module.exports);
227
227
  __reExport(stdin_exports, require("./uploader"), module.exports);
228
228
  __reExport(stdin_exports, require("./watermark"), module.exports);
229
- const version = "4.9.17";
229
+ const version = "4.9.19";
230
230
  function install(app) {
231
231
  const components = [
232
232
  import_action_bar.ActionBar,
@@ -38,8 +38,10 @@ const overlayProps = {
38
38
  };
39
39
  var stdin_default = (0, import_vue.defineComponent)({
40
40
  name,
41
+ inheritAttrs: false,
41
42
  props: overlayProps,
42
43
  setup(props, {
44
+ attrs,
43
45
  slots
44
46
  }) {
45
47
  const root = (0, import_vue.ref)();
@@ -55,11 +57,11 @@ var stdin_default = (0, import_vue.defineComponent)({
55
57
  if ((0, import_utils.isDef)(props.duration)) {
56
58
  style.animationDuration = `${props.duration}s`;
57
59
  }
58
- return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
60
+ return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
59
61
  "ref": root,
60
62
  "style": style,
61
63
  "class": [bem(), props.className]
62
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[import_vue.vShow, props.show]]);
64
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[import_vue.vShow, props.show]]);
63
65
  });
64
66
  (0, import_use.useEventListener)("touchmove", onTouchMove, {
65
67
  target: root
@@ -133,7 +133,8 @@ var stdin_default = (0, import_vue.defineComponent)({
133
133
  children.forEach((child) => child.stopMomentum());
134
134
  const params = getEventParams();
135
135
  (0, import_vue.nextTick)(() => {
136
- emit("confirm", params);
136
+ const params2 = getEventParams();
137
+ emit("confirm", params2);
137
138
  });
138
139
  return params;
139
140
  };
@@ -55,7 +55,7 @@ function findIndexOfEnabledOption(options, index) {
55
55
  }
56
56
  return 0;
57
57
  }
58
- const isOptionExist = (options, value, fields) => value !== void 0 && !!options.find((option) => option[fields.value] === value);
58
+ const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
59
59
  function findOptionByValue(options, value, fields) {
60
60
  const index = options.findIndex((option) => option[fields.value] === value);
61
61
  const enabledIndex = findIndexOfEnabledOption(options, index);
@@ -46,7 +46,8 @@ var stdin_default = (0, import_vue.defineComponent)({
46
46
  props: signatureProps,
47
47
  emits: ["submit", "clear", "start", "end", "signing"],
48
48
  setup(props, {
49
- emit
49
+ emit,
50
+ slots
50
51
  }) {
51
52
  const canvasRef = (0, import_vue.ref)();
52
53
  const wrapRef = (0, import_vue.ref)();
@@ -161,7 +162,7 @@ var stdin_default = (0, import_vue.defineComponent)({
161
162
  "onTouchstartPassive": touchStart,
162
163
  "onTouchmove": touchMove,
163
164
  "onTouchend": touchEnd
164
- }, null) : (0, import_vue.createVNode)("p", null, [props.tips])]), (0, import_vue.createVNode)("div", {
165
+ }, null) : slots.tips ? slots.tips() : (0, import_vue.createVNode)("p", null, [props.tips])]), (0, import_vue.createVNode)("div", {
165
166
  "class": bem("footer")
166
167
  }, [(0, import_vue.createVNode)(import_button.Button, {
167
168
  "size": "small",
@@ -142,8 +142,8 @@ var stdin_default = (0, import_vue.defineComponent)({
142
142
  });
143
143
  }
144
144
  };
145
- const getClickHandler = (position, stop) => (event) => {
146
- if (stop) {
145
+ const getClickHandler = (position) => (event) => {
146
+ if (lockClick || opened) {
147
147
  event.stopPropagation();
148
148
  }
149
149
  if (lockClick) {
@@ -157,7 +157,7 @@ var stdin_default = (0, import_vue.defineComponent)({
157
157
  return (0, import_vue.createVNode)("div", {
158
158
  "ref": ref2,
159
159
  "class": bem(side),
160
- "onClick": getClickHandler(side, true)
160
+ "onClick": getClickHandler(side)
161
161
  }, [contentSlot()]);
162
162
  }
163
163
  };
@@ -180,7 +180,7 @@ var stdin_default = (0, import_vue.defineComponent)({
180
180
  return (0, import_vue.createVNode)("div", {
181
181
  "ref": root,
182
182
  "class": bem(),
183
- "onClick": getClickHandler("cell", lockClick),
183
+ "onClick": getClickHandler("cell"),
184
184
  "onTouchstartPassive": onTouchStart,
185
185
  "onTouchend": onTouchEnd,
186
186
  "onTouchcancel": onTouchEnd
@@ -73,7 +73,7 @@ var stdin_default = (0, import_vue.defineComponent)({
73
73
  const config = (0, import_utils.isObject)(to) ? to : {
74
74
  path: to
75
75
  };
76
- return !!$route.matched.find((val) => {
76
+ return $route.matched.some((val) => {
77
77
  const pathMatched = "path" in config && config.path === val.path;
78
78
  const nameMatched = "name" in config && config.name === val.name;
79
79
  return pathMatched || nameMatched;
package/lib/tabs/Tabs.js CHANGED
@@ -196,9 +196,8 @@ var stdin_default = (0, import_vue.defineComponent)({
196
196
  }
197
197
  };
198
198
  const setCurrentIndexByName = (name2, skipScrollIntoView) => {
199
- const matched = children.find((tab, index2) => getTabName(tab, index2) === name2);
200
- const index = matched ? children.indexOf(matched) : 0;
201
- setCurrentIndex(index, skipScrollIntoView);
199
+ const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
200
+ setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
202
201
  };
203
202
  const scrollToCurrentContent = (immediate = false) => {
204
203
  if (props.scrollspy) {
package/lib/vant.cjs.js CHANGED
@@ -1285,8 +1285,10 @@ const overlayProps = {
1285
1285
  };
1286
1286
  var stdin_default$1L = vue.defineComponent({
1287
1287
  name: name$1C,
1288
+ inheritAttrs: false,
1288
1289
  props: overlayProps,
1289
1290
  setup(props2, {
1291
+ attrs,
1290
1292
  slots
1291
1293
  }) {
1292
1294
  const root = vue.ref();
@@ -1302,11 +1304,11 @@ var stdin_default$1L = vue.defineComponent({
1302
1304
  if (isDef(props2.duration)) {
1303
1305
  style.animationDuration = `${props2.duration}s`;
1304
1306
  }
1305
- return vue.withDirectives(vue.createVNode("div", {
1307
+ return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
1306
1308
  "ref": root,
1307
1309
  "style": style,
1308
1310
  "class": [bem$1x(), props2.className]
1309
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props2.show]]);
1311
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props2.show]]);
1310
1312
  });
1311
1313
  use.useEventListener("touchmove", onTouchMove, {
1312
1314
  target: root
@@ -1689,7 +1691,7 @@ function findIndexOfEnabledOption(options, index) {
1689
1691
  }
1690
1692
  return 0;
1691
1693
  }
1692
- const isOptionExist = (options, value, fields) => value !== void 0 && !!options.find((option) => option[fields.value] === value);
1694
+ const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
1693
1695
  function findOptionByValue(options, value, fields) {
1694
1696
  const index = options.findIndex((option) => option[fields.value] === value);
1695
1697
  const enabledIndex = findIndexOfEnabledOption(options, index);
@@ -2029,7 +2031,7 @@ function scrollTopTo(scroller, to, duration, callback) {
2029
2031
  setScrollTop(scroller, current2);
2030
2032
  if (isDown && current2 < to || !isDown && current2 > to) {
2031
2033
  rafId = use.raf(animate);
2032
- } else {
2034
+ } else if (callback) {
2033
2035
  rafId = use.raf(callback);
2034
2036
  }
2035
2037
  }
@@ -2793,9 +2795,8 @@ var stdin_default$1D = vue.defineComponent({
2793
2795
  }
2794
2796
  };
2795
2797
  const setCurrentIndexByName = (name2, skipScrollIntoView) => {
2796
- const matched = children.find((tab, index2) => getTabName(tab, index2) === name2);
2797
- const index = matched ? children.indexOf(matched) : 0;
2798
- setCurrentIndex(index, skipScrollIntoView);
2798
+ const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
2799
+ setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
2799
2800
  };
2800
2801
  const scrollToCurrentContent = (immediate = false) => {
2801
2802
  if (props2.scrollspy) {
@@ -3443,7 +3444,8 @@ var stdin_default$1z = vue.defineComponent({
3443
3444
  children.forEach((child) => child.stopMomentum());
3444
3445
  const params = getEventParams();
3445
3446
  vue.nextTick(() => {
3446
- emit("confirm", params);
3447
+ const params2 = getEventParams();
3448
+ emit("confirm", params2);
3447
3449
  });
3448
3450
  return params;
3449
3451
  };
@@ -9521,9 +9523,10 @@ const dialogProps = extend({}, popupSharedProps, {
9521
9523
  confirmButtonDisabled: Boolean,
9522
9524
  showConfirmButton: truthProp,
9523
9525
  closeOnClickOverlay: Boolean,
9524
- keyboardEnabled: truthProp
9526
+ keyboardEnabled: truthProp,
9527
+ destroyOnClose: Boolean
9525
9528
  });
9526
- const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
9529
+ const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate", "destroyOnClose"];
9527
9530
  var stdin_default$W = vue.defineComponent({
9528
9531
  name: name$N,
9529
9532
  props: dialogProps,
@@ -9736,7 +9739,8 @@ const DEFAULT_OPTIONS = {
9736
9739
  showConfirmButton: true,
9737
9740
  showCancelButton: false,
9738
9741
  closeOnPopstate: true,
9739
- closeOnClickOverlay: false
9742
+ closeOnClickOverlay: false,
9743
+ destroyOnClose: false
9740
9744
  };
9741
9745
  let currentOptions$1 = extend({}, DEFAULT_OPTIONS);
9742
9746
  function initInstance$2() {
@@ -10144,7 +10148,10 @@ var stdin_default$T = vue.defineComponent({
10144
10148
  const DropdownItem = withInstall(stdin_default$T);
10145
10149
  const DropdownMenu = withInstall(stdin_default$U);
10146
10150
  const floatingBubbleProps = {
10147
- gap: makeNumberProp(24),
10151
+ gap: {
10152
+ type: [Number, Object],
10153
+ default: 24
10154
+ },
10148
10155
  icon: String,
10149
10156
  axis: makeStringProp("y"),
10150
10157
  magnetic: String,
@@ -10178,11 +10185,13 @@ var stdin_default$S = vue.defineComponent({
10178
10185
  width: 0,
10179
10186
  height: 0
10180
10187
  });
10188
+ const gapX = vue.computed(() => isObject(props2.gap) ? props2.gap.x : props2.gap);
10189
+ const gapY = vue.computed(() => isObject(props2.gap) ? props2.gap.y : props2.gap);
10181
10190
  const boundary = vue.computed(() => ({
10182
- top: props2.gap,
10183
- right: windowWidth.value - state.value.width - props2.gap,
10184
- bottom: windowHeight.value - state.value.height - props2.gap,
10185
- left: props2.gap
10191
+ top: gapY.value,
10192
+ right: windowWidth.value - state.value.width - gapX.value,
10193
+ bottom: windowHeight.value - state.value.height - gapY.value,
10194
+ left: gapX.value
10186
10195
  }));
10187
10196
  const dragging = vue.ref(false);
10188
10197
  let initialized = false;
@@ -10206,8 +10215,8 @@ var stdin_default$S = vue.defineComponent({
10206
10215
  offset
10207
10216
  } = props2;
10208
10217
  state.value = {
10209
- x: offset.x > -1 ? offset.x : windowWidth.value - width - props2.gap,
10210
- y: offset.y > -1 ? offset.y : windowHeight.value - height - props2.gap,
10218
+ x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
10219
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
10211
10220
  width,
10212
10221
  height
10213
10222
  };
@@ -10275,7 +10284,7 @@ var stdin_default$S = vue.defineComponent({
10275
10284
  initialized = true;
10276
10285
  });
10277
10286
  });
10278
- vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
10287
+ vue.watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
10279
10288
  deep: true
10280
10289
  });
10281
10290
  const show = vue.ref(true);
@@ -13755,7 +13764,8 @@ var stdin_default$r = vue.defineComponent({
13755
13764
  props: signatureProps,
13756
13765
  emits: ["submit", "clear", "start", "end", "signing"],
13757
13766
  setup(props2, {
13758
- emit
13767
+ emit,
13768
+ slots
13759
13769
  }) {
13760
13770
  const canvasRef = vue.ref();
13761
13771
  const wrapRef = vue.ref();
@@ -13870,7 +13880,7 @@ var stdin_default$r = vue.defineComponent({
13870
13880
  "onTouchstartPassive": touchStart,
13871
13881
  "onTouchmove": touchMove,
13872
13882
  "onTouchend": touchEnd
13873
- }, null) : vue.createVNode("p", null, [props2.tips])]), vue.createVNode("div", {
13883
+ }, null) : slots.tips ? slots.tips() : vue.createVNode("p", null, [props2.tips])]), vue.createVNode("div", {
13874
13884
  "class": bem$i("footer")
13875
13885
  }, [vue.createVNode(Button, {
13876
13886
  "size": "small",
@@ -15025,8 +15035,8 @@ var stdin_default$c = vue.defineComponent({
15025
15035
  });
15026
15036
  }
15027
15037
  };
15028
- const getClickHandler = (position, stop) => (event) => {
15029
- if (stop) {
15038
+ const getClickHandler = (position) => (event) => {
15039
+ if (lockClick2 || opened) {
15030
15040
  event.stopPropagation();
15031
15041
  }
15032
15042
  if (lockClick2) {
@@ -15040,7 +15050,7 @@ var stdin_default$c = vue.defineComponent({
15040
15050
  return vue.createVNode("div", {
15041
15051
  "ref": ref2,
15042
15052
  "class": bem$6(side),
15043
- "onClick": getClickHandler(side, true)
15053
+ "onClick": getClickHandler(side)
15044
15054
  }, [contentSlot()]);
15045
15055
  }
15046
15056
  };
@@ -15063,7 +15073,7 @@ var stdin_default$c = vue.defineComponent({
15063
15073
  return vue.createVNode("div", {
15064
15074
  "ref": root,
15065
15075
  "class": bem$6(),
15066
- "onClick": getClickHandler("cell", lockClick2),
15076
+ "onClick": getClickHandler("cell"),
15067
15077
  "onTouchstartPassive": onTouchStart,
15068
15078
  "onTouchend": onTouchEnd,
15069
15079
  "onTouchcancel": onTouchEnd
@@ -15196,7 +15206,7 @@ var stdin_default$a = vue.defineComponent({
15196
15206
  const config = isObject(to) ? to : {
15197
15207
  path: to
15198
15208
  };
15199
- return !!$route.matched.find((val) => {
15209
+ return $route.matched.some((val) => {
15200
15210
  const pathMatched = "path" in config && config.path === val.path;
15201
15211
  const nameMatched = "name" in config && config.name === val.name;
15202
15212
  return pathMatched || nameMatched;
@@ -16175,28 +16185,25 @@ var stdin_default$4 = vue.defineComponent({
16175
16185
  });
16176
16186
  return URL.createObjectURL(svgBlob);
16177
16187
  };
16188
+ const revokeWatermarkUrl = () => {
16189
+ if (watermarkUrl.value) {
16190
+ URL.revokeObjectURL(watermarkUrl.value);
16191
+ }
16192
+ };
16193
+ const generateWatermarkUrl = () => {
16194
+ if (svgElRef.value) {
16195
+ revokeWatermarkUrl();
16196
+ watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
16197
+ }
16198
+ };
16178
16199
  vue.watchEffect(() => {
16179
16200
  if (props2.image) {
16180
16201
  makeImageToBase64(props2.image);
16181
16202
  }
16182
16203
  });
16183
- vue.watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], () => {
16184
- vue.nextTick(() => {
16185
- if (svgElRef.value) {
16186
- if (watermarkUrl.value) {
16187
- URL.revokeObjectURL(watermarkUrl.value);
16188
- }
16189
- watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
16190
- }
16191
- });
16192
- }, {
16193
- immediate: true
16194
- });
16195
- vue.onUnmounted(() => {
16196
- if (watermarkUrl.value) {
16197
- URL.revokeObjectURL(watermarkUrl.value);
16198
- }
16199
- });
16204
+ vue.watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], generateWatermarkUrl);
16205
+ vue.onMounted(generateWatermarkUrl);
16206
+ vue.onUnmounted(revokeWatermarkUrl);
16200
16207
  return () => {
16201
16208
  const style = extend({
16202
16209
  backgroundImage: `url(${watermarkUrl.value})`
@@ -17077,7 +17084,7 @@ const Lazyload = {
17077
17084
  });
17078
17085
  }
17079
17086
  };
17080
- const version = "4.9.17";
17087
+ const version = "4.9.19";
17081
17088
  function install(app) {
17082
17089
  const components = [
17083
17090
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, Teleport, withDirectives, vShow, Fragment, onBeforeUpdate, Comment, createTextVNode, onUnmounted, createApp, resolveDirective, withKeys, onUpdated, Text, h } from "vue";
2
- import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, cancelRaf, raf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, useCountDown, useClickAway } from "@vant/use";
2
+ import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, raf, cancelRaf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, useCountDown, useClickAway } from "@vant/use";
3
3
  import { normalizeClass, stringifyStyle, normalizeStyle } from "@vue/shared";
4
- import { offsetModifier, createPopper } from "@vant/popperjs";
4
+ import { createPopper, offsetModifier } from "@vant/popperjs";
5
5
  function noop() {
6
6
  }
7
7
  const extend = Object.assign;
@@ -1283,8 +1283,10 @@ const overlayProps = {
1283
1283
  };
1284
1284
  var stdin_default$1L = defineComponent({
1285
1285
  name: name$1C,
1286
+ inheritAttrs: false,
1286
1287
  props: overlayProps,
1287
1288
  setup(props2, {
1289
+ attrs,
1288
1290
  slots
1289
1291
  }) {
1290
1292
  const root = ref();
@@ -1300,11 +1302,11 @@ var stdin_default$1L = defineComponent({
1300
1302
  if (isDef(props2.duration)) {
1301
1303
  style.animationDuration = `${props2.duration}s`;
1302
1304
  }
1303
- return withDirectives(createVNode("div", {
1305
+ return withDirectives(createVNode("div", mergeProps({
1304
1306
  "ref": root,
1305
1307
  "style": style,
1306
1308
  "class": [bem$1x(), props2.className]
1307
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props2.show]]);
1309
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props2.show]]);
1308
1310
  });
1309
1311
  useEventListener("touchmove", onTouchMove, {
1310
1312
  target: root
@@ -1687,7 +1689,7 @@ function findIndexOfEnabledOption(options, index) {
1687
1689
  }
1688
1690
  return 0;
1689
1691
  }
1690
- const isOptionExist = (options, value, fields) => value !== void 0 && !!options.find((option) => option[fields.value] === value);
1692
+ const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
1691
1693
  function findOptionByValue(options, value, fields) {
1692
1694
  const index = options.findIndex((option) => option[fields.value] === value);
1693
1695
  const enabledIndex = findIndexOfEnabledOption(options, index);
@@ -2027,7 +2029,7 @@ function scrollTopTo(scroller, to, duration, callback) {
2027
2029
  setScrollTop(scroller, current2);
2028
2030
  if (isDown && current2 < to || !isDown && current2 > to) {
2029
2031
  rafId = raf(animate);
2030
- } else {
2032
+ } else if (callback) {
2031
2033
  rafId = raf(callback);
2032
2034
  }
2033
2035
  }
@@ -2791,9 +2793,8 @@ var stdin_default$1D = defineComponent({
2791
2793
  }
2792
2794
  };
2793
2795
  const setCurrentIndexByName = (name2, skipScrollIntoView) => {
2794
- const matched = children.find((tab, index2) => getTabName(tab, index2) === name2);
2795
- const index = matched ? children.indexOf(matched) : 0;
2796
- setCurrentIndex(index, skipScrollIntoView);
2796
+ const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
2797
+ setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
2797
2798
  };
2798
2799
  const scrollToCurrentContent = (immediate = false) => {
2799
2800
  if (props2.scrollspy) {
@@ -3441,7 +3442,8 @@ var stdin_default$1z = defineComponent({
3441
3442
  children.forEach((child) => child.stopMomentum());
3442
3443
  const params = getEventParams();
3443
3444
  nextTick(() => {
3444
- emit("confirm", params);
3445
+ const params2 = getEventParams();
3446
+ emit("confirm", params2);
3445
3447
  });
3446
3448
  return params;
3447
3449
  };
@@ -9519,9 +9521,10 @@ const dialogProps = extend({}, popupSharedProps, {
9519
9521
  confirmButtonDisabled: Boolean,
9520
9522
  showConfirmButton: truthProp,
9521
9523
  closeOnClickOverlay: Boolean,
9522
- keyboardEnabled: truthProp
9524
+ keyboardEnabled: truthProp,
9525
+ destroyOnClose: Boolean
9523
9526
  });
9524
- const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
9527
+ const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate", "destroyOnClose"];
9525
9528
  var stdin_default$W = defineComponent({
9526
9529
  name: name$N,
9527
9530
  props: dialogProps,
@@ -9734,7 +9737,8 @@ const DEFAULT_OPTIONS = {
9734
9737
  showConfirmButton: true,
9735
9738
  showCancelButton: false,
9736
9739
  closeOnPopstate: true,
9737
- closeOnClickOverlay: false
9740
+ closeOnClickOverlay: false,
9741
+ destroyOnClose: false
9738
9742
  };
9739
9743
  let currentOptions$1 = extend({}, DEFAULT_OPTIONS);
9740
9744
  function initInstance$2() {
@@ -10142,7 +10146,10 @@ var stdin_default$T = defineComponent({
10142
10146
  const DropdownItem = withInstall(stdin_default$T);
10143
10147
  const DropdownMenu = withInstall(stdin_default$U);
10144
10148
  const floatingBubbleProps = {
10145
- gap: makeNumberProp(24),
10149
+ gap: {
10150
+ type: [Number, Object],
10151
+ default: 24
10152
+ },
10146
10153
  icon: String,
10147
10154
  axis: makeStringProp("y"),
10148
10155
  magnetic: String,
@@ -10176,11 +10183,13 @@ var stdin_default$S = defineComponent({
10176
10183
  width: 0,
10177
10184
  height: 0
10178
10185
  });
10186
+ const gapX = computed(() => isObject(props2.gap) ? props2.gap.x : props2.gap);
10187
+ const gapY = computed(() => isObject(props2.gap) ? props2.gap.y : props2.gap);
10179
10188
  const boundary = computed(() => ({
10180
- top: props2.gap,
10181
- right: windowWidth.value - state.value.width - props2.gap,
10182
- bottom: windowHeight.value - state.value.height - props2.gap,
10183
- left: props2.gap
10189
+ top: gapY.value,
10190
+ right: windowWidth.value - state.value.width - gapX.value,
10191
+ bottom: windowHeight.value - state.value.height - gapY.value,
10192
+ left: gapX.value
10184
10193
  }));
10185
10194
  const dragging = ref(false);
10186
10195
  let initialized = false;
@@ -10204,8 +10213,8 @@ var stdin_default$S = defineComponent({
10204
10213
  offset
10205
10214
  } = props2;
10206
10215
  state.value = {
10207
- x: offset.x > -1 ? offset.x : windowWidth.value - width - props2.gap,
10208
- y: offset.y > -1 ? offset.y : windowHeight.value - height - props2.gap,
10216
+ x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
10217
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
10209
10218
  width,
10210
10219
  height
10211
10220
  };
@@ -10273,7 +10282,7 @@ var stdin_default$S = defineComponent({
10273
10282
  initialized = true;
10274
10283
  });
10275
10284
  });
10276
- watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
10285
+ watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
10277
10286
  deep: true
10278
10287
  });
10279
10288
  const show = ref(true);
@@ -13753,7 +13762,8 @@ var stdin_default$r = defineComponent({
13753
13762
  props: signatureProps,
13754
13763
  emits: ["submit", "clear", "start", "end", "signing"],
13755
13764
  setup(props2, {
13756
- emit
13765
+ emit,
13766
+ slots
13757
13767
  }) {
13758
13768
  const canvasRef = ref();
13759
13769
  const wrapRef = ref();
@@ -13868,7 +13878,7 @@ var stdin_default$r = defineComponent({
13868
13878
  "onTouchstartPassive": touchStart,
13869
13879
  "onTouchmove": touchMove,
13870
13880
  "onTouchend": touchEnd
13871
- }, null) : createVNode("p", null, [props2.tips])]), createVNode("div", {
13881
+ }, null) : slots.tips ? slots.tips() : createVNode("p", null, [props2.tips])]), createVNode("div", {
13872
13882
  "class": bem$i("footer")
13873
13883
  }, [createVNode(Button, {
13874
13884
  "size": "small",
@@ -15023,8 +15033,8 @@ var stdin_default$c = defineComponent({
15023
15033
  });
15024
15034
  }
15025
15035
  };
15026
- const getClickHandler = (position, stop) => (event) => {
15027
- if (stop) {
15036
+ const getClickHandler = (position) => (event) => {
15037
+ if (lockClick2 || opened) {
15028
15038
  event.stopPropagation();
15029
15039
  }
15030
15040
  if (lockClick2) {
@@ -15038,7 +15048,7 @@ var stdin_default$c = defineComponent({
15038
15048
  return createVNode("div", {
15039
15049
  "ref": ref2,
15040
15050
  "class": bem$6(side),
15041
- "onClick": getClickHandler(side, true)
15051
+ "onClick": getClickHandler(side)
15042
15052
  }, [contentSlot()]);
15043
15053
  }
15044
15054
  };
@@ -15061,7 +15071,7 @@ var stdin_default$c = defineComponent({
15061
15071
  return createVNode("div", {
15062
15072
  "ref": root,
15063
15073
  "class": bem$6(),
15064
- "onClick": getClickHandler("cell", lockClick2),
15074
+ "onClick": getClickHandler("cell"),
15065
15075
  "onTouchstartPassive": onTouchStart,
15066
15076
  "onTouchend": onTouchEnd,
15067
15077
  "onTouchcancel": onTouchEnd
@@ -15194,7 +15204,7 @@ var stdin_default$a = defineComponent({
15194
15204
  const config = isObject(to) ? to : {
15195
15205
  path: to
15196
15206
  };
15197
- return !!$route.matched.find((val) => {
15207
+ return $route.matched.some((val) => {
15198
15208
  const pathMatched = "path" in config && config.path === val.path;
15199
15209
  const nameMatched = "name" in config && config.name === val.name;
15200
15210
  return pathMatched || nameMatched;
@@ -16173,28 +16183,25 @@ var stdin_default$4 = defineComponent({
16173
16183
  });
16174
16184
  return URL.createObjectURL(svgBlob);
16175
16185
  };
16186
+ const revokeWatermarkUrl = () => {
16187
+ if (watermarkUrl.value) {
16188
+ URL.revokeObjectURL(watermarkUrl.value);
16189
+ }
16190
+ };
16191
+ const generateWatermarkUrl = () => {
16192
+ if (svgElRef.value) {
16193
+ revokeWatermarkUrl();
16194
+ watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
16195
+ }
16196
+ };
16176
16197
  watchEffect(() => {
16177
16198
  if (props2.image) {
16178
16199
  makeImageToBase64(props2.image);
16179
16200
  }
16180
16201
  });
16181
- watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], () => {
16182
- nextTick(() => {
16183
- if (svgElRef.value) {
16184
- if (watermarkUrl.value) {
16185
- URL.revokeObjectURL(watermarkUrl.value);
16186
- }
16187
- watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
16188
- }
16189
- });
16190
- }, {
16191
- immediate: true
16192
- });
16193
- onUnmounted(() => {
16194
- if (watermarkUrl.value) {
16195
- URL.revokeObjectURL(watermarkUrl.value);
16196
- }
16197
- });
16202
+ watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], generateWatermarkUrl);
16203
+ onMounted(generateWatermarkUrl);
16204
+ onUnmounted(revokeWatermarkUrl);
16198
16205
  return () => {
16199
16206
  const style = extend({
16200
16207
  backgroundImage: `url(${watermarkUrl.value})`
@@ -17075,7 +17082,7 @@ const Lazyload = {
17075
17082
  });
17076
17083
  }
17077
17084
  };
17078
- const version = "4.9.17";
17085
+ const version = "4.9.19";
17079
17086
  function install(app) {
17080
17087
  const components = [
17081
17088
  ActionBar,