vant 3.4.6 → 3.4.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.
Files changed (136) hide show
  1. package/changelog.generated.md +39 -50
  2. package/es/address-list/AddressListItem.d.ts +3 -2
  3. package/es/address-list/AddressListItem.js +1 -1
  4. package/es/badge/Badge.d.ts +4 -3
  5. package/es/badge/index.d.ts +2 -2
  6. package/es/calendar/Calendar.js +1 -1
  7. package/es/calendar/types.d.ts +2 -1
  8. package/es/cascader/types.d.ts +2 -1
  9. package/es/checkbox/Checker.d.ts +2 -1
  10. package/es/collapse/Collapse.d.ts +7 -6
  11. package/es/collapse/index.d.ts +3 -3
  12. package/es/composables/use-touch.js +1 -1
  13. package/es/config-provider/ConfigProvider.d.ts +4 -3
  14. package/es/config-provider/index.d.ts +2 -2
  15. package/es/contact-list/ContactList.d.ts +3 -2
  16. package/es/coupon/Coupon.d.ts +2 -1
  17. package/es/coupon-list/CouponList.d.ts +3 -13
  18. package/es/coupon-list/CouponList.js +9 -7
  19. package/es/coupon-list/index.css +1 -1
  20. package/es/coupon-list/index.d.ts +2 -9
  21. package/es/coupon-list/index.less +4 -16
  22. package/es/coupon-list/style/index.js +1 -0
  23. package/es/coupon-list/style/less.js +1 -0
  24. package/es/coupon-list/var.less +0 -1
  25. package/es/datetime-picker/DatePicker.js +1 -2
  26. package/es/dialog/types.d.ts +2 -2
  27. package/es/dropdown-item/types.d.ts +2 -1
  28. package/es/index-bar/IndexBar.d.ts +5 -4
  29. package/es/index-bar/IndexBar.js +25 -4
  30. package/es/index-bar/index.d.ts +3 -3
  31. package/es/index-bar/types.d.ts +2 -1
  32. package/es/index.d.ts +1 -1
  33. package/es/index.js +1 -1
  34. package/es/locale/lang/is-IS.d.ts +64 -0
  35. package/es/locale/lang/is-IS.js +74 -0
  36. package/es/locale/lang/la-LA.d.ts +64 -0
  37. package/es/locale/lang/la-LA.js +66 -0
  38. package/es/locale/lang/sv-SE.d.ts +64 -0
  39. package/es/locale/lang/sv-SE.js +66 -0
  40. package/es/notify/types.d.ts +2 -1
  41. package/es/number-keyboard/NumberKeyboard.js +10 -1
  42. package/es/picker/types.d.ts +3 -2
  43. package/es/progress/Progress.d.ts +4 -3
  44. package/es/progress/index.d.ts +2 -2
  45. package/es/skeleton/Skeleton.d.ts +5 -4
  46. package/es/skeleton/index.d.ts +3 -3
  47. package/es/tabbar/Tabbar.d.ts +2 -2
  48. package/es/tabs/Tabs.d.ts +1 -1
  49. package/es/tabs/Tabs.js +1 -0
  50. package/es/tabs/types.d.ts +5 -4
  51. package/es/toast/types.d.ts +3 -2
  52. package/es/tree-select/TreeSelect.d.ts +7 -6
  53. package/es/tree-select/index.d.ts +3 -3
  54. package/es/uploader/Uploader.d.ts +4 -4
  55. package/es/uploader/Uploader.js +2 -2
  56. package/es/uploader/UploaderPreviewItem.d.ts +3 -3
  57. package/es/uploader/UploaderPreviewItem.js +9 -6
  58. package/es/uploader/index.d.ts +2 -2
  59. package/es/uploader/types.d.ts +5 -5
  60. package/es/utils/basic.d.ts +1 -0
  61. package/es/utils/format.d.ts +7 -6
  62. package/es/utils/format.js +6 -0
  63. package/es/utils/validate.d.ts +2 -1
  64. package/lib/address-list/AddressListItem.d.ts +3 -2
  65. package/lib/badge/Badge.d.ts +4 -3
  66. package/lib/badge/index.d.ts +2 -2
  67. package/lib/calendar/Calendar.js +1 -1
  68. package/lib/calendar/types.d.ts +2 -1
  69. package/lib/cascader/types.d.ts +2 -1
  70. package/lib/checkbox/Checker.d.ts +2 -1
  71. package/lib/collapse/Collapse.d.ts +7 -6
  72. package/lib/collapse/index.d.ts +3 -3
  73. package/lib/composables/use-touch.js +1 -1
  74. package/lib/config-provider/ConfigProvider.d.ts +4 -3
  75. package/lib/config-provider/index.d.ts +2 -2
  76. package/lib/contact-list/ContactList.d.ts +3 -2
  77. package/lib/coupon/Coupon.d.ts +2 -1
  78. package/lib/coupon-list/CouponList.d.ts +3 -13
  79. package/lib/coupon-list/CouponList.js +9 -7
  80. package/lib/coupon-list/index.css +1 -1
  81. package/lib/coupon-list/index.d.ts +2 -9
  82. package/lib/coupon-list/index.less +4 -16
  83. package/lib/coupon-list/style/index.js +1 -0
  84. package/lib/coupon-list/style/less.js +1 -0
  85. package/lib/coupon-list/var.less +0 -1
  86. package/lib/datetime-picker/DatePicker.js +1 -2
  87. package/lib/dialog/types.d.ts +2 -2
  88. package/lib/dropdown-item/types.d.ts +2 -1
  89. package/lib/index-bar/IndexBar.d.ts +5 -4
  90. package/lib/index-bar/IndexBar.js +25 -4
  91. package/lib/index-bar/index.d.ts +3 -3
  92. package/lib/index-bar/types.d.ts +2 -1
  93. package/lib/index.css +1 -1
  94. package/lib/index.d.ts +1 -1
  95. package/lib/index.js +1 -1
  96. package/lib/index.less +2 -2
  97. package/lib/locale/lang/is-IS.d.ts +64 -0
  98. package/lib/locale/lang/is-IS.js +98 -0
  99. package/lib/locale/lang/la-LA.d.ts +64 -0
  100. package/lib/locale/lang/la-LA.js +90 -0
  101. package/lib/locale/lang/sv-SE.d.ts +64 -0
  102. package/lib/locale/lang/sv-SE.js +90 -0
  103. package/lib/notify/types.d.ts +2 -1
  104. package/lib/number-keyboard/NumberKeyboard.js +10 -1
  105. package/lib/picker/types.d.ts +3 -2
  106. package/lib/progress/Progress.d.ts +4 -3
  107. package/lib/progress/index.d.ts +2 -2
  108. package/lib/skeleton/Skeleton.d.ts +5 -4
  109. package/lib/skeleton/index.d.ts +3 -3
  110. package/lib/tabbar/Tabbar.d.ts +2 -2
  111. package/lib/tabs/Tabs.d.ts +1 -1
  112. package/lib/tabs/Tabs.js +1 -0
  113. package/lib/tabs/types.d.ts +5 -4
  114. package/lib/toast/types.d.ts +3 -2
  115. package/lib/tree-select/TreeSelect.d.ts +7 -6
  116. package/lib/tree-select/index.d.ts +3 -3
  117. package/lib/uploader/Uploader.d.ts +4 -4
  118. package/lib/uploader/Uploader.js +1 -1
  119. package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
  120. package/lib/uploader/UploaderPreviewItem.js +9 -6
  121. package/lib/uploader/index.d.ts +2 -2
  122. package/lib/uploader/types.d.ts +5 -5
  123. package/lib/utils/basic.d.ts +1 -0
  124. package/lib/utils/format.d.ts +7 -6
  125. package/lib/utils/format.js +6 -0
  126. package/lib/utils/validate.d.ts +2 -1
  127. package/lib/vant.cjs.js +269 -229
  128. package/lib/vant.cjs.min.js +1 -1
  129. package/lib/vant.es.js +269 -229
  130. package/lib/vant.es.min.js +269 -229
  131. package/lib/vant.js +269 -229
  132. package/lib/vant.min.js +1 -1
  133. package/package.json +1 -1
  134. package/vetur/attributes.json +641 -638
  135. package/vetur/tags.json +227 -227
  136. package/vetur/web-types.json +2160 -2158
