vant 4.0.9 → 4.0.10

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
@@ -39,7 +39,7 @@
39
39
  - 🍭 Support Dark Mode
40
40
  - 🍭 Support Nuxt 3
41
41
  - 🍭 Support SSR
42
- - 🌍 Support i18n, built-in 20+ languages
42
+ - 🌍 Support i18n, built-in 30+ languages
43
43
 
44
44
  ## Install
45
45
 
package/es/index.d.ts CHANGED
@@ -98,4 +98,4 @@ declare namespace _default {
98
98
  }
99
99
  export default _default;
100
100
  export function install(app: any): void;
101
- export const version: "4.0.9";
101
+ export const version: "4.0.10";
package/es/index.mjs CHANGED
@@ -91,7 +91,7 @@ import { TimePicker } from "./time-picker/index.mjs";
91
91
  import { Toast } from "./toast/index.mjs";
92
92
  import { TreeSelect } from "./tree-select/index.mjs";
93
93
  import { Uploader } from "./uploader/index.mjs";
94
- const version = "4.0.9";
94
+ const version = "4.0.10";
95
95
  function install(app) {
96
96
  const components = [
97
97
  ActionBar,
@@ -82,9 +82,11 @@ var stdin_default = defineComponent({
82
82
  }
83
83
  });
84
84
  }
85
- emit("change", extend({
86
- columnIndex
87
- }, getEventParams()));
85
+ nextTick(() => {
86
+ emit("change", extend({
87
+ columnIndex
88
+ }, getEventParams()));
89
+ });
88
90
  };
89
91
  const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
90
92
  columnIndex,
