vant 4.0.0-alpha.0 → 4.0.0-alpha.1

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.
Files changed (66) hide show
  1. package/changelog.generated.md +197 -0
  2. package/es/calendar/Calendar.d.ts +4 -0
  3. package/es/calendar/Calendar.js +2 -0
  4. package/es/calendar/index.css +1 -1
  5. package/es/calendar/index.d.ts +3 -0
  6. package/es/calendar/index.less +1 -0
  7. package/es/config-provider/ConfigProvider.js +2 -0
  8. package/es/date-picker/DatePicker.js +1 -1
  9. package/es/dialog/index.css +1 -1
  10. package/es/dialog/index.less +2 -0
  11. package/es/index-bar/IndexBar.js +25 -4
  12. package/es/index.d.ts +1 -1
  13. package/es/index.js +1 -1
  14. package/es/locale/lang/la-LA.d.ts +64 -0
  15. package/es/locale/lang/la-LA.js +66 -0
  16. package/es/nav-bar/NavBar.d.ts +1 -1
  17. package/es/nav-bar/NavBar.js +3 -3
  18. package/es/nav-bar/index.d.ts +1 -1
  19. package/es/picker/index.css +1 -1
  20. package/es/picker/index.less +1 -0
  21. package/es/popup/Popup.d.ts +4 -0
  22. package/es/popup/Popup.js +3 -0
  23. package/es/popup/index.d.ts +3 -0
  24. package/es/skeleton/Skeleton.js +6 -4
  25. package/es/style/base.css +1 -1
  26. package/es/style/base.less +5 -0
  27. package/es/swipe-cell/SwipeCell.js +1 -1
  28. package/es/toast/Toast.js +1 -0
  29. package/lib/calendar/Calendar.d.ts +4 -0
  30. package/lib/calendar/Calendar.js +2 -0
  31. package/lib/calendar/index.css +1 -1
  32. package/lib/calendar/index.d.ts +3 -0
  33. package/lib/calendar/index.less +1 -0
  34. package/lib/config-provider/ConfigProvider.js +2 -0
  35. package/lib/date-picker/DatePicker.js +1 -1
  36. package/lib/dialog/index.css +1 -1
  37. package/lib/dialog/index.less +2 -0
  38. package/lib/index-bar/IndexBar.js +25 -4
  39. package/lib/index.css +1 -1
  40. package/lib/index.d.ts +1 -1
  41. package/lib/index.js +1 -1
  42. package/lib/locale/lang/la-LA.d.ts +64 -0
  43. package/lib/locale/lang/la-LA.js +90 -0
  44. package/lib/nav-bar/NavBar.d.ts +1 -1
  45. package/lib/nav-bar/NavBar.js +3 -3
  46. package/lib/nav-bar/index.d.ts +1 -1
  47. package/lib/picker/index.css +1 -1
  48. package/lib/picker/index.less +1 -0
  49. package/lib/popup/Popup.d.ts +4 -0
  50. package/lib/popup/Popup.js +3 -0
  51. package/lib/popup/index.d.ts +3 -0
  52. package/lib/skeleton/Skeleton.js +5 -3
  53. package/lib/style/base.css +1 -1
  54. package/lib/style/base.less +5 -0
  55. package/lib/swipe-cell/SwipeCell.js +1 -1
  56. package/lib/toast/Toast.js +1 -0
  57. package/lib/vant.cjs.js +44 -13
  58. package/lib/vant.cjs.min.js +1 -1
  59. package/lib/vant.es.js +44 -13
  60. package/lib/vant.es.min.js +44 -13
  61. package/lib/vant.js +44 -13
  62. package/lib/vant.min.js +1 -1
  63. package/package.json +2 -2
  64. package/vetur/attributes.json +203 -195
  65. package/vetur/tags.json +70 -68
  66. package/vetur/web-types.json +644 -624
@@ -60,6 +60,7 @@ body {
60
60
  }
61
61
 
