vant 4.9.23 → 4.10.0

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.
@@ -1,4 +1,3 @@
1
- import { type ComponentInstance } from '../utils';
2
1
  import type { NotifyMessage, NotifyOptions } from './types';
3
2
  /**
4
3
  * Close the currently displayed Notify
@@ -7,7 +6,7 @@ export declare const closeNotify: () => void;
7
6
  /**
8
7
  * Display Notify at the top of the page
9
8
  */
10
- export declare function showNotify(options: NotifyMessage | NotifyOptions): ComponentInstance | undefined;
9
+ export declare function showNotify(options: NotifyMessage | NotifyOptions): any;
11
10
  /**
12
11
  * Modify the default configuration, affecting all `showNotify` calls
13
12
  */
package/lib/vant.cjs.js CHANGED
@@ -1223,10 +1223,13 @@ function useLockScroll(rootRef, shouldLock) {
1223
1223
  const onTouchMove = (event) => {
1224
1224
  touch.move(event);
1225
1225
  const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
1226
- const el = use.getScrollParent(
1226
+ let el = use.getScrollParent(
1227
1227
  event.target,
1228
1228
  rootRef.value
1229
1229
  );
1230
+ while (el.scrollHeight <= el.offsetHeight && el !== rootRef.value && el.parentElement) {
1231
+ el = use.getScrollParent(el.parentElement, rootRef.value);
1232
+ }
1230
1233
  const { scrollHeight, offsetHeight, scrollTop } = el;
1231
1234
  let status = "11";
1232
1235
  if (scrollTop === 0) {
@@ -3847,7 +3850,7 @@ var stdin_default$1x = vue.defineComponent({
3847
3850
  "class": bem$1j(classes),
3848
3851
  "role": clickable ? "button" : void 0,
3849
3852
  "tabindex": clickable ? 0 : void 0,
3850
- "onClick": route2
3853
+ "onClick": clickable ? route2 : void 0
3851
3854
  }, {
3852
3855
  default: () => {
3853
3856
  var _a2;
@@ -4580,7 +4583,8 @@ var stdin_default$1v = vue.defineComponent({
4580
4583
  validate,
4581
4584
  formValue,
4582
4585
  resetValidation,
4583
- getValidationStatus
4586
+ getValidationStatus,
4587
+ adjustTextareaSize
4584
4588
  });
4585
4589
  vue.provide(use.CUSTOM_FIELD_INJECTION_KEY, {
4586
4590
  customValue,
@@ -4623,8 +4627,9 @@ var stdin_default$1v = vue.defineComponent({
4623
4627
  }),
4624
4628
  "center": props2.center,
4625
4629
  "border": props2.border,
4626
- "isLink": props2.isLink,
4627
- "clickable": props2.clickable,
4630
+ "isLink": disabled ? false : props2.isLink,
4631
+ "clickable": disabled ? false : props2.clickable,
4632
+ "onClick": disabled ? (e) => e.stopImmediatePropagation() : void 0,
4628
4633
  "titleStyle": labelStyle.value,
4629
4634
  "valueClass": bem$1h("value"),
4630
4635
  "titleClass": [bem$1h("label", [labelAlign, {
@@ -11261,6 +11266,14 @@ var stdin_default$M = vue.defineComponent({
11261
11266
  }
11262
11267
  };
11263
11268
  const onClosed = () => emit("closed");
11269
+ const prev = () => {
11270
+ var _a;
11271
+ return (_a = swipeRef.value) == null ? void 0 : _a.prev();
11272
+ };
11273
+ const next = () => {
11274
+ var _a;
11275
+ return (_a = swipeRef.value) == null ? void 0 : _a.next();
11276
+ };
11264
11277
  const swipeTo = (index, options) => {
11265
11278
  var _a;
11266
11279
  return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
@@ -11270,7 +11283,9 @@ var stdin_default$M = vue.defineComponent({
11270
11283
  var _a;
11271
11284
  (_a = activedPreviewItemRef.value) == null ? void 0 : _a.resetScale();
11272
11285
  },
11273
- swipeTo
11286
+ swipeTo,
11287
+ prev,
11288
+ next
11274
11289
  });
11275
11290
  vue.onMounted(resize);
11276
11291
  vue.watch([windowWidth, windowHeight], resize);
@@ -17191,7 +17206,7 @@ const Lazyload = {
17191
17206
  });
17192
17207
  }
17193
17208
  };
17194
- const version = "4.9.23";
17209
+ const version = "4.10.0";
17195
17210
  function install(app) {
17196
17211
  const components = [
17197
17212
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -1221,10 +1221,13 @@ function useLockScroll(rootRef, shouldLock) {
1221
1221
  const onTouchMove = (event) => {
1222
1222
  touch.move(event);
1223
1223
  const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
1224
- const el = getScrollParent(
1224
+ let el = getScrollParent(
1225
1225
  event.target,
1226
1226
  rootRef.value
1227
1227
  );
1228
+ while (el.scrollHeight <= el.offsetHeight && el !== rootRef.value && el.parentElement) {
1229
+ el = getScrollParent(el.parentElement, rootRef.value);
1230
+ }
1228
1231
  const { scrollHeight, offsetHeight, scrollTop } = el;
1229
1232
  let status = "11";
1230
1233
  if (scrollTop === 0) {
@@ -3845,7 +3848,7 @@ var stdin_default$1x = defineComponent({
3845
3848
  "class": bem$1j(classes),
3846
3849
  "role": clickable ? "button" : void 0,
3847
3850
  "tabindex": clickable ? 0 : void 0,
3848
- "onClick": route2
3851
+ "onClick": clickable ? route2 : void 0
3849
3852
  }, {
3850
3853
  default: () => {
3851
3854
  var _a2;
@@ -4578,7 +4581,8 @@ var stdin_default$1v = defineComponent({
4578
4581
  validate,
4579
4582
  formValue,
4580
4583
  resetValidation,
4581
- getValidationStatus
4584
+ getValidationStatus,
4585
+ adjustTextareaSize
4582
4586
  });
4583
4587
  provide(CUSTOM_FIELD_INJECTION_KEY, {
4584
4588
  customValue,
@@ -4621,8 +4625,9 @@ var stdin_default$1v = defineComponent({
4621
4625
  }),
4622
4626
  "center": props2.center,
4623
4627
  "border": props2.border,
4624
- "isLink": props2.isLink,
4625
- "clickable": props2.clickable,
4628
+ "isLink": disabled ? false : props2.isLink,
4629
+ "clickable": disabled ? false : props2.clickable,
4630
+ "onClick": disabled ? (e) => e.stopImmediatePropagation() : void 0,
4626
4631
  "titleStyle": labelStyle.value,
4627
4632
  "valueClass": bem$1h("value"),
4628
4633
  "titleClass": [bem$1h("label", [labelAlign, {
@@ -11259,6 +11264,14 @@ var stdin_default$M = defineComponent({
11259
11264
  }
11260
11265
  };
11261
11266
  const onClosed = () => emit("closed");
11267
+ const prev = () => {
11268
+ var _a;
11269
+ return (_a = swipeRef.value) == null ? void 0 : _a.prev();
11270
+ };
11271
+ const next = () => {
11272
+ var _a;
11273
+ return (_a = swipeRef.value) == null ? void 0 : _a.next();
11274
+ };
11262
11275
  const swipeTo = (index, options) => {
11263
11276
  var _a;
11264
11277
  return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
@@ -11268,7 +11281,9 @@ var stdin_default$M = defineComponent({
11268
11281
  var _a;
11269
11282
  (_a = activedPreviewItemRef.value) == null ? void 0 : _a.resetScale();
11270
11283
  },
11271
- swipeTo
11284
+ swipeTo,
11285
+ prev,
11286
+ next
11272
11287
  });
11273
11288
  onMounted(resize);
11274
11289
  watch([windowWidth, windowHeight], resize);
@@ -17189,7 +17204,7 @@ const Lazyload = {
17189
17204
  });
17190
17205
  }
17191
17206
  };
17192
- const version = "4.9.23";
17207
+ const version = "4.10.0";
17193
17208
  function install(app) {
17194
17209
  const components = [
17195
17210
  ActionBar,
package/lib/vant.js CHANGED
@@ -1577,10 +1577,13 @@
1577
1577
  const onTouchMove = (event) => {
1578
1578
  touch.move(event);
1579
1579
  const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
1580
- const el = getScrollParent$1(
1580
+ let el = getScrollParent$1(
1581
1581
  event.target,
1582
1582
  rootRef.value
1583
1583
  );
1584
+ while (el.scrollHeight <= el.offsetHeight && el !== rootRef.value && el.parentElement) {
1585
+ el = getScrollParent$1(el.parentElement, rootRef.value);
1586
+ }
1584
1587
  const { scrollHeight, offsetHeight, scrollTop } = el;
1585
1588
  let status = "11";
1586
1589
  if (scrollTop === 0) {
@@ -2362,7 +2365,7 @@
2362
2365
  return propRef;
2363
2366
  };
2364
2367
  /**
2365
- * @vue/shared v3.5.31
2368
+ * @vue/shared v3.5.39
2366
2369
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
2367
2370
  * @license MIT
2368
2371
  **/
@@ -4274,7 +4277,7 @@
4274
4277
  "class": bem$1j(classes),
4275
4278
  "role": clickable ? "button" : void 0,
4276
4279
  "tabindex": clickable ? 0 : void 0,
4277
- "onClick": route2
4280
+ "onClick": clickable ? route2 : void 0
4278
4281
  }, {
4279
4282
  default: () => {
4280
4283
  var _a2;
@@ -5007,7 +5010,8 @@
5007
5010
  validate,
5008
5011
  formValue,
5009
5012
  resetValidation,
5010
- getValidationStatus
5013
+ getValidationStatus,
5014
+ adjustTextareaSize
5011
5015
  });
5012
5016
  vue.provide(CUSTOM_FIELD_INJECTION_KEY, {
5013
5017
  customValue,
@@ -5050,8 +5054,9 @@
5050
5054
  }),
5051
5055
  "center": props2.center,
5052
5056
  "border": props2.border,
5053
- "isLink": props2.isLink,
5054
- "clickable": props2.clickable,
5057
+ "isLink": disabled ? false : props2.isLink,
5058
+ "clickable": disabled ? false : props2.clickable,
5059
+ "onClick": disabled ? (e) => e.stopImmediatePropagation() : void 0,
5055
5060
  "titleStyle": labelStyle.value,
5056
5061
  "valueClass": bem$1h("value"),
5057
5062
  "titleClass": [bem$1h("label", [labelAlign, {
@@ -11659,6 +11664,14 @@
11659
11664
  }
11660
11665
  };
11661
11666
  const onClosed = () => emit("closed");
11667
+ const prev = () => {
11668
+ var _a;
11669
+ return (_a = swipeRef.value) == null ? void 0 : _a.prev();
11670
+ };
11671
+ const next = () => {
11672
+ var _a;
11673
+ return (_a = swipeRef.value) == null ? void 0 : _a.next();
11674
+ };
11662
11675
  const swipeTo = (index, options) => {
11663
11676
  var _a;
11664
11677
  return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
@@ -11668,7 +11681,9 @@
11668
11681
  var _a;
11669
11682
  (_a = activedPreviewItemRef.value) == null ? void 0 : _a.resetScale();
11670
11683
  },
11671
- swipeTo
11684
+ swipeTo,
11685
+ prev,
11686
+ next
11672
11687
  });
11673
11688
  vue.onMounted(resize);
11674
11689
  vue.watch([windowWidth, windowHeight], resize);
@@ -18308,7 +18323,7 @@
18308
18323
  });
18309
18324
  }
18310
18325
  };
18311
- const version = "4.9.23";
18326
+ const version = "4.10.0";
18312
18327
  function install(app) {
18313
18328
  const components = [
18314
18329
  ActionBar,