vant 3.6.4 → 3.6.6

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/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.4";
94
+ export const version: "3.6.6";
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.4";
199
+ const version = "3.6.6";
200
200
  function install(app) {
201
201
  const components = [
202
202
  import_action_bar.ActionBar,
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(stdin_exports);
23
23
  var import_use = require("@vant/use");
24
24
  var import_util = require("./util");
25
25
  var import_utils = require("../../utils");
26
+ var import_vue = require("vue");
26
27
  var stdin_default = (lazyManager) => ({
27
28
  props: {
28
29
  src: [String, Object],
@@ -31,15 +32,14 @@ var stdin_default = (lazyManager) => ({
31
32
  default: "img"
32
33
  }
33
34
  },
34
- render(h) {
35
- return h(
35
+ render() {
36
+ var _a, _b;
37
+ return (0, import_vue.h)(
36
38
  this.tag,
37
39
  {
38
- attrs: {
39
- src: this.renderSrc
40
- }
40
+ src: this.renderSrc
41
41
  },
42
- this.$slots.default
42
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
43
43
  );
44
44
  },
45
45
  data() {
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")
@@ -9596,7 +9596,8 @@ var stdin_default$A = vue.defineComponent({
9596
9596
  },
9597
9597
  emits: ["scale", "close"],
9598
9598
  setup(props, {
9599
- emit
9599
+ emit,
9600
+ slots
9600
9601
  }) {
9601
9602
  const state = vue.reactive({
9602
9603
  scale: 1,
@@ -9814,7 +9815,11 @@ var stdin_default$A = vue.defineComponent({
9814
9815
  "onTouchend": onTouchEnd,
9815
9816
  "onTouchcancel": onTouchEnd
9816
9817
  }, {
9817
- default: () => [vue.createVNode(Image$1, {
9818
+ default: () => [slots.image ? vue.createVNode("div", {
9819
+ "class": bem$v("image-wrap")
9820
+ }, [slots.image({
9821
+ src: props.src
9822
+ })]) : vue.createVNode(Image$1, {
9818
9823
  "src": props.src,
9819
9824
  "fit": "contain",
9820
9825
  "class": bem$v("image", {
@@ -9923,7 +9928,9 @@ var stdin_default$z = vue.defineComponent({
9923
9928
  "rootHeight": state.rootHeight,
9924
9929
  "onScale": emitScale,
9925
9930
  "onClose": emitClose
9926
- }, null))]
9931
+ }, {
9932
+ image: slots.image
9933
+ }))]
9927
9934
  });
9928
9935
  const renderClose = () => {
9929
9936
  if (props.closeable) {
@@ -10352,7 +10359,7 @@ var stdin_default$w = vue.defineComponent({
10352
10359
  emit,
10353
10360
  slots
10354
10361
  }) {
10355
- const loading = vue.ref(false);
10362
+ const loading = vue.ref(props.loading);
10356
10363
  const root = vue.ref();
10357
10364
  const placeholder = vue.ref();
10358
10365
  const tabStatus = useTabStatus();
@@ -10922,11 +10929,13 @@ function shuffle(array) {
10922
10929
  }
10923
10930
  var stdin_default$r = vue.defineComponent({
10924
10931
  name: name$m,
10932
+ inheritAttrs: false,
10925
10933
  props: numberKeyboardProps,
10926
10934
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
10927
10935
  setup(props, {
10928
10936
  emit,
10929
- slots
10937
+ slots,
10938
+ attrs
10930
10939
  }) {
10931
10940
  const root = vue.ref();
10932
10941
  const genBasicKeys = () => {
@@ -11082,7 +11091,7 @@ var stdin_default$r = vue.defineComponent({
11082
11091
  const Content = vue.createVNode(vue.Transition, {
11083
11092
  "name": props.transition ? "van-slide-up" : ""
11084
11093
  }, {
11085
- default: () => [vue.withDirectives(vue.createVNode("div", {
11094
+ default: () => [vue.withDirectives(vue.createVNode("div", vue.mergeProps({
11086
11095
  "ref": root,
11087
11096
  "style": getZIndexStyle(props.zIndex),
11088
11097
  "class": bem$m({
@@ -11091,7 +11100,7 @@ var stdin_default$r = vue.defineComponent({
11091
11100
  }),
11092
11101
  "onAnimationend": onAnimationEnd,
11093
11102
  "onTouchstartPassive": stopPropagation
11094
- }, [Title, vue.createVNode("div", {
11103
+ }, attrs), [Title, vue.createVNode("div", {
11095
11104
  "class": bem$m("body")
11096
11105
  }, [vue.createVNode("div", {
11097
11106
  "class": bem$m("keys")
@@ -14838,15 +14847,14 @@ var stdin_default$1 = (lazyManager) => ({
14838
14847
  default: "img"
14839
14848
  }
14840
14849
  },
14841
- render(h) {
14842
- return h(
14850
+ render() {
14851
+ var _a, _b;
14852
+ return vue.h(
14843
14853
  this.tag,
14844
14854
  {
14845
- attrs: {
14846
- src: this.renderSrc
14847
- }
14855
+ src: this.renderSrc
14848
14856
  },
14849
- this.$slots.default
14857
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
14850
14858
  );
14851
14859
  },
14852
14860
  data() {
@@ -14948,7 +14956,7 @@ const Lazyload = {
14948
14956
  });
14949
14957
  }
14950
14958
  };
14951
- const version = "3.6.4";
14959
+ const version = "3.6.6";
14952
14960
  function install(app) {
14953
14961
  const components = [
14954
14962
  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")
@@ -9594,7 +9594,8 @@ var stdin_default$A = defineComponent({
9594
9594
  },
9595
9595
  emits: ["scale", "close"],
9596
9596
  setup(props, {
9597
- emit
9597
+ emit,
9598
+ slots
9598
9599
  }) {
9599
9600
  const state = reactive({
9600
9601
  scale: 1,
@@ -9812,7 +9813,11 @@ var stdin_default$A = defineComponent({
9812
9813
  "onTouchend": onTouchEnd,
9813
9814
  "onTouchcancel": onTouchEnd
9814
9815
  }, {
9815
- default: () => [createVNode(Image$1, {
9816
+ default: () => [slots.image ? createVNode("div", {
9817
+ "class": bem$v("image-wrap")
9818
+ }, [slots.image({
9819
+ src: props.src
9820
+ })]) : createVNode(Image$1, {
9816
9821
  "src": props.src,
9817
9822
  "fit": "contain",
9818
9823
  "class": bem$v("image", {
@@ -9921,7 +9926,9 @@ var stdin_default$z = defineComponent({
9921
9926
  "rootHeight": state.rootHeight,
9922
9927
  "onScale": emitScale,
9923
9928
  "onClose": emitClose
9924
- }, null))]
9929
+ }, {
9930
+ image: slots.image
9931
+ }))]
9925
9932
  });
9926
9933
  const renderClose = () => {
9927
9934
  if (props.closeable) {
@@ -10350,7 +10357,7 @@ var stdin_default$w = defineComponent({
10350
10357
  emit,
10351
10358
  slots
10352
10359
  }) {
10353
- const loading = ref(false);
10360
+ const loading = ref(props.loading);
10354
10361
  const root = ref();
10355
10362
  const placeholder = ref();
10356
10363
  const tabStatus = useTabStatus();
@@ -10920,11 +10927,13 @@ function shuffle(array) {
10920
10927
  }
10921
10928
  var stdin_default$r = defineComponent({
10922
10929
  name: name$m,
10930
+ inheritAttrs: false,
10923
10931
  props: numberKeyboardProps,
10924
10932
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
10925
10933
  setup(props, {
10926
10934
  emit,
10927
- slots
10935
+ slots,
10936
+ attrs
10928
10937
  }) {
10929
10938
  const root = ref();
10930
10939
  const genBasicKeys = () => {
@@ -11080,7 +11089,7 @@ var stdin_default$r = defineComponent({
11080
11089
  const Content = createVNode(Transition, {
11081
11090
  "name": props.transition ? "van-slide-up" : ""
11082
11091
  }, {
11083
- default: () => [withDirectives(createVNode("div", {
11092
+ default: () => [withDirectives(createVNode("div", mergeProps({
11084
11093
  "ref": root,
11085
11094
  "style": getZIndexStyle(props.zIndex),
11086
11095
  "class": bem$m({
@@ -11089,7 +11098,7 @@ var stdin_default$r = defineComponent({
11089
11098
  }),
11090
11099
  "onAnimationend": onAnimationEnd,
11091
11100
  "onTouchstartPassive": stopPropagation
11092
- }, [Title, createVNode("div", {
11101
+ }, attrs), [Title, createVNode("div", {
11093
11102
  "class": bem$m("body")
11094
11103
  }, [createVNode("div", {
11095
11104
  "class": bem$m("keys")
@@ -14836,15 +14845,14 @@ var stdin_default$1 = (lazyManager) => ({
14836
14845
  default: "img"
14837
14846
  }
14838
14847
  },
14839
- render(h2) {
14840
- return h2(
14848
+ render() {
14849
+ var _a, _b;
14850
+ return h(
14841
14851
  this.tag,
14842
14852
  {
14843
- attrs: {
14844
- src: this.renderSrc
14845
- }
14853
+ src: this.renderSrc
14846
14854
  },
14847
- this.$slots.default
14855
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
14848
14856
  );
14849
14857
  },
14850
14858
  data() {
@@ -14946,7 +14954,7 @@ const Lazyload = {
14946
14954
  });
14947
14955
  }
14948
14956
  };
14949
- const version = "3.6.4";
14957
+ const version = "3.6.6";
14950
14958
  function install(app) {
14951
14959
  const components = [
14952
14960
  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")
@@ -9913,7 +9913,8 @@
9913
9913
  },
9914
9914
  emits: ["scale", "close"],
9915
9915
  setup(props, {
9916
- emit
9916
+ emit,
9917
+ slots
9917
9918
  }) {
9918
9919
  const state = vue.reactive({
9919
9920
  scale: 1,
@@ -10131,7 +10132,11 @@
10131
10132
  "onTouchend": onTouchEnd,
10132
10133
  "onTouchcancel": onTouchEnd
10133
10134
  }, {
10134
- default: () => [vue.createVNode(Image$1, {
10135
+ default: () => [slots.image ? vue.createVNode("div", {
10136
+ "class": bem$v("image-wrap")
10137
+ }, [slots.image({
10138
+ src: props.src
10139
+ })]) : vue.createVNode(Image$1, {
10135
10140
  "src": props.src,
10136
10141
  "fit": "contain",
10137
10142
  "class": bem$v("image", {
@@ -10240,7 +10245,9 @@
10240
10245
  "rootHeight": state.rootHeight,
10241
10246
  "onScale": emitScale,
10242
10247
  "onClose": emitClose
10243
- }, null))]
10248
+ }, {
10249
+ image: slots.image
10250
+ }))]
10244
10251
  });
10245
10252
  const renderClose = () => {
10246
10253
  if (props.closeable) {
@@ -10666,7 +10673,7 @@
10666
10673
  emit,
10667
10674
  slots
10668
10675
  }) {
10669
- const loading = vue.ref(false);
10676
+ const loading = vue.ref(props.loading);
10670
10677
  const root = vue.ref();
10671
10678
  const placeholder = vue.ref();
10672
10679
  const tabStatus = useTabStatus();
@@ -11236,11 +11243,13 @@
11236
11243
  }
11237
11244
  var stdin_default$r = vue.defineComponent({
11238
11245
  name: name$m,
11246
+ inheritAttrs: false,
11239
11247
  props: numberKeyboardProps,
11240
11248
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
11241
11249
  setup(props, {
11242
11250
  emit,
11243
- slots
11251
+ slots,
11252
+ attrs
11244
11253
  }) {
11245
11254
  const root = vue.ref();
11246
11255
  const genBasicKeys = () => {
@@ -11396,7 +11405,7 @@
11396
11405
  const Content = vue.createVNode(vue.Transition, {
11397
11406
  "name": props.transition ? "van-slide-up" : ""
11398
11407
  }, {
11399
- default: () => [vue.withDirectives(vue.createVNode("div", {
11408
+ default: () => [vue.withDirectives(vue.createVNode("div", vue.mergeProps({
11400
11409
  "ref": root,
11401
11410
  "style": getZIndexStyle(props.zIndex),
11402
11411
  "class": bem$m({
@@ -11405,7 +11414,7 @@
11405
11414
  }),
11406
11415
  "onAnimationend": onAnimationEnd,
11407
11416
  "onTouchstartPassive": stopPropagation
11408
- }, [Title, vue.createVNode("div", {
11417
+ }, attrs), [Title, vue.createVNode("div", {
11409
11418
  "class": bem$m("body")
11410
11419
  }, [vue.createVNode("div", {
11411
11420
  "class": bem$m("keys")
@@ -16040,15 +16049,14 @@
16040
16049
  default: "img"
16041
16050
  }
16042
16051
  },
16043
- render(h) {
16044
- return h(
16052
+ render() {
16053
+ var _a, _b;
16054
+ return vue.h(
16045
16055
  this.tag,
16046
16056
  {
16047
- attrs: {
16048
- src: this.renderSrc
16049
- }
16057
+ src: this.renderSrc
16050
16058
  },
16051
- this.$slots.default
16059
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
16052
16060
  );
16053
16061
  },
16054
16062
  data() {
@@ -16145,7 +16153,7 @@
16145
16153
  });
16146
16154
  }
16147
16155
  };
16148
- const version = "3.6.4";
16156
+ const version = "3.6.6";
16149
16157
  function install(app) {
16150
16158
  const components = [
16151
16159
  ActionBar,