62
62
  &__title {
63
+ color: var(--van-text-color);
63
64
  max-width: 50%;
64
65
  font-weight: var(--van-font-bold);
65
66
  font-size: var(--van-picker-title-font-size);
@@ -43,6 +43,7 @@ declare const popupProps: {
43
43
  type: import("vue").PropType<PopupCloseIconPosition>;
44
44
  default: PopupCloseIconPosition;
45
45
  };
46
+ safeAreaInsetTop: BooleanConstructor;
46
47
  safeAreaInsetBottom: BooleanConstructor;
47
48
  };
48
49
  export declare type PopupProps = ExtractPropTypes<typeof popupProps>;
@@ -89,6 +90,7 @@ declare const _default: import("vue").DefineComponent<{
89
90
  type: import("vue").PropType<PopupCloseIconPosition>;
90
91
  default: PopupCloseIconPosition;
91
92
  };
93
+ safeAreaInsetTop: BooleanConstructor;
92
94
  safeAreaInsetBottom: BooleanConstructor;
93
95
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon")[], "open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
94
96
  show: BooleanConstructor;
@@ -133,6 +135,7 @@ declare const _default: import("vue").DefineComponent<{
133
135
  type: import("vue").PropType<PopupCloseIconPosition>;
134
136
  default: PopupCloseIconPosition;
135
137
  };
138
+ safeAreaInsetTop: BooleanConstructor;
136
139
  safeAreaInsetBottom: BooleanConstructor;
