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/README.md CHANGED
@@ -133,6 +133,7 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
133
133
  | [vscode-common-intellisense](https://github.com/Simon-He95/vscode-common-intellisense) | A VS Code extension that provides better intellisense to Vant developers |
134
134
  | [nuxt-vant-mobile](https://github.com/easy-temps/nuxt-vant-mobile) | Nuxt _⁴_ project template based on Vant, out of the box |
135
135
  | [mobvue](https://github.com/un-pany/mobvue) | A well-crafted mobile web app template |
136
+ | [novlan1/press-ui](https://github.com/novlan1/press-ui) | Uni APP mobile UI Components based on Vant |
136
137
 
137
138
  ## Links
138
139
 
@@ -29,6 +29,8 @@ export type DialogOptions = {
29
29
  confirmButtonColor?: string;
30
30
  confirmButtonDisabled?: boolean;
31
31
  closeOnClickOverlay?: boolean;
32
+ destroyOnClose?: boolean;
33
+ keyboardEnabled?: boolean;
32
34
  };
33
35
  export type DialogThemeVars = {
34
36
  dialogWidth?: string;
@@ -1,8 +1,8 @@
1
1
  import { PropType, TeleportProps, type ExtractPropTypes } from 'vue';
2
- import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset } from './types';
2
+ import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, FloatingBubbleGap } from './types';
3
3
  export declare const floatingBubbleProps: {
4
4
  gap: {
5
- type: NumberConstructor;
5
+ type: PropType<FloatingBubbleGap>;
6
6
  default: number;
7
7
  };
8
8
  icon: StringConstructor;
@@ -26,7 +26,7 @@ export declare const floatingBubbleProps: {
26
26
  export type FloatingBubbleProps = ExtractPropTypes<typeof floatingBubbleProps>;
27
27
  declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
28
28
  gap: {
29
- type: NumberConstructor;
29
+ type: PropType<FloatingBubbleGap>;
30
30
  default: number;
31
31
  };
32
32
  icon: StringConstructor;
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
48
48
  };
49
49
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").PublicProps, Readonly<ExtractPropTypes<{
50
50
  gap: {
51
- type: NumberConstructor;
51
+ type: PropType<FloatingBubbleGap>;
52
52
  default: number;
53
53
  };
54
54
  icon: StringConstructor;
@@ -75,7 +75,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
75
75
  }>, {
76
76
  offset: FloatingBubbleOffset;
77
77
  teleport: string | import("vue").RendererElement | null | undefined;
78
- gap: number;
78
+ gap: FloatingBubbleGap;
79
79
  axis: FloatingBubbleAxis;
80
80
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
81
81
  export default _default;
@@ -1,10 +1,13 @@
1
1
  import { Teleport, computed, defineComponent, nextTick, onMounted, ref, watch, onActivated, onDeactivated, createVNode as _createVNode, vShow as _vShow, mergeProps as _mergeProps, withDirectives as _withDirectives } from "vue";
2
- import { pick, addUnit, closest, createNamespace, makeNumberProp, makeStringProp, windowWidth, windowHeight } from "../utils/index.mjs";
2
+ import { pick, addUnit, closest, createNamespace, isObject, makeStringProp, windowWidth, windowHeight } from "../utils/index.mjs";
3
3
  import { useRect, useEventListener } from "@vant/use";
4
4
  import { useTouch } from "../composables/use-touch.mjs";
5
5
  import Icon from "../icon/index.mjs";
6
6
  const floatingBubbleProps = {
7
- gap: makeNumberProp(24),
7
+ gap: {
8
+ type: [Number, Object],
9
+ default: 24
10
+ },
8
11
  icon: String,
9
12
  axis: makeStringProp("y"),
10
13
  magnetic: String,
@@ -38,11 +41,13 @@ var stdin_default = defineComponent({
38
41
  width: 0,
39
42
  height: 0
40
43
  });
44
+ const gapX = computed(() => isObject(props.gap) ? props.gap.x : props.gap);
45
+ const gapY = computed(() => isObject(props.gap) ? props.gap.y : props.gap);
41
46
  const boundary = computed(() => ({
42
- top: props.gap,
43
- right: windowWidth.value - state.value.width - props.gap,
44
- bottom: windowHeight.value - state.value.height - props.gap,
45
- left: props.gap
47
+ top: gapY.value,
48
+ right: windowWidth.value - state.value.width - gapX.value,
49
+ bottom: windowHeight.value - state.value.height - gapY.value,
50
+ left: gapX.value
46
51
  }));
47
52
  const dragging = ref(false);
48
53
  let initialized = false;
@@ -66,8 +71,8 @@ var stdin_default = defineComponent({
66
71
  offset
67
72
  } = props;
68
73
  state.value = {
69
- x: offset.x > -1 ? offset.x : windowWidth.value - width - props.gap,
70
- y: offset.y > -1 ? offset.y : windowHeight.value - height - props.gap,
74
+ x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
75
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
71
76
  width,
72
77
  height
73
78
  };
@@ -135,7 +140,7 @@ var stdin_default = defineComponent({
135
140
  initialized = true;
136
141
  });
137
142
  });
138
- watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState, {
143
+ watch([windowWidth, windowHeight, gapX, gapY, () => props.offset], updateState, {
139
144
  deep: true
140
145
  });
141
146
  const show = ref(true);
@@ -1,6 +1,6 @@
1
1
  export declare const FloatingBubble: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  gap: {
3
- type: NumberConstructor;
3
+ type: import("vue").PropType<import("./types").FloatingBubbleGap>;
4
4
  default: number;
5
5
  };
6
6
  icon: StringConstructor;
@@ -22,7 +22,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
22
22
  };
23
23
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
24
  gap: {
25
- type: NumberConstructor;
25
+ type: import("vue").PropType<import("./types").FloatingBubbleGap>;
26
26
  default: number;
27
27
  };
28
28
  icon: StringConstructor;
@@ -49,7 +49,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
49
49
  }>, {
50
50
  offset: import("./types").FloatingBubbleOffset;
51
51
  teleport: string | import("vue").RendererElement | null | undefined;
52
- gap: number;
52
+ gap: import("./types").FloatingBubbleGap;
53
53
  axis: import("./types").FloatingBubbleAxis;
54
54
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
55
55
  export default FloatingBubble;
@@ -12,6 +12,10 @@ export type FloatingBubbleOffset = {
12
12
  x: number;
13
13
  y: number;
14
14
  };
15
+ export type FloatingBubbleGap = number | {
16
+ x: number;
17
+ y: number;
18
+ };
15
19
  export type FloatingBubbleBoundary = {
16
20
  top: number;
17
21
  right: number;
package/es/index.d.ts CHANGED
@@ -106,4 +106,4 @@ declare namespace _default {
106
106
  }
107
107
  export default _default;
108
108
  export function install(app: any): void;
109
- export const version: "4.9.18";
109
+ export const version: "4.9.19";
package/es/index.mjs CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
99
99
  import { TreeSelect } from "./tree-select/index.mjs";
100
100
  import { Uploader } from "./uploader/index.mjs";
101
101
  import { Watermark } from "./watermark/index.mjs";
102
- const version = "4.9.18";
102
+ const version = "4.9.19";
103
103
  function install(app) {
104
104
  const components = [
105
105
  ActionBar,
@@ -1,4 +1,4 @@
1
- import { ref, defineComponent, Teleport, Transition, vShow as _vShow, createVNode as _createVNode, withDirectives as _withDirectives } from "vue";
1
+ import { ref, defineComponent, Teleport, Transition, vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode, withDirectives as _withDirectives } from "vue";
2
2
  import { isDef, extend, truthProp, numericProp, unknownProp, preventDefault, createNamespace, getZIndexStyle } from "../utils/index.mjs";
3
3
  import { useEventListener } from "@vant/use";
4
4
  import { useLazyRender } from "../composables/use-lazy-render.mjs";
@@ -15,8 +15,10 @@ const overlayProps = {
15
15
  };
16
16
  var stdin_default = defineComponent({
17
17
  name,
18
+ inheritAttrs: false,
18
19
  props: overlayProps,
19
20
  setup(props, {
21
+ attrs,
20
22
  slots
21
23
  }) {
22
24
  const root = ref();
@@ -32,11 +34,11 @@ var stdin_default = defineComponent({
32
34
  if (isDef(props.duration)) {
33
35
  style.animationDuration = `${props.duration}s`;
34
36
  }
35
- return _withDirectives(_createVNode("div", {
37
+ return _withDirectives(_createVNode("div", _mergeProps({
36
38
  "ref": root,
37
39
  "style": style,
38
40
  "class": [bem(), props.className]
39
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[_vShow, props.show]]);
41
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[_vShow, props.show]]);
40
42
  });
41
43
  useEventListener("touchmove", onTouchMove, {
42
44
  target: root
@@ -99,7 +99,8 @@ var stdin_default = defineComponent({
99
99
  children.forEach((child) => child.stopMomentum());
100
100
  const params = getEventParams();
101
101
  nextTick(() => {
102
- emit("confirm", params);
102
+ const params2 = getEventParams();
103
+ emit("confirm", params2);
103
104
  });
104
105
  return params;
105
106
  };
@@ -23,7 +23,7 @@ function findIndexOfEnabledOption(options, index) {
23
23
  }
24
24
  return 0;
25
25
  }
26
- const isOptionExist = (options, value, fields) => value !== void 0 && !!options.find((option) => option[fields.value] === value);
26
+ const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
27
27
  function findOptionByValue(options, value, fields) {
28
28
  const index = options.findIndex((option) => option[fields.value] === value);
29
29
  const enabledIndex = findIndexOfEnabledOption(options, index);
@@ -50,7 +50,7 @@ var stdin_default = defineComponent({
50
50
  const config = isObject(to) ? to : {
51
51
  path: to
52
52
  };
53
- return !!$route.matched.find((val) => {
53
+ return $route.matched.some((val) => {
54
54
  const pathMatched = "path" in config && config.path === val.path;
55
55
  const nameMatched = "name" in config && config.name === val.name;
56
56
  return pathMatched || nameMatched;
package/es/tabs/Tabs.mjs CHANGED
@@ -162,9 +162,8 @@ var stdin_default = defineComponent({
162
162
  }
163
163
  };
164
164
  const setCurrentIndexByName = (name2, skipScrollIntoView) => {
165
- const matched = children.find((tab, index2) => getTabName(tab, index2) === name2);
166
- const index = matched ? children.indexOf(matched) : 0;
167
- setCurrentIndex(index, skipScrollIntoView);
165
+ const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
166
+ setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
168
167
  };
169
168
  const scrollToCurrentContent = (immediate = false) => {
170
169
  if (props.scrollspy) {
@@ -1,4 +1,4 @@
1
- import { defineComponent, nextTick, onUnmounted, ref, watch, watchEffect, createVNode as _createVNode } from "vue";
1
+ import { defineComponent, onMounted, onUnmounted, ref, watch, watchEffect, createVNode as _createVNode } from "vue";
2
2
  import { extend, truthProp, numericProp, createNamespace, getZIndexStyle, makeNumberProp, makeNumericProp, makeStringProp } from "../utils/index.mjs";
3
3
  const [name, bem] = createNamespace("watermark");
4
4
  const watermarkProps = {
@@ -88,28 +88,25 @@ var stdin_default = defineComponent({
88
88
  });
89
89
  return URL.createObjectURL(svgBlob);
90
90
  };
91
+ const revokeWatermarkUrl = () => {
92
+ if (watermarkUrl.value) {
93
+ URL.revokeObjectURL(watermarkUrl.value);
94
+ }
95
+ };
96
+ const generateWatermarkUrl = () => {
97
+ if (svgElRef.value) {
98
+ revokeWatermarkUrl();
99
+ watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
100
+ }
101
+ };
91
102
  watchEffect(() => {
92
103
  if (props.image) {
93
104
  makeImageToBase64(props.image);
94
105
  }
95
106
  });
96
- watch(() => [imageBase64.value, props.content, props.textColor, props.height, props.width, props.rotate, props.gapX, props.gapY], () => {
97
- nextTick(() => {
98
- if (svgElRef.value) {
99
- if (watermarkUrl.value) {
100
- URL.revokeObjectURL(watermarkUrl.value);
101
- }
102
- watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
103
- }
104
- });
105
- }, {
106
- immediate: true
107
- });
108
- onUnmounted(() => {
109
- if (watermarkUrl.value) {
110
- URL.revokeObjectURL(watermarkUrl.value);
111
- }
112
- });
107
+ watch(() => [imageBase64.value, props.content, props.textColor, props.height, props.width, props.rotate, props.gapX, props.gapY], generateWatermarkUrl);
108
+ onMounted(generateWatermarkUrl);
109
+ onUnmounted(revokeWatermarkUrl);
113
110
  return () => {
114
111
  const style = extend({
115
112
  backgroundImage: `url(${watermarkUrl.value})`
@@ -29,6 +29,8 @@ export type DialogOptions = {
29
29
  confirmButtonColor?: string;
30
30
  confirmButtonDisabled?: boolean;
31
31
  closeOnClickOverlay?: boolean;
32
+ destroyOnClose?: boolean;
33
+ keyboardEnabled?: boolean;
32
34
  };
33
35
  export type DialogThemeVars = {
34
36
  dialogWidth?: string;
@@ -1,8 +1,8 @@
1
1
  import { PropType, TeleportProps, type ExtractPropTypes } from 'vue';
2
- import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset } from './types';
2
+ import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, FloatingBubbleGap } from './types';
3
3
  export declare const floatingBubbleProps: {
4
4
  gap: {
5
- type: NumberConstructor;
5
+ type: PropType<FloatingBubbleGap>;
6
6
  default: number;
7
7
  };
8
8
  icon: StringConstructor;
@@ -26,7 +26,7 @@ export declare const floatingBubbleProps: {
26
26
  export type FloatingBubbleProps = ExtractPropTypes<typeof floatingBubbleProps>;
27
27
  declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
28
28
  gap: {
29
- type: NumberConstructor;
29
+ type: PropType<FloatingBubbleGap>;
30
30
  default: number;
31
31
  };
32
32
  icon: StringConstructor;
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
48
48
  };
49
49
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").PublicProps, Readonly<ExtractPropTypes<{
50
50
  gap: {
51
- type: NumberConstructor;
51
+ type: PropType<FloatingBubbleGap>;
52
52
  default: number;
53
53
  };
54
54
  icon: StringConstructor;
@@ -75,7 +75,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
75
75
  }>, {
76
76
  offset: FloatingBubbleOffset;
77
77
  teleport: string | import("vue").RendererElement | null | undefined;
78
- gap: number;
78
+ gap: FloatingBubbleGap;
79
79
  axis: FloatingBubbleAxis;
80
80
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
81
81
  export default _default;
@@ -37,7 +37,10 @@ var import_use = require("@vant/use");
37
37
  var import_use_touch = require("../composables/use-touch");
38
38
  var import_icon = __toESM(require("../icon"));
39
39
  const floatingBubbleProps = {
40
- gap: (0, import_utils.makeNumberProp)(24),
40
+ gap: {
41
+ type: [Number, Object],
42
+ default: 24
43
+ },
41
44
  icon: String,
42
45
  axis: (0, import_utils.makeStringProp)("y"),
43
46
  magnetic: String,
@@ -71,11 +74,13 @@ var stdin_default = (0, import_vue.defineComponent)({
71
74
  width: 0,
72
75
  height: 0
73
76
  });
77
+ const gapX = (0, import_vue.computed)(() => (0, import_utils.isObject)(props.gap) ? props.gap.x : props.gap);
78
+ const gapY = (0, import_vue.computed)(() => (0, import_utils.isObject)(props.gap) ? props.gap.y : props.gap);
74
79
  const boundary = (0, import_vue.computed)(() => ({
75
- top: props.gap,
76
- right: import_utils.windowWidth.value - state.value.width - props.gap,
77
- bottom: import_utils.windowHeight.value - state.value.height - props.gap,
78
- left: props.gap
80
+ top: gapY.value,
81
+ right: import_utils.windowWidth.value - state.value.width - gapX.value,
82
+ bottom: import_utils.windowHeight.value - state.value.height - gapY.value,
83
+ left: gapX.value
79
84
  }));
80
85
  const dragging = (0, import_vue.ref)(false);
81
86
  let initialized = false;
@@ -99,8 +104,8 @@ var stdin_default = (0, import_vue.defineComponent)({
99
104
  offset
100
105
  } = props;
101
106
  state.value = {
102
- x: offset.x > -1 ? offset.x : import_utils.windowWidth.value - width - props.gap,
103
- y: offset.y > -1 ? offset.y : import_utils.windowHeight.value - height - props.gap,
107
+ x: offset.x > -1 ? offset.x : import_utils.windowWidth.value - width - gapX.value,
108
+ y: offset.y > -1 ? offset.y : import_utils.windowHeight.value - height - gapY.value,
104
109
  width,
105
110
  height
106
111
  };
@@ -168,7 +173,7 @@ var stdin_default = (0, import_vue.defineComponent)({
168
173
  initialized = true;
169
174
  });
170
175
  });
171
- (0, import_vue.watch)([import_utils.windowWidth, import_utils.windowHeight, () => props.gap, () => props.offset], updateState, {
176
+ (0, import_vue.watch)([import_utils.windowWidth, import_utils.windowHeight, gapX, gapY, () => props.offset], updateState, {
172
177
  deep: true
173
178
  });
174
179
  const show = (0, import_vue.ref)(true);
@@ -1,6 +1,6 @@
1
1
  export declare const FloatingBubble: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  gap: {
3
- type: NumberConstructor;
3
+ type: import("vue").PropType<import("./types").FloatingBubbleGap>;
4
4
  default: number;
5
5
  };
6
6
  icon: StringConstructor;
@@ -22,7 +22,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
22
22
  };
23
23
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
24
  gap: {
25
- type: NumberConstructor;
25
+ type: import("vue").PropType<import("./types").FloatingBubbleGap>;
26
26
  default: number;
27
27
  };
28
28
  icon: StringConstructor;
@@ -49,7 +49,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
49
49
  }>, {
50
50
  offset: import("./types").FloatingBubbleOffset;
51
51
  teleport: string | import("vue").RendererElement | null | undefined;
52
- gap: number;
52
+ gap: import("./types").FloatingBubbleGap;
53
53
  axis: import("./types").FloatingBubbleAxis;
54
54
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
55
55
  export default FloatingBubble;
@@ -12,6 +12,10 @@ export type FloatingBubbleOffset = {
12
12
  x: number;
13
13
  y: number;
14
14
  };
15
+ export type FloatingBubbleGap = number | {
16
+ x: number;
17
+ y: number;
18
+ };
15
19
  export type FloatingBubbleBoundary = {
16
20
  top: number;
17
21
  right: number;
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.18";
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.18";
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);
@@ -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) {