vant 4.9.18 → 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.
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
  };
@@ -10146,7 +10148,10 @@ var stdin_default$T = vue.defineComponent({
10146
10148
  const DropdownItem = withInstall(stdin_default$T);
10147
10149
  const DropdownMenu = withInstall(stdin_default$U);
10148
10150
  const floatingBubbleProps = {
10149
- gap: makeNumberProp(24),
10151
+ gap: {
10152
+ type: [Number, Object],
10153
+ default: 24
10154
+ },
10150
10155
  icon: String,
10151
10156
  axis: makeStringProp("y"),
10152
10157
  magnetic: String,
@@ -10180,11 +10185,13 @@ var stdin_default$S = vue.defineComponent({
10180
10185
  width: 0,
10181
10186
  height: 0
10182
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);
10183
10190
  const boundary = vue.computed(() => ({
10184
- top: props2.gap,
10185
- right: windowWidth.value - state.value.width - props2.gap,
10186
- bottom: windowHeight.value - state.value.height - props2.gap,
10187
- 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
10188
10195
  }));
10189
10196
  const dragging = vue.ref(false);
10190
10197
  let initialized = false;
@@ -10208,8 +10215,8 @@ var stdin_default$S = vue.defineComponent({
10208
10215
  offset
10209
10216
  } = props2;
10210
10217
  state.value = {
10211
- x: offset.x > -1 ? offset.x : windowWidth.value - width - props2.gap,
10212
- 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,
10213
10220
  width,
10214
10221
  height
10215
10222
  };
@@ -10277,7 +10284,7 @@ var stdin_default$S = vue.defineComponent({
10277
10284
  initialized = true;
10278
10285
  });
10279
10286
  });
10280
- vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
10287
+ vue.watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
10281
10288
  deep: true
10282
10289
  });
10283
10290
  const show = vue.ref(true);
@@ -15199,7 +15206,7 @@ var stdin_default$a = vue.defineComponent({
15199
15206
  const config = isObject(to) ? to : {
15200
15207
  path: to
15201
15208
  };
15202
- return !!$route.matched.find((val) => {
15209
+ return $route.matched.some((val) => {
15203
15210
  const pathMatched = "path" in config && config.path === val.path;
15204
15211
  const nameMatched = "name" in config && config.name === val.name;
15205
15212
  return pathMatched || nameMatched;
@@ -16178,28 +16185,25 @@ var stdin_default$4 = vue.defineComponent({
16178
16185
  });
16179
16186
  return URL.createObjectURL(svgBlob);
16180
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
+ };
16181
16199
  vue.watchEffect(() => {
16182
16200
  if (props2.image) {
16183
16201
  makeImageToBase64(props2.image);
16184
16202
  }
16185
16203
  });
16186
- vue.watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], () => {
16187
- vue.nextTick(() => {
16188
- if (svgElRef.value) {
16189
- if (watermarkUrl.value) {
16190
- URL.revokeObjectURL(watermarkUrl.value);
16191
- }
16192
- watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
16193
- }
16194
- });
16195
- }, {
16196
- immediate: true
16197
- });
16198
- vue.onUnmounted(() => {
16199
- if (watermarkUrl.value) {
16200
- URL.revokeObjectURL(watermarkUrl.value);
16201
- }
16202
- });
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);
16203
16207
  return () => {
16204
16208
  const style = extend({
16205
16209
  backgroundImage: `url(${watermarkUrl.value})`
@@ -17080,7 +17084,7 @@ const Lazyload = {
17080
17084
  });
17081
17085
  }
17082
17086
  };
17083
- const version = "4.9.18";
17087
+ const version = "4.9.19";
17084
17088
  function install(app) {
17085
17089
  const components = [
17086
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
  };
@@ -10144,7 +10146,10 @@ var stdin_default$T = defineComponent({
10144
10146
  const DropdownItem = withInstall(stdin_default$T);
10145
10147
  const DropdownMenu = withInstall(stdin_default$U);
10146
10148
  const floatingBubbleProps = {
10147
- gap: makeNumberProp(24),
10149
+ gap: {
10150
+ type: [Number, Object],
10151
+ default: 24
10152
+ },
10148
10153
  icon: String,
10149
10154
  axis: makeStringProp("y"),
10150
10155
  magnetic: String,
@@ -10178,11 +10183,13 @@ var stdin_default$S = defineComponent({
10178
10183
  width: 0,
10179
10184
  height: 0
10180
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);
10181
10188
  const boundary = 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
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
10186
10193
  }));
10187
10194
  const dragging = ref(false);
10188
10195
  let initialized = false;
@@ -10206,8 +10213,8 @@ var stdin_default$S = defineComponent({
10206
10213
  offset
10207
10214
  } = props2;
10208
10215
  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,
10216
+ x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
10217
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
10211
10218
  width,
10212
10219
  height
10213
10220
  };
@@ -10275,7 +10282,7 @@ var stdin_default$S = defineComponent({
10275
10282
  initialized = true;
10276
10283
  });
10277
10284
  });
10278
- watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
10285
+ watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
10279
10286
  deep: true
10280
10287
  });
10281
10288
  const show = ref(true);
@@ -15197,7 +15204,7 @@ var stdin_default$a = defineComponent({
15197
15204
  const config = isObject(to) ? to : {
15198
15205
  path: to
15199
15206
  };
15200
- return !!$route.matched.find((val) => {
15207
+ return $route.matched.some((val) => {
15201
15208
  const pathMatched = "path" in config && config.path === val.path;
15202
15209
  const nameMatched = "name" in config && config.name === val.name;
15203
15210
  return pathMatched || nameMatched;
@@ -16176,28 +16183,25 @@ var stdin_default$4 = defineComponent({
16176
16183
  });
16177
16184
  return URL.createObjectURL(svgBlob);
16178
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
+ };
16179
16197
  watchEffect(() => {
16180
16198
  if (props2.image) {
16181
16199
  makeImageToBase64(props2.image);
16182
16200
  }
16183
16201
  });
16184
- watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], () => {
16185
- nextTick(() => {
16186
- if (svgElRef.value) {
16187
- if (watermarkUrl.value) {
16188
- URL.revokeObjectURL(watermarkUrl.value);
16189
- }
16190
- watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
16191
- }
16192
- });
16193
- }, {
16194
- immediate: true
16195
- });
16196
- onUnmounted(() => {
16197
- if (watermarkUrl.value) {
16198
- URL.revokeObjectURL(watermarkUrl.value);
16199
- }
16200
- });
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);
16201
16205
  return () => {
16202
16206
  const style = extend({
16203
16207
  backgroundImage: `url(${watermarkUrl.value})`
@@ -17078,7 +17082,7 @@ const Lazyload = {
17078
17082
  });
17079
17083
  }
17080
17084
  };
17081
- const version = "4.9.18";
17085
+ const version = "4.9.19";
17082
17086
  function install(app) {
17083
17087
  const components = [
17084
17088
  ActionBar,
package/lib/vant.js CHANGED
@@ -147,7 +147,7 @@
147
147
  if ((0, __WEBPACK_EXTERNAL_MODULE_vue____namespace.isVNode)(child)) {
148
148
  var _child_component;
149
149
  result.push(child);
150
- if (null === (_child_component = child.component) || void 0 === _child_component ? void 0 : _child_component.subTree) {
150
+ if (null == (_child_component = child.component) ? void 0 : _child_component.subTree) {
151
151
  result.push(child.component.subTree);
152
152
  traverse(child.component.subTree.children);
153
153
  }
@@ -239,11 +239,11 @@
239
239
  const setRemain = (value) => {
240
240
  var _options_onChange;
241
241
  remain.value = value;
242
- null === (_options_onChange = options.onChange) || void 0 === _options_onChange || _options_onChange.call(options, current2.value);
242
+ null == (_options_onChange = options.onChange) || _options_onChange.call(options, current2.value);
243
243
  if (0 === value) {
244
244
  var _options_onFinish;
245
245
  pause();
246
- null === (_options_onFinish = options.onFinish) || void 0 === _options_onFinish || _options_onFinish.call(options);
246
+ null == (_options_onFinish = options.onFinish) || _options_onFinish.call(options);
247
247
  }
248
248
  };
249
249
  const microTick = () => {
@@ -1656,8 +1656,10 @@
1656
1656
  };
1657
1657
  var stdin_default$1L = __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent({
1658
1658
  name: name$1C,
1659
+ inheritAttrs: false,
1659
1660
  props: overlayProps,
1660
1661
  setup(props2, {
1662
+ attrs,
1661
1663
  slots
1662
1664
  }) {
1663
1665
  const root = __WEBPACK_EXTERNAL_MODULE_vue__.ref();
@@ -1673,11 +1675,11 @@
1673
1675
  if (isDef(props2.duration)) {
1674
1676
  style.animationDuration = `${props2.duration}s`;
1675
1677
  }
1676
- return __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives(__WEBPACK_EXTERNAL_MODULE_vue__.createVNode("div", {
1678
+ return __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives(__WEBPACK_EXTERNAL_MODULE_vue__.createVNode("div", __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps({
1677
1679
  "ref": root,
1678
1680
  "style": style,
1679
1681
  "class": [bem$1x(), props2.className]
1680
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[__WEBPACK_EXTERNAL_MODULE_vue__.vShow, props2.show]]);
1682
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[__WEBPACK_EXTERNAL_MODULE_vue__.vShow, props2.show]]);
1681
1683
  });
1682
1684
  useEventListener("touchmove", onTouchMove, {
1683
1685
  target: root
@@ -2060,7 +2062,7 @@
2060
2062
  }
2061
2063
  return 0;
2062
2064
  }
2063
- const isOptionExist = (options, value, fields) => value !== void 0 && !!options.find((option) => option[fields.value] === value);
2065
+ const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
2064
2066
  function findOptionByValue(options, value, fields) {
2065
2067
  const index = options.findIndex((option) => option[fields.value] === value);
2066
2068
  const enabledIndex = findIndexOfEnabledOption(options, index);
@@ -2482,7 +2484,7 @@
2482
2484
  setScrollTop(scroller, current2);
2483
2485
  if (isDown && current2 < to || !isDown && current2 > to) {
2484
2486
  rafId = raf(animate);
2485
- } else {
2487
+ } else if (callback) {
2486
2488
  rafId = raf(callback);
2487
2489
  }
2488
2490
  }
@@ -3243,9 +3245,8 @@
3243
3245
  }
3244
3246
  };
3245
3247
  const setCurrentIndexByName = (name2, skipScrollIntoView) => {
3246
- const matched = children.find((tab, index2) => getTabName(tab, index2) === name2);
3247
- const index = matched ? children.indexOf(matched) : 0;
3248
- setCurrentIndex(index, skipScrollIntoView);
3248
+ const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
3249
+ setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
3249
3250
  };
3250
3251
  const scrollToCurrentContent = (immediate = false) => {
3251
3252
  if (props2.scrollspy) {
@@ -3887,7 +3888,8 @@
3887
3888
  children.forEach((child) => child.stopMomentum());
3888
3889
  const params = getEventParams();
3889
3890
  __WEBPACK_EXTERNAL_MODULE_vue__.nextTick(() => {
3890
- emit("confirm", params);
3891
+ const params2 = getEventParams();
3892
+ emit("confirm", params2);
3891
3893
  });
3892
3894
  return params;
3893
3895
  };
@@ -10564,7 +10566,10 @@
10564
10566
  const DropdownItem = withInstall(stdin_default$T);
10565
10567
  const DropdownMenu = withInstall(stdin_default$U);
10566
10568
  const floatingBubbleProps = {
10567
- gap: makeNumberProp(24),
10569
+ gap: {
10570
+ type: [Number, Object],
10571
+ default: 24
10572
+ },
10568
10573
  icon: String,
10569
10574
  axis: makeStringProp("y"),
10570
10575
  magnetic: String,
@@ -10598,11 +10603,13 @@
10598
10603
  width: 0,
10599
10604
  height: 0
10600
10605
  });
10606
+ const gapX = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => isObject$1(props2.gap) ? props2.gap.x : props2.gap);
10607
+ const gapY = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => isObject$1(props2.gap) ? props2.gap.y : props2.gap);
10601
10608
  const boundary = __WEBPACK_EXTERNAL_MODULE_vue__.computed(() => ({
10602
- top: props2.gap,
10603
- right: windowWidth.value - state.value.width - props2.gap,
10604
- bottom: windowHeight.value - state.value.height - props2.gap,
10605
- left: props2.gap
10609
+ top: gapY.value,
10610
+ right: windowWidth.value - state.value.width - gapX.value,
10611
+ bottom: windowHeight.value - state.value.height - gapY.value,
10612
+ left: gapX.value
10606
10613
  }));
10607
10614
  const dragging = __WEBPACK_EXTERNAL_MODULE_vue__.ref(false);
10608
10615
  let initialized = false;
@@ -10626,8 +10633,8 @@
10626
10633
  offset
10627
10634
  } = props2;
10628
10635
  state.value = {
10629
- x: offset.x > -1 ? offset.x : windowWidth.value - width - props2.gap,
10630
- y: offset.y > -1 ? offset.y : windowHeight.value - height - props2.gap,
10636
+ x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
10637
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
10631
10638
  width,
10632
10639
  height
10633
10640
  };
@@ -10695,7 +10702,7 @@
10695
10702
  initialized = true;
10696
10703
  });
10697
10704
  });
10698
- __WEBPACK_EXTERNAL_MODULE_vue__.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
10705
+ __WEBPACK_EXTERNAL_MODULE_vue__.watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
10699
10706
  deep: true
10700
10707
  });
