vant 3.6.5 → 3.6.7

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/es/cell/Cell.mjs CHANGED
@@ -78,7 +78,7 @@ var stdin_default = defineComponent({
78
78
  return slots["right-icon"]();
79
79
  }
80
80
  if (props.isLink) {
81
- const name2 = props.arrowDirection ? `arrow-${props.arrowDirection}` : "arrow";
81
+ const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
82
82
  return _createVNode(Icon, {
83
83
  "name": name2,
84
84
  "class": bem("right-icon")
@@ -200,7 +200,12 @@ var stdin_default = defineComponent({
200
200
  value = props.formatter(value);
201
201
  }
202
202
  if (inputRef.value && inputRef.value.value !== value) {
203
+ const {
204
+ selectionStart,
205
+ selectionEnd
206
+ } = inputRef.value;
203
207
  inputRef.value.value = value;
208
+ inputRef.value.setSelectionRange(selectionStart, selectionEnd);
204
209
  }
205
210
  if (value !== props.modelValue) {
206
211
  emit("update:modelValue", value);
package/es/index.d.ts CHANGED
@@ -91,4 +91,4 @@ declare namespace _default {
91
91
  }
92
92
  export default _default;
93
93
  export function install(app: any): void;
94
- export const version: "3.6.5";
94
+ export const version: "3.6.7";
package/es/index.mjs CHANGED
@@ -84,7 +84,7 @@ import { Tag } from "./tag/index.mjs";
84
84
  import { Toast } from "./toast/index.mjs";
85
85
  import { TreeSelect } from "./tree-select/index.mjs";
86
86
  import { Uploader } from "./uploader/index.mjs";
87
- const version = "3.6.5";
87
+ const version = "3.6.7";
88
88
  function install(app) {
89
89
  const components = [
90
90
  ActionBar,
package/es/list/List.mjs CHANGED
@@ -25,7 +25,7 @@ var stdin_default = defineComponent({
25
25
  emit,
26
26
  slots
27
27
  }) {
28
- const loading = ref(false);
28
+ const loading = ref(props.loading);
29
29
  const root = ref();
30
30
  const placeholder = ref();
31
31
  const tabStatus = useTabStatus();
@@ -1,4 +1,4 @@
1
- import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
1
+ import { withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from "vue";
2
2
  import { ref, watch, computed, Teleport, Transition, defineComponent } from "vue";
3
3
  import { truthProp, numericProp, getZIndexStyle, makeStringProp, makeNumericProp, stopPropagation, createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
4
4
  import { useClickAway } from "@vant/use";
@@ -37,11 +37,13 @@ function shuffle(array) {
37
37
  }
38
38
  var stdin_default = defineComponent({
39
39
  name,
40
+ inheritAttrs: false,
40
41
  props: numberKeyboardProps,
41
42
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
42
43
  setup(props, {
43
44
  emit,
44
- slots
45
+ slots,
46
+ attrs
45
47
  }) {
46
48
  const root = ref();
47
49
  const genBasicKeys = () => {
@@ -197,7 +199,7 @@ var stdin_default = defineComponent({
197
199
  const Content = _createVNode(Transition, {
198
200
  "name": props.transition ? "van-slide-up" : ""
199
201
  }, {
200
- default: () => [_withDirectives(_createVNode("div", {
202
+ default: () => [_withDirectives(_createVNode("div", _mergeProps({
201
203
  "ref": root,
202
204
  "style": getZIndexStyle(props.zIndex),
203
205
  "class": bem({
@@ -206,7 +208,7 @@ var stdin_default = defineComponent({
206
208
  }),
207
209
  "onAnimationend": onAnimationEnd,
208
210
  "onTouchstartPassive": stopPropagation
209
- }, [Title, _createVNode("div", {
211
+ }, attrs), [Title, _createVNode("div", {
210
212
  "class": bem("body")
211
213
  }, [_createVNode("div", {
212
214
  "class": bem("keys")
package/lib/cell/Cell.js CHANGED
@@ -101,7 +101,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
101
101
  return slots["right-icon"]();
102
102
  }
103
103
  if (props.isLink) {
104
- const name2 = props.arrowDirection ? `arrow-${props.arrowDirection}` : "arrow";
104
+ const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
105
105
  return (0, import_vue.createVNode)(import_icon.Icon, {
106
106
  "name": name2,
107
107
  "class": bem("right-icon")
@@ -223,7 +223,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
223
223
  value = props.formatter(value);
224
224
  }
225
225
  if (inputRef.value && inputRef.value.value !== value) {
226
+ const {
227
+ selectionStart,
228
+ selectionEnd
229
+ } = inputRef.value;
226
230
  inputRef.value.value = value;
231
+ inputRef.value.setSelectionRange(selectionStart, selectionEnd);
227
232
  }
228
233
  if (value !== props.modelValue) {
229
234
  emit("update:modelValue", value);
package/lib/index.d.ts CHANGED
@@ -91,4 +91,4 @@ declare namespace _default {
91
91
  }
92
92
  export default _default;
93
93
  export function install(app: any): void;
94
- export const version: "3.6.5";
94
+ export const version: "3.6.7";
package/lib/index.js CHANGED
@@ -196,7 +196,7 @@ __reExport(stdin_exports, require("./tag"), module.exports);
196
196
  __reExport(stdin_exports, require("./toast"), module.exports);
197
197
  __reExport(stdin_exports, require("./tree-select"), module.exports);
198
198
  __reExport(stdin_exports, require("./uploader"), module.exports);
199
- const version = "3.6.5";
199
+ const version = "3.6.7";
200
200
  function install(app) {
201
201
  const components = [
202
202
  import_action_bar.ActionBar,
package/lib/list/List.js CHANGED
@@ -47,7 +47,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
47
47
  emit,
48
48
  slots
49
49
  }) {
50
- const loading = (0, import_vue2.ref)(false);
50
+ const loading = (0, import_vue2.ref)(props.loading);
51
51
  const root = (0, import_vue2.ref)();
52
52
  const placeholder = (0, import_vue2.ref)();
53
53
  const tabStatus = (0, import_use_tab_status.useTabStatus)();
@@ -65,11 +65,13 @@ function shuffle(array) {
65
65
  }
66
66
  var stdin_default = (0, import_vue2.defineComponent)({
67
67
  name,
68
+ inheritAttrs: false,
68
69
  props: numberKeyboardProps,
69
70
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
70
71
  setup(props, {
71
72
  emit,
72
- slots
73
+ slots,
74
+ attrs
73
75
  }) {
74
76
  const root = (0, import_vue2.ref)();
75
77
  const genBasicKeys = () => {
@@ -225,7 +227,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
225
227
  const Content = (0, import_vue.createVNode)(import_vue2.Transition, {
226
228
  "name": props.transition ? "van-slide-up" : ""
227
229
  }, {
228
- default: () => [(0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
230
+ default: () => [(0, import_vue.withDirectives)((0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
229
231
  "ref": root,
230
232
  "style": (0, import_utils.getZIndexStyle)(props.zIndex),
231
233
  "class": bem({
@@ -234,7 +236,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
234
236
  }),
235
237
  "onAnimationend": onAnimationEnd,
236
238
  "onTouchstartPassive": import_utils.stopPropagation
237
- }, [Title, (0, import_vue.createVNode)("div", {
239
+ }, attrs), [Title, (0, import_vue.createVNode)("div", {
238
240
  "class": bem("body")
239
241
  }, [(0, import_vue.createVNode)("div", {
240
242
  "class": bem("keys")
package/lib/vant.cjs.js CHANGED
@@ -2378,7 +2378,7 @@ var stdin_default$1o = vue.defineComponent({
2378
2378
  return slots["right-icon"]();
2379
2379
  }
2380
2380
  if (props.isLink) {
2381
- const name2 = props.arrowDirection ? `arrow-${props.arrowDirection}` : "arrow";
2381
+ const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
2382
2382
  return vue.createVNode(Icon, {
2383
2383
  "name": name2,
2384
2384
  "class": bem$1d("right-icon")
@@ -2854,7 +2854,12 @@ var stdin_default$1m = vue.defineComponent({
2854
2854
  value = props.formatter(value);
2855
2855
  }
2856
2856
  if (inputRef.value && inputRef.value.value !== value) {
2857
+ const {
2858
+ selectionStart,
2859
+ selectionEnd
2860
+ } = inputRef.value;
2857
2861
  inputRef.value.value = value;
2862
+ inputRef.value.setSelectionRange(selectionStart, selectionEnd);
2858
2863
  }
2859
2864
  if (value !== props.modelValue) {
2860
2865
  emit("update:modelValue", value);
@@ -10359,7 +10364,7 @@ var stdin_default$w = vue.defineComponent({
10359
10364
  emit,
10360
10365
  slots
10361
10366
  }) {
10362
- const loading = vue.ref(false);
10367
+ const loading = vue.ref(props.loading);
10363
10368
  const root = vue.ref();
10364
10369
  const placeholder = vue.ref();
10365
10370
  const tabStatus = useTabStatus();
@@ -10929,11 +10934,13 @@ function shuffle(array) {
10929
10934
  }
10930
10935
  var stdin_default$r = vue.defineComponent({
10931
10936
  name: name$m,
10937
+ inheritAttrs: false,
10932
10938
  props: numberKeyboardProps,
10933
10939
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
10934
10940
  setup(props, {
10935
10941
  emit,
10936
- slots
10942
+ slots,
10943
+ attrs
10937
10944
  }) {
10938
10945
  const root = vue.ref();
10939
10946
  const genBasicKeys = () => {
@@ -11089,7 +11096,7 @@ var stdin_default$r = vue.defineComponent({
11089
11096
  const Content = vue.createVNode(vue.Transition, {
11090
11097
  "name": props.transition ? "van-slide-up" : ""
11091
11098
  }, {
11092
- default: () => [vue.withDirectives(vue.createVNode("div", {
11099
+ default: () => [vue.withDirectives(vue.createVNode("div", vue.mergeProps({
11093
11100
  "ref": root,
11094
11101
  "style": getZIndexStyle(props.zIndex),
11095
11102
  "class": bem$m({
@@ -11098,7 +11105,7 @@ var stdin_default$r = vue.defineComponent({
11098
11105
  }),
11099
11106
  "onAnimationend": onAnimationEnd,
11100
11107
  "onTouchstartPassive": stopPropagation
11101
- }, [Title, vue.createVNode("div", {
11108
+ }, attrs), [Title, vue.createVNode("div", {
11102
11109
  "class": bem$m("body")
11103
11110
  }, [vue.createVNode("div", {
11104
11111
  "class": bem$m("keys")
@@ -14954,7 +14961,7 @@ const Lazyload = {
14954
14961
  });
14955
14962
  }
14956
14963
  };
14957
- const version = "3.6.5";
14964
+ const version = "3.6.7";
14958
14965
  function install(app) {
14959
14966
  const components = [
14960
14967
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -2376,7 +2376,7 @@ var stdin_default$1o = defineComponent({
2376
2376
  return slots["right-icon"]();
2377
2377
  }
2378
2378
  if (props.isLink) {
2379
- const name2 = props.arrowDirection ? `arrow-${props.arrowDirection}` : "arrow";
2379
+ const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
2380
2380
  return createVNode(Icon, {
2381
2381
  "name": name2,
2382
2382
  "class": bem$1d("right-icon")
@@ -2852,7 +2852,12 @@ var stdin_default$1m = defineComponent({
2852
2852
  value = props.formatter(value);
2853
2853
  }
2854
2854
  if (inputRef.value && inputRef.value.value !== value) {
2855
+ const {
2856
+ selectionStart,
2857
+ selectionEnd
2858
+ } = inputRef.value;
2855
2859
  inputRef.value.value = value;
2860
+ inputRef.value.setSelectionRange(selectionStart, selectionEnd);
2856
2861
  }
2857
2862
  if (value !== props.modelValue) {
2858
2863
  emit("update:modelValue", value);
@@ -10357,7 +10362,7 @@ var stdin_default$w = defineComponent({
10357
10362
  emit,
10358
10363
  slots
10359
10364
  }) {
10360
- const loading = ref(false);
10365
+ const loading = ref(props.loading);
10361
10366
  const root = ref();
10362
10367
  const placeholder = ref();
10363
10368
  const tabStatus = useTabStatus();
@@ -10927,11 +10932,13 @@ function shuffle(array) {
10927
10932
  }
10928
10933
  var stdin_default$r = defineComponent({
10929
10934
  name: name$m,
10935
+ inheritAttrs: false,
10930
10936
  props: numberKeyboardProps,
10931
10937
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
10932
10938
  setup(props, {
10933
10939
  emit,
10934
- slots
10940
+ slots,
10941
+ attrs
10935
10942
  }) {
10936
10943
  const root = ref();
10937
10944
  const genBasicKeys = () => {
@@ -11087,7 +11094,7 @@ var stdin_default$r = defineComponent({
11087
11094
  const Content = createVNode(Transition, {
11088
11095
  "name": props.transition ? "van-slide-up" : ""
11089
11096
  }, {
11090
- default: () => [withDirectives(createVNode("div", {
11097
+ default: () => [withDirectives(createVNode("div", mergeProps({
11091
11098
  "ref": root,
11092
11099
  "style": getZIndexStyle(props.zIndex),
11093
11100
  "class": bem$m({
@@ -11096,7 +11103,7 @@ var stdin_default$r = defineComponent({
11096
11103
  }),
11097
11104
  "onAnimationend": onAnimationEnd,
11098
11105
  "onTouchstartPassive": stopPropagation
11099
- }, [Title, createVNode("div", {
11106
+ }, attrs), [Title, createVNode("div", {
11100
11107
  "class": bem$m("body")
11101
11108
  }, [createVNode("div", {
11102
11109
  "class": bem$m("keys")
@@ -14952,7 +14959,7 @@ const Lazyload = {
14952
14959
  });
14953
14960
  }
14954
14961
  };
14955
- const version = "3.6.5";
14962
+ const version = "3.6.7";
14956
14963
  function install(app) {
14957
14964
  const components = [
14958
14965
  ActionBar,
package/lib/vant.js CHANGED
@@ -2737,7 +2737,7 @@
2737
2737
  return slots["right-icon"]();
2738
2738
  }
2739
2739
  if (props.isLink) {
2740
- const name2 = props.arrowDirection ? `arrow-${props.arrowDirection}` : "arrow";
2740
+ const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
2741
2741
  return vue.createVNode(Icon, {
2742
2742
  "name": name2,
2743
2743
  "class": bem$1d("right-icon")
@@ -3210,7 +3210,12 @@
3210
3210
  value = props.formatter(value);
3211
3211
  }
3212
3212
  if (inputRef.value && inputRef.value.value !== value) {
3213
+ const {
3214
+ selectionStart,
3215
+ selectionEnd
3216
+ } = inputRef.value;
3213
3217
  inputRef.value.value = value;
3218
+ inputRef.value.setSelectionRange(selectionStart, selectionEnd);
3214
3219
  }
3215
3220
  if (value !== props.modelValue) {
3216
3221
  emit("update:modelValue", value);
@@ -10673,7 +10678,7 @@
10673
10678
  emit,
10674
10679
  slots
10675
10680
  }) {
10676
- const loading = vue.ref(false);
10681
+ const loading = vue.ref(props.loading);
10677
10682
  const root = vue.ref();
10678
10683
  const placeholder = vue.ref();
10679
10684
  const tabStatus = useTabStatus();
@@ -11243,11 +11248,13 @@
11243
11248
  }
11244
11249
  var stdin_default$r = vue.defineComponent({
11245
11250
  name: name$m,
11251
+ inheritAttrs: false,
11246
11252
  props: numberKeyboardProps,
11247
11253
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
11248
11254
  setup(props, {
11249
11255
  emit,
11250
- slots
11256
+ slots,
11257
+ attrs
11251
11258
  }) {
11252
11259
  const root = vue.ref();
11253
11260
  const genBasicKeys = () => {
@@ -11403,7 +11410,7 @@
11403
11410
  const Content = vue.createVNode(vue.Transition, {
11404
11411
  "name": props.transition ? "van-slide-up" : ""
11405
11412
  }, {
11406
- default: () => [vue.withDirectives(vue.createVNode("div", {
11413
+ default: () => [vue.withDirectives(vue.createVNode("div", vue.mergeProps({
11407
11414
  "ref": root,
11408
11415
  "style": getZIndexStyle(props.zIndex),
11409
11416
  "class": bem$m({
@@ -11412,7 +11419,7 @@
11412
11419
  }),
11413
11420
  "onAnimationend": onAnimationEnd,
11414
11421
  "onTouchstartPassive": stopPropagation
11415
- }, [Title, vue.createVNode("div", {
11422
+ }, attrs), [Title, vue.createVNode("div", {
11416
11423
  "class": bem$m("body")
11417
11424
  }, [vue.createVNode("div", {
11418
11425
  "class": bem$m("keys")
@@ -16151,7 +16158,7 @@
16151
16158
  });
16152
16159
  }
16153
16160
  };
16154
- const version = "3.6.5";
16161
+ const version = "3.6.7";
16155
16162
  function install(app) {
16156
16163
  const components = [
16157
16164
  ActionBar,