137
140
  }>> & {
138
141
  onKeydown?: ((...args: any[]) => any) | undefined;
@@ -157,5 +160,6 @@ declare const _default: import("vue").DefineComponent<{
157
160
  closeable: boolean;
158
161
  closeOnPopstate: boolean;
159
162
  closeIconPosition: PopupCloseIconPosition;
163
+ safeAreaInsetTop: boolean;
160
164
  }>;
161
165
  export default _default;
package/es/popup/Popup.js CHANGED
@@ -18,6 +18,7 @@ const popupProps = extend({}, popupSharedProps, {
18
18
  iconPrefix: String,
19
19
  closeOnPopstate: Boolean,
20
20
  closeIconPosition: makeStringProp("top-right"),
21
+ safeAreaInsetTop: Boolean,
21
22
  safeAreaInsetBottom: Boolean
22
23
  });
23
24
  const [name, bem] = createNamespace("popup");
@@ -112,6 +113,7 @@ var stdin_default = defineComponent({
112
113
  const {
113
114
  round,
114
115
  position,
116
+ safeAreaInsetTop,
115
117
  safeAreaInsetBottom
116
118
  } = props;
117
119
  return _withDirectives(_createVNode("div", _mergeProps({
@@ -121,6 +123,7 @@ var stdin_default = defineComponent({
121
123
  round,
122
124
  [position]: position
123
125
  }), {
126
+ "van-safe-area-top": safeAreaInsetTop,
124
127
  "van-safe-area-bottom": safeAreaInsetBottom
125
128
  }],
126
129
  "onKeydown": onKeydown
@@ -41,6 +41,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
41
41
  type: import("vue").PropType<import("./types").PopupCloseIconPosition>;
42
42
  default: import("./types").PopupCloseIconPosition;
43
43
  };
44
+ safeAreaInsetTop: BooleanConstructor;
44
45
  safeAreaInsetBottom: BooleanConstructor;
45
46
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon")[], "open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "clickOverlay" | "clickCloseIcon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
46
47
  show: BooleanConstructor;
@@ -85,6 +86,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
85
86
  type: import("vue").PropType<import("./types").PopupCloseIconPosition>;
86
87
  default: import("./types").PopupCloseIconPosition;
87
88
  };
89
+ safeAreaInsetTop: BooleanConstructor;
88
90
  safeAreaInsetBottom: BooleanConstructor;
89
91
  }>> & {
90
92
  onKeydown?: ((...args: any[]) => any) | undefined;
@@ -109,6 +111,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
109
111
  closeable: boolean;
110
112
  closeOnPopstate: boolean;
111
113
  closeIconPosition: import("./types").PopupCloseIconPosition;
114
+ safeAreaInsetTop: boolean;
112
115
  }>>;
113
116
  export default Popup;
114
117
  export type { PopupProps } from './Popup';
@@ -1,4 +1,4 @@
1
- import { createVNode as _createVNode } from "vue";
1
+ import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
3
  import { addUnit, truthProp, numericProp, getSizeStyle, makeStringProp, makeNumericProp, createNamespace } from "../utils";
4
4
  const [name, bem] = createNamespace("skeleton");
@@ -21,9 +21,11 @@ const skeletonProps = {
21
21
  };
22
22
  var stdin_default = defineComponent({
23
23
  name,
24
+ inheritAttrs: false,
24
25
  props: skeletonProps,
25
26
  setup(props, {
26
- slots
27
+ slots,
28
+ attrs
27
29
  }) {
28
30
  const renderAvatar = () => {
29
31
  if (props.avatar) {
@@ -66,12 +68,12 @@ var stdin_default = defineComponent({
66
68
  if (!props.loading) {
67
69
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
68
70
  }
69
- return _createVNode("div", {
71
+ return _createVNode("div", _mergeProps({
70
72
  "class": bem({
71
73
  animate: props.animate,
72
74
  round: props.round
73
75
  })
74
- }, [renderAvatar(), _createVNode("div", {
76
+ }, attrs), [renderAvatar(), _createVNode("div", {
75
77
  "class": bem("content")
76
78
  }, [renderTitle(), renderRows()])]);
77
79
  };
package/es/style/base.css CHANGED
@@ -1 +1 @@
1
- body{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-link-color: #576b95;--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translateY(100%)}}@keyframes van-slide-up-leave{to{transform:translateY(100%)}}@keyframes van-slide-down-enter{0%{transform:translateY(-100%)}}@keyframes van-slide-down-leave{to{transform:translateY(-100%)}}@keyframes van-slide-left-enter{0%{transform:translate(-100%)}}@keyframes van-slide-left-leave{to{transform:translate(-100%)}}@keyframes van-slide-right-enter{0%{transform:translate(100%)}}@keyframes van-slide-right-leave{to{transform:translate(100%)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}
1
+ body{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-link-color: #576b95;--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translateY(100%)}}@keyframes van-slide-up-leave{to{transform:translateY(100%)}}@keyframes van-slide-down-enter{0%{transform:translateY(-100%)}}@keyframes van-slide-down-leave{to{transform:translateY(-100%)}}@keyframes van-slide-left-enter{0%{transform:translate(-100%)}}@keyframes van-slide-left-leave{to{transform:translate(-100%)}}@keyframes van-slide-right-enter{0%{transform:translate(100%)}}@keyframes van-slide-right-leave{to{transform:translate(100%)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}
@@ -25,6 +25,11 @@
25
25
  .multi-ellipsis(3);
26
26
  }
27
27
 
28
+ .van-safe-area-top {
29
+ padding-top: constant(safe-area-inset-top);
30
+ padding-top: env(safe-area-inset-top);
31
+ }
32
+
28
33
  .van-safe-area-bottom {
29
34
  padding-bottom: constant(safe-area-inset-bottom);
30
35
  padding-bottom: env(safe-area-inset-bottom);
@@ -143,7 +143,7 @@ var stdin_default = defineComponent({
143
143
  return _createVNode("div", {
144
144
  "ref": root,
145
145
  "class": bem(),
146
- "onClick": getClickHandler("cell"),
146
+ "onClick": getClickHandler("cell", lockClick),
147
147
  "onTouchstart": onTouchStart,
148
148
  "onTouchmove": onTouchMove,
149
149
  "onTouchend": onTouchEnd,
package/es/toast/Toast.js CHANGED
@@ -82,6 +82,7 @@ var stdin_default = defineComponent({
82
82
  } = props;
83
83
  if (isDef(message) && message !== "") {
84
84
  return type === "html" ? _createVNode("div", {
85
+ "key": 0,
85
86
  "class": bem("text"),
86
87
  "innerHTML": String(message)
87
88
  }, null) : _createVNode("div", {
@@ -66,6 +66,7 @@ declare const calendarProps: {
66
66
  type: BooleanConstructor;
67
67
  default: true;
68
68
  };
69
+ safeAreaInsetTop: BooleanConstructor;
69
70
  safeAreaInsetBottom: {
70
71
  type: BooleanConstructor;
71
72
  default: true;
@@ -152,6 +153,7 @@ declare const _default: import("vue").DefineComponent<{
152
153
  type: BooleanConstructor;
153
154
  default: true;
154
155
  };
156
+ safeAreaInsetTop: BooleanConstructor;
155
157
  safeAreaInsetBottom: {
156
158
  type: BooleanConstructor;
157
159
  default: true;
@@ -236,6 +238,7 @@ declare const _default: import("vue").DefineComponent<{
236
238
  type: BooleanConstructor;
237
239
  default: true;
238
240
  };
241
+ safeAreaInsetTop: BooleanConstructor;
239
242
  safeAreaInsetBottom: {
240
243
  type: BooleanConstructor;
241
244
  default: true;
@@ -273,6 +276,7 @@ declare const _default: import("vue").DefineComponent<{
273
276
  lazyRender: boolean;
274
277
  closeOnClickOverlay: boolean;
275
278
  closeOnPopstate: boolean;
279
+ safeAreaInsetTop: boolean;
276
280
  poppable: boolean;
277
281
  maxRange: string | number;
278
282
  showMark: boolean;
@@ -67,6 +67,7 @@ const calendarProps = {
67
67
  showRangePrompt: import_utils.truthProp,
68
68
  confirmDisabledText: String,
69
69
  closeOnClickOverlay: import_utils.truthProp,
70
+ safeAreaInsetTop: Boolean,
70
71
  safeAreaInsetBottom: import_utils.truthProp,
71
72
  minDate: {
72
73
  type: Date,
@@ -415,6 +416,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
415
416
  "closeable": props.showTitle || props.showSubtitle,
416
417
  "teleport": props.teleport,
417
418
  "closeOnPopstate": props.closeOnPopstate,
419
+ "safeAreaInsetTop": props.safeAreaInsetTop,
418
420
  "closeOnClickOverlay": props.closeOnClickOverlay,
419
421
  "onUpdate:show": updateShow
420
422
  }, {
@@ -1 +1 @@
1
- body{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width: 350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background);border-radius:var(--van-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
1
+ body{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{color:var(--van-text-color);height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width: 350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background);border-radius:var(--van-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
@@ -63,6 +63,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
63
63
  type: BooleanConstructor;
64
64
  default: true;
65
65
  };
66
+ safeAreaInsetTop: BooleanConstructor;
66
67
  safeAreaInsetBottom: {
67
68
  type: BooleanConstructor;
68
69
  default: true;
@@ -147,6 +148,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
147
148
  type: BooleanConstructor;
148
149
  default: true;
149
150
  };
151
+ safeAreaInsetTop: BooleanConstructor;
150
152
  safeAreaInsetBottom: {
151
153
  type: BooleanConstructor;
152
154
  default: true;
@@ -184,6 +186,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
184
186
  lazyRender: boolean;
185
187
  closeOnClickOverlay: boolean;
186
188
  closeOnPopstate: boolean;
189
+ safeAreaInsetTop: boolean;
187
190
  poppable: boolean;
188
191
  maxRange: string | number;
189
192
  showMark: boolean;
@@ -61,6 +61,7 @@ body {
61
61
  &__month-title,
62
62
  &__header-title,
63
63
  &__header-subtitle {
64
+ color: var(--van-text-color);
64
65
  height: var(--van-calendar-header-title-height);
65
66
  font-weight: var(--van-font-bold);
66
67
  line-height: var(--van-calendar-header-title-height);
@@ -58,6 +58,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
58
58
  (0, import_vue2.watch)(() => props.theme, (newVal, oldVal) => {
59
59
  document.body.classList.remove(`van-theme-${oldVal}`);
60
60
  document.body.classList.add(`van-theme-${newVal}`);
61
+ }, {
62
+ immediate: true
61
63
  });
62
64
  }
63
65
  (0, import_vue2.provide)(CONFIG_PROVIDER_KEY, props);
@@ -115,7 +115,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
115
115
  }
116
116
  });
117
117
  (0, import_vue2.watch)(() => props.modelValue, (newValues) => {
118
- if ((0, import_utils.isSameValue)(newValues, currentValues.value)) {
118
+ if (!(0, import_utils.isSameValue)(newValues, currentValues.value)) {
119
119
  currentValues.value = newValues;
120
120
  }
121
121
  });
@@ -1 +1 @@
1
- body{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate(-50%,-50%) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate(-50%,-50%) scale(.9);opacity:0}
1
+ body{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate(-50%,-50%) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate(-50%,-50%) scale(.9);opacity:0}
@@ -37,6 +37,7 @@ body {
37
37
  }
38
38
 
39
39
  &__header {
40
+ color: var(--van-text-color);
40
41
  padding-top: var(--van-dialog-header-padding-top);
41
42
  font-weight: var(--van-dialog-header-font-weight);
42
43
  line-height: var(--van-dialog-header-line-height);
@@ -56,6 +57,7 @@ body {
56
57
  }
57
58
 
58
59
  &__message {
60
+ color: var(--van-text-color);
59
61
  flex: 1;
60
62
  max-height: var(--van-dialog-message-max-height);
61
63
  padding: 26px var(--van-dialog-message-padding);
@@ -65,6 +65,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
65
65
  children,
66
66
  linkChildren
67
67
  } = (0, import_use.useChildren)(INDEX_BAR_KEY);
68
+ let selectActiveIndex;
68
69
  linkChildren({
69
70
  props
70
71
  });
@@ -92,6 +93,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
92
93
  }
93
94
  return -1;
94
95
  };
96
+ const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
95
97
  const onScroll = () => {
96
98
  if ((0, import_utils.isHidden)(root)) {
97
99
  return;
@@ -103,7 +105,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
103
105
  const scrollTop = (0, import_utils.getScrollTop)(scrollParent.value);
104
106
  const scrollParentRect = (0, import_use.useRect)(scrollParent);
105
107
  const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
106
- const active = getActiveAnchor(scrollTop, rects);
108
+ let active = -1;
109
+ if (selectActiveIndex) {
110
+ const match = getMatchAnchor(selectActiveIndex);
111
+ if (match) {
112
+ const rect = match.getRect(scrollParent.value, scrollParentRect);
113
+ active = getActiveAnchor(rect.top, rects);
114
+ }
115
+ } else {
116
+ active = getActiveAnchor(scrollTop, rects);
117
+ }
107
118
  activeAnchor.value = indexList[active];
108
119
  if (sticky) {
109
120
  children.forEach((item, index) => {
@@ -122,7 +133,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
122
133
  if (index === active) {
123
134
  state.active = true;
124
135
  state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
125
- } else if (index === active - 1) {
136
+ } else if (index === active - 1 && selectActiveIndex === "") {
126
137
  const activeItemTop = rects[active].top - scrollTop;
127
138
  state.active = activeItemTop > 0;
128
139
  state.top = activeItemTop + scrollParentRect.top - rects[index].height;
@@ -131,6 +142,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
131
142
  }
132
143
  });
133
144
  }
145
+ selectActiveIndex = "";
134
146
  };
135
147
  const init = () => {
136
148
  (0, import_vue2.nextTick)(onScroll);
@@ -156,9 +168,18 @@ var stdin_default = (0, import_vue2.defineComponent)({
156
168
  }, [index]);
157
169
  });
158
170
  const scrollTo = (index) => {
159
- index = String(index);
160
- const match = children.find((item) => String(item.index) === index);
171
+ selectActiveIndex = String(index);
172
+ const match = getMatchAnchor(selectActiveIndex);
161
173
  if (match) {
174
+ const scrollTop = (0, import_utils.getScrollTop)(scrollParent.value);
175
+ const scrollParentRect = (0, import_use.useRect)(scrollParent);
176
+ const {
177
+ offsetHeight
178
+ } = document.documentElement;
179
+ if (scrollTop === offsetHeight - scrollParentRect.height) {
180
+ onScroll();
181
+ return;
182
+ }
162
183
  match.$el.scrollIntoView();
163
184
  if (props.sticky && props.stickyOffsetTop) {
164
185
  (0, import_utils.setRootScrollTop)((0, import_utils.getRootScrollTop)() - props.stickyOffsetTop);