10701
10708
  const show = __WEBPACK_EXTERNAL_MODULE_vue__.ref(true);
@@ -13555,7 +13562,6 @@
13555
13562
  state.modifiersData[name2] = computeOffsets({
13556
13563
  reference: state.rects.reference,
13557
13564
  element: state.rects.popper,
13558
- strategy: "absolute",
13559
13565
  placement: state.placement
13560
13566
  });
13561
13567
  }
@@ -16354,7 +16360,7 @@
16354
16360
  const config = isObject$1(to) ? to : {
16355
16361
  path: to
16356
16362
  };
16357
- return !!$route.matched.find((val) => {
16363
+ return $route.matched.some((val) => {
16358
16364
  const pathMatched = "path" in config && config.path === val.path;
16359
16365
  const nameMatched = "name" in config && config.name === val.name;
16360
16366
  return pathMatched || nameMatched;
@@ -17330,28 +17336,25 @@
17330
17336
  });
17331
17337
  return URL.createObjectURL(svgBlob);
17332
17338
  };
17339
+ const revokeWatermarkUrl = () => {
17340
+ if (watermarkUrl.value) {
17341
+ URL.revokeObjectURL(watermarkUrl.value);
17342
+ }
17343
+ };
17344
+ const generateWatermarkUrl = () => {
17345
+ if (svgElRef.value) {
17346
+ revokeWatermarkUrl();
17347
+ watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
17348
+ }
17349
+ };
17333
17350
  __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect(() => {
17334
17351
  if (props2.image) {
17335
17352
  makeImageToBase64(props2.image);
17336
17353
  }
17337
17354
  });
17338
- __WEBPACK_EXTERNAL_MODULE_vue__.watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], () => {
17339
- __WEBPACK_EXTERNAL_MODULE_vue__.nextTick(() => {
17340
- if (svgElRef.value) {
17341
- if (watermarkUrl.value) {
17342
- URL.revokeObjectURL(watermarkUrl.value);
17343
- }
17344
- watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
17345
- }
17346
- });
17347
- }, {
17348
- immediate: true
17349
- });
17350
- __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted(() => {
17351
- if (watermarkUrl.value) {
17352
- URL.revokeObjectURL(watermarkUrl.value);
17353
- }
17354
- });
17355
+ __WEBPACK_EXTERNAL_MODULE_vue__.watch(() => [imageBase64.value, props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], generateWatermarkUrl);
17356
+ __WEBPACK_EXTERNAL_MODULE_vue__.onMounted(generateWatermarkUrl);
17357
+ __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted(revokeWatermarkUrl);
17355
17358
  return () => {
17356
17359
  const style = extend({
17357
17360
  backgroundImage: `url(${watermarkUrl.value})`
@@ -18215,7 +18218,7 @@
18215
18218
  });
18216
18219
  }
18217
18220
  };
18218
- const version = "4.9.18";
18221
+ const version = "4.9.19";
18219
18222
  function install(app) {
18220
18223
  const components = [
18221
18224
  ActionBar,