@@ -34,7 +34,7 @@ var stdin_default = defineComponent({
34
34
  let current;
35
35
  let startValue;
36
36
  const root = ref();
37
- const slider = ref();
37
+ const slider = [ref(), ref()];
38
38
  const dragStatus = ref();
39
39
  const touch = useTouch();
40
40
  const scope = computed(() => Number(props.max) - Number(props.min));
@@ -226,7 +226,7 @@ var stdin_default = defineComponent({
226
226
  const renderButton = (index) => {
227
227
  const current2 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
228
228
  return _createVNode("div", {
229
- "ref": slider,
229
+ "ref": slider[index != null ? index : 0],
230
230
  "role": "slider",
231
231
  "class": getButtonClassName(index),
232
232
  "tabindex": props.disabled ? void 0 : 0,
@@ -249,8 +249,10 @@ var stdin_default = defineComponent({
249
249
  };
250
250
  updateValue(props.modelValue);
251
251
  useCustomFieldValue(() => props.modelValue);
252
- useEventListener("touchmove", onTouchMove, {
253
- target: slider
252
+ slider.forEach((item) => {
253
+ useEventListener("touchmove", onTouchMove, {
254
+ target: item
255
+ });
254
256
  });
255
257
  return () => _createVNode("div", {
256
258
  "ref": root,
package/lib/index.d.ts CHANGED
@@ -98,4 +98,4 @@ declare namespace _default {
98
98
  }
99
99
  export default _default;
100
100
  export function install(app: any): void;
101
- export const version: "4.0.9";
101
+ export const version: "4.0.10";
package/lib/index.js CHANGED
@@ -210,7 +210,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
210
210
  __reExport(stdin_exports, require("./toast"), module.exports);
211
211
  __reExport(stdin_exports, require("./tree-select"), module.exports);
212
212
  __reExport(stdin_exports, require("./uploader"), module.exports);
213
- const version = "4.0.9";
213
+ const version = "4.0.10";
214
214
  function install(app) {
215
215
  const components = [
216
216
  import_action_bar.ActionBar,
@@ -112,9 +112,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
112
112
  }
113
113
  });
114
114
  }
115
- emit("change", (0, import_utils.extend)({
116
- columnIndex
117
- }, getEventParams()));
115
+ (0, import_vue2.nextTick)(() => {
116
+ emit("change", (0, import_utils.extend)({
117
+ columnIndex
118
+ }, getEventParams()));
119
+ });
118
120
  };
119
121
  const onClickOption = (currentOption, columnIndex) => emit("clickOption", (0, import_utils.extend)({
120
122
  columnIndex,
@@ -57,7 +57,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
57
57
  let current;
58
58
  let startValue;
59
59
  const root = (0, import_vue2.ref)();
60
- const slider = (0, import_vue2.ref)();
60
+ const slider = [(0, import_vue2.ref)(), (0, import_vue2.ref)()];
61
61
  const dragStatus = (0, import_vue2.ref)();
62
62
  const touch = (0, import_use_touch.useTouch)();
63
63
  const scope = (0, import_vue2.computed)(() => Number(props.max) - Number(props.min));
@@ -249,7 +249,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
249
249
  const renderButton = (index) => {
250
250
  const current2 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
251
251
  return (0, import_vue.createVNode)("div", {
252
- "ref": slider,
252
+ "ref": slider[index != null ? index : 0],
253
253
  "role": "slider",
254
254
  "class": getButtonClassName(index),
255
255
  "tabindex": props.disabled ? void 0 : 0,
@@ -272,8 +272,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
272
272
  };
273
273
  updateValue(props.modelValue);
274
274
  (0, import_use.useCustomFieldValue)(() => props.modelValue);
275
- (0, import_use.useEventListener)("touchmove", onTouchMove, {
276
- target: slider
275
+ slider.forEach((item) => {
276
+ (0, import_use.useEventListener)("touchmove", onTouchMove, {
277
+ target: item
278
+ });
277
279
  });
278
280
  return () => (0, import_vue.createVNode)("div", {
279
281
  "ref": root,
package/lib/vant.cjs.js CHANGED
@@ -3209,9 +3209,11 @@ var stdin_default$1q = vue.defineComponent({
3209
3209
  }
3210
3210
  });
3211
3211
  }
3212
- emit("change", extend({
3213
- columnIndex
3214
- }, getEventParams()));
3212
+ vue.nextTick(() => {
3213
+ emit("change", extend({
3214
+ columnIndex
3215
+ }, getEventParams()));
3216
+ });
3215
3217
  };
3216
3218
  const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
3217
3219
  columnIndex,
@@ -12482,7 +12484,7 @@ var stdin_default$g = vue.defineComponent({
12482
12484
  let current2;
12483
12485
  let startValue;
12484
12486
  const root = vue.ref();
12485
- const slider = vue.ref();
12487
+ const slider = [vue.ref(), vue.ref()];
12486
12488
  const dragStatus = vue.ref();
12487
12489
  const touch = useTouch();
12488
12490
  const scope = vue.computed(() => Number(props.max) - Number(props.min));
@@ -12674,7 +12676,7 @@ var stdin_default$g = vue.defineComponent({
12674
12676
  const renderButton = (index) => {
12675
12677
  const current22 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
12676
12678
  return vue.createVNode("div", {
12677
- "ref": slider,
12679
+ "ref": slider[index != null ? index : 0],
12678
12680
  "role": "slider",
12679
12681
  "class": getButtonClassName(index),
12680
12682
  "tabindex": props.disabled ? void 0 : 0,
@@ -12697,8 +12699,10 @@ var stdin_default$g = vue.defineComponent({
12697
12699
  };
12698
12700
  updateValue(props.modelValue);
12699
12701
  use.useCustomFieldValue(() => props.modelValue);
12700
- use.useEventListener("touchmove", onTouchMove, {
12701
- target: slider
12702
+ slider.forEach((item) => {
12703
+ use.useEventListener("touchmove", onTouchMove, {
12704
+ target: item
12705
+ });
12702
12706
  });
12703
12707
  return () => vue.createVNode("div", {
12704
12708
  "ref": root,
@@ -14954,7 +14958,7 @@ const Lazyload = {
14954
14958
  });
14955
14959
  }
14956
14960
  };
14957
- const version = "4.0.9";
14961
+ const version = "4.0.10";
14958
14962
  function install(app) {
14959
14963
  const components = [
14960
14964
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -3207,9 +3207,11 @@ var stdin_default$1q = defineComponent({
3207
3207
  }
3208
3208
  });
3209
3209
  }
3210
- emit("change", extend({
3211
- columnIndex
3212
- }, getEventParams()));
3210
+ nextTick(() => {
3211
+ emit("change", extend({
3212
+ columnIndex
3213
+ }, getEventParams()));
3214
+ });
3213
3215
  };
3214
3216
  const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
3215
3217
  columnIndex,
@@ -12480,7 +12482,7 @@ var stdin_default$g = defineComponent({
12480
12482
  let current2;
12481
12483
  let startValue;
12482
12484
  const root = ref();
12483
- const slider = ref();
12485
+ const slider = [ref(), ref()];
12484
12486
  const dragStatus = ref();
12485
12487
  const touch = useTouch();
12486
12488
  const scope = computed(() => Number(props.max) - Number(props.min));
@@ -12672,7 +12674,7 @@ var stdin_default$g = defineComponent({
12672
12674
  const renderButton = (index) => {
12673
12675
  const current22 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
12674
12676
  return createVNode("div", {
12675
- "ref": slider,
12677
+ "ref": slider[index != null ? index : 0],
12676
12678
  "role": "slider",
12677
12679
  "class": getButtonClassName(index),
12678
12680
  "tabindex": props.disabled ? void 0 : 0,
@@ -12695,8 +12697,10 @@ var stdin_default$g = defineComponent({
12695
12697
  };
12696
12698
  updateValue(props.modelValue);
12697
12699
  useCustomFieldValue(() => props.modelValue);
12698
- useEventListener("touchmove", onTouchMove, {
12699
- target: slider
12700
+ slider.forEach((item) => {
12701
+ useEventListener("touchmove", onTouchMove, {
12702
+ target: item
12703
+ });
12700
12704
  });
12701
12705
  return () => createVNode("div", {
12702
12706
  "ref": root,
@@ -14952,7 +14956,7 @@ const Lazyload = {
14952
14956
  });
14953
14957
  }
14954
14958
  };
14955
- const version = "4.0.9";
14959
+ const version = "4.0.10";
14956
14960
  function install(app) {
14957
14961
  const components = [
14958
14962
  ActionBar,
package/lib/vant.js CHANGED
@@ -3576,9 +3576,11 @@
3576
3576
  }
3577
3577
  });
3578
3578
  }
3579
- emit("change", extend({
3580
- columnIndex
3581
- }, getEventParams()));
3579
+ vue.nextTick(() => {
3580
+ emit("change", extend({
3581
+ columnIndex
3582
+ }, getEventParams()));
3583
+ });
3582
3584
  };
3583
3585
  const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
3584
3586
  columnIndex,
@@ -13723,7 +13725,7 @@
13723
13725
  let current2;
13724
13726
  let startValue;
13725
13727
  const root = vue.ref();
13726
- const slider = vue.ref();
13728
+ const slider = [vue.ref(), vue.ref()];
13727
13729
  const dragStatus = vue.ref();
13728
13730
  const touch = useTouch();
13729
13731
  const scope = vue.computed(() => Number(props.max) - Number(props.min));
@@ -13915,7 +13917,7 @@
13915
13917
  const renderButton = (index) => {
13916
13918
  const current22 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
13917
13919
  return vue.createVNode("div", {
13918
- "ref": slider,
13920
+ "ref": slider[index != null ? index : 0],
13919
13921
  "role": "slider",
13920
13922
  "class": getButtonClassName(index),
13921
13923
  "tabindex": props.disabled ? void 0 : 0,
@@ -13938,8 +13940,10 @@
13938
13940
  };
13939
13941
  updateValue(props.modelValue);
13940
13942
  useCustomFieldValue(() => props.modelValue);
13941
- useEventListener("touchmove", onTouchMove, {
13942
- target: slider
13943
+ slider.forEach((item) => {
13944
+ useEventListener("touchmove", onTouchMove, {
13945
+ target: item
13946
+ });
13943
13947
  });
13944
13948
  return () => vue.createVNode("div", {
13945
13949
  "ref": root,
@@ -16169,7 +16173,7 @@
16169
16173
  });
16170
16174
  }
16171
16175
  };
16172
- const version = "4.0.9";
16176
+ const version = "4.0.10";
16173
16177
  function install(app) {
16174
16178
  const components = [
16175
16179
  ActionBar,