@@ -58,7 +58,7 @@ function useTouch() {
58
58
  };
59
59
  const move = (event) => {
60
60
  const touch = event.touches[0];
61
- deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
61
+ deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
62
62
  deltaY.value = touch.clientY - startY.value;
63
63
  offsetX.value = Math.abs(deltaX.value);
64
64
  offsetY.value = Math.abs(deltaY.value);
@@ -1,4 +1,5 @@
1
1
  import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type ConfigProviderProvide = {
3
4
  iconPrefix?: string;
4
5
  };
@@ -8,7 +9,7 @@ declare const configProviderProps: {
8
9
  type: PropType<keyof HTMLElementTagNameMap>;
9
10
  default: keyof HTMLElementTagNameMap;
10
11
  };
11
- themeVars: PropType<Record<string, string | number>>;
12
+ themeVars: PropType<Record<string, Numeric>>;
12
13
  iconPrefix: StringConstructor;
13
14
  };
14
15
  export declare type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
@@ -17,14 +18,14 @@ declare const _default: import("vue").DefineComponent<{
17
18
  type: PropType<keyof HTMLElementTagNameMap>;
18
19
  default: keyof HTMLElementTagNameMap;
19
20
  };
20
- themeVars: PropType<Record<string, string | number>>;
21
+ themeVars: PropType<Record<string, Numeric>>;
21
22
  iconPrefix: StringConstructor;
22
23
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
23
24
  tag: {
24
25
  type: PropType<keyof HTMLElementTagNameMap>;
25
26
  default: keyof HTMLElementTagNameMap;
26
27
  };
27
- themeVars: PropType<Record<string, string | number>>;
28
+ themeVars: PropType<Record<string, Numeric>>;
28
29
  iconPrefix: StringConstructor;
29
30
  }>>, {
30
31
  tag: keyof HTMLElementTagNameMap;
@@ -3,14 +3,14 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
3
3
  type: import("vue").PropType<keyof HTMLElementTagNameMap>;
4
4
  default: keyof HTMLElementTagNameMap;
5
5
  };
6
- themeVars: import("vue").PropType<Record<string, string | number>>;
6
+ themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
7
7
  iconPrefix: StringConstructor;
8
8
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  tag: {
10
10
  type: import("vue").PropType<keyof HTMLElementTagNameMap>;
11
11
  default: keyof HTMLElementTagNameMap;
12
12
  };
13
- themeVars: import("vue").PropType<Record<string, string | number>>;
13
+ themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
14
14
  iconPrefix: StringConstructor;
15
15
  }>>, {
16
16
  tag: keyof HTMLElementTagNameMap;
@@ -1,7 +1,8 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type ContactListItem = {
3
- id?: number | string;
4
- tel: number | string;
4
+ id?: Numeric;
5
+ tel: Numeric;
5
6
  name: string;
6
7
  isDefault?: boolean;
7
8
  };
@@ -1,6 +1,7 @@
1
1
  import { type PropType } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type CouponInfo = {
3
- id: string | number;
4
+ id: Numeric;
4
5
  name: string;
5
6
  endAt: number;
6
7
  value: number;
@@ -17,10 +17,7 @@ declare const couponListProps: {
17
17
  type: BooleanConstructor;
18
18
  default: true;
19
19
  };
20
- emptyImage: {
21
- type: import("vue").PropType<string>;
22
- default: string;
23
- };
20
+ emptyImage: StringConstructor;
24
21
  chosenCoupon: {
25
22
  type: NumberConstructor;
26
23
  default: number;
@@ -71,10 +68,7 @@ declare const _default: import("vue").DefineComponent<{
71
68
  type: BooleanConstructor;
72
69
  default: true;
73
70
  };
74
- emptyImage: {
75
- type: import("vue").PropType<string>;
76
- default: string;
77
- };
71
+ emptyImage: StringConstructor;
78
72
  chosenCoupon: {
79
73
  type: NumberConstructor;
80
74
  default: number;
@@ -123,10 +117,7 @@ declare const _default: import("vue").DefineComponent<{
123
117
  type: BooleanConstructor;
124
118
  default: true;
125
119
  };
126
- emptyImage: {
127
- type: import("vue").PropType<string>;
128
- default: string;
129
- };
120
+ emptyImage: StringConstructor;
130
121
  chosenCoupon: {
131
122
  type: NumberConstructor;
132
123
  default: number;
@@ -168,7 +159,6 @@ declare const _default: import("vue").DefineComponent<{
168
159
  coupons: CouponInfo[];
169
160
  chosenCoupon: number;
170
161
  showCount: boolean;
171
- emptyImage: string;
172
162
  disabledCoupons: CouponInfo[];
173
163
  showExchangeBar: boolean;
174
164
  showCloseButton: boolean;
@@ -30,18 +30,18 @@ var import_utils = require("../utils");
30
30
  var import_use_refs = require("../composables/use-refs");
31
31
  var import_tab = require("../tab");
32
32
  var import_tabs = require("../tabs");
33
+ var import_empty = require("../empty");
33
34
  var import_field = require("../field");
34
35
  var import_button = require("../button");
35
36
  var import_coupon = require("../coupon");
36
37
  var import_use = require("@vant/use");
37
38
  const [name, bem, t] = (0, import_utils.createNamespace)("coupon-list");
38
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
39
39
  const couponListProps = {
40
40
  code: (0, import_utils.makeStringProp)(""),
41
41
  coupons: (0, import_utils.makeArrayProp)(),
42
42
  currency: (0, import_utils.makeStringProp)("\xA5"),
43
43
  showCount: import_utils.truthProp,
44
- emptyImage: (0, import_utils.makeStringProp)(EMPTY_IMAGE),
44
+ emptyImage: String,
45
45
  chosenCoupon: (0, import_utils.makeNumberProp)(-1),
46
46
  enabledTitle: String,
47
47
  disabledTitle: String,
@@ -89,11 +89,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
89
89
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
90
90
  });
91
91
  };
92
- const renderEmpty = () => (0, import_vue.createVNode)("div", {
93
- "class": bem("empty")
94
- }, [(0, import_vue.createVNode)("img", {
95
- "src": props.emptyImage
96
- }, null), (0, import_vue.createVNode)("p", null, [t("noCoupon")])]);
92
+ const renderEmpty = () => (0, import_vue.createVNode)(import_empty.Empty, {
93
+ "image": props.emptyImage
94
+ }, {
95
+ default: () => [(0, import_vue.createVNode)("p", {
96
+ "class": bem("empty-tip")
97
+ }, [t("noCoupon")])]
98
+ });
97
99
  const renderExchangeBar = () => {
98
100
  if (props.showExchangeBar) {
99
101
  return (0, import_vue.createVNode)("div", {
@@ -1 +1 @@
1
- :root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-image-size: 200px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
1
+ :root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}
@@ -15,10 +15,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
15
15
  type: BooleanConstructor;
16
16
  default: true;
17
17
  };
18
- emptyImage: {
19
- type: import("vue").PropType<string>;
20
- default: string;
21
- };
18
+ emptyImage: StringConstructor;
22
19
  chosenCoupon: {
23
20
  type: NumberConstructor;
24
21
  default: number;
@@ -67,10 +64,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
67
64
  type: BooleanConstructor;
68
65
  default: true;
69
66
  };
70
- emptyImage: {
71
- type: import("vue").PropType<string>;
72
- default: string;
73
- };
67
+ emptyImage: StringConstructor;
74
68
  chosenCoupon: {
75
69
  type: NumberConstructor;
76
70
  default: number;
@@ -112,7 +106,6 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
112
106
  coupons: import("..").CouponInfo[];
113
107
  chosenCoupon: number;
114
108
  showCount: boolean;
115
- emptyImage: string;
116
109
  disabledCoupons: import("..").CouponInfo[];
117
110
  showExchangeBar: boolean;
118
111
  showCloseButton: boolean;
@@ -5,7 +5,6 @@
5
5
  --van-coupon-list-field-padding: @coupon-list-field-padding;
6
6
  --van-coupon-list-exchange-button-height: @coupon-list-exchange-button-height;
7
7
  --van-coupon-list-close-button-height: @coupon-list-close-button-height;
8
- --van-coupon-list-empty-image-size: @coupon-list-empty-image-size;
9
8
  --van-coupon-list-empty-tip-color: @coupon-list-empty-tip-color;
10
9
  --van-coupon-list-empty-tip-font-size: @coupon-list-empty-tip-font-size;
11
10
  --van-coupon-list-empty-tip-line-height: @coupon-list-empty-tip-line-height;
@@ -81,20 +80,9 @@
81
80
  height: var(--van-coupon-list-close-button-height);
82
81
  }
83
82
 
84
- &__empty {
85
- padding-top: 60px;
86
- text-align: center;
87
-
88
- p {
89
- margin: var(--van-padding-md) 0;
90
- color: var(--van-coupon-list-empty-tip-color);
91
- font-size: var(--van-coupon-list-empty-tip-font-size);
92
- line-height: var(--van-coupon-list-empty-tip-line-height);
93
- }
94
-
95
- img {
96
- width: var(--van-coupon-list-empty-image-size);
97
- height: var(--van-coupon-list-empty-image-size);
98
- }
83
+ &__empty-tip {
84
+ color: var(--van-coupon-list-empty-tip-color);
85
+ font-size: var(--van-coupon-list-empty-tip-font-size);
86
+ line-height: var(--van-coupon-list-empty-tip-line-height);
99
87
  }
100
88
  }
@@ -13,4 +13,5 @@ require("../../swipe/index.css");
13
13
  require("../../swipe-item/index.css");
14
14
  require("../../tabs/index.css");
15
15
  require("../../tab/index.css");
16
+ require("../../empty/index.css");
16
17
  require("../index.css");
@@ -13,4 +13,5 @@ require("../../swipe/index.less");
13
13
  require("../../swipe-item/index.less");
14
14
  require("../../tabs/index.less");
15
15
  require("../../tab/index.less");
16
+ require("../../empty/index.less");
16
17
  require("../index.less");
@@ -4,7 +4,6 @@
4
4
  @coupon-list-field-padding: 5px 0 5px var(--van-padding-md);
5
5
  @coupon-list-exchange-button-height: 32px;
6
6
  @coupon-list-close-button-height: 40px;
7
- @coupon-list-empty-image-size: 200px;
8
7
  @coupon-list-empty-tip-color: var(--van-text-color-2);
9
8
  @coupon-list-empty-tip-font-size: var(--van-font-size-md);
10
9
  @coupon-list-empty-tip-line-height: var(--van-line-height-md);
@@ -248,8 +248,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
248
248
  });
249
249
  (0, import_vue2.watch)(columns, updateColumnValue);
250
250
  (0, import_vue2.watch)(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
251
- (0, import_vue2.watch)(() => [props.filter, props.maxDate], updateInnerValue);
252
- (0, import_vue2.watch)(() => props.minDate, () => {
251
+ (0, import_vue2.watch)(() => [props.filter, props.minDate, props.maxDate], () => {
253
252
  (0, import_vue2.nextTick)(updateInnerValue);
254
253
  });
255
254
  (0, import_vue2.watch)(() => props.modelValue, (value) => {
@@ -1,13 +1,13 @@
1
1
  import { Dialog } from './function-call';
2
2
  import type { CSSProperties, TeleportProps } from 'vue';
3
- import type { Interceptor } from '../utils';
3
+ import type { Interceptor, Numeric } from '../utils';
4
4
  export declare type DialogTheme = 'default' | 'round-button';
5
5
  export declare type DialogAction = 'confirm' | 'cancel';
6
6
  export declare type DialogMessage = string | (() => JSX.Element);
7
7
  export declare type DialogMessageAlign = 'left' | 'center' | 'right';
8
8
  export declare type DialogOptions = {
9
9
  title?: string;
10
- width?: string | number;
10
+ width?: Numeric;
11
11
  theme?: DialogTheme;
12
12
  message?: DialogMessage;
13
13
  overlay?: boolean;
@@ -1,9 +1,10 @@
1
1
  import type { DropdownItemProps } from './DropdownItem';
2
2
  import type { VNode, ComponentPublicInstance } from 'vue';
3
+ import type { Numeric } from '../utils';
3
4
  export declare type DropdownItemOption = {
4
5
  text: string;
5
6
  icon?: string;
6
- value: number | string;
7
+ value: Numeric;
7
8
  };
8
9
  export declare type DropdownItemExpose = {
9
10
  toggle: (show?: boolean, options?: {
@@ -1,4 +1,5 @@
1
1
  import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  import { IndexBarProvide } from './types';
3
4
  declare function genAlphabet(): string[];
4
5
  declare const indexBarProps: {
@@ -14,7 +15,7 @@ declare const indexBarProps: {
14
15
  default: number;
15
16
  };
16
17
  indexList: {
17
- type: PropType<(string | number)[]>;
18
+ type: PropType<Numeric[]>;
18
19
  default: typeof genAlphabet;
19
20
  };
20
21
  };
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
33
34
  default: number;
34
35
  };
35
36
  indexList: {
36
- type: PropType<(string | number)[]>;
37
+ type: PropType<Numeric[]>;
37
38
  default: typeof genAlphabet;
38
39
  };
39
40
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change")[], "select" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
@@ -49,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
49
50
  default: number;
50
51
  };
51
52
  indexList: {
52
- type: PropType<(string | number)[]>;
53
+ type: PropType<Numeric[]>;
53
54
  default: typeof genAlphabet;
54
55
  };
55
56
  }>> & {
@@ -58,6 +59,6 @@ declare const _default: import("vue").DefineComponent<{
58
59
  }, {
59
60
  sticky: boolean;
60
61
  stickyOffsetTop: number;
61
- indexList: (string | number)[];
62
+ indexList: Numeric[];
62
63
  }>;
63
64
  export default _default;
@@ -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);
@@ -12,7 +12,7 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
12
12
  default: number;
13
13
  };
14
14
  indexList: {
15
- type: import("vue").PropType<(string | number)[]>;
15
+ type: import("vue").PropType<import("../utils").Numeric[]>;
16
16
  default: () => string[];
17
17
  };
18
18
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change")[], "select" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -28,7 +28,7 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
28
28
  default: number;
29
29
  };
30
30
  indexList: {
31
- type: import("vue").PropType<(string | number)[]>;
31
+ type: import("vue").PropType<import("../utils").Numeric[]>;
32
32
  default: () => string[];
33
33
  };
34
34
  }>> & {
@@ -37,7 +37,7 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
37
37
  }, {
38
38
  sticky: boolean;
39
39
  stickyOffsetTop: number;
40
- indexList: (string | number)[];
40
+ indexList: import("../utils").Numeric[];
41
41
  }>>;
42
42
  export default IndexBar;
43
43
  export type { IndexBarProps };
@@ -1,9 +1,10 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
+ import type { Numeric } from '../utils';
2
3
  import type { IndexBarProps } from './IndexBar';
3
4
  export declare type IndexBarProvide = {
4
5
  props: IndexBarProps;
5
6
  };
6
7
  export declare type IndexBarExpose = {
7
- scrollTo: (index: string | number) => void;
8
+ scrollTo: (index: Numeric) => void;
8
9
  };
9
10
  export declare type IndexBarInstance = ComponentPublicInstance<IndexBarProps, IndexBarExpose>;