vant 3.2.8 → 3.3.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.
Files changed (171) hide show
  1. package/es/address-edit/AddressEdit.js +155 -180
  2. package/es/address-edit/AddressEditDetail.d.ts +10 -9
  3. package/es/address-edit/AddressEditDetail.js +6 -6
  4. package/es/button/Button.js +2 -2
  5. package/es/calendar/CalendarHeader.js +1 -3
  6. package/es/cascader/Cascader.js +10 -2
  7. package/es/checkbox/Checker.js +1 -1
  8. package/es/checkbox/types.d.ts +2 -6
  9. package/es/composables/use-id.d.ts +1 -0
  10. package/es/composables/use-id.js +14 -0
  11. package/es/composables/use-route.d.ts +1 -1
  12. package/es/composables/use-route.js +4 -4
  13. package/es/count-down/CountDown.js +1 -0
  14. package/es/coupon-list/CouponList.js +40 -24
  15. package/es/coupon-list/index.css +1 -1
  16. package/es/coupon-list/index.less +0 -5
  17. package/es/dropdown-item/DropdownItem.js +7 -2
  18. package/es/dropdown-item/types.d.ts +2 -6
  19. package/es/dropdown-menu/DropdownMenu.js +7 -3
  20. package/es/dropdown-menu/types.d.ts +1 -0
  21. package/es/empty/Network.js +22 -34
  22. package/es/field/Field.d.ts +1 -1
  23. package/es/field/Field.js +13 -5
  24. package/es/field/index.d.ts +2 -2
  25. package/es/field/types.d.ts +7 -6
  26. package/es/form/Form.js +2 -2
  27. package/es/image/Image.js +4 -9
  28. package/es/image-preview/ImagePreview.js +3 -4
  29. package/es/index.d.ts +1 -1
  30. package/es/index.js +1 -1
  31. package/es/lazyload/index.d.ts +1 -1
  32. package/es/lazyload/index.js +1 -1
  33. package/es/lazyload/vue-lazyload/index.d.ts +55 -0
  34. package/es/lazyload/vue-lazyload/index.js +46 -0
  35. package/es/lazyload/vue-lazyload/lazy-component.js +53 -0
  36. package/es/lazyload/vue-lazyload/lazy-container.js +98 -0
  37. package/es/lazyload/vue-lazyload/lazy-image.js +115 -0
  38. package/es/lazyload/vue-lazyload/lazy.js +507 -0
  39. package/es/lazyload/vue-lazyload/listener.js +241 -0
  40. package/es/lazyload/vue-lazyload/util.js +183 -0
  41. package/es/list/List.js +3 -1
  42. package/es/number-keyboard/NumberKeyboardKey.js +4 -4
  43. package/es/pagination/Pagination.js +67 -49
  44. package/es/pagination/index.css +1 -1
  45. package/es/pagination/index.less +32 -31
  46. package/es/password-input/PasswordInput.d.ts +1 -1
  47. package/es/password-input/index.d.ts +1 -1
  48. package/es/popover/Popover.js +2 -0
  49. package/es/popup/Popup.d.ts +1 -2
  50. package/es/popup/Popup.js +2 -5
  51. package/es/popup/index.d.ts +1 -2
  52. package/es/rate/Rate.js +5 -3
  53. package/es/search/Search.js +8 -2
  54. package/es/sidebar/Sidebar.js +1 -0
  55. package/es/sidebar-item/SidebarItem.js +4 -1
  56. package/es/slider/Slider.js +5 -3
  57. package/es/stepper/Stepper.js +11 -8
  58. package/es/swipe/Swipe.js +3 -4
  59. package/es/swipe/types.d.ts +1 -3
  60. package/es/switch/Switch.js +1 -0
  61. package/es/switch/index.css +1 -1
  62. package/es/switch/index.less +2 -0
  63. package/es/tab/Tab.js +17 -4
  64. package/es/tab/index.css +1 -1
  65. package/es/tab/index.less +1 -1
  66. package/es/tabbar/Tabbar.d.ts +1 -1
  67. package/es/tabbar/Tabbar.js +10 -10
  68. package/es/tabbar-item/TabbarItem.js +11 -4
  69. package/es/tabs/Tabs.js +10 -5
  70. package/es/tabs/TabsTitle.d.ts +6 -0
  71. package/es/tabs/TabsTitle.js +7 -1
  72. package/es/tabs/types.d.ts +1 -0
  73. package/es/uploader/UploaderPreviewItem.js +4 -1
  74. package/es/uploader/utils.d.ts +2 -2
  75. package/es/uploader/utils.js +2 -2
  76. package/es/utils/dom.d.ts +1 -0
  77. package/es/utils/dom.js +6 -2
  78. package/es/utils/format.js +6 -5
  79. package/es/vue-tsx-shim.d.ts +1 -0
  80. package/lib/address-edit/AddressEdit.js +156 -180
  81. package/lib/address-edit/AddressEditDetail.d.ts +10 -9
  82. package/lib/address-edit/AddressEditDetail.js +6 -6
  83. package/lib/button/Button.js +1 -1
  84. package/lib/calendar/CalendarHeader.js +1 -3
  85. package/lib/cascader/Cascader.js +10 -2
  86. package/lib/checkbox/Checker.js +1 -1
  87. package/lib/checkbox/types.d.ts +2 -6
  88. package/lib/composables/use-id.d.ts +1 -0
  89. package/lib/composables/use-id.js +21 -0
  90. package/lib/composables/use-route.d.ts +1 -1
  91. package/lib/composables/use-route.js +4 -4
  92. package/lib/count-down/CountDown.js +1 -0
  93. package/lib/coupon-list/CouponList.js +39 -22
  94. package/lib/coupon-list/index.css +1 -1
  95. package/lib/coupon-list/index.less +0 -5
  96. package/lib/dropdown-item/DropdownItem.js +7 -2
  97. package/lib/dropdown-item/types.d.ts +2 -6
  98. package/lib/dropdown-menu/DropdownMenu.js +7 -2
  99. package/lib/dropdown-menu/types.d.ts +1 -0
  100. package/lib/empty/Network.js +22 -34
  101. package/lib/field/Field.d.ts +1 -1
  102. package/lib/field/Field.js +14 -5
  103. package/lib/field/index.d.ts +2 -2
  104. package/lib/field/types.d.ts +7 -6
  105. package/lib/form/Form.js +1 -1
  106. package/lib/image/Image.js +4 -9
  107. package/lib/image-preview/ImagePreview.js +1 -2
  108. package/lib/index.css +1 -1
  109. package/lib/index.d.ts +1 -1
  110. package/lib/index.js +1 -1
  111. package/lib/lazyload/index.d.ts +1 -1
  112. package/lib/lazyload/index.js +3 -3
  113. package/lib/lazyload/vue-lazyload/index.d.ts +55 -0
  114. package/lib/lazyload/vue-lazyload/index.js +58 -0
  115. package/lib/lazyload/vue-lazyload/lazy-component.js +62 -0
  116. package/lib/lazyload/vue-lazyload/lazy-container.js +106 -0
  117. package/lib/lazyload/vue-lazyload/lazy-image.js +125 -0
  118. package/lib/lazyload/vue-lazyload/lazy.js +520 -0
  119. package/lib/lazyload/vue-lazyload/listener.js +251 -0
  120. package/lib/lazyload/vue-lazyload/util.js +213 -0
  121. package/lib/list/List.js +3 -1
  122. package/lib/number-keyboard/NumberKeyboardKey.js +3 -3
  123. package/lib/pagination/Pagination.js +65 -47
  124. package/lib/pagination/index.css +1 -1
  125. package/lib/pagination/index.less +32 -31
  126. package/lib/password-input/PasswordInput.d.ts +1 -1
  127. package/lib/password-input/index.d.ts +1 -1
  128. package/lib/popover/Popover.js +2 -0
  129. package/lib/popup/Popup.d.ts +1 -2
  130. package/lib/popup/Popup.js +2 -5
  131. package/lib/popup/index.d.ts +1 -2
  132. package/lib/rate/Rate.js +5 -3
  133. package/lib/search/Search.js +9 -2
  134. package/lib/sidebar/Sidebar.js +1 -0
  135. package/lib/sidebar-item/SidebarItem.js +4 -1
  136. package/lib/slider/Slider.js +5 -3
  137. package/lib/stepper/Stepper.js +11 -8
  138. package/lib/swipe/Swipe.js +1 -2
  139. package/lib/swipe/types.d.ts +1 -3
  140. package/lib/switch/Switch.js +1 -0
  141. package/lib/switch/index.css +1 -1
  142. package/lib/switch/index.less +2 -0
  143. package/lib/tab/Tab.js +19 -4
  144. package/lib/tab/index.css +1 -1
  145. package/lib/tab/index.less +1 -1
  146. package/lib/tabbar/Tabbar.d.ts +1 -1
  147. package/lib/tabbar/Tabbar.js +10 -10
  148. package/lib/tabbar-item/TabbarItem.js +11 -4
  149. package/lib/tabs/Tabs.js +9 -3
  150. package/lib/tabs/TabsTitle.d.ts +6 -0
  151. package/lib/tabs/TabsTitle.js +7 -1
  152. package/lib/tabs/types.d.ts +1 -0
  153. package/lib/uploader/UploaderPreviewItem.js +3 -0
  154. package/lib/uploader/utils.d.ts +2 -2
  155. package/lib/uploader/utils.js +3 -2
  156. package/lib/utils/dom.d.ts +1 -0
  157. package/lib/utils/dom.js +9 -2
  158. package/lib/utils/format.js +7 -5
  159. package/lib/vant.es.js +1086 -1068
  160. package/lib/vant.es.min.js +1086 -1068
  161. package/lib/vant.js +1085 -1067
  162. package/lib/vant.min.js +1 -1
  163. package/lib/vue-tsx-shim.d.ts +1 -0
  164. package/package.json +4 -4
  165. package/vetur/attributes.json +340 -340
  166. package/vetur/tags.json +119 -119
  167. package/vetur/web-types.json +1143 -1143
  168. package/es/composables/use-link-field.d.ts +0 -0
  169. package/es/composables/use-link-field.js +0 -0
  170. package/lib/composables/use-link-field.d.ts +0 -0
  171. package/lib/composables/use-link-field.js +0 -1
@@ -1,5 +1,5 @@
1
- import { unref, ref, inject, getCurrentInstance, onUnmounted, computed, reactive, provide, isVNode, onBeforeUnmount, onActivated, onDeactivated, onMounted, nextTick, isRef, watch, defineComponent, createVNode, Transition, withDirectives, vShow, Teleport, Fragment, mergeProps, createTextVNode, createApp, onBeforeUpdate, resolveDirective, h, onUpdated } from "vue";
2
- function noop$1() {
1
+ import { unref, ref, inject, getCurrentInstance, onUnmounted, computed, reactive, provide, onBeforeUnmount, onActivated, onDeactivated, onMounted, nextTick, isRef, watch, isVNode, defineComponent, createVNode, Transition, withDirectives, vShow, Teleport, Fragment, mergeProps, createTextVNode, createApp, onBeforeUpdate, resolveDirective, h, onUpdated, watchEffect } from "vue";
2
+ function noop() {
3
3
  }
4
4
  var extend = Object.assign;
5
5
  var inBrowser$1 = typeof window !== "undefined";
@@ -46,7 +46,7 @@ var makeStringProp = (defaultVal) => ({
46
46
  type: String,
47
47
  default: defaultVal
48
48
  });
49
- var inBrowser = typeof window !== "undefined";
49
+ const inBrowser = typeof window !== "undefined";
50
50
  function raf(fn2) {
51
51
  return inBrowser ? requestAnimationFrame(fn2) : -1;
52
52
  }
@@ -58,56 +58,42 @@ function cancelRaf(id) {
58
58
  function doubleRaf(fn2) {
59
59
  raf(() => raf(fn2));
60
60
  }
61
- function isWindow(val) {
62
- return val === window;
63
- }
64
- function makeDOMRect(width2, height2) {
65
- return {
66
- top: 0,
67
- left: 0,
68
- right: width2,
69
- bottom: height2,
70
- width: width2,
71
- height: height2
72
- };
73
- }
74
- var useRect = (elementOrRef) => {
75
- var element = unref(elementOrRef);
61
+ const isWindow = (val) => val === window;
62
+ const makeDOMRect = (width2, height2) => ({
63
+ top: 0,
64
+ left: 0,
65
+ right: width2,
66
+ bottom: height2,
67
+ width: width2,
68
+ height: height2
69
+ });
70
+ const useRect = (elementOrRef) => {
71
+ const element = unref(elementOrRef);
76
72
  if (isWindow(element)) {
77
- var width2 = element.innerWidth;
78
- var height2 = element.innerHeight;
73
+ const width2 = element.innerWidth;
74
+ const height2 = element.innerHeight;
79
75
  return makeDOMRect(width2, height2);
80
76
  }
81
- if (element && element.getBoundingClientRect) {
77
+ if (element == null ? void 0 : element.getBoundingClientRect) {
82
78
  return element.getBoundingClientRect();
83
79
  }
84
80
  return makeDOMRect(0, 0);
85
81
  };
86
- function useToggle(defaultValue) {
87
- if (defaultValue === void 0) {
88
- defaultValue = false;
89
- }
90
- var state = ref(defaultValue);
91
- var toggle = function(value) {
92
- if (value === void 0) {
93
- value = !state.value;
94
- }
82
+ function useToggle(defaultValue = false) {
83
+ const state = ref(defaultValue);
84
+ const toggle = (value = !state.value) => {
95
85
  state.value = value;
96
86
  };
97
87
  return [state, toggle];
98
88
  }
99
89
  function useParent(key) {
100
- var parent = inject(key, null);
90
+ const parent = inject(key, null);
101
91
  if (parent) {
102
- var instance2 = getCurrentInstance();
103
- var {
104
- link: _link,
105
- unlink: _unlink,
106
- internalChildren
107
- } = parent;
108
- _link(instance2);
109
- onUnmounted(() => _unlink(instance2));
110
- var index2 = computed(() => internalChildren.indexOf(instance2));
92
+ const instance2 = getCurrentInstance();
93
+ const { link, unlink, internalChildren } = parent;
94
+ link(instance2);
95
+ onUnmounted(() => unlink(instance2));
96
+ const index2 = computed(() => internalChildren.indexOf(instance2));
111
97
  return {
112
98
  parent,
113
99
  index: index2
@@ -119,14 +105,14 @@ function useParent(key) {
119
105
  };
120
106
  }
121
107
  function flattenVNodes(children) {
122
- var result = [];
123
- var traverse = (children2) => {
108
+ const result = [];
109
+ const traverse = (children2) => {
124
110
  if (Array.isArray(children2)) {
125
111
  children2.forEach((child) => {
112
+ var _a;
126
113
  if (isVNode(child)) {
127
- var _child$component;
128
114
  result.push(child);
129
- if ((_child$component = child.component) != null && _child$component.subTree) {
115
+ if ((_a = child.component) == null ? void 0 : _a.subTree) {
130
116
  traverse(child.component.subTree.children);
131
117
  }
132
118
  if (child.children) {
@@ -140,29 +126,29 @@ function flattenVNodes(children) {
140
126
  return result;
141
127
  }
142
128
  function sortChildren(parent, publicChildren, internalChildren) {
143
- var vnodes = flattenVNodes(parent.subTree.children);
129
+ const vnodes = flattenVNodes(parent.subTree.children);
144
130
  internalChildren.sort((a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode));
145
- var orderedPublicChildren = internalChildren.map((item) => item.proxy);
131
+ const orderedPublicChildren = internalChildren.map((item) => item.proxy);
146
132
  publicChildren.sort((a, b) => {
147
- var indexA = orderedPublicChildren.indexOf(a);
148
- var indexB = orderedPublicChildren.indexOf(b);
133
+ const indexA = orderedPublicChildren.indexOf(a);
134
+ const indexB = orderedPublicChildren.indexOf(b);
149
135
  return indexA - indexB;
150
136
  });
151
137
  }
152
138
  function useChildren(key) {
153
- var publicChildren = reactive([]);
154
- var internalChildren = reactive([]);
155
- var parent = getCurrentInstance();
156
- var linkChildren = (value) => {
157
- var link = (child) => {
139
+ const publicChildren = reactive([]);
140
+ const internalChildren = reactive([]);
141
+ const parent = getCurrentInstance();
142
+ const linkChildren = (value) => {
143
+ const link = (child) => {
158
144
  if (child.proxy) {
159
145
  internalChildren.push(child);
160
146
  publicChildren.push(child.proxy);
161
147
  sortChildren(parent, publicChildren, internalChildren);
162
148
  }
163
149
  };
164
- var unlink = (child) => {
165
- var index2 = internalChildren.indexOf(child);
150
+ const unlink = (child) => {
151
+ const index2 = internalChildren.indexOf(child);
166
152
  publicChildren.splice(index2, 1);
167
153
  internalChildren.splice(index2, 1);
168
154
  };
@@ -178,16 +164,16 @@ function useChildren(key) {
178
164
  linkChildren
179
165
  };
180
166
  }
181
- var SECOND = 1e3;
182
- var MINUTE = 60 * SECOND;
183
- var HOUR = 60 * MINUTE;
184
- var DAY = 24 * HOUR;
167
+ const SECOND = 1e3;
168
+ const MINUTE = 60 * SECOND;
169
+ const HOUR = 60 * MINUTE;
170
+ const DAY = 24 * HOUR;
185
171
  function parseTime(time) {
186
- var days = Math.floor(time / DAY);
187
- var hours = Math.floor(time % DAY / HOUR);
188
- var minutes = Math.floor(time % HOUR / MINUTE);
189
- var seconds = Math.floor(time % MINUTE / SECOND);
190
- var milliseconds = Math.floor(time % SECOND);
172
+ const days = Math.floor(time / DAY);
173
+ const hours = Math.floor(time % DAY / HOUR);
174
+ const minutes = Math.floor(time % HOUR / MINUTE);
175
+ const seconds = Math.floor(time % MINUTE / SECOND);
176
+ const milliseconds = Math.floor(time % SECOND);
191
177
  return {
192
178
  total: time,
193
179
  days,
@@ -201,26 +187,27 @@ function isSameSecond(time1, time2) {
201
187
  return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
202
188
  }
203
189
  function useCountDown(options) {
204
- var rafId;
205
- var endTime;
206
- var counting;
207
- var deactivated;
208
- var remain = ref(options.time);
209
- var current = computed(() => parseTime(remain.value));
210
- var pause = () => {
190
+ let rafId;
191
+ let endTime;
192
+ let counting;
193
+ let deactivated;
194
+ const remain = ref(options.time);
195
+ const current2 = computed(() => parseTime(remain.value));
196
+ const pause = () => {
211
197
  counting = false;
212
198
  cancelRaf(rafId);
213
199
  };
214
- var getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
215
- var setRemain = (value) => {
200
+ const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
201
+ const setRemain = (value) => {
202
+ var _a, _b;
216
203
  remain.value = value;
217
- options.onChange == null ? void 0 : options.onChange(current.value);
204
+ (_a = options.onChange) == null ? void 0 : _a.call(options, current2.value);
218
205
  if (value === 0) {
219
206
  pause();
220
- options.onFinish == null ? void 0 : options.onFinish();
207
+ (_b = options.onFinish) == null ? void 0 : _b.call(options);
221
208
  }
222
209
  };
223
- var microTick = () => {
210
+ const microTick = () => {
224
211
  rafId = raf(() => {
225
212
  if (counting) {
226
213
  setRemain(getCurrentRemain());
@@ -230,10 +217,10 @@ function useCountDown(options) {
230
217
  }
231
218
  });
232
219
  };
233
- var macroTick = () => {
220
+ const macroTick = () => {
234
221
  rafId = raf(() => {
235
222
  if (counting) {
236
- var remainRemain = getCurrentRemain();
223
+ const remainRemain = getCurrentRemain();
237
224
  if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
238
225
  setRemain(remainRemain);
239
226
  }
@@ -243,7 +230,7 @@ function useCountDown(options) {
243
230
  }
244
231
  });
245
232
  };
246
- var tick = () => {
233
+ const tick = () => {
247
234
  if (!inBrowser) {
248
235
  return;
249
236
  }
@@ -253,17 +240,14 @@ function useCountDown(options) {
253
240
  macroTick();
254
241
  }
255
242
  };
256
- var start2 = () => {
243
+ const start2 = () => {
257
244
  if (!counting) {
258
245
  endTime = Date.now() + remain.value;
259
246
  counting = true;
260
247
  tick();
261
248
  }
262
249
  };
263
- var reset = function(totalTime) {
264
- if (totalTime === void 0) {
265
- totalTime = options.time;
266
- }
250
+ const reset = (totalTime = options.time) => {
267
251
  pause();
268
252
  remain.value = totalTime;
269
253
  };
@@ -285,11 +269,11 @@ function useCountDown(options) {
285
269
  start: start2,
286
270
  pause,
287
271
  reset,
288
- current
272
+ current: current2
289
273
  };
290
274
  }
291
275
  function onMountedOrActivated(hook) {
292
- var mounted;
276
+ let mounted;
293
277
  onMounted(() => {
294
278
  hook();
295
279
  nextTick(() => {
@@ -302,31 +286,21 @@ function onMountedOrActivated(hook) {
302
286
  }
303
287
  });
304
288
  }
305
- function useEventListener(type, listener, options) {
306
- if (options === void 0) {
307
- options = {};
308
- }
289
+ function useEventListener(type, listener, options = {}) {
309
290
  if (!inBrowser) {
310
291
  return;
311
292
  }
312
- var {
313
- target = window,
314
- passive: passive2 = false,
315
- capture = false
316
- } = options;
317
- var attached;
318
- var add = (target2) => {
319
- var element = unref(target2);
293
+ const { target = window, passive: passive2 = false, capture = false } = options;
294
+ let attached;
295
+ const add = (target2) => {
296
+ const element = unref(target2);
320
297
  if (element && !attached) {
321
- element.addEventListener(type, listener, {
322
- capture,
323
- passive: passive2
324
- });
298
+ element.addEventListener(type, listener, { capture, passive: passive2 });
325
299
  attached = true;
326
300
  }
327
301
  };
328
- var remove2 = (target2) => {
329
- var element = unref(target2);
302
+ const remove2 = (target2) => {
303
+ const element = unref(target2);
330
304
  if (element && attached) {
331
305
  element.removeEventListener(type, listener, capture);
332
306
  attached = false;
@@ -342,62 +316,47 @@ function useEventListener(type, listener, options) {
342
316
  });
343
317
  }
344
318
  }
345
- function useClickAway(target, listener, options) {
346
- if (options === void 0) {
347
- options = {};
348
- }
319
+ function useClickAway(target, listener, options = {}) {
349
320
  if (!inBrowser) {
350
321
  return;
351
322
  }
352
- var {
353
- eventName = "click"
354
- } = options;
355
- var onClick = (event) => {
356
- var element = unref(target);
323
+ const { eventName = "click" } = options;
324
+ const onClick = (event) => {
325
+ const element = unref(target);
357
326
  if (element && !element.contains(event.target)) {
358
327
  listener(event);
359
328
  }
360
329
  };
361
- useEventListener(eventName, onClick, {
362
- target: document
363
- });
330
+ useEventListener(eventName, onClick, { target: document });
364
331
  }
365
- var width;
366
- var height;
332
+ let width;
333
+ let height;
367
334
  function useWindowSize() {
368
335
  if (!width) {
369
336
  width = ref(0);
370
337
  height = ref(0);
371
- var update = () => {
372
- if (inBrowser) {
338
+ if (inBrowser) {
339
+ const update = () => {
373
340
  width.value = window.innerWidth;
374
341
  height.value = window.innerHeight;
375
- }
376
- };
377
- update();
378
- useEventListener("resize", update);
379
- useEventListener("orientationchange", update);
342
+ };
343
+ update();
344
+ window.addEventListener("resize", update, { passive: true });
345
+ window.addEventListener("orientationchange", update, { passive: true });
346
+ }
380
347
  }
381
- return {
382
- width,
383
- height
384
- };
348
+ return { width, height };
385
349
  }
386
- var overflowScrollReg = /scroll|auto/i;
387
- var defaultRoot = inBrowser ? window : void 0;
350
+ const overflowScrollReg = /scroll|auto/i;
351
+ const defaultRoot = inBrowser ? window : void 0;
388
352
  function isElement$1(node) {
389
- var ELEMENT_NODE_TYPE = 1;
353
+ const ELEMENT_NODE_TYPE = 1;
390
354
  return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
391
355
  }
392
- function getScrollParent$1(el, root) {
393
- if (root === void 0) {
394
- root = defaultRoot;
395
- }
396
- var node = el;
356
+ function getScrollParent$1(el, root = defaultRoot) {
357
+ let node = el;
397
358
  while (node && node !== root && isElement$1(node)) {
398
- var {
399
- overflowY
400
- } = window.getComputedStyle(node);
359
+ const { overflowY } = window.getComputedStyle(node);
401
360
  if (overflowScrollReg.test(overflowY)) {
402
361
  return node;
403
362
  }
@@ -405,11 +364,8 @@ function getScrollParent$1(el, root) {
405
364
  }
406
365
  return root;
407
366
  }
408
- function useScrollParent(el, root) {
409
- if (root === void 0) {
410
- root = defaultRoot;
411
- }
412
- var scrollParent = ref();
367
+ function useScrollParent(el, root = defaultRoot) {
368
+ const scrollParent = ref();
413
369
  onMounted(() => {
414
370
  if (el.value) {
415
371
  scrollParent.value = getScrollParent$1(el.value, root);
@@ -417,20 +373,23 @@ function useScrollParent(el, root) {
417
373
  });
418
374
  return scrollParent;
419
375
  }
376
+ let visibility;
420
377
  function usePageVisibility() {
421
- var visibility = ref("visible");
422
- var setVisibility = () => {
378
+ if (!visibility) {
379
+ visibility = ref("visible");
423
380
  if (inBrowser) {
424
- visibility.value = document.hidden ? "hidden" : "visible";
381
+ const update = () => {
382
+ visibility.value = document.hidden ? "hidden" : "visible";
383
+ };
384
+ update();
385
+ window.addEventListener("visibilitychange", update);
425
386
  }
426
- };
427
- setVisibility();
428
- useEventListener("visibilitychange", setVisibility);
387
+ }
429
388
  return visibility;
430
389
  }
431
- var CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
390
+ const CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
432
391
  function useCustomFieldValue(customValue) {
433
- var field = inject(CUSTOM_FIELD_INJECTION_KEY, null);
392
+ const field = inject(CUSTOM_FIELD_INJECTION_KEY, null);
434
393
  if (field && !field.customValue.value) {
435
394
  field.customValue.value = customValue;
436
395
  watch(customValue, () => {
@@ -441,8 +400,8 @@ function useCustomFieldValue(customValue) {
441
400
  }
442
401
  var isDef = (val) => val !== void 0 && val !== null;
443
402
  var isFunction = (val) => typeof val === "function";
444
- var isObject$1 = (val) => val !== null && typeof val === "object";
445
- var isPromise = (val) => isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
403
+ var isObject = (val) => val !== null && typeof val === "object";
404
+ var isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
446
405
  var isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
447
406
  function isMobile(value) {
448
407
  value = value.replace(/[^-|\d]/g, "");
@@ -500,11 +459,15 @@ function isHidden(elementRef) {
500
459
  var parentHidden = el.offsetParent === null && style.position !== "fixed";
501
460
  return hidden || parentHidden;
502
461
  }
462
+ var {
463
+ width: windowWidth,
464
+ height: windowHeight
465
+ } = useWindowSize();
503
466
  function addUnit(value) {
504
- if (!isDef(value)) {
505
- return void 0;
467
+ if (isDef(value)) {
468
+ return isNumeric(value) ? value + "px" : String(value);
506
469
  }
507
- return isNumeric(value) ? value + "px" : String(value);
470
+ return void 0;
508
471
  }
509
472
  function getSizeStyle(originSize) {
510
473
  if (isDef(originSize)) {
@@ -537,11 +500,11 @@ function convertRem(value) {
537
500
  }
538
501
  function convertVw(value) {
539
502
  value = value.replace(/vw/g, "");
540
- return +value * window.innerWidth / 100;
503
+ return +value * windowWidth.value / 100;
541
504
  }
542
505
  function convertVh(value) {
543
506
  value = value.replace(/vh/g, "");
544
- return +value * window.innerHeight / 100;
507
+ return +value * windowHeight.value / 100;
545
508
  }
546
509
  function unitToPx(value) {
547
510
  if (typeof value === "number") {
@@ -616,7 +579,7 @@ function assignKey(to, from, key) {
616
579
  if (!isDef(val)) {
617
580
  return;
618
581
  }
619
- if (!hasOwnProperty.call(to, key) || !isObject$1(val)) {
582
+ if (!hasOwnProperty.call(to, key) || !isObject(val)) {
620
583
  to[key] = val;
621
584
  } else {
622
585
  to[key] = deepAssign(Object(to[key]), val);
@@ -783,7 +746,7 @@ function callInterceptor(interceptor, _ref) {
783
746
  } else if (canceled) {
784
747
  canceled();
785
748
  }
786
- }).catch(noop$1);
749
+ }).catch(noop);
787
750
  } else if (returnVal) {
788
751
  done();
789
752
  } else if (canceled) {
@@ -838,13 +801,13 @@ var routeProps = {
838
801
  url: String,
839
802
  replace: Boolean
840
803
  };
841
- function route(vm) {
842
- var router = vm.$router;
804
+ function route(_ref) {
843
805
  var {
844
806
  to,
845
807
  url,
846
- replace
847
- } = vm;
808
+ replace,
809
+ $router: router
810
+ } = _ref;
848
811
  if (to && router) {
849
812
  router[replace ? "replace" : "push"](to);
850
813
  } else if (url) {
@@ -1183,7 +1146,7 @@ var _Button = defineComponent({
1183
1146
  };
1184
1147
  var onClick = (event) => {
1185
1148
  if (props.loading) {
1186
- event.preventDefault();
1149
+ preventDefault(event);
1187
1150
  } else if (!props.disabled) {
1188
1151
  emit("click", event);
1189
1152
  route2();
@@ -1524,7 +1487,7 @@ var _Overlay = defineComponent({
1524
1487
  return withDirectives(createVNode("div", {
1525
1488
  "style": style,
1526
1489
  "class": [bem$1i(), props.className],
1527
- "onTouchmove": props.lockScroll ? preventTouchMove : noop$1
1490
+ "onTouchmove": props.lockScroll ? preventTouchMove : noop
1528
1491
  }, [slots.default == null ? void 0 : slots.default()]), [[vShow, props.show]]);
1529
1492
  });
1530
1493
  return () => createVNode(Transition, {
@@ -1553,7 +1516,7 @@ var _Popup = defineComponent({
1553
1516
  name: name$1l,
1554
1517
  inheritAttrs: false,
1555
1518
  props: popupProps$2,
1556
- emits: ["open", "close", "click", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
1519
+ emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
1557
1520
  setup(props, _ref) {
1558
1521
  var {
1559
1522
  emit,
@@ -1632,7 +1595,6 @@ var _Popup = defineComponent({
1632
1595
  }, null);
1633
1596
  }
1634
1597
  };
1635
- var onClick = (event) => emit("click", event);
1636
1598
  var onOpened = () => emit("opened");
1637
1599
  var onClosed = () => emit("closed");
1638
1600
  var renderPopup = lazyRender(() => {
@@ -1649,8 +1611,7 @@ var _Popup = defineComponent({
1649
1611
  [position]: position
1650
1612
  }), {
1651
1613
  "van-safe-area-bottom": safeAreaInsetBottom
1652
- }],
1653
- "onClick": onClick
1614
+ }]
1654
1615
  }, attrs), [slots.default == null ? void 0 : slots.default(), renderCloseIcon()]), [[vShow, props.show]]);
1655
1616
  });
1656
1617
  var renderTransition = () => {
@@ -1836,7 +1797,7 @@ function deepClone(obj) {
1836
1797
  if (Array.isArray(obj)) {
1837
1798
  return obj.map((item) => deepClone(item));
1838
1799
  }
1839
- if (isObject$1(obj)) {
1800
+ if (isObject(obj)) {
1840
1801
  var to = {};
1841
1802
  Object.keys(obj).forEach((key) => {
1842
1803
  to[key] = deepClone(obj[key]);
@@ -1857,7 +1818,7 @@ function getElementTranslateY(element) {
1857
1818
  return Number(translateY);
1858
1819
  }
1859
1820
  var PICKER_KEY = Symbol(name$1j);
1860
- var isOptionDisabled = (option) => isObject$1(option) && option.disabled;
1821
+ var isOptionDisabled = (option) => isObject(option) && option.disabled;
1861
1822
  var Column = defineComponent({
1862
1823
  name: name$1j,
1863
1824
  props: {
@@ -1936,7 +1897,7 @@ var Column = defineComponent({
1936
1897
  setIndex(index2, true);
1937
1898
  };
1938
1899
  var getOptionText = (option) => {
1939
- if (isObject$1(option) && props.textKey in option) {
1900
+ if (isObject(option) && props.textKey in option) {
1940
1901
  return option[props.textKey];
1941
1902
  }
1942
1903
  return option;
@@ -2073,7 +2034,7 @@ var Column = defineComponent({
2073
2034
  }, [renderOptions()])]);
2074
2035
  }
2075
2036
  });
2076
- var [name$1i, bem$1e, t$i] = createNamespace("picker");
2037
+ var [name$1i, bem$1e, t$j] = createNamespace("picker");
2077
2038
  var pickerSharedProps = {
2078
2039
  title: String,
2079
2040
  loading: Boolean,
@@ -2272,7 +2233,7 @@ var _Picker = defineComponent({
2272
2233
  }
2273
2234
  };
2274
2235
  var renderCancel = () => {
2275
- var text = props.cancelButtonText || t$i("cancel");
2236
+ var text = props.cancelButtonText || t$j("cancel");
2276
2237
  return createVNode("button", {
2277
2238
  "type": "button",
2278
2239
  "class": [bem$1e("cancel"), HAPTICS_FEEDBACK],
@@ -2280,7 +2241,7 @@ var _Picker = defineComponent({
2280
2241
  }, [slots.cancel ? slots.cancel() : text]);
2281
2242
  };
2282
2243
  var renderConfirm = () => {
2283
- var text = props.confirmButtonText || t$i("confirm");
2244
+ var text = props.confirmButtonText || t$j("confirm");
2284
2245
  return createVNode("button", {
2285
2246
  "type": "button",
2286
2247
  "class": [bem$1e("confirm"), HAPTICS_FEEDBACK],
@@ -2713,6 +2674,146 @@ var _Cell = defineComponent({
2713
2674
  }
2714
2675
  });
2715
2676
  var Cell = withInstall(_Cell);
2677
+ var [name$1f, bem$1b] = createNamespace("form");
2678
+ var formProps = {
2679
+ colon: Boolean,
2680
+ disabled: Boolean,
2681
+ readonly: Boolean,
2682
+ showError: Boolean,
2683
+ labelWidth: numericProp,
2684
+ labelAlign: String,
2685
+ inputAlign: String,
2686
+ scrollToError: Boolean,
2687
+ validateFirst: Boolean,
2688
+ submitOnEnter: truthProp,
2689
+ validateTrigger: makeStringProp("onBlur"),
2690
+ showErrorMessage: truthProp,
2691
+ errorMessageAlign: String
2692
+ };
2693
+ var _Form = defineComponent({
2694
+ name: name$1f,
2695
+ props: formProps,
2696
+ emits: ["submit", "failed"],
2697
+ setup(props, _ref) {
2698
+ var {
2699
+ emit,
2700
+ slots
2701
+ } = _ref;
2702
+ var {
2703
+ children,
2704
+ linkChildren
2705
+ } = useChildren(FORM_KEY);
2706
+ var getFieldsByNames = (names) => {
2707
+ if (names) {
2708
+ return children.filter((field) => names.includes(field.name));
2709
+ }
2710
+ return children;
2711
+ };
2712
+ var validateSeq = (names) => new Promise((resolve, reject) => {
2713
+ var errors = [];
2714
+ var fields = getFieldsByNames(names);
2715
+ fields.reduce((promise, field) => promise.then(() => {
2716
+ if (!errors.length) {
2717
+ return field.validate().then((error) => {
2718
+ if (error) {
2719
+ errors.push(error);
2720
+ }
2721
+ });
2722
+ }
2723
+ }), Promise.resolve()).then(() => {
2724
+ if (errors.length) {
2725
+ reject(errors);
2726
+ } else {
2727
+ resolve();
2728
+ }
2729
+ });
2730
+ });
2731
+ var validateAll = (names) => new Promise((resolve, reject) => {
2732
+ var fields = getFieldsByNames(names);
2733
+ Promise.all(fields.map((item) => item.validate())).then((errors) => {
2734
+ errors = errors.filter(Boolean);
2735
+ if (errors.length) {
2736
+ reject(errors);
2737
+ } else {
2738
+ resolve();
2739
+ }
2740
+ });
2741
+ });
2742
+ var validateField = (name2) => {
2743
+ var matched = children.find((item) => item.name === name2);
2744
+ if (matched) {
2745
+ return new Promise((resolve, reject) => {
2746
+ matched.validate().then((error) => {
2747
+ if (error) {
2748
+ reject(error);
2749
+ } else {
2750
+ resolve();
2751
+ }
2752
+ });
2753
+ });
2754
+ }
2755
+ return Promise.reject();
2756
+ };
2757
+ var validate = (name2) => {
2758
+ if (typeof name2 === "string") {
2759
+ return validateField(name2);
2760
+ }
2761
+ return props.validateFirst ? validateSeq(name2) : validateAll(name2);
2762
+ };
2763
+ var resetValidation = (name2) => {
2764
+ if (typeof name2 === "string") {
2765
+ name2 = [name2];
2766
+ }
2767
+ var fields = getFieldsByNames(name2);
2768
+ fields.forEach((item) => {
2769
+ item.resetValidation();
2770
+ });
2771
+ };
2772
+ var scrollToField = (name2, options) => {
2773
+ children.some((item) => {
2774
+ if (item.name === name2) {
2775
+ item.$el.scrollIntoView(options);
2776
+ return true;
2777
+ }
2778
+ return false;
2779
+ });
2780
+ };
2781
+ var getValues = () => children.reduce((form, field) => {
2782
+ form[field.name] = field.formValue.value;
2783
+ return form;
2784
+ }, {});
2785
+ var submit = () => {
2786
+ var values = getValues();
2787
+ validate().then(() => emit("submit", values)).catch((errors) => {
2788
+ emit("failed", {
2789
+ values,
2790
+ errors
2791
+ });
2792
+ if (props.scrollToError && errors[0].name) {
2793
+ scrollToField(errors[0].name);
2794
+ }
2795
+ });
2796
+ };
2797
+ var onSubmit = (event) => {
2798
+ preventDefault(event);
2799
+ submit();
2800
+ };
2801
+ linkChildren({
2802
+ props
2803
+ });
2804
+ useExpose({
2805
+ submit,
2806
+ validate,
2807
+ scrollToField,
2808
+ resetValidation
2809
+ });
2810
+ return () => createVNode("form", {
2811
+ "class": bem$1b(),
2812
+ "onSubmit": onSubmit
2813
+ }, [slots.default == null ? void 0 : slots.default()]);
2814
+ }
2815
+ });
2816
+ var Form = withInstall(_Form);
2716
2817
  function isEmptyValue(value) {
2717
2818
  if (Array.isArray(value)) {
2718
2819
  return !value.length;
@@ -2768,7 +2869,7 @@ function resizeTextarea(input, autosize) {
2768
2869
  var scrollTop = getRootScrollTop();
2769
2870
  input.style.height = "auto";
2770
2871
  var height2 = input.scrollHeight;
2771
- if (isObject$1(autosize)) {
2872
+ if (isObject(autosize)) {
2772
2873
  var {
2773
2874
  maxHeight,
2774
2875
  minHeight
@@ -2802,7 +2903,15 @@ function mapInputType(type) {
2802
2903
  type
2803
2904
  };
2804
2905
  }
2805
- var [name$1f, bem$1b] = createNamespace("field");
2906
+ var current = 0;
2907
+ function useId() {
2908
+ var vm = getCurrentInstance();
2909
+ var {
2910
+ name: name2 = "unknown"
2911
+ } = (vm == null ? void 0 : vm.type) || {};
2912
+ return name2 + "-" + ++current;
2913
+ }
2914
+ var [name$1e, bem$1a] = createNamespace("field");
2806
2915
  var fieldSharedProps = {
2807
2916
  id: String,
2808
2917
  name: String,
@@ -2849,7 +2958,7 @@ var fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
2849
2958
  }
2850
2959
  });
2851
2960
  var _Field = defineComponent({
2852
- name: name$1f,
2961
+ name: name$1e,
2853
2962
  props: fieldProps,
2854
2963
  emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2855
2964
  setup(props, _ref) {
@@ -2857,6 +2966,7 @@ var _Field = defineComponent({
2857
2966
  emit,
2858
2967
  slots
2859
2968
  } = _ref;
2969
+ var id = useId();
2860
2970
  var state = reactive({
2861
2971
  focused: false,
2862
2972
  validateFailed: false,
@@ -3018,12 +3128,14 @@ var _Field = defineComponent({
3018
3128
  state.focused = true;
3019
3129
  emit("focus", event);
3020
3130
  nextTick(adjustTextareaSize);
3021
- var readonly = getProp("readonly");
3022
- if (readonly) {
3131
+ if (getProp("readonly")) {
3023
3132
  blur();
3024
3133
  }
3025
3134
  };
3026
3135
  var onBlur = (event) => {
3136
+ if (getProp("readonly")) {
3137
+ return;
3138
+ }
3027
3139
  state.focused = false;
3028
3140
  updateValue(getModelValue(), "onBlur");
3029
3141
  emit("blur", event);
@@ -3068,8 +3180,9 @@ var _Field = defineComponent({
3068
3180
  }
3069
3181
  emit("keypress", event);
3070
3182
  };
3183
+ var getInputId = () => props.id || id + "-input";
3071
3184
  var renderInput = () => {
3072
- var controlClass = bem$1b("control", [getProp("inputAlign"), {
3185
+ var controlClass = bem$1a("control", [getProp("inputAlign"), {
3073
3186
  error: showError.value,
3074
3187
  custom: !!slots.input,
3075
3188
  "min-height": props.type === "textarea" && !props.autosize
@@ -3081,7 +3194,7 @@ var _Field = defineComponent({
3081
3194
  }, [slots.input()]);
3082
3195
  }
3083
3196
  var inputAttrs = {
3084
- id: props.id,
3197
+ id: getInputId(),
3085
3198
  ref: inputRef,
3086
3199
  name: props.name,
3087
3200
  rows: props.rows !== void 0 ? +props.rows : void 0,
@@ -3092,6 +3205,7 @@ var _Field = defineComponent({
3092
3205
  autofocus: props.autofocus,
3093
3206
  placeholder: props.placeholder,
3094
3207
  autocomplete: props.autocomplete,
3208
+ "aria-labelledby": props.label ? id + "-label" : void 0,
3095
3209
  onBlur,
3096
3210
  onFocus,
3097
3211
  onInput,
@@ -3110,7 +3224,7 @@ var _Field = defineComponent({
3110
3224
  var leftIconSlot = slots["left-icon"];
3111
3225
  if (props.leftIcon || leftIconSlot) {
3112
3226
  return createVNode("div", {
3113
- "class": bem$1b("left-icon"),
3227
+ "class": bem$1a("left-icon"),
3114
3228
  "onClick": onClickLeftIcon
3115
3229
  }, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
3116
3230
  "name": props.leftIcon,
@@ -3122,7 +3236,7 @@ var _Field = defineComponent({
3122
3236
  var rightIconSlot = slots["right-icon"];
3123
3237
  if (props.rightIcon || rightIconSlot) {
3124
3238
  return createVNode("div", {
3125
- "class": bem$1b("right-icon"),
3239
+ "class": bem$1a("right-icon"),
3126
3240
  "onClick": onClickRightIcon
3127
3241
  }, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
3128
3242
  "name": props.rightIcon,
@@ -3134,9 +3248,9 @@ var _Field = defineComponent({
3134
3248
  if (props.showWordLimit && props.maxlength) {
3135
3249
  var count = getModelValue().length;
3136
3250
  return createVNode("div", {
3137
- "class": bem$1b("word-limit")
3251
+ "class": bem$1a("word-limit")
3138
3252
  }, [createVNode("span", {
3139
- "class": bem$1b("word-num")
3253
+ "class": bem$1a("word-num")
3140
3254
  }, [count]), createTextVNode("/"), props.maxlength]);
3141
3255
  }
3142
3256
  };
@@ -3149,7 +3263,7 @@ var _Field = defineComponent({
3149
3263
  var slot = slots["error-message"];
3150
3264
  var errorMessageAlign = getProp("errorMessageAlign");
3151
3265
  return createVNode("div", {
3152
- "class": bem$1b("error-message", errorMessageAlign)
3266
+ "class": bem$1a("error-message", errorMessageAlign)
3153
3267
  }, [slot ? slot({
3154
3268
  message
3155
3269
  }) : message]);
@@ -3162,18 +3276,19 @@ var _Field = defineComponent({
3162
3276
  }
3163
3277
  if (props.label) {
3164
3278
  return createVNode("label", {
3165
- "for": props.id
3279
+ "id": id + "-label",
3280
+ "for": getInputId()
3166
3281
  }, [props.label + colon]);
3167
3282
  }
3168
3283
  };
3169
3284
  var renderFieldBody = () => [createVNode("div", {
3170
- "class": bem$1b("body")
3285
+ "class": bem$1a("body")
3171
3286
  }, [renderInput(), showClear.value && createVNode(Icon, {
3172
3287
  "name": props.clearIcon,
3173
- "class": bem$1b("clear"),
3288
+ "class": bem$1a("clear"),
3174
3289
  "onTouchstart": onClear
3175
3290
  }, null), renderRightIcon(), slots.button && createVNode("div", {
3176
- "class": bem$1b("button")
3291
+ "class": bem$1a("button")
3177
3292
  }, [slots.button()])]), renderWordLimit(), renderMessage()];
3178
3293
  useExpose({
3179
3294
  blur,
@@ -3205,7 +3320,7 @@ var _Field = defineComponent({
3205
3320
  return createVNode(Cell, {
3206
3321
  "size": props.size,
3207
3322
  "icon": props.leftIcon,
3208
- "class": bem$1b({
3323
+ "class": bem$1a({
3209
3324
  error: showError.value,
3210
3325
  disabled,
3211
3326
  ["label-" + labelAlign]: labelAlign
@@ -3215,8 +3330,8 @@ var _Field = defineComponent({
3215
3330
  "isLink": props.isLink,
3216
3331
  "clickable": props.clickable,
3217
3332
  "titleStyle": labelStyle.value,
3218
- "valueClass": bem$1b("value"),
3219
- "titleClass": [bem$1b("label", [labelAlign, {
3333
+ "valueClass": bem$1a("value"),
3334
+ "titleClass": [bem$1a("label", [labelAlign, {
3220
3335
  required: props.required
3221
3336
  }]), props.labelClass],
3222
3337
  "arrowDirection": props.arrowDirection
@@ -3282,7 +3397,7 @@ function lockClick(lock) {
3282
3397
  }
3283
3398
  }
3284
3399
  }
3285
- var [name$1e, bem$1a] = createNamespace("toast");
3400
+ var [name$1d, bem$19] = createNamespace("toast");
3286
3401
  var popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
3287
3402
  var toastProps = {
3288
3403
  icon: String,
@@ -3304,7 +3419,7 @@ var toastProps = {
3304
3419
  closeOnClickOverlay: Boolean
3305
3420
  };
3306
3421
  var VanToast = defineComponent({
3307
- name: name$1e,
3422
+ name: name$1d,
3308
3423
  props: toastProps,
3309
3424
  emits: ["update:show"],
3310
3425
  setup(props, _ref) {
@@ -3340,13 +3455,13 @@ var VanToast = defineComponent({
3340
3455
  return createVNode(Icon, {
3341
3456
  "name": icon || type,
3342
3457
  "size": iconSize,
3343
- "class": bem$1a("icon"),
3458
+ "class": bem$19("icon"),
3344
3459
  "classPrefix": iconPrefix
3345
3460
  }, null);
3346
3461
  }
3347
3462
  if (type === "loading") {
3348
3463
  return createVNode(Loading, {
3349
- "class": bem$1a("loading"),
3464
+ "class": bem$19("loading"),
3350
3465
  "size": iconSize,
3351
3466
  "type": loadingType
3352
3467
  }, null);
@@ -3359,10 +3474,10 @@ var VanToast = defineComponent({
3359
3474
  } = props;
3360
3475
  if (isDef(message) && message !== "") {
3361
3476
  return type === "html" ? createVNode("div", {
3362
- "class": bem$1a("text"),
3477
+ "class": bem$19("text"),
3363
3478
  "innerHTML": String(message)
3364
3479
  }, null) : createVNode("div", {
3365
- "class": bem$1a("text")
3480
+ "class": bem$19("text")
3366
3481
  }, [message]);
3367
3482
  }
3368
3483
  };
@@ -3378,7 +3493,7 @@ var VanToast = defineComponent({
3378
3493
  onMounted(toggleClickable);
3379
3494
  onUnmounted(toggleClickable);
3380
3495
  return () => createVNode(Popup, mergeProps({
3381
- "class": [bem$1a([props.position, {
3496
+ "class": [bem$19([props.position, {
3382
3497
  [props.type]: !props.icon
3383
3498
  }]), props.className],
3384
3499
  "lockScroll": false,
@@ -3416,7 +3531,7 @@ var allowMultiple = false;
3416
3531
  var currentOptions = extend({}, defaultOptions$1);
3417
3532
  var defaultOptionsMap = new Map();
3418
3533
  function parseOptions$1(message) {
3419
- if (isObject$1(message)) {
3534
+ if (isObject(message)) {
3420
3535
  return message;
3421
3536
  }
3422
3537
  return {
@@ -3528,7 +3643,7 @@ Toast.install = (app) => {
3528
3643
  app.use(withInstall(VanToast));
3529
3644
  app.config.globalProperties.$toast = Toast;
3530
3645
  };
3531
- var [name$1d, bem$19] = createNamespace("switch");
3646
+ var [name$1c, bem$18] = createNamespace("switch");
3532
3647
  var switchProps = {
3533
3648
  size: numericProp,
3534
3649
  loading: Boolean,
@@ -3546,7 +3661,7 @@ var switchProps = {
3546
3661
  }
3547
3662
  };
3548
3663
  var _Switch = defineComponent({
3549
- name: name$1d,
3664
+ name: name$1c,
3550
3665
  props: switchProps,
3551
3666
  emits: ["change", "update:modelValue"],
3552
3667
  setup(props, _ref) {
@@ -3565,7 +3680,7 @@ var _Switch = defineComponent({
3565
3680
  if (props.loading) {
3566
3681
  var color = isChecked() ? props.activeColor : props.inactiveColor;
3567
3682
  return createVNode(Loading, {
3568
- "class": bem$19("loading"),
3683
+ "class": bem$18("loading"),
3569
3684
  "color": color
3570
3685
  }, null);
3571
3686
  }
@@ -3586,32 +3701,33 @@ var _Switch = defineComponent({
3586
3701
  };
3587
3702
  return createVNode("div", {
3588
3703
  "role": "switch",
3589
- "class": bem$19({
3704
+ "class": bem$18({
3590
3705
  on: checked,
3591
3706
  loading,
3592
3707
  disabled
3593
3708
  }),
3594
3709
  "style": style,
3710
+ "tabindex": disabled ? void 0 : 0,
3595
3711
  "aria-checked": checked,
3596
3712
  "onClick": onClick
3597
3713
  }, [createVNode("div", {
3598
- "class": bem$19("node")
3714
+ "class": bem$18("node")
3599
3715
  }, [renderLoading()])]);
3600
3716
  };
3601
3717
  }
3602
3718
  });
3603
3719
  var Switch = withInstall(_Switch);
3604
- var [name$1c, bem$18, t$h] = createNamespace("address-edit-detail");
3720
+ var [name$1b, bem$17, t$i] = createNamespace("address-edit-detail");
3605
3721
  var AddressEditDetail = defineComponent({
3606
- name: name$1c,
3722
+ name: name$1b,
3607
3723
  props: {
3608
3724
  show: Boolean,
3725
+ rows: numericProp,
3609
3726
  value: String,
3727
+ rules: Array,
3610
3728
  focused: Boolean,
3611
- detailRows: numericProp,
3729
+ maxlength: numericProp,
3612
3730
  searchResult: Array,
3613
- errorMessage: String,
3614
- detailMaxlength: numericProp,
3615
3731
  showSearchResult: Boolean
3616
3732
  },
3617
3733
  emits: ["blur", "focus", "input", "select-search"],
@@ -3627,7 +3743,7 @@ var AddressEditDetail = defineComponent({
3627
3743
  };
3628
3744
  var renderSearchTitle = (express) => {
3629
3745
  if (express.name) {
3630
- var text = express.name.replace(props.value, "<span class=" + bem$18("keyword") + ">" + props.value + "</span>");
3746
+ var text = express.name.replace(props.value, "<span class=" + bem$17("keyword") + ">" + props.value + "</span>");
3631
3747
  return createVNode("div", {
3632
3748
  "innerHTML": text
3633
3749
  }, null);
@@ -3645,7 +3761,7 @@ var AddressEditDetail = defineComponent({
3645
3761
  "key": express.name + express.address,
3646
3762
  "icon": "location-o",
3647
3763
  "label": express.address,
3648
- "class": bem$18("search-item"),
3764
+ "class": bem$17("search-item"),
3649
3765
  "border": false,
3650
3766
  "onClick": () => onSelect(express)
3651
3767
  }, {
@@ -3661,15 +3777,15 @@ var AddressEditDetail = defineComponent({
3661
3777
  "autosize": true,
3662
3778
  "clearable": true,
3663
3779
  "ref": field,
3664
- "class": bem$18(),
3665
- "rows": props.detailRows,
3780
+ "class": bem$17(),
3781
+ "rows": props.rows,
3666
3782
  "type": "textarea",
3667
- "label": t$h("label"),
3783
+ "rules": props.rules,
3784
+ "label": t$i("label"),
3668
3785
  "border": !showSearchResult(),
3669
- "maxlength": props.detailMaxlength,
3786
+ "maxlength": props.maxlength,
3670
3787
  "modelValue": props.value,
3671
- "placeholder": t$h("placeholder"),
3672
- "errorMessage": props.errorMessage,
3788
+ "placeholder": t$i("placeholder"),
3673
3789
  "onBlur": onBlur,
3674
3790
  "onFocus": onFocus,
3675
3791
  "onUpdate:modelValue": onInput
@@ -3678,7 +3794,7 @@ var AddressEditDetail = defineComponent({
3678
3794
  };
3679
3795
  }
3680
3796
  });
3681
- var [name$1b, bem$17, t$g] = createNamespace("address-edit");
3797
+ var [name$1a, bem$16, t$h] = createNamespace("address-edit");
3682
3798
  var DEFAULT_DATA = {
3683
3799
  name: "",
3684
3800
  tel: "",
@@ -3726,7 +3842,7 @@ var addressEditProps = {
3726
3842
  }
3727
3843
  };
3728
3844
  var _AddressEdit = defineComponent({
3729
- name: name$1b,
3845
+ name: name$1a,
3730
3846
  props: addressEditProps,
3731
3847
  emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
3732
3848
  setup(props, _ref) {
@@ -3735,19 +3851,10 @@ var _AddressEdit = defineComponent({
3735
3851
  slots
3736
3852
  } = _ref;
3737
3853
  var areaRef = ref();
3738
- var state = reactive({
3739
- data: {},
3740
- showAreaPopup: false,
3741
- detailFocused: false,
3742
- errorInfo: {
3743
- tel: "",
3744
- name: "",
3745
- areaCode: "",
3746
- postalCode: "",
3747
- addressDetail: ""
3748
- }
3749
- });
3750
- var areaListLoaded = computed(() => isObject$1(props.areaList) && Object.keys(props.areaList).length);
3854
+ var data = reactive({});
3855
+ var showAreaPopup = ref(false);
3856
+ var detailFocused = ref(false);
3857
+ var areaListLoaded = computed(() => isObject(props.areaList) && Object.keys(props.areaList).length);
3751
3858
  var areaText = computed(() => {
3752
3859
  var {
3753
3860
  country,
@@ -3755,7 +3862,7 @@ var _AddressEdit = defineComponent({
3755
3862
  city,
3756
3863
  county,
3757
3864
  areaCode
3758
- } = state.data;
3865
+ } = data;
3759
3866
  if (areaCode) {
3760
3867
  var arr = [country, province, city, county];
3761
3868
  if (province && province === city) {
@@ -3767,231 +3874,224 @@ var _AddressEdit = defineComponent({
3767
3874
  });
3768
3875
  var hideBottomFields = computed(() => {
3769
3876
  var _props$searchResult;
3770
- return ((_props$searchResult = props.searchResult) == null ? void 0 : _props$searchResult.length) && state.detailFocused;
3877
+ return ((_props$searchResult = props.searchResult) == null ? void 0 : _props$searchResult.length) && detailFocused.value;
3771
3878
  });
3772
3879
  var assignAreaValues = () => {
3773
3880
  if (areaRef.value) {
3774
3881
  var detail = areaRef.value.getArea();
3775
3882
  detail.areaCode = detail.code;
3776
3883
  delete detail.code;
3777
- extend(state.data, detail);
3884
+ extend(data, detail);
3778
3885
  }
3779
3886
  };
3780
3887
  var onFocus = (key) => {
3781
- state.errorInfo[key] = "";
3782
- state.detailFocused = key === "addressDetail";
3888
+ detailFocused.value = key === "addressDetail";
3783
3889
  emit("focus", key);
3784
3890
  };
3785
- var getErrorMessage = (key) => {
3786
- var value = String(state.data[key] || "").trim();
3787
- if (props.validator) {
3788
- var message = props.validator(key, value);
3789
- if (message) {
3790
- return message;
3791
- }
3792
- }
3793
- switch (key) {
3794
- case "name":
3795
- return value ? "" : t$g("nameEmpty");
3796
- case "tel":
3797
- return props.telValidator(value) ? "" : t$g("telInvalid");
3798
- case "areaCode":
3799
- return value ? "" : t$g("areaEmpty");
3800
- case "addressDetail":
3801
- return value ? "" : t$g("addressEmpty");
3802
- case "postalCode":
3803
- return value && !props.postalValidator(value) ? t$g("postalEmpty") : "";
3804
- }
3805
- };
3806
- var onSave = () => {
3807
- var items = ["name", "tel"];
3808
- if (props.showArea) {
3809
- items.push("areaCode");
3810
- }
3811
- if (props.showDetail) {
3812
- items.push("addressDetail");
3813
- }
3814
- if (props.showPostal) {
3815
- items.push("postalCode");
3816
- }
3817
- var isValid = items.every((item) => {
3818
- var msg = getErrorMessage(item);
3819
- if (msg) {
3820
- state.errorInfo[item] = msg;
3891
+ var rules = computed(() => {
3892
+ var {
3893
+ validator,
3894
+ telValidator,
3895
+ postalValidator
3896
+ } = props;
3897
+ var makeRule = (name2, emptyMessage) => ({
3898
+ validator: (value) => {
3899
+ if (validator) {
3900
+ var message = validator(name2, value);
3901
+ if (message) {
3902
+ return message;
3903
+ }
3904
+ }
3905
+ if (!value) {
3906
+ return emptyMessage;
3907
+ }
3908
+ return true;
3821
3909
  }
3822
- return !msg;
3823
3910
  });
3824
- if (isValid && !props.isSaving) {
3825
- emit("save", state.data);
3826
- }
3827
- };
3911
+ return {
3912
+ name: [makeRule("name", t$h("nameEmpty"))],
3913
+ tel: [makeRule("tel", t$h("telInvalid")), {
3914
+ validator: telValidator,
3915
+ message: t$h("telInvalid")
3916
+ }],
3917
+ areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
3918
+ addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))],
3919
+ postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
3920
+ validator: postalValidator,
3921
+ message: t$h("postalEmpty")
3922
+ }]
3923
+ };
3924
+ });
3925
+ var onSave = () => emit("save", data);
3828
3926
  var onChangeDetail = (val) => {
3829
- state.data.addressDetail = val;
3927
+ data.addressDetail = val;
3830
3928
  emit("change-detail", val);
3831
3929
  };
3832
3930
  var onAreaConfirm = (values) => {
3833
3931
  values = values.filter(Boolean);
3834
3932
  if (values.some((value) => !value.code)) {
3835
- Toast(t$g("areaEmpty"));
3836
- return;
3933
+ Toast(t$h("areaEmpty"));
3934
+ } else {
3935
+ showAreaPopup.value = false;
3936
+ assignAreaValues();
3937
+ emit("change-area", values);
3837
3938
  }
3838
- state.showAreaPopup = false;
3839
- assignAreaValues();
3840
- emit("change-area", values);
3841
3939
  };
3842
- var onDelete = () => emit("delete", state.data);
3843
- var getArea = () => areaRef.value ? areaRef.value.getValues() : [];
3940
+ var onDelete = () => emit("delete", data);
3941
+ var getArea = () => {
3942
+ var _areaRef$value;
3943
+ return ((_areaRef$value = areaRef.value) == null ? void 0 : _areaRef$value.getValues()) || [];
3944
+ };
3844
3945
  var setAreaCode = (code) => {
3845
- state.data.areaCode = code || "";
3946
+ data.areaCode = code || "";
3846
3947
  if (code) {
3847
3948
  nextTick(assignAreaValues);
3848
3949
  }
3849
3950
  };
3850
3951
  var onDetailBlur = () => {
3851
3952
  setTimeout(() => {
3852
- state.detailFocused = false;
3953
+ detailFocused.value = false;
3853
3954
  });
3854
3955
  };
3855
3956
  var setAddressDetail = (value) => {
3856
- state.data.addressDetail = value;
3957
+ data.addressDetail = value;
3857
3958
  };
3858
3959
  var renderSetDefaultCell = () => {
3859
3960
  if (props.showSetDefault) {
3860
3961
  var _slots = {
3861
3962
  "right-icon": () => createVNode(Switch, {
3862
- "modelValue": state.data.isDefault,
3863
- "onUpdate:modelValue": ($event) => state.data.isDefault = $event,
3963
+ "modelValue": data.isDefault,
3964
+ "onUpdate:modelValue": ($event) => data.isDefault = $event,
3864
3965
  "size": "24",
3865
3966
  "onChange": (event) => emit("change-default", event)
3866
3967
  }, null)
3867
3968
  };
3868
3969
  return withDirectives(createVNode(Cell, {
3869
3970
  "center": true,
3870
- "title": t$g("defaultAddress"),
3871
- "class": bem$17("default")
3971
+ "title": t$h("defaultAddress"),
3972
+ "class": bem$16("default")
3872
3973
  }, _slots), [[vShow, !hideBottomFields.value]]);
3873
3974
  }
3874
- return null;
3875
3975
  };
3876
3976
  useExpose({
3877
3977
  getArea,
3878
3978
  setAreaCode,
3879
3979
  setAddressDetail
3880
3980
  });
3881
- watch(() => props.areaList, () => setAreaCode(state.data.areaCode));
3981
+ watch(() => props.areaList, () => setAreaCode(data.areaCode));
3882
3982
  watch(() => props.addressInfo, (value) => {
3883
- state.data = extend({}, DEFAULT_DATA, value);
3983
+ extend(data, DEFAULT_DATA, value);
3884
3984
  setAreaCode(value.areaCode);
3885
3985
  }, {
3886
3986
  deep: true,
3887
3987
  immediate: true
3888
3988
  });
3889
3989
  return () => {
3890
- var {
3891
- data,
3892
- errorInfo
3893
- } = state;
3894
3990
  var {
3895
3991
  disableArea
3896
3992
  } = props;
3897
- return createVNode("div", {
3898
- "class": bem$17()
3899
- }, [createVNode("div", {
3900
- "class": bem$17("fields")
3901
- }, [createVNode(Field, {
3902
- "modelValue": data.name,
3903
- "onUpdate:modelValue": ($event) => data.name = $event,
3904
- "clearable": true,
3905
- "label": t$g("name"),
3906
- "placeholder": t$g("name"),
3907
- "errorMessage": errorInfo.name,
3908
- "onFocus": () => onFocus("name")
3909
- }, null), createVNode(Field, {
3910
- "modelValue": data.tel,
3911
- "onUpdate:modelValue": ($event) => data.tel = $event,
3912
- "clearable": true,
3913
- "type": "tel",
3914
- "label": t$g("tel"),
3915
- "maxlength": props.telMaxlength,
3916
- "placeholder": t$g("tel"),
3917
- "errorMessage": errorInfo.tel,
3918
- "onFocus": () => onFocus("tel")
3919
- }, null), withDirectives(createVNode(Field, {
3920
- "readonly": true,
3921
- "label": t$g("area"),
3922
- "is-link": !disableArea,
3923
- "modelValue": areaText.value,
3924
- "placeholder": props.areaPlaceholder || t$g("area"),
3925
- "errorMessage": errorInfo.areaCode,
3926
- "onFocus": () => onFocus("areaCode"),
3927
- "onClick": () => {
3928
- emit("click-area");
3929
- state.showAreaPopup = !disableArea;
3930
- }
3931
- }, null), [[vShow, props.showArea]]), createVNode(AddressEditDetail, {
3932
- "show": props.showDetail,
3933
- "value": data.addressDetail,
3934
- "focused": state.detailFocused,
3935
- "detailRows": props.detailRows,
3936
- "errorMessage": errorInfo.addressDetail,
3937
- "searchResult": props.searchResult,
3938
- "detailMaxlength": props.detailMaxlength,
3939
- "showSearchResult": props.showSearchResult,
3940
- "onBlur": onDetailBlur,
3941
- "onFocus": () => onFocus("addressDetail"),
3942
- "onInput": onChangeDetail,
3943
- "onSelect-search": (event) => emit("select-search", event)
3944
- }, null), props.showPostal && withDirectives(createVNode(Field, {
3945
- "modelValue": data.postalCode,
3946
- "onUpdate:modelValue": ($event) => data.postalCode = $event,
3947
- "type": "tel",
3948
- "label": t$g("postal"),
3949
- "maxlength": "6",
3950
- "placeholder": t$g("postal"),
3951
- "errorMessage": errorInfo.postalCode,
3952
- "onFocus": () => onFocus("postalCode")
3953
- }, null), [[vShow, !hideBottomFields.value]]), slots.default == null ? void 0 : slots.default()]), renderSetDefaultCell(), withDirectives(createVNode("div", {
3954
- "class": bem$17("buttons")
3955
- }, [createVNode(Button, {
3956
- "block": true,
3957
- "round": true,
3958
- "type": "danger",
3959
- "text": props.saveButtonText || t$g("save"),
3960
- "class": bem$17("button"),
3961
- "loading": props.isSaving,
3962
- "onClick": onSave
3963
- }, null), props.showDelete && createVNode(Button, {
3964
- "block": true,
3965
- "round": true,
3966
- "class": bem$17("button"),
3967
- "loading": props.isDeleting,
3968
- "text": props.deleteButtonText || t$g("delete"),
3969
- "onClick": onDelete
3970
- }, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
3971
- "show": state.showAreaPopup,
3972
- "onUpdate:show": ($event) => state.showAreaPopup = $event,
3973
- "round": true,
3974
- "teleport": "body",
3975
- "position": "bottom",
3976
- "lazyRender": false
3993
+ return createVNode(Form, {
3994
+ "class": bem$16(),
3995
+ "onSubmit": onSave
3977
3996
  }, {
3978
- default: () => [createVNode(Area, {
3979
- "ref": areaRef,
3980
- "value": data.areaCode,
3981
- "loading": !areaListLoaded.value,
3982
- "areaList": props.areaList,
3983
- "columnsPlaceholder": props.areaColumnsPlaceholder,
3984
- "onConfirm": onAreaConfirm,
3985
- "onCancel": () => {
3986
- state.showAreaPopup = false;
3997
+ default: () => [createVNode("div", {
3998
+ "class": bem$16("fields")
3999
+ }, [createVNode(Field, {
4000
+ "modelValue": data.name,
4001
+ "onUpdate:modelValue": ($event) => data.name = $event,
4002
+ "clearable": true,
4003
+ "label": t$h("name"),
4004
+ "rules": rules.value.name,
4005
+ "placeholder": t$h("name"),
4006
+ "onFocus": () => onFocus("name")
4007
+ }, null), createVNode(Field, {
4008
+ "modelValue": data.tel,
4009
+ "onUpdate:modelValue": ($event) => data.tel = $event,
4010
+ "clearable": true,
4011
+ "type": "tel",
4012
+ "label": t$h("tel"),
4013
+ "rules": rules.value.tel,
4014
+ "maxlength": props.telMaxlength,
4015
+ "placeholder": t$h("tel"),
4016
+ "onFocus": () => onFocus("tel")
4017
+ }, null), withDirectives(createVNode(Field, {
4018
+ "readonly": true,
4019
+ "label": t$h("area"),
4020
+ "is-link": !disableArea,
4021
+ "modelValue": areaText.value,
4022
+ "rules": rules.value.areaCode,
4023
+ "placeholder": props.areaPlaceholder || t$h("area"),
4024
+ "onFocus": () => onFocus("areaCode"),
4025
+ "onClick": () => {
4026
+ emit("click-area");
4027
+ showAreaPopup.value = !disableArea;
3987
4028
  }
3988
- }, null)]
3989
- })]);
4029
+ }, null), [[vShow, props.showArea]]), createVNode(AddressEditDetail, {
4030
+ "show": props.showDetail,
4031
+ "rows": props.detailRows,
4032
+ "rules": rules.value.addressDetail,
4033
+ "value": data.addressDetail,
4034
+ "focused": detailFocused.value,
4035
+ "maxlength": props.detailMaxlength,
4036
+ "searchResult": props.searchResult,
4037
+ "showSearchResult": props.showSearchResult,
4038
+ "onBlur": onDetailBlur,
4039
+ "onFocus": () => onFocus("addressDetail"),
4040
+ "onInput": onChangeDetail,
4041
+ "onSelect-search": (event) => emit("select-search", event)
4042
+ }, null), props.showPostal && withDirectives(createVNode(Field, {
4043
+ "modelValue": data.postalCode,
4044
+ "onUpdate:modelValue": ($event) => data.postalCode = $event,
4045
+ "type": "tel",
4046
+ "rules": rules.value.postalCode,
4047
+ "label": t$h("postal"),
4048
+ "maxlength": "6",
4049
+ "placeholder": t$h("postal"),
4050
+ "onFocus": () => onFocus("postalCode")
4051
+ }, null), [[vShow, !hideBottomFields.value]]), slots.default == null ? void 0 : slots.default()]), renderSetDefaultCell(), withDirectives(createVNode("div", {
4052
+ "class": bem$16("buttons")
4053
+ }, [createVNode(Button, {
4054
+ "block": true,
4055
+ "round": true,
4056
+ "type": "danger",
4057
+ "text": props.saveButtonText || t$h("save"),
4058
+ "class": bem$16("button"),
4059
+ "loading": props.isSaving,
4060
+ "nativeType": "submit",
4061
+ "onClick": onSave
4062
+ }, null), props.showDelete && createVNode(Button, {
4063
+ "block": true,
4064
+ "round": true,
4065
+ "class": bem$16("button"),
4066
+ "loading": props.isDeleting,
4067
+ "text": props.deleteButtonText || t$h("delete"),
4068
+ "onClick": onDelete
4069
+ }, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
4070
+ "show": showAreaPopup.value,
4071
+ "onUpdate:show": ($event) => showAreaPopup.value = $event,
4072
+ "round": true,
4073
+ "teleport": "body",
4074
+ "position": "bottom",
4075
+ "lazyRender": false
4076
+ }, {
4077
+ default: () => [createVNode(Area, {
4078
+ "ref": areaRef,
4079
+ "value": data.areaCode,
4080
+ "loading": !areaListLoaded.value,
4081
+ "areaList": props.areaList,
4082
+ "columnsPlaceholder": props.areaColumnsPlaceholder,
4083
+ "onConfirm": onAreaConfirm,
4084
+ "onCancel": () => {
4085
+ showAreaPopup.value = false;
4086
+ }
4087
+ }, null)]
4088
+ })]
4089
+ });
3990
4090
  };
3991
4091
  }
3992
4092
  });
3993
4093
  var AddressEdit = withInstall(_AddressEdit);
3994
- var [name$1a, bem$16] = createNamespace("radio-group");
4094
+ var [name$19, bem$15] = createNamespace("radio-group");
3995
4095
  var radioGroupProps = {
3996
4096
  disabled: Boolean,
3997
4097
  iconSize: numericProp,
@@ -3999,9 +4099,9 @@ var radioGroupProps = {
3999
4099
  modelValue: unknownProp,
4000
4100
  checkedColor: String
4001
4101
  };
4002
- var RADIO_KEY = Symbol(name$1a);
4102
+ var RADIO_KEY = Symbol(name$19);
4003
4103
  var _RadioGroup = defineComponent({
4004
- name: name$1a,
4104
+ name: name$19,
4005
4105
  props: radioGroupProps,
4006
4106
  emits: ["change", "update:modelValue"],
4007
4107
  setup(props, _ref) {
@@ -4020,13 +4120,13 @@ var _RadioGroup = defineComponent({
4020
4120
  });
4021
4121
  useCustomFieldValue(() => props.modelValue);
4022
4122
  return () => createVNode("div", {
4023
- "class": bem$16([props.direction]),
4123
+ "class": bem$15([props.direction]),
4024
4124
  "role": "radiogroup"
4025
4125
  }, [slots.default == null ? void 0 : slots.default()]);
4026
4126
  }
4027
4127
  });
4028
4128
  var RadioGroup = withInstall(_RadioGroup);
4029
- var [name$19, bem$15] = createNamespace("tag");
4129
+ var [name$18, bem$14] = createNamespace("tag");
4030
4130
  var tagProps = {
4031
4131
  size: String,
4032
4132
  mark: Boolean,
@@ -4039,7 +4139,7 @@ var tagProps = {
4039
4139
  closeable: Boolean
4040
4140
  };
4041
4141
  var _Tag = defineComponent({
4042
- name: name$19,
4142
+ name: name$18,
4043
4143
  props: tagProps,
4044
4144
  emits: ["close"],
4045
4145
  setup(props, _ref) {
@@ -4082,12 +4182,12 @@ var _Tag = defineComponent({
4082
4182
  }
4083
4183
  var CloseIcon = closeable && createVNode(Icon, {
4084
4184
  "name": "cross",
4085
- "class": bem$15("close"),
4185
+ "class": bem$14("close"),
4086
4186
  "onClick": onClose
4087
4187
  }, null);
4088
4188
  return createVNode("span", {
4089
4189
  "style": getStyle(),
4090
- "class": bem$15([classes, type])
4190
+ "class": bem$14([classes, type])
4091
4191
  }, [slots.default == null ? void 0 : slots.default(), CloseIcon]);
4092
4192
  };
4093
4193
  return () => createVNode(Transition, {
@@ -4191,16 +4291,16 @@ var Checker = defineComponent({
4191
4291
  disabled: disabled.value,
4192
4292
  "label-disabled": props.labelDisabled
4193
4293
  }, direction.value]),
4194
- "tabindex": disabled.value ? -1 : 0,
4294
+ "tabindex": disabled.value ? void 0 : 0,
4195
4295
  "aria-checked": props.checked,
4196
4296
  "onClick": onClick
4197
4297
  }, [nodes]);
4198
4298
  };
4199
4299
  }
4200
4300
  });
4201
- var [name$18, bem$14] = createNamespace("radio");
4301
+ var [name$17, bem$13] = createNamespace("radio");
4202
4302
  var _Radio = defineComponent({
4203
- name: name$18,
4303
+ name: name$17,
4204
4304
  props: checkerProps,
4205
4305
  emits: ["update:modelValue"],
4206
4306
  setup(props, _ref) {
@@ -4223,7 +4323,7 @@ var _Radio = defineComponent({
4223
4323
  }
4224
4324
  };
4225
4325
  return () => createVNode(Checker, mergeProps({
4226
- "bem": bem$14,
4326
+ "bem": bem$13,
4227
4327
  "role": "radio",
4228
4328
  "parent": parent,
4229
4329
  "checked": checked(),
@@ -4232,9 +4332,9 @@ var _Radio = defineComponent({
4232
4332
  }
4233
4333
  });
4234
4334
  var Radio = withInstall(_Radio);
4235
- var [name$17, bem$13] = createNamespace("address-item");
4335
+ var [name$16, bem$12] = createNamespace("address-item");
4236
4336
  var AddressListItem = defineComponent({
4237
- name: name$17,
4337
+ name: name$16,
4238
4338
  props: {
4239
4339
  address: makeRequiredProp(Object),
4240
4340
  disabled: Boolean,
@@ -4255,7 +4355,7 @@ var AddressListItem = defineComponent({
4255
4355
  };
4256
4356
  var renderRightIcon = () => createVNode(Icon, {
4257
4357
  "name": "edit",
4258
- "class": bem$13("edit"),
4358
+ "class": bem$12("edit"),
4259
4359
  "onClick": (event) => {
4260
4360
  event.stopPropagation();
4261
4361
  emit("edit");
@@ -4270,7 +4370,7 @@ var AddressListItem = defineComponent({
4270
4370
  return createVNode(Tag, {
4271
4371
  "type": "danger",
4272
4372
  "round": true,
4273
- "class": bem$13("tag")
4373
+ "class": bem$12("tag")
4274
4374
  }, {
4275
4375
  default: () => [props.defaultTagText]
4276
4376
  });
@@ -4283,9 +4383,9 @@ var AddressListItem = defineComponent({
4283
4383
  switchable
4284
4384
  } = props;
4285
4385
  var Info = [createVNode("div", {
4286
- "class": bem$13("name")
4386
+ "class": bem$12("name")
4287
4387
  }, [address.name + " " + address.tel, renderTag()]), createVNode("div", {
4288
- "class": bem$13("address")
4388
+ "class": bem$12("address")
4289
4389
  }, [address.address])];
4290
4390
  if (switchable && !disabled) {
4291
4391
  return createVNode(Radio, {
@@ -4302,13 +4402,13 @@ var AddressListItem = defineComponent({
4302
4402
  disabled
4303
4403
  } = props;
4304
4404
  return createVNode("div", {
4305
- "class": bem$13({
4405
+ "class": bem$12({
4306
4406
  disabled
4307
4407
  }),
4308
4408
  "onClick": onClick
4309
4409
  }, [createVNode(Cell, {
4310
4410
  "border": false,
4311
- "valueClass": bem$13("value")
4411
+ "valueClass": bem$12("value")
4312
4412
  }, {
4313
4413
  value: renderContent,
4314
4414
  "right-icon": renderRightIcon
@@ -4318,7 +4418,7 @@ var AddressListItem = defineComponent({
4318
4418
  };
4319
4419
  }
4320
4420
  });
4321
- var [name$16, bem$12, t$f] = createNamespace("address-list");
4421
+ var [name$15, bem$11, t$g] = createNamespace("address-list");
4322
4422
  var addressListProps = {
4323
4423
  list: makeArrayProp(),
4324
4424
  modelValue: numericProp,
@@ -4329,7 +4429,7 @@ var addressListProps = {
4329
4429
  defaultTagText: String
4330
4430
  };
4331
4431
  var _AddressList = defineComponent({
4332
- name: name$16,
4432
+ name: name$15,
4333
4433
  props: addressListProps,
4334
4434
  emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
4335
4435
  setup(props, _ref) {
@@ -4366,23 +4466,23 @@ var _AddressList = defineComponent({
4366
4466
  }
4367
4467
  };
4368
4468
  var renderBottom = () => createVNode("div", {
4369
- "class": [bem$12("bottom"), "van-safe-area-bottom"]
4469
+ "class": [bem$11("bottom"), "van-safe-area-bottom"]
4370
4470
  }, [createVNode(Button, {
4371
4471
  "round": true,
4372
4472
  "block": true,
4373
4473
  "type": "danger",
4374
- "text": props.addButtonText || t$f("add"),
4375
- "class": bem$12("add"),
4474
+ "text": props.addButtonText || t$g("add"),
4475
+ "class": bem$11("add"),
4376
4476
  "onClick": () => emit("add")
4377
4477
  }, null)]);
4378
4478
  return () => {
4379
4479
  var List2 = renderList(props.list);
4380
4480
  var DisabledList = renderList(props.disabledList, true);
4381
4481
  var DisabledText = props.disabledText && createVNode("div", {
4382
- "class": bem$12("disabled-text")
4482
+ "class": bem$11("disabled-text")
4383
4483
  }, [props.disabledText]);
4384
4484
  return createVNode("div", {
4385
- "class": bem$12()
4485
+ "class": bem$11()
4386
4486
  }, [slots.top == null ? void 0 : slots.top(), createVNode(RadioGroup, {
4387
4487
  "modelValue": props.modelValue
4388
4488
  }, {
@@ -4392,8 +4492,8 @@ var _AddressList = defineComponent({
4392
4492
  }
4393
4493
  });
4394
4494
  var AddressList = withInstall(_AddressList);
4395
- var [name$15, bem$11, t$e] = createNamespace("calendar");
4396
- var formatMonthTitle = (date) => t$e("monthTitle", date.getFullYear(), date.getMonth() + 1);
4495
+ var [name$14, bem$10, t$f] = createNamespace("calendar");
4496
+ var formatMonthTitle = (date) => t$f("monthTitle", date.getFullYear(), date.getMonth() + 1);
4397
4497
  function compareMonth(date1, date2) {
4398
4498
  var year1 = date1.getFullYear();
4399
4499
  var year2 = date2.getFullYear();
@@ -4480,9 +4580,9 @@ var useHeight = (element) => {
4480
4580
  }));
4481
4581
  return height2;
4482
4582
  };
4483
- var [name$14] = createNamespace("calendar-day");
4583
+ var [name$13] = createNamespace("calendar-day");
4484
4584
  var CalendarDay = defineComponent({
4485
- name: name$14,
4585
+ name: name$13,
4486
4586
  props: {
4487
4587
  item: makeRequiredProp(Object),
4488
4588
  color: String,
@@ -4541,7 +4641,7 @@ var CalendarDay = defineComponent({
4541
4641
  } = props.item;
4542
4642
  if (topInfo || slots["top-info"]) {
4543
4643
  return createVNode("div", {
4544
- "class": bem$11("top-info")
4644
+ "class": bem$10("top-info")
4545
4645
  }, [slots["top-info"] ? slots["top-info"](props.item) : topInfo]);
4546
4646
  }
4547
4647
  };
@@ -4551,7 +4651,7 @@ var CalendarDay = defineComponent({
4551
4651
  } = props.item;
4552
4652
  if (bottomInfo || slots["bottom-info"]) {
4553
4653
  return createVNode("div", {
4554
- "class": bem$11("bottom-info")
4654
+ "class": bem$10("bottom-info")
4555
4655
  }, [slots["bottom-info"] ? slots["bottom-info"](props.item) : bottomInfo]);
4556
4656
  }
4557
4657
  };
@@ -4568,7 +4668,7 @@ var CalendarDay = defineComponent({
4568
4668
  var Nodes = [renderTopInfo(), text, renderBottomInfo()];
4569
4669
  if (type === "selected") {
4570
4670
  return createVNode("div", {
4571
- "class": bem$11("selected-day"),
4671
+ "class": bem$10("selected-day"),
4572
4672
  "style": {
4573
4673
  width: rowHeight,
4574
4674
  height: rowHeight,
@@ -4585,21 +4685,21 @@ var CalendarDay = defineComponent({
4585
4685
  } = props.item;
4586
4686
  if (type === "placeholder") {
4587
4687
  return createVNode("div", {
4588
- "class": bem$11("day"),
4688
+ "class": bem$10("day"),
4589
4689
  "style": style.value
4590
4690
  }, null);
4591
4691
  }
4592
4692
  return createVNode("div", {
4593
4693
  "role": "gridcell",
4594
4694
  "style": style.value,
4595
- "class": [bem$11("day", type), className],
4695
+ "class": [bem$10("day", type), className],
4596
4696
  "tabindex": type === "disabled" ? void 0 : -1,
4597
4697
  "onClick": onClick
4598
4698
  }, [renderContent()]);
4599
4699
  };
4600
4700
  }
4601
4701
  });
4602
- var [name$13] = createNamespace("calendar-month");
4702
+ var [name$12] = createNamespace("calendar-month");
4603
4703
  var calendarMonthProps = {
4604
4704
  date: makeRequiredProp(Date),
4605
4705
  type: String,
@@ -4617,7 +4717,7 @@ var calendarMonthProps = {
4617
4717
  firstDayOfWeek: Number
4618
4718
  };
4619
4719
  var CalendarMonth = defineComponent({
4620
- name: name$13,
4720
+ name: name$12,
4621
4721
  props: calendarMonthProps,
4622
4722
  emits: ["click", "update-height"],
4623
4723
  setup(props, _ref) {
@@ -4720,24 +4820,24 @@ var CalendarMonth = defineComponent({
4720
4820
  var getBottomInfo = (dayType) => {
4721
4821
  if (props.type === "range") {
4722
4822
  if (dayType === "start" || dayType === "end") {
4723
- return t$e(dayType);
4823
+ return t$f(dayType);
4724
4824
  }
4725
4825
  if (dayType === "start-end") {
4726
- return t$e("startEnd");
4826
+ return t$f("startEnd");
4727
4827
  }
4728
4828
  }
4729
4829
  };
4730
4830
  var renderTitle = () => {
4731
4831
  if (props.showMonthTitle) {
4732
4832
  return createVNode("div", {
4733
- "class": bem$11("month-title")
4833
+ "class": bem$10("month-title")
4734
4834
  }, [title.value]);
4735
4835
  }
4736
4836
  };
4737
4837
  var renderMark = () => {
4738
4838
  if (props.showMark && shouldRender.value) {
4739
4839
  return createVNode("div", {
4740
- "class": bem$11("month-mark")
4840
+ "class": bem$10("month-mark")
4741
4841
  }, [props.date.getMonth() + 1]);
4742
4842
  }
4743
4843
  };
@@ -4779,7 +4879,7 @@ var CalendarMonth = defineComponent({
4779
4879
  var renderDays = () => createVNode("div", {
4780
4880
  "ref": daysRef,
4781
4881
  "role": "grid",
4782
- "class": bem$11("days")
4882
+ "class": bem$10("days")
4783
4883
  }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
4784
4884
  useExpose({
4785
4885
  getTitle,
@@ -4789,14 +4889,14 @@ var CalendarMonth = defineComponent({
4789
4889
  disabledDays
4790
4890
  });
4791
4891
  return () => createVNode("div", {
4792
- "class": bem$11("month"),
4892
+ "class": bem$10("month"),
4793
4893
  "ref": monthRef
4794
4894
  }, [renderTitle(), renderDays()]);
4795
4895
  }
4796
4896
  });
4797
- var [name$12] = createNamespace("calendar-header");
4897
+ var [name$11] = createNamespace("calendar-header");
4798
4898
  var CalendarHeader = defineComponent({
4799
- name: name$12,
4899
+ name: name$11,
4800
4900
  props: {
4801
4901
  title: String,
4802
4902
  subtitle: String,
@@ -4812,21 +4912,19 @@ var CalendarHeader = defineComponent({
4812
4912
  } = _ref;
4813
4913
  var renderTitle = () => {
4814
4914
  if (props.showTitle) {
4815
- var text = props.title || t$e("title");
4915
+ var text = props.title || t$f("title");
4816
4916
  var title = slots.title ? slots.title() : text;
4817
4917
  return createVNode("div", {
4818
- "class": bem$11("header-title")
4918
+ "class": bem$10("header-title")
4819
4919
  }, [title]);
4820
4920
  }
4821
4921
  };
4822
- var onClickSubtitle = (event) => {
4823
- emit("click-subtitle", event);
4824
- };
4922
+ var onClickSubtitle = (event) => emit("click-subtitle", event);
4825
4923
  var renderSubtitle = () => {
4826
4924
  if (props.showSubtitle) {
4827
4925
  var title = slots.subtitle ? slots.subtitle() : props.subtitle;
4828
4926
  return createVNode("div", {
4829
- "class": bem$11("header-subtitle"),
4927
+ "class": bem$10("header-subtitle"),
4830
4928
  "onClick": onClickSubtitle
4831
4929
  }, [title]);
4832
4930
  }
@@ -4835,16 +4933,16 @@ var CalendarHeader = defineComponent({
4835
4933
  var {
4836
4934
  firstDayOfWeek
4837
4935
  } = props;
4838
- var weekdays = t$e("weekdays");
4936
+ var weekdays = t$f("weekdays");
4839
4937
  var renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
4840
4938
  return createVNode("div", {
4841
- "class": bem$11("weekdays")
4939
+ "class": bem$10("weekdays")
4842
4940
  }, [renderWeekDays2.map((text) => createVNode("span", {
4843
- "class": bem$11("weekday")
4941
+ "class": bem$10("weekday")
4844
4942
  }, [text]))]);
4845
4943
  };
4846
4944
  return () => createVNode("div", {
4847
- "class": bem$11("header")
4945
+ "class": bem$10("header")
4848
4946
  }, [renderTitle(), renderSubtitle(), renderWeekDays()]);
4849
4947
  }
4850
4948
  });
@@ -4895,7 +4993,7 @@ var calendarProps = {
4895
4993
  }
4896
4994
  };
4897
4995
  var _Calendar = defineComponent({
4898
- name: name$15,
4996
+ name: name$14,
4899
4997
  props: calendarProps,
4900
4998
  emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
4901
4999
  setup(props, _ref) {
@@ -5064,7 +5162,7 @@ var _Calendar = defineComponent({
5064
5162
  } = props;
5065
5163
  if (maxRange && calcDateNum(date) > maxRange) {
5066
5164
  if (showRangePrompt) {
5067
- Toast(rangePrompt || t$e("rangePrompt", maxRange));
5165
+ Toast(rangePrompt || t$f("rangePrompt", maxRange));
5068
5166
  }
5069
5167
  emit("over-range");
5070
5168
  return false;
@@ -5149,7 +5247,7 @@ var _Calendar = defineComponent({
5149
5247
  var [unselectedDate] = dates.splice(selectedIndex, 1);
5150
5248
  emit("unselect", cloneDate(unselectedDate));
5151
5249
  } else if (props.maxRange && dates.length >= props.maxRange) {
5152
- Toast(props.rangePrompt || t$e("rangePrompt", props.maxRange));
5250
+ Toast(props.rangePrompt || t$f("rangePrompt", props.maxRange));
5153
5251
  } else {
5154
5252
  select([...dates, date]);
5155
5253
  }
@@ -5183,24 +5281,24 @@ var _Calendar = defineComponent({
5183
5281
  "block": true,
5184
5282
  "type": "danger",
5185
5283
  "color": props.color,
5186
- "class": bem$11("confirm"),
5284
+ "class": bem$10("confirm"),
5187
5285
  "disabled": disabled,
5188
5286
  "nativeType": "button",
5189
5287
  "onClick": onConfirm
5190
5288
  }, {
5191
5289
  default: () => [slot ? slot({
5192
5290
  disabled
5193
- }) : text || t$e("confirm")]
5291
+ }) : text || t$f("confirm")]
5194
5292
  });
5195
5293
  }
5196
5294
  };
5197
5295
  var renderFooter = () => createVNode("div", {
5198
- "class": [bem$11("footer"), {
5296
+ "class": [bem$10("footer"), {
5199
5297
  "van-safe-area-bottom": props.safeAreaInsetBottom
5200
5298
  }]
5201
5299
  }, [renderFooterButton()]);
5202
5300
  var renderCalendar = () => createVNode("div", {
5203
- "class": bem$11()
5301
+ "class": bem$10()
5204
5302
  }, [createVNode(CalendarHeader, {
5205
5303
  "title": props.title,
5206
5304
  "subtitle": subtitle.value,
@@ -5210,7 +5308,7 @@ var _Calendar = defineComponent({
5210
5308
  "onClick-subtitle": (event) => emit("click-subtitle", event)
5211
5309
  }, pick(slots, ["title", "subtitle"])), createVNode("div", {
5212
5310
  "ref": bodyRef,
5213
- "class": bem$11("body"),
5311
+ "class": bem$10("body"),
5214
5312
  "onScroll": onScroll
5215
5313
  }, [months.value.map(renderMonth)]), renderFooter()]);
5216
5314
  watch(() => props.show, init);
@@ -5231,7 +5329,7 @@ var _Calendar = defineComponent({
5231
5329
  if (props.poppable) {
5232
5330
  return createVNode(Popup, {
5233
5331
  "show": props.show,
5234
- "class": bem$11("popup"),
5332
+ "class": bem$10("popup"),
5235
5333
  "round": props.round,
5236
5334
  "position": props.position,
5237
5335
  "closeable": props.showTitle || props.showSubtitle,
@@ -5248,7 +5346,7 @@ var _Calendar = defineComponent({
5248
5346
  }
5249
5347
  });
5250
5348
  var Calendar = withInstall(_Calendar);
5251
- var [name$11, bem$10] = createNamespace("image");
5349
+ var [name$10, bem$$] = createNamespace("image");
5252
5350
  var imageProps = {
5253
5351
  src: String,
5254
5352
  alt: String,
@@ -5266,7 +5364,7 @@ var imageProps = {
5266
5364
  loadingIcon: makeStringProp("photo")
5267
5365
  };
5268
5366
  var _Image = defineComponent({
5269
- name: name$11,
5367
+ name: name$10,
5270
5368
  props: imageProps,
5271
5369
  emits: ["load", "error"],
5272
5370
  setup(props, _ref) {
@@ -5281,13 +5379,10 @@ var _Image = defineComponent({
5281
5379
  $Lazyload
5282
5380
  } = getCurrentInstance().proxy;
5283
5381
  var style = computed(() => {
5284
- var style2 = {};
5285
- if (isDef(props.width)) {
5286
- style2.width = addUnit(props.width);
5287
- }
5288
- if (isDef(props.height)) {
5289
- style2.height = addUnit(props.height);
5290
- }
5382
+ var style2 = {
5383
+ width: addUnit(props.width),
5384
+ height: addUnit(props.height)
5385
+ };
5291
5386
  if (isDef(props.radius)) {
5292
5387
  style2.overflow = "hidden";
5293
5388
  style2.borderRadius = addUnit(props.radius);
@@ -5321,13 +5416,13 @@ var _Image = defineComponent({
5321
5416
  var renderPlaceholder = () => {
5322
5417
  if (loading.value && props.showLoading) {
5323
5418
  return createVNode("div", {
5324
- "class": bem$10("loading")
5325
- }, [renderIcon(props.loadingIcon, bem$10("loading-icon"), slots.loading)]);
5419
+ "class": bem$$("loading")
5420
+ }, [renderIcon(props.loadingIcon, bem$$("loading-icon"), slots.loading)]);
5326
5421
  }
5327
5422
  if (error.value && props.showError) {
5328
5423
  return createVNode("div", {
5329
- "class": bem$10("error")
5330
- }, [renderIcon(props.errorIcon, bem$10("error-icon"), slots.error)]);
5424
+ "class": bem$$("error")
5425
+ }, [renderIcon(props.errorIcon, bem$$("error-icon"), slots.error)]);
5331
5426
  }
5332
5427
  };
5333
5428
  var renderImage = () => {
@@ -5336,7 +5431,7 @@ var _Image = defineComponent({
5336
5431
  }
5337
5432
  var attrs = {
5338
5433
  alt: props.alt,
5339
- class: bem$10("img"),
5434
+ class: bem$$("img"),
5340
5435
  style: {
5341
5436
  objectFit: props.fit
5342
5437
  }
@@ -5377,7 +5472,7 @@ var _Image = defineComponent({
5377
5472
  });
5378
5473
  }
5379
5474
  return () => createVNode("div", {
5380
- "class": bem$10({
5475
+ "class": bem$$({
5381
5476
  round: props.round
5382
5477
  }),
5383
5478
  "style": style.value
@@ -5385,7 +5480,7 @@ var _Image = defineComponent({
5385
5480
  }
5386
5481
  });
5387
5482
  var Image$1 = withInstall(_Image);
5388
- var [name$10, bem$$] = createNamespace("card");
5483
+ var [name$$, bem$_] = createNamespace("card");
5389
5484
  var cardProps = {
5390
5485
  tag: String,
5391
5486
  num: numericProp,
@@ -5400,7 +5495,7 @@ var cardProps = {
5400
5495
  originPrice: numericProp
5401
5496
  };
5402
5497
  var _Card = defineComponent({
5403
- name: name$10,
5498
+ name: name$$,
5404
5499
  props: cardProps,
5405
5500
  emits: ["click-thumb"],
5406
5501
  setup(props, _ref) {
@@ -5414,14 +5509,14 @@ var _Card = defineComponent({
5414
5509
  }
5415
5510
  if (props.title) {
5416
5511
  return createVNode("div", {
5417
- "class": [bem$$("title"), "van-multi-ellipsis--l2"]
5512
+ "class": [bem$_("title"), "van-multi-ellipsis--l2"]
5418
5513
  }, [props.title]);
5419
5514
  }
5420
5515
  };
5421
5516
  var renderThumbTag = () => {
5422
5517
  if (slots.tag || props.tag) {
5423
5518
  return createVNode("div", {
5424
- "class": bem$$("tag")
5519
+ "class": bem$_("tag")
5425
5520
  }, [slots.tag ? slots.tag() : createVNode(Tag, {
5426
5521
  "mark": true,
5427
5522
  "type": "danger"
@@ -5446,7 +5541,7 @@ var _Card = defineComponent({
5446
5541
  if (slots.thumb || props.thumb) {
5447
5542
  return createVNode("a", {
5448
5543
  "href": props.thumbLink,
5449
- "class": bem$$("thumb"),
5544
+ "class": bem$_("thumb"),
5450
5545
  "onClick": (event) => emit("click-thumb", event)
5451
5546
  }, [renderThumbImage(), renderThumbTag()]);
5452
5547
  }
@@ -5457,18 +5552,18 @@ var _Card = defineComponent({
5457
5552
  }
5458
5553
  if (props.desc) {
5459
5554
  return createVNode("div", {
5460
- "class": [bem$$("desc"), "van-ellipsis"]
5555
+ "class": [bem$_("desc"), "van-ellipsis"]
5461
5556
  }, [props.desc]);
5462
5557
  }
5463
5558
  };
5464
5559
  var renderPriceText = () => {
5465
5560
  var priceArr = props.price.toString().split(".");
5466
5561
  return createVNode("div", null, [createVNode("span", {
5467
- "class": bem$$("price-currency")
5562
+ "class": bem$_("price-currency")
5468
5563
  }, [props.currency]), createVNode("span", {
5469
- "class": bem$$("price-integer")
5564
+ "class": bem$_("price-integer")
5470
5565
  }, [priceArr[0]]), createTextVNode("."), createVNode("span", {
5471
- "class": bem$$("price-decimal")
5566
+ "class": bem$_("price-decimal")
5472
5567
  }, [priceArr[1]])]);
5473
5568
  };
5474
5569
  return () => {
@@ -5478,26 +5573,26 @@ var _Card = defineComponent({
5478
5573
  var showOriginPrice = slots["origin-price"] || isDef(props.originPrice);
5479
5574
  var showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
5480
5575
  var Price = showPrice && createVNode("div", {
5481
- "class": bem$$("price")
5576
+ "class": bem$_("price")
5482
5577
  }, [slots.price ? slots.price() : renderPriceText()]);
5483
5578
  var OriginPrice = showOriginPrice && createVNode("div", {
5484
- "class": bem$$("origin-price")
5579
+ "class": bem$_("origin-price")
5485
5580
  }, [slots["origin-price"] ? slots["origin-price"]() : props.currency + " " + props.originPrice]);
5486
5581
  var Num = showNum && createVNode("div", {
5487
- "class": bem$$("num")
5582
+ "class": bem$_("num")
5488
5583
  }, [slots.num ? slots.num() : "x" + props.num]);
5489
5584
  var Footer = slots.footer && createVNode("div", {
5490
- "class": bem$$("footer")
5585
+ "class": bem$_("footer")
5491
5586
  }, [slots.footer()]);
5492
5587
  var Bottom = showBottom && createVNode("div", {
5493
- "class": bem$$("bottom")
5588
+ "class": bem$_("bottom")
5494
5589
  }, [(_slots$priceTop = slots["price-top"]) == null ? void 0 : _slots$priceTop.call(slots), Price, OriginPrice, Num, slots.bottom == null ? void 0 : slots.bottom()]);
5495
5590
  return createVNode("div", {
5496
- "class": bem$$()
5591
+ "class": bem$_()
5497
5592
  }, [createVNode("div", {
5498
- "class": bem$$("header")
5593
+ "class": bem$_("header")
5499
5594
  }, [renderThumb(), createVNode("div", {
5500
- "class": bem$$("content", {
5595
+ "class": bem$_("content", {
5501
5596
  centered: props.centered
5502
5597
  })
5503
5598
  }, [createVNode("div", null, [renderTitle(), renderDesc(), slots.tags == null ? void 0 : slots.tags()]), Bottom])]), Footer]);
@@ -5518,17 +5613,17 @@ function scrollLeftTo(scroller, to, duration) {
5518
5613
  animate();
5519
5614
  }
5520
5615
  function scrollTopTo(scroller, to, duration, callback) {
5521
- var current = getScrollTop(scroller);
5522
- var isDown = current < to;
5616
+ var current2 = getScrollTop(scroller);
5617
+ var isDown = current2 < to;
5523
5618
  var frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
5524
- var step = (to - current) / frames;
5619
+ var step = (to - current2) / frames;
5525
5620
  function animate() {
5526
- current += step;
5527
- if (isDown && current > to || !isDown && current < to) {
5528
- current = to;
5621
+ current2 += step;
5622
+ if (isDown && current2 > to || !isDown && current2 < to) {
5623
+ current2 = to;
5529
5624
  }
5530
- setScrollTop(scroller, current);
5531
- if (isDown && current < to || !isDown && current > to) {
5625
+ setScrollTop(scroller, current2);
5626
+ if (isDown && current2 < to || !isDown && current2 > to) {
5532
5627
  raf(animate);
5533
5628
  } else if (callback) {
5534
5629
  raf(callback);
@@ -5559,7 +5654,7 @@ function useVisibilityChange(target, onChange) {
5559
5654
  onBeforeUnmount(unobserve);
5560
5655
  onMountedOrActivated(observe);
5561
5656
  }
5562
- var [name$$, bem$_] = createNamespace("sticky");
5657
+ var [name$_, bem$Z] = createNamespace("sticky");
5563
5658
  var stickyProps = {
5564
5659
  zIndex: numericProp,
5565
5660
  position: makeStringProp("top"),
@@ -5568,7 +5663,7 @@ var stickyProps = {
5568
5663
  offsetBottom: makeNumericProp(0)
5569
5664
  };
5570
5665
  var _Sticky = defineComponent({
5571
- name: name$$,
5666
+ name: name$_,
5572
5667
  props: stickyProps,
5573
5668
  emits: ["scroll", "change"],
5574
5669
  setup(props, _ref) {
@@ -5661,7 +5756,7 @@ var _Sticky = defineComponent({
5661
5756
  "ref": root,
5662
5757
  "style": rootStyle.value
5663
5758
  }, [createVNode("div", {
5664
- "class": bem$_({
5759
+ "class": bem$Z({
5665
5760
  fixed: state.fixed
5666
5761
  }),
5667
5762
  "style": stickyStyle.value
@@ -5669,10 +5764,11 @@ var _Sticky = defineComponent({
5669
5764
  }
5670
5765
  });
5671
5766
  var Sticky = withInstall(_Sticky);
5672
- var [name$_, bem$Z] = createNamespace("tab");
5767
+ var [name$Z, bem$Y] = createNamespace("tab");
5673
5768
  var TabsTitle = defineComponent({
5674
- name: name$_,
5769
+ name: name$Z,
5675
5770
  props: {
5771
+ id: String,
5676
5772
  dot: Boolean,
5677
5773
  type: String,
5678
5774
  color: String,
@@ -5680,6 +5776,7 @@ var TabsTitle = defineComponent({
5680
5776
  badge: numericProp,
5681
5777
  isActive: Boolean,
5682
5778
  disabled: Boolean,
5779
+ controls: String,
5683
5780
  scrollable: Boolean,
5684
5781
  activeColor: String,
5685
5782
  renderTitle: Function,
@@ -5716,7 +5813,7 @@ var TabsTitle = defineComponent({
5716
5813
  });
5717
5814
  var renderText = () => {
5718
5815
  var Text = createVNode("span", {
5719
- "class": bem$Z("text", {
5816
+ "class": bem$Y("text", {
5720
5817
  ellipsis: !props.scrollable
5721
5818
  })
5722
5819
  }, [props.renderTitle ? props.renderTitle() : props.title]);
@@ -5732,17 +5829,21 @@ var TabsTitle = defineComponent({
5732
5829
  return Text;
5733
5830
  };
5734
5831
  return () => createVNode("div", {
5832
+ "id": props.id,
5735
5833
  "role": "tab",
5736
- "class": [bem$Z({
5834
+ "class": [bem$Y({
5737
5835
  active: props.isActive,
5738
5836
  disabled: props.disabled
5739
5837
  })],
5740
5838
  "style": style.value,
5741
- "aria-selected": props.isActive
5839
+ "tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
5840
+ "aria-selected": props.isActive,
5841
+ "aria-disabled": props.disabled || void 0,
5842
+ "aria-controls": props.controls
5742
5843
  }, [renderText()]);
5743
5844
  }
5744
5845
  });
5745
- var [name$Z, bem$Y] = createNamespace("swipe");
5846
+ var [name$Y, bem$X] = createNamespace("swipe");
5746
5847
  var swipeProps = {
5747
5848
  loop: truthProp,
5748
5849
  width: numericProp,
@@ -5757,9 +5858,9 @@ var swipeProps = {
5757
5858
  showIndicators: truthProp,
5758
5859
  stopPropagation: truthProp
5759
5860
  };
5760
- var SWIPE_KEY = Symbol(name$Z);
5861
+ var SWIPE_KEY = Symbol(name$Y);
5761
5862
  var _Swipe = defineComponent({
5762
- name: name$Z,
5863
+ name: name$Y,
5763
5864
  props: swipeProps,
5764
5865
  emits: ["change"],
5765
5866
  setup(props, _ref) {
@@ -5777,7 +5878,6 @@ var _Swipe = defineComponent({
5777
5878
  swiping: false
5778
5879
  });
5779
5880
  var touch = useTouch();
5780
- var windowSize = useWindowSize();
5781
5881
  var {
5782
5882
  children,
5783
5883
  linkChildren
@@ -6022,7 +6122,7 @@ var _Swipe = defineComponent({
6022
6122
  } : void 0;
6023
6123
  return createVNode("i", {
6024
6124
  "style": style,
6025
- "class": bem$Y("indicator", {
6125
+ "class": bem$X("indicator", {
6026
6126
  active
6027
6127
  })
6028
6128
  }, null);
@@ -6035,7 +6135,7 @@ var _Swipe = defineComponent({
6035
6135
  }
6036
6136
  if (props.showIndicators && count.value > 1) {
6037
6137
  return createVNode("div", {
6038
- "class": bem$Y("indicators", {
6138
+ "class": bem$X("indicators", {
6039
6139
  vertical: props.vertical
6040
6140
  })
6041
6141
  }, [Array(count.value).fill("").map(renderDot)]);
@@ -6057,7 +6157,7 @@ var _Swipe = defineComponent({
6057
6157
  watch(() => props.initialSwipe, (value) => initialize(+value));
6058
6158
  watch(count, () => initialize(state.active));
6059
6159
  watch(() => props.autoplay, autoplay);
6060
- watch([windowSize.width, windowSize.height], resize);
6160
+ watch([windowWidth, windowHeight], resize);
6061
6161
  watch(usePageVisibility(), (visible) => {
6062
6162
  if (visible === "visible") {
6063
6163
  autoplay();
@@ -6072,10 +6172,10 @@ var _Swipe = defineComponent({
6072
6172
  onBeforeUnmount(stopAutoplay);
6073
6173
  return () => createVNode("div", {
6074
6174
  "ref": root,
6075
- "class": bem$Y()
6175
+ "class": bem$X()
6076
6176
  }, [createVNode("div", {
6077
6177
  "style": trackStyle.value,
6078
- "class": bem$Y("track", {
6178
+ "class": bem$X("track", {
6079
6179
  vertical: props.vertical
6080
6180
  }),
6081
6181
  "onTouchstart": onTouchStart,
@@ -6086,9 +6186,9 @@ var _Swipe = defineComponent({
6086
6186
  }
6087
6187
  });
6088
6188
  var Swipe = withInstall(_Swipe);
6089
- var [name$Y, bem$X] = createNamespace("tabs");
6189
+ var [name$X, bem$W] = createNamespace("tabs");
6090
6190
  var TabsContent = defineComponent({
6091
- name: name$Y,
6191
+ name: name$X,
6092
6192
  props: {
6093
6193
  count: makeRequiredProp(Number),
6094
6194
  inited: Boolean,
@@ -6112,7 +6212,7 @@ var TabsContent = defineComponent({
6112
6212
  return createVNode(Swipe, {
6113
6213
  "ref": swipeRef,
6114
6214
  "loop": false,
6115
- "class": bem$X("track"),
6215
+ "class": bem$W("track"),
6116
6216
  "duration": +props.duration * 1e3,
6117
6217
  "touchable": props.swipeable,
6118
6218
  "lazyRender": props.lazyRender,
@@ -6137,13 +6237,13 @@ var TabsContent = defineComponent({
6137
6237
  swipeToCurrentTab(props.currentIndex);
6138
6238
  });
6139
6239
  return () => createVNode("div", {
6140
- "class": bem$X("content", {
6240
+ "class": bem$W("content", {
6141
6241
  animated: props.animated || props.swipeable
6142
6242
  })
6143
6243
  }, [renderChildren()]);
6144
6244
  }
6145
6245
  });
6146
- var [name$X, bem$W] = createNamespace("tabs");
6246
+ var [name$W, bem$V] = createNamespace("tabs");
6147
6247
  var tabsProps = {
6148
6248
  type: makeStringProp("line"),
6149
6249
  color: String,
@@ -6165,9 +6265,9 @@ var tabsProps = {
6165
6265
  titleActiveColor: String,
6166
6266
  titleInactiveColor: String
6167
6267
  };
6168
- var TABS_KEY = Symbol(name$X);
6268
+ var TABS_KEY = Symbol(name$W);
6169
6269
  var _Tabs = defineComponent({
6170
- name: name$X,
6270
+ name: name$W,
6171
6271
  props: tabsProps,
6172
6272
  emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active"],
6173
6273
  setup(props, _ref) {
@@ -6181,7 +6281,7 @@ var _Tabs = defineComponent({
6181
6281
  var root = ref();
6182
6282
  var navRef = ref();
6183
6283
  var wrapRef = ref();
6184
- var windowSize = useWindowSize();
6284
+ var id = useId();
6185
6285
  var scroller = useScrollParent(root);
6186
6286
  var [titleRefs, setTitleRefs] = useRefs();
6187
6287
  var {
@@ -6354,12 +6454,14 @@ var _Tabs = defineComponent({
6354
6454
  }
6355
6455
  };
6356
6456
  var renderNav = () => children.map((item, index2) => createVNode(TabsTitle, mergeProps({
6457
+ "id": id + "-" + index2,
6357
6458
  "ref": setTitleRefs(index2),
6358
6459
  "type": props.type,
6359
6460
  "color": props.color,
6360
6461
  "style": item.titleStyle,
6361
6462
  "class": item.titleClass,
6362
6463
  "isActive": index2 === state.currentIndex,
6464
+ "controls": item.id,
6363
6465
  "scrollable": scrollable.value,
6364
6466
  "renderTitle": item.$slots.title,
6365
6467
  "activeColor": props.titleActiveColor,
@@ -6374,7 +6476,7 @@ var _Tabs = defineComponent({
6374
6476
  } = props;
6375
6477
  return createVNode("div", {
6376
6478
  "ref": wrapRef,
6377
- "class": [bem$W("wrap", {
6479
+ "class": [bem$V("wrap", {
6378
6480
  scrollable: scrollable.value
6379
6481
  }), {
6380
6482
  [BORDER_TOP_BOTTOM]: type === "line" && border
@@ -6382,16 +6484,17 @@ var _Tabs = defineComponent({
6382
6484
  }, [createVNode("div", {
6383
6485
  "ref": navRef,
6384
6486
  "role": "tablist",
6385
- "class": bem$W("nav", [type, {
6487
+ "class": bem$V("nav", [type, {
6386
6488
  complete: scrollable.value
6387
6489
  }]),
6388
- "style": navStyle.value
6490
+ "style": navStyle.value,
6491
+ "aria-orientation": "horizontal"
6389
6492
  }, [(_slots$navLeft = slots["nav-left"]) == null ? void 0 : _slots$navLeft.call(slots), renderNav(), type === "line" && createVNode("div", {
6390
- "class": bem$W("line"),
6493
+ "class": bem$V("line"),
6391
6494
  "style": state.lineStyle
6392
6495
  }, null), (_slots$navRight = slots["nav-right"]) == null ? void 0 : _slots$navRight.call(slots)])]);
6393
6496
  };
6394
- watch([() => props.color, windowSize.width], setLine);
6497
+ watch([() => props.color, windowWidth], setLine);
6395
6498
  watch(() => props.active, (value) => {
6396
6499
  if (value !== currentName.value) {
6397
6500
  setCurrentIndexByName(value);
@@ -6435,6 +6538,7 @@ var _Tabs = defineComponent({
6435
6538
  target: scroller
6436
6539
  });
6437
6540
  linkChildren({
6541
+ id,
6438
6542
  props,
6439
6543
  setLine,
6440
6544
  onRendered,
@@ -6445,7 +6549,7 @@ var _Tabs = defineComponent({
6445
6549
  var _slots$navBottom, _slots$navBottom2;
6446
6550
  return createVNode("div", {
6447
6551
  "ref": root,
6448
- "class": bem$W([props.type])
6552
+ "class": bem$V([props.type])
6449
6553
  }, [props.sticky ? createVNode(Sticky, {
6450
6554
  "container": root.value,
6451
6555
  "offsetTop": offsetTopPx.value,
@@ -6469,9 +6573,9 @@ var _Tabs = defineComponent({
6469
6573
  });
6470
6574
  var TAB_STATUS_KEY = Symbol();
6471
6575
  var useTabStatus = () => inject(TAB_STATUS_KEY, null);
6472
- var [name$W, bem$V] = createNamespace("swipe-item");
6576
+ var [name$V, bem$U] = createNamespace("swipe-item");
6473
6577
  var _SwipeItem = defineComponent({
6474
- name: name$W,
6578
+ name: name$V,
6475
6579
  setup(props, _ref) {
6476
6580
  var {
6477
6581
  slots
@@ -6532,13 +6636,13 @@ var _SwipeItem = defineComponent({
6532
6636
  setOffset
6533
6637
  });
6534
6638
  return () => createVNode("div", {
6535
- "class": bem$V(),
6639
+ "class": bem$U(),
6536
6640
  "style": style.value
6537
6641
  }, [shouldRender.value ? slots.default == null ? void 0 : slots.default() : null]);
6538
6642
  }
6539
6643
  });
6540
6644
  var SwipeItem = withInstall(_SwipeItem);
6541
- var [name$V, bem$U] = createNamespace("tab");
6645
+ var [name$U, bem$T] = createNamespace("tab");
6542
6646
  var tabProps = extend({}, routeProps, {
6543
6647
  dot: Boolean,
6544
6648
  name: numericProp,
@@ -6550,12 +6654,13 @@ var tabProps = extend({}, routeProps, {
6550
6654
  showZeroBadge: truthProp
6551
6655
  });
6552
6656
  var _Tab = defineComponent({
6553
- name: name$V,
6657
+ name: name$U,
6554
6658
  props: tabProps,
6555
6659
  setup(props, _ref) {
6556
6660
  var {
6557
6661
  slots
6558
6662
  } = _ref;
6663
+ var id = useId();
6559
6664
  var inited = ref(false);
6560
6665
  var {
6561
6666
  parent,
@@ -6589,6 +6694,7 @@ var _Tab = defineComponent({
6589
6694
  });
6590
6695
  provide(TAB_STATUS_KEY, active);
6591
6696
  return () => {
6697
+ var label = parent.id + "-" + index2.value;
6592
6698
  var {
6593
6699
  animated,
6594
6700
  swipeable,
@@ -6601,29 +6707,38 @@ var _Tab = defineComponent({
6601
6707
  var show = scrollspy || active.value;
6602
6708
  if (animated || swipeable) {
6603
6709
  return createVNode(SwipeItem, {
6710
+ "id": id,
6604
6711
  "role": "tabpanel",
6605
- "aria-hidden": !active.value,
6606
- "class": bem$U("pane-wrapper", {
6712
+ "class": bem$T("pane-wrapper", {
6607
6713
  inactive: !active.value
6608
- })
6714
+ }),
6715
+ "tabindex": active.value ? 0 : -1,
6716
+ "aria-hidden": !active.value,
6717
+ "aria-labelledby": label
6609
6718
  }, {
6610
6719
  default: () => [createVNode("div", {
6611
- "class": bem$U("pane")
6720
+ "class": bem$T("panel")
6612
6721
  }, [slots.default == null ? void 0 : slots.default()])]
6613
6722
  });
6614
6723
  }
6615
6724
  var shouldRender = inited.value || scrollspy || !lazyRender;
6616
6725
  var Content = shouldRender ? slots.default == null ? void 0 : slots.default() : null;
6726
+ useExpose({
6727
+ id
6728
+ });
6617
6729
  return withDirectives(createVNode("div", {
6730
+ "id": id,
6618
6731
  "role": "tabpanel",
6619
- "class": bem$U("pane")
6732
+ "class": bem$T("panel"),
6733
+ "tabindex": show ? 0 : -1,
6734
+ "aria-labelledby": label
6620
6735
  }, [Content]), [[vShow, show]]);
6621
6736
  };
6622
6737
  }
6623
6738
  });
6624
6739
  var Tab = withInstall(_Tab);
6625
6740
  var Tabs = withInstall(_Tabs);
6626
- var [name$U, bem$T, t$d] = createNamespace("cascader");
6741
+ var [name$T, bem$S, t$e] = createNamespace("cascader");
6627
6742
  var cascaderProps = {
6628
6743
  title: String,
6629
6744
  options: makeArrayProp(),
@@ -6636,7 +6751,7 @@ var cascaderProps = {
6636
6751
  activeColor: String
6637
6752
  };
6638
6753
  var _Cascader = defineComponent({
6639
- name: name$U,
6754
+ name: name$T,
6640
6755
  props: cascaderProps,
6641
6756
  emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
6642
6757
  setup(props, _ref) {
@@ -6748,37 +6863,45 @@ var _Cascader = defineComponent({
6748
6863
  return emit("click-tab", name2, title);
6749
6864
  };
6750
6865
  var renderHeader = () => createVNode("div", {
6751
- "class": bem$T("header")
6866
+ "class": bem$S("header")
6752
6867
  }, [createVNode("h2", {
6753
- "class": bem$T("title")
6868
+ "class": bem$S("title")
6754
6869
  }, [slots.title ? slots.title() : props.title]), props.closeable ? createVNode(Icon, {
6755
6870
  "name": props.closeIcon,
6756
- "class": [bem$T("close-icon"), HAPTICS_FEEDBACK],
6871
+ "class": [bem$S("close-icon"), HAPTICS_FEEDBACK],
6757
6872
  "onClick": onClose
6758
6873
  }, null) : null]);
6759
6874
  var renderOption = (option, selectedOption, tabIndex) => {
6760
- var selected = selectedOption && option[valueKey] === selectedOption[valueKey];
6875
+ var {
6876
+ disabled
6877
+ } = option;
6878
+ var selected = !!(selectedOption && option[valueKey] === selectedOption[valueKey]);
6761
6879
  var color = option.color || (selected ? props.activeColor : void 0);
6762
6880
  var Text = slots.option ? slots.option({
6763
6881
  option,
6764
6882
  selected
6765
6883
  }) : createVNode("span", null, [option[textKey]]);
6766
6884
  return createVNode("li", {
6767
- "class": [bem$T("option", {
6885
+ "role": "menuitemradio",
6886
+ "class": [bem$S("option", {
6768
6887
  selected,
6769
- disabled: option.disabled
6888
+ disabled
6770
6889
  }), option.className],
6771
6890
  "style": {
6772
6891
  color
6773
6892
  },
6893
+ "tabindex": disabled ? void 0 : selected ? 0 : -1,
6894
+ "aria-checked": selected,
6895
+ "aria-disabled": disabled || void 0,
6774
6896
  "onClick": () => onSelect(option, tabIndex)
6775
6897
  }, [Text, selected ? createVNode(Icon, {
6776
6898
  "name": "success",
6777
- "class": bem$T("selected-icon")
6899
+ "class": bem$S("selected-icon")
6778
6900
  }, null) : null]);
6779
6901
  };
6780
6902
  var renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
6781
- "class": bem$T("options")
6903
+ "role": "menu",
6904
+ "class": bem$S("options")
6782
6905
  }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
6783
6906
  var renderTab = (tab, tabIndex) => {
6784
6907
  var _slots$optionsTop, _slots$optionsBottom;
@@ -6786,11 +6909,11 @@ var _Cascader = defineComponent({
6786
6909
  options,
6787
6910
  selected
6788
6911
  } = tab;
6789
- var placeholder = props.placeholder || t$d("select");
6912
+ var placeholder = props.placeholder || t$e("select");
6790
6913
  var title = selected ? selected[textKey] : placeholder;
6791
6914
  return createVNode(Tab, {
6792
6915
  "title": title,
6793
- "titleClass": bem$T("tab", {
6916
+ "titleClass": bem$S("tab", {
6794
6917
  unselected: !selected
6795
6918
  })
6796
6919
  }, {
@@ -6805,7 +6928,7 @@ var _Cascader = defineComponent({
6805
6928
  "active": activeTab.value,
6806
6929
  "onUpdate:active": ($event) => activeTab.value = $event,
6807
6930
  "animated": true,
6808
- "class": bem$T("tabs"),
6931
+ "class": bem$S("tabs"),
6809
6932
  "color": props.activeColor,
6810
6933
  "swipeThreshold": 0,
6811
6934
  "swipeable": props.swipeable,
@@ -6830,19 +6953,19 @@ var _Cascader = defineComponent({
6830
6953
  updateTabs();
6831
6954
  });
6832
6955
  return () => createVNode("div", {
6833
- "class": bem$T()
6956
+ "class": bem$S()
6834
6957
  }, [renderHeader(), renderTabs()]);
6835
6958
  }
6836
6959
  });
6837
6960
  var Cascader = withInstall(_Cascader);
6838
- var [name$T, bem$S] = createNamespace("cell-group");
6961
+ var [name$S, bem$R] = createNamespace("cell-group");
6839
6962
  var cellGroupProps = {
6840
6963
  title: String,
6841
6964
  inset: Boolean,
6842
6965
  border: truthProp
6843
6966
  };
6844
6967
  var _CellGroup = defineComponent({
6845
- name: name$T,
6968
+ name: name$S,
6846
6969
  inheritAttrs: false,
6847
6970
  props: cellGroupProps,
6848
6971
  setup(props, _ref) {
@@ -6851,14 +6974,14 @@ var _CellGroup = defineComponent({
6851
6974
  attrs
6852
6975
  } = _ref;
6853
6976
  var renderGroup = () => createVNode("div", mergeProps({
6854
- "class": [bem$S({
6977
+ "class": [bem$R({
6855
6978
  inset: props.inset
6856
6979
  }), {
6857
6980
  [BORDER_TOP_BOTTOM]: props.border && !props.inset
6858
6981
  }]
6859
6982
  }, attrs), [slots.default == null ? void 0 : slots.default()]);
6860
6983
  var renderTitle = () => createVNode("div", {
6861
- "class": bem$S("title", {
6984
+ "class": bem$R("title", {
6862
6985
  inset: props.inset
6863
6986
  })
6864
6987
  }, [slots.title ? slots.title() : props.title]);
@@ -6871,7 +6994,7 @@ var _CellGroup = defineComponent({
6871
6994
  }
6872
6995
  });
6873
6996
  var CellGroup = withInstall(_CellGroup);
6874
- var [name$S, bem$R] = createNamespace("checkbox-group");
6997
+ var [name$R, bem$Q] = createNamespace("checkbox-group");
6875
6998
  var checkboxGroupProps = {
6876
6999
  max: numericProp,
6877
7000
  disabled: Boolean,
@@ -6880,9 +7003,9 @@ var checkboxGroupProps = {
6880
7003
  modelValue: makeArrayProp(),
6881
7004
  checkedColor: String
6882
7005
  };
6883
- var CHECKBOX_GROUP_KEY = Symbol(name$S);
7006
+ var CHECKBOX_GROUP_KEY = Symbol(name$R);
6884
7007
  var _CheckboxGroup = defineComponent({
6885
- name: name$S,
7008
+ name: name$R,
6886
7009
  props: checkboxGroupProps,
6887
7010
  emits: ["change", "update:modelValue"],
6888
7011
  setup(props, _ref) {
@@ -6930,16 +7053,16 @@ var _CheckboxGroup = defineComponent({
6930
7053
  updateValue
6931
7054
  });
6932
7055
  return () => createVNode("div", {
6933
- "class": bem$R([props.direction])
7056
+ "class": bem$Q([props.direction])
6934
7057
  }, [slots.default == null ? void 0 : slots.default()]);
6935
7058
  }
6936
7059
  });
6937
- var [name$R, bem$Q] = createNamespace("checkbox");
7060
+ var [name$Q, bem$P] = createNamespace("checkbox");
6938
7061
  var checkboxProps = extend({}, checkerProps, {
6939
7062
  bindGroup: truthProp
6940
7063
  });
6941
7064
  var _Checkbox = defineComponent({
6942
- name: name$R,
7065
+ name: name$Q,
6943
7066
  props: checkboxProps,
6944
7067
  emits: ["change", "update:modelValue"],
6945
7068
  setup(props, _ref) {
@@ -7001,7 +7124,7 @@ var _Checkbox = defineComponent({
7001
7124
  });
7002
7125
  useCustomFieldValue(() => props.modelValue);
7003
7126
  return () => createVNode(Checker, mergeProps({
7004
- "bem": bem$Q,
7127
+ "bem": bem$P,
7005
7128
  "role": "checkbox",
7006
7129
  "parent": parent,
7007
7130
  "checked": checked.value,
@@ -7011,7 +7134,7 @@ var _Checkbox = defineComponent({
7011
7134
  });
7012
7135
  var Checkbox = withInstall(_Checkbox);
7013
7136
  var CheckboxGroup = withInstall(_CheckboxGroup);
7014
- var [name$Q, bem$P] = createNamespace("circle");
7137
+ var [name$P, bem$O] = createNamespace("circle");
7015
7138
  var uid = 0;
7016
7139
  var format = (rate) => Math.min(Math.max(+rate, 0), 100);
7017
7140
  function getPath(clockwise, viewBoxSize) {
@@ -7033,7 +7156,7 @@ var circleProps = {
7033
7156
  startPosition: makeStringProp("top")
7034
7157
  };
7035
7158
  var _Circle = defineComponent({
7036
- name: name$Q,
7159
+ name: name$P,
7037
7160
  props: circleProps,
7038
7161
  emits: ["update:currentRate"],
7039
7162
  setup(props, _ref) {
@@ -7092,7 +7215,7 @@ var _Circle = defineComponent({
7092
7215
  strokeLinecap
7093
7216
  } = props;
7094
7217
  var offset2 = PERIMETER * currentRate / 100;
7095
- var color = isObject$1(props.color) ? "url(#" + id + ")" : props.color;
7218
+ var color = isObject(props.color) ? "url(#" + id + ")" : props.color;
7096
7219
  var style = {
7097
7220
  stroke: color,
7098
7221
  strokeWidth: +strokeWidth + 1 + "px",
@@ -7102,7 +7225,7 @@ var _Circle = defineComponent({
7102
7225
  return createVNode("path", {
7103
7226
  "d": path.value,
7104
7227
  "style": style,
7105
- "class": bem$P("hover"),
7228
+ "class": bem$O("hover"),
7106
7229
  "stroke": color
7107
7230
  }, null);
7108
7231
  };
@@ -7113,7 +7236,7 @@ var _Circle = defineComponent({
7113
7236
  strokeWidth: props.strokeWidth + "px"
7114
7237
  };
7115
7238
  return createVNode("path", {
7116
- "class": bem$P("layer"),
7239
+ "class": bem$O("layer"),
7117
7240
  "style": style,
7118
7241
  "d": path.value
7119
7242
  }, null);
@@ -7122,7 +7245,7 @@ var _Circle = defineComponent({
7122
7245
  var {
7123
7246
  color
7124
7247
  } = props;
7125
- if (!isObject$1(color)) {
7248
+ if (!isObject(color)) {
7126
7249
  return;
7127
7250
  }
7128
7251
  var Stops = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key, index2) => createVNode("stop", {
@@ -7144,12 +7267,12 @@ var _Circle = defineComponent({
7144
7267
  }
7145
7268
  if (props.text) {
7146
7269
  return createVNode("div", {
7147
- "class": bem$P("text")
7270
+ "class": bem$O("text")
7148
7271
  }, [props.text]);
7149
7272
  }
7150
7273
  };
7151
7274
  return () => createVNode("div", {
7152
- "class": bem$P(),
7275
+ "class": bem$O(),
7153
7276
  "style": getSizeStyle(props.size)
7154
7277
  }, [createVNode("svg", {
7155
7278
  "viewBox": "0 0 " + viewBoxSize.value + " " + viewBoxSize.value,
@@ -7158,8 +7281,8 @@ var _Circle = defineComponent({
7158
7281
  }
7159
7282
  });
7160
7283
  var Circle = withInstall(_Circle);
7161
- var [name$P, bem$O] = createNamespace("row");
7162
- var ROW_KEY = Symbol(name$P);
7284
+ var [name$O, bem$N] = createNamespace("row");
7285
+ var ROW_KEY = Symbol(name$O);
7163
7286
  var rowProps = {
7164
7287
  tag: makeStringProp("div"),
7165
7288
  wrap: truthProp,
@@ -7168,7 +7291,7 @@ var rowProps = {
7168
7291
  justify: String
7169
7292
  };
7170
7293
  var _Row = defineComponent({
7171
- name: name$P,
7294
+ name: name$O,
7172
7295
  props: rowProps,
7173
7296
  setup(props, _ref) {
7174
7297
  var {
@@ -7228,7 +7351,7 @@ var _Row = defineComponent({
7228
7351
  justify
7229
7352
  } = props;
7230
7353
  return createVNode(tag, {
7231
- "class": bem$O({
7354
+ "class": bem$N({
7232
7355
  ["align-" + align]: align,
7233
7356
  ["justify-" + justify]: justify,
7234
7357
  nowrap: !wrap
@@ -7239,14 +7362,14 @@ var _Row = defineComponent({
7239
7362
  };
7240
7363
  }
7241
7364
  });
7242
- var [name$O, bem$N] = createNamespace("col");
7365
+ var [name$N, bem$M] = createNamespace("col");
7243
7366
  var colProps = {
7244
7367
  tag: makeStringProp("div"),
7245
7368
  span: makeNumericProp(0),
7246
7369
  offset: numericProp
7247
7370
  };
7248
7371
  var _Col = defineComponent({
7249
- name: name$O,
7372
+ name: name$N,
7250
7373
  props: colProps,
7251
7374
  setup(props, _ref) {
7252
7375
  var {
@@ -7282,7 +7405,7 @@ var _Col = defineComponent({
7282
7405
  } = props;
7283
7406
  return createVNode(tag, {
7284
7407
  "style": style.value,
7285
- "class": bem$N({
7408
+ "class": bem$M({
7286
7409
  [span]: span,
7287
7410
  ["offset-" + offset2]: offset2
7288
7411
  })
@@ -7293,8 +7416,8 @@ var _Col = defineComponent({
7293
7416
  }
7294
7417
  });
7295
7418
  var Col = withInstall(_Col);
7296
- var [name$N, bem$M] = createNamespace("collapse");
7297
- var COLLAPSE_KEY = Symbol(name$N);
7419
+ var [name$M, bem$L] = createNamespace("collapse");
7420
+ var COLLAPSE_KEY = Symbol(name$M);
7298
7421
  var collapseProps = {
7299
7422
  border: truthProp,
7300
7423
  accordion: Boolean,
@@ -7304,7 +7427,7 @@ var collapseProps = {
7304
7427
  }
7305
7428
  };
7306
7429
  var _Collapse = defineComponent({
7307
- name: name$N,
7430
+ name: name$M,
7308
7431
  props: collapseProps,
7309
7432
  emits: ["change", "update:modelValue"],
7310
7433
  setup(props, _ref) {
@@ -7344,14 +7467,14 @@ var _Collapse = defineComponent({
7344
7467
  isExpanded
7345
7468
  });
7346
7469
  return () => createVNode("div", {
7347
- "class": [bem$M(), {
7470
+ "class": [bem$L(), {
7348
7471
  [BORDER_TOP_BOTTOM]: props.border
7349
7472
  }]
7350
7473
  }, [slots.default == null ? void 0 : slots.default()]);
7351
7474
  }
7352
7475
  });
7353
7476
  var Collapse = withInstall(_Collapse);
7354
- var [name$M, bem$L] = createNamespace("collapse-item");
7477
+ var [name$L, bem$K] = createNamespace("collapse-item");
7355
7478
  var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
7356
7479
  var collapseItemProps = extend({}, cellSharedProps, {
7357
7480
  name: numericProp,
@@ -7360,7 +7483,7 @@ var collapseItemProps = extend({}, cellSharedProps, {
7360
7483
  readonly: Boolean
7361
7484
  });
7362
7485
  var _CollapseItem = defineComponent({
7363
- name: name$M,
7486
+ name: name$L,
7364
7487
  props: collapseItemProps,
7365
7488
  setup(props, _ref) {
7366
7489
  var {
@@ -7443,7 +7566,7 @@ var _CollapseItem = defineComponent({
7443
7566
  }
7444
7567
  return createVNode(Cell, mergeProps({
7445
7568
  "role": "button",
7446
- "class": bem$L("title", {
7569
+ "class": bem$K("title", {
7447
7570
  disabled,
7448
7571
  expanded: expanded.value,
7449
7572
  borderless: !border
@@ -7454,17 +7577,17 @@ var _CollapseItem = defineComponent({
7454
7577
  };
7455
7578
  var renderContent = lazyRender(() => withDirectives(createVNode("div", {
7456
7579
  "ref": wrapperRef,
7457
- "class": bem$L("wrapper"),
7580
+ "class": bem$K("wrapper"),
7458
7581
  "onTransitionend": onTransitionEnd
7459
7582
  }, [createVNode("div", {
7460
7583
  "ref": contentRef,
7461
- "class": bem$L("content")
7584
+ "class": bem$K("content")
7462
7585
  }, [slots.default == null ? void 0 : slots.default()])]), [[vShow, show.value]]));
7463
7586
  useExpose({
7464
7587
  toggle
7465
7588
  });
7466
7589
  return () => createVNode("div", {
7467
- "class": [bem$L({
7590
+ "class": [bem$K({
7468
7591
  border: index2.value && props.border
7469
7592
  })]
7470
7593
  }, [renderTitle(), renderContent()]);
@@ -7472,7 +7595,7 @@ var _CollapseItem = defineComponent({
7472
7595
  });
7473
7596
  var CollapseItem = withInstall(_CollapseItem);
7474
7597
  var ConfigProvider = withInstall(_ConfigProvider);
7475
- var [name$L, bem$K, t$c] = createNamespace("contact-card");
7598
+ var [name$K, bem$J, t$d] = createNamespace("contact-card");
7476
7599
  var contactCardProps = {
7477
7600
  tel: String,
7478
7601
  name: String,
@@ -7481,7 +7604,7 @@ var contactCardProps = {
7481
7604
  editable: truthProp
7482
7605
  };
7483
7606
  var _ContactCard = defineComponent({
7484
- name: name$L,
7607
+ name: name$K,
7485
7608
  props: contactCardProps,
7486
7609
  emits: ["click"],
7487
7610
  setup(props, _ref) {
@@ -7495,17 +7618,17 @@ var _ContactCard = defineComponent({
7495
7618
  };
7496
7619
  var renderContent = () => {
7497
7620
  if (props.type === "add") {
7498
- return props.addText || t$c("addText");
7621
+ return props.addText || t$d("addText");
7499
7622
  }
7500
- return [createVNode("div", null, [t$c("name") + "\uFF1A" + props.name]), createVNode("div", null, [t$c("tel") + "\uFF1A" + props.tel])];
7623
+ return [createVNode("div", null, [t$d("name") + "\uFF1A" + props.name]), createVNode("div", null, [t$d("tel") + "\uFF1A" + props.tel])];
7501
7624
  };
7502
7625
  return () => createVNode(Cell, {
7503
7626
  "center": true,
7504
7627
  "icon": props.type === "edit" ? "contact" : "add-square",
7505
- "class": bem$K([props.type]),
7628
+ "class": bem$J([props.type]),
7506
7629
  "border": false,
7507
7630
  "isLink": props.editable,
7508
- "valueClass": bem$K("value"),
7631
+ "valueClass": bem$J("value"),
7509
7632
  "onClick": onClick
7510
7633
  }, {
7511
7634
  value: renderContent
@@ -7513,147 +7636,7 @@ var _ContactCard = defineComponent({
7513
7636
  }
7514
7637
  });
7515
7638
  var ContactCard = withInstall(_ContactCard);
7516
- var [name$K, bem$J] = createNamespace("form");
7517
- var formProps = {
7518
- colon: Boolean,
7519
- disabled: Boolean,
7520
- readonly: Boolean,
7521
- showError: Boolean,
7522
- labelWidth: numericProp,
7523
- labelAlign: String,
7524
- inputAlign: String,
7525
- scrollToError: Boolean,
7526
- validateFirst: Boolean,
7527
- submitOnEnter: truthProp,
7528
- validateTrigger: makeStringProp("onBlur"),
7529
- showErrorMessage: truthProp,
7530
- errorMessageAlign: String
7531
- };
7532
- var _Form = defineComponent({
7533
- name: name$K,
7534
- props: formProps,
7535
- emits: ["submit", "failed"],
7536
- setup(props, _ref) {
7537
- var {
7538
- emit,
7539
- slots
7540
- } = _ref;
7541
- var {
7542
- children,
7543
- linkChildren
7544
- } = useChildren(FORM_KEY);
7545
- var getFieldsByNames = (names) => {
7546
- if (names) {
7547
- return children.filter((field) => names.includes(field.name));
7548
- }
7549
- return children;
7550
- };
7551
- var validateSeq = (names) => new Promise((resolve, reject) => {
7552
- var errors = [];
7553
- var fields = getFieldsByNames(names);
7554
- fields.reduce((promise, field) => promise.then(() => {
7555
- if (!errors.length) {
7556
- return field.validate().then((error) => {
7557
- if (error) {
7558
- errors.push(error);
7559
- }
7560
- });
7561
- }
7562
- }), Promise.resolve()).then(() => {
7563
- if (errors.length) {
7564
- reject(errors);
7565
- } else {
7566
- resolve();
7567
- }
7568
- });
7569
- });
7570
- var validateAll = (names) => new Promise((resolve, reject) => {
7571
- var fields = getFieldsByNames(names);
7572
- Promise.all(fields.map((item) => item.validate())).then((errors) => {
7573
- errors = errors.filter(Boolean);
7574
- if (errors.length) {
7575
- reject(errors);
7576
- } else {
7577
- resolve();
7578
- }
7579
- });
7580
- });
7581
- var validateField = (name2) => {
7582
- var matched = children.find((item) => item.name === name2);
7583
- if (matched) {
7584
- return new Promise((resolve, reject) => {
7585
- matched.validate().then((error) => {
7586
- if (error) {
7587
- reject(error);
7588
- } else {
7589
- resolve();
7590
- }
7591
- });
7592
- });
7593
- }
7594
- return Promise.reject();
7595
- };
7596
- var validate = (name2) => {
7597
- if (typeof name2 === "string") {
7598
- return validateField(name2);
7599
- }
7600
- return props.validateFirst ? validateSeq(name2) : validateAll(name2);
7601
- };
7602
- var resetValidation = (name2) => {
7603
- if (typeof name2 === "string") {
7604
- name2 = [name2];
7605
- }
7606
- var fields = getFieldsByNames(name2);
7607
- fields.forEach((item) => {
7608
- item.resetValidation();
7609
- });
7610
- };
7611
- var scrollToField = (name2, options) => {
7612
- children.some((item) => {
7613
- if (item.name === name2) {
7614
- item.$el.scrollIntoView(options);
7615
- return true;
7616
- }
7617
- return false;
7618
- });
7619
- };
7620
- var getValues = () => children.reduce((form, field) => {
7621
- form[field.name] = field.formValue.value;
7622
- return form;
7623
- }, {});
7624
- var submit = () => {
7625
- var values = getValues();
7626
- validate().then(() => emit("submit", values)).catch((errors) => {
7627
- emit("failed", {
7628
- values,
7629
- errors
7630
- });
7631
- if (props.scrollToError && errors[0].name) {
7632
- scrollToField(errors[0].name);
7633
- }
7634
- });
7635
- };
7636
- var onSubmit = (event) => {
7637
- event.preventDefault();
7638
- submit();
7639
- };
7640
- linkChildren({
7641
- props
7642
- });
7643
- useExpose({
7644
- submit,
7645
- validate,
7646
- scrollToField,
7647
- resetValidation
7648
- });
7649
- return () => createVNode("form", {
7650
- "class": bem$J(),
7651
- "onSubmit": onSubmit
7652
- }, [slots.default == null ? void 0 : slots.default()]);
7653
- }
7654
- });
7655
- var Form = withInstall(_Form);
7656
- var [name$J, bem$I, t$b] = createNamespace("contact-edit");
7639
+ var [name$J, bem$I, t$c] = createNamespace("contact-edit");
7657
7640
  var DEFAULT_CONTACT = {
7658
7641
  tel: "",
7659
7642
  name: ""
@@ -7694,14 +7677,14 @@ var _ContactEdit = defineComponent({
7694
7677
  "block": true,
7695
7678
  "round": true,
7696
7679
  "type": "danger",
7697
- "text": t$b("save"),
7680
+ "text": t$c("save"),
7698
7681
  "class": bem$I("button"),
7699
7682
  "loading": props.isSaving,
7700
7683
  "nativeType": "submit"
7701
7684
  }, null), props.isEdit && createVNode(Button, {
7702
7685
  "block": true,
7703
7686
  "round": true,
7704
- "text": t$b("delete"),
7687
+ "text": t$c("delete"),
7705
7688
  "class": bem$I("button"),
7706
7689
  "loading": props.isDeleting,
7707
7690
  "onClick": onDelete
@@ -7734,30 +7717,30 @@ var _ContactEdit = defineComponent({
7734
7717
  "modelValue": contact.name,
7735
7718
  "onUpdate:modelValue": ($event) => contact.name = $event,
7736
7719
  "clearable": true,
7737
- "label": t$b("name"),
7720
+ "label": t$c("name"),
7738
7721
  "rules": [{
7739
7722
  required: true,
7740
- message: t$b("nameEmpty")
7723
+ message: t$c("nameEmpty")
7741
7724
  }],
7742
7725
  "maxlength": "30",
7743
- "placeholder": t$b("name")
7726
+ "placeholder": t$c("name")
7744
7727
  }, null), createVNode(Field, {
7745
7728
  "modelValue": contact.tel,
7746
7729
  "onUpdate:modelValue": ($event) => contact.tel = $event,
7747
7730
  "clearable": true,
7748
7731
  "type": "tel",
7749
- "label": t$b("tel"),
7732
+ "label": t$c("tel"),
7750
7733
  "rules": [{
7751
7734
  validator: props.telValidator,
7752
- message: t$b("telInvalid")
7735
+ message: t$c("telInvalid")
7753
7736
  }],
7754
- "placeholder": t$b("tel")
7737
+ "placeholder": t$c("tel")
7755
7738
  }, null)]), renderSetDefault(), renderButtons()]
7756
7739
  });
7757
7740
  }
7758
7741
  });
7759
7742
  var ContactEdit = withInstall(_ContactEdit);
7760
- var [name$I, bem$H, t$a] = createNamespace("contact-list");
7743
+ var [name$I, bem$H, t$b] = createNamespace("contact-list");
7761
7744
  var contactListProps = {
7762
7745
  list: Array,
7763
7746
  addText: String,
@@ -7830,7 +7813,7 @@ var _ContactList = defineComponent({
7830
7813
  "block": true,
7831
7814
  "type": "danger",
7832
7815
  "class": bem$H("add"),
7833
- "text": props.addText || t$a("addText"),
7816
+ "text": props.addText || t$b("addText"),
7834
7817
  "onClick": () => emit("add")
7835
7818
  }, null)])]);
7836
7819
  }
@@ -7898,14 +7881,14 @@ var _CountDown = defineComponent({
7898
7881
  start: start2,
7899
7882
  pause,
7900
7883
  reset,
7901
- current
7884
+ current: current2
7902
7885
  } = useCountDown({
7903
7886
  time: +props.time,
7904
7887
  millisecond: props.millisecond,
7905
- onChange: (current2) => emit("change", current2),
7888
+ onChange: (current3) => emit("change", current3),
7906
7889
  onFinish: () => emit("finish")
7907
7890
  });
7908
- var timeText = computed(() => parseFormat(props.format, current.value));
7891
+ var timeText = computed(() => parseFormat(props.format, current2.value));
7909
7892
  var resetTime = () => {
7910
7893
  reset(+props.time);
7911
7894
  if (props.autoStart) {
@@ -7921,8 +7904,9 @@ var _CountDown = defineComponent({
7921
7904
  reset: resetTime
7922
7905
  });
7923
7906
  return () => createVNode("div", {
7907
+ "role": "timer",
7924
7908
  "class": bem$G()
7925
- }, [slots.default ? slots.default(current.value) : timeText.value]);
7909
+ }, [slots.default ? slots.default(current2.value) : timeText.value]);
7926
7910
  }
7927
7911
  });
7928
7912
  var CountDown = withInstall(_CountDown);
@@ -7932,7 +7916,7 @@ function getDate(timeStamp) {
7932
7916
  }
7933
7917
  var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
7934
7918
  var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
7935
- var [name$G, bem$F, t$9] = createNamespace("coupon");
7919
+ var [name$G, bem$F, t$a] = createNamespace("coupon");
7936
7920
  var _Coupon = defineComponent({
7937
7921
  name: name$G,
7938
7922
  props: {
@@ -7962,13 +7946,13 @@ var _Coupon = defineComponent({
7962
7946
  return [createVNode("span", null, [currency]), " " + denominations];
7963
7947
  }
7964
7948
  if (coupon.discount) {
7965
- return t$9("discount", formatDiscount(coupon.discount));
7949
+ return t$a("discount", formatDiscount(coupon.discount));
7966
7950
  }
7967
7951
  return "";
7968
7952
  });
7969
7953
  var conditionMessage = computed(() => {
7970
7954
  var condition = formatAmount(props.coupon.originCondition || 0);
7971
- return condition === "0" ? t$9("unlimited") : t$9("condition", condition);
7955
+ return condition === "0" ? t$a("unlimited") : t$a("condition", condition);
7972
7956
  });
7973
7957
  return () => {
7974
7958
  var {
@@ -8005,7 +7989,7 @@ var _Coupon = defineComponent({
8005
7989
  }
8006
7990
  });
8007
7991
  var Coupon = withInstall(_Coupon);
8008
- var [name$F, bem$E, t$8] = createNamespace("coupon-cell");
7992
+ var [name$F, bem$E, t$9] = createNamespace("coupon-cell");
8009
7993
  var couponCellProps = {
8010
7994
  title: String,
8011
7995
  border: truthProp,
@@ -8032,7 +8016,7 @@ function formatValue(_ref) {
8032
8016
  }
8033
8017
  return "-" + currency + " " + (value / 100).toFixed(2);
8034
8018
  }
8035
- return coupons.length === 0 ? t$8("noCoupon") : t$8("count", coupons.length);
8019
+ return coupons.length === 0 ? t$9("noCoupon") : t$9("count", coupons.length);
8036
8020
  }
8037
8021
  var _CouponCell = defineComponent({
8038
8022
  name: name$F,
@@ -8043,7 +8027,7 @@ var _CouponCell = defineComponent({
8043
8027
  return createVNode(Cell, {
8044
8028
  "class": bem$E(),
8045
8029
  "value": formatValue(props),
8046
- "title": props.title || t$8("title"),
8030
+ "title": props.title || t$9("title"),
8047
8031
  "border": props.border,
8048
8032
  "isLink": props.editable,
8049
8033
  "valueClass": bem$E("value", {
@@ -8054,7 +8038,7 @@ var _CouponCell = defineComponent({
8054
8038
  }
8055
8039
  });
8056
8040
  var CouponCell = withInstall(_CouponCell);
8057
- var [name$E, bem$D, t$7] = createNamespace("coupon-list");
8041
+ var [name$E, bem$D, t$8] = createNamespace("coupon-list");
8058
8042
  var EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
8059
8043
  var couponListProps = {
8060
8044
  code: makeStringProp(""),
@@ -8086,46 +8070,53 @@ var _CouponList = defineComponent({
8086
8070
  slots
8087
8071
  } = _ref;
8088
8072
  var [couponRefs, setCouponRefs] = useRefs();
8089
- var state = reactive({
8090
- tab: 0,
8091
- code: props.code
8092
- });
8093
- var buttonDisabled = computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !state.code || state.code.length < props.exchangeMinLength));
8073
+ var root = ref();
8074
+ var barRef = ref();
8075
+ var activeTab = ref(0);
8076
+ var listHeight = ref(0);
8077
+ var currentCode = ref(props.code);
8078
+ var buttonDisabled = computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !currentCode.value || currentCode.value.length < props.exchangeMinLength));
8079
+ var updateListHeight = () => {
8080
+ var TABS_HEIGHT = 44;
8081
+ var rootHeight = useRect(root).height;
8082
+ var headerHeight = useRect(barRef).height + TABS_HEIGHT;
8083
+ listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight.value) - headerHeight;
8084
+ };
8094
8085
  var onExchange = () => {
8095
- emit("exchange", state.code);
8086
+ emit("exchange", currentCode.value);
8096
8087
  if (!props.code) {
8097
- state.code = "";
8088
+ currentCode.value = "";
8098
8089
  }
8099
8090
  };
8100
8091
  var scrollToCoupon = (index2) => {
8101
8092
  nextTick(() => {
8102
- if (couponRefs.value[index2]) {
8103
- couponRefs.value[index2].scrollIntoView();
8104
- }
8093
+ var _couponRefs$value$ind;
8094
+ return (_couponRefs$value$ind = couponRefs.value[index2]) == null ? void 0 : _couponRefs$value$ind.scrollIntoView();
8105
8095
  });
8106
8096
  };
8107
8097
  var renderEmpty = () => createVNode("div", {
8108
8098
  "class": bem$D("empty")
8109
8099
  }, [createVNode("img", {
8110
8100
  "src": props.emptyImage
8111
- }, null), createVNode("p", null, [t$7("noCoupon")])]);
8101
+ }, null), createVNode("p", null, [t$8("noCoupon")])]);
8112
8102
  var renderExchangeBar = () => {
8113
8103
  if (props.showExchangeBar) {
8114
8104
  return createVNode("div", {
8105
+ "ref": barRef,
8115
8106
  "class": bem$D("exchange-bar")
8116
8107
  }, [createVNode(Field, {
8117
- "modelValue": state.code,
8118
- "onUpdate:modelValue": ($event) => state.code = $event,
8108
+ "modelValue": currentCode.value,
8109
+ "onUpdate:modelValue": ($event) => currentCode.value = $event,
8119
8110
  "clearable": true,
8120
8111
  "border": false,
8121
8112
  "class": bem$D("field"),
8122
- "placeholder": props.inputPlaceholder || t$7("placeholder"),
8113
+ "placeholder": props.inputPlaceholder || t$8("placeholder"),
8123
8114
  "maxlength": "20"
8124
8115
  }, null), createVNode(Button, {
8125
8116
  "plain": true,
8126
8117
  "type": "danger",
8127
8118
  "class": bem$D("exchange"),
8128
- "text": props.exchangeButtonText || t$7("exchange"),
8119
+ "text": props.exchangeButtonText || t$8("exchange"),
8129
8120
  "loading": props.exchangeButtonLoading,
8130
8121
  "disabled": buttonDisabled.value,
8131
8122
  "onClick": onExchange
@@ -8138,15 +8129,17 @@ var _CouponList = defineComponent({
8138
8129
  coupons
8139
8130
  } = props;
8140
8131
  var count = props.showCount ? " (" + coupons.length + ")" : "";
8141
- var title = (props.enabledTitle || t$7("enable")) + count;
8132
+ var title = (props.enabledTitle || t$8("enable")) + count;
8142
8133
  return createVNode(Tab, {
8143
8134
  "title": title
8144
8135
  }, {
8145
8136
  default: () => [createVNode("div", {
8146
8137
  "class": bem$D("list", {
8147
- "with-bar": props.showExchangeBar,
8148
8138
  "with-bottom": props.showCloseButton
8149
- })
8139
+ }),
8140
+ "style": {
8141
+ height: listHeight.value + "px"
8142
+ }
8150
8143
  }, [coupons.map((coupon, index2) => createVNode(Coupon, {
8151
8144
  "key": coupon.id,
8152
8145
  "ref": setCouponRefs(index2),
@@ -8163,15 +8156,17 @@ var _CouponList = defineComponent({
8163
8156
  disabledCoupons
8164
8157
  } = props;
8165
8158
  var count = props.showCount ? " (" + disabledCoupons.length + ")" : "";
8166
- var title = (props.disabledTitle || t$7("disabled")) + count;
8159
+ var title = (props.disabledTitle || t$8("disabled")) + count;
8167
8160
  return createVNode(Tab, {
8168
8161
  "title": title
8169
8162
  }, {
8170
8163
  default: () => [createVNode("div", {
8171
8164
  "class": bem$D("list", {
8172
- "with-bar": props.showExchangeBar,
8173
8165
  "with-bottom": props.showCloseButton
8174
- })
8166
+ }),
8167
+ "style": {
8168
+ height: listHeight.value + "px"
8169
+ }
8175
8170
  }, [disabledCoupons.map((coupon) => createVNode(Coupon, {
8176
8171
  "disabled": true,
8177
8172
  "key": coupon.id,
@@ -8181,20 +8176,22 @@ var _CouponList = defineComponent({
8181
8176
  });
8182
8177
  };
8183
8178
  watch(() => props.code, (value) => {
8184
- state.code = value;
8179
+ currentCode.value = value;
8185
8180
  });
8186
- watch(() => state.code, (value) => emit("update:code", value));
8181
+ watch(windowHeight, updateListHeight);
8182
+ watch(currentCode, (value) => emit("update:code", value));
8187
8183
  watch(() => props.displayedCouponIndex, scrollToCoupon);
8188
8184
  onMounted(() => {
8185
+ updateListHeight();
8189
8186
  scrollToCoupon(props.displayedCouponIndex);
8190
8187
  });
8191
8188
  return () => createVNode("div", {
8189
+ "ref": root,
8192
8190
  "class": bem$D()
8193
8191
  }, [renderExchangeBar(), createVNode(Tabs, {
8194
- "active": state.tab,
8195
- "onUpdate:active": ($event) => state.tab = $event,
8196
- "class": bem$D("tab"),
8197
- "border": false
8192
+ "active": activeTab.value,
8193
+ "onUpdate:active": ($event) => activeTab.value = $event,
8194
+ "class": bem$D("tab")
8198
8195
  }, {
8199
8196
  default: () => [renderCouponTab(), renderDisabledTab()]
8200
8197
  }), createVNode("div", {
@@ -8204,7 +8201,7 @@ var _CouponList = defineComponent({
8204
8201
  "block": true,
8205
8202
  "type": "danger",
8206
8203
  "class": bem$D("close"),
8207
- "text": props.closeButtonText || t$7("close"),
8204
+ "text": props.closeButtonText || t$8("close"),
8208
8205
  "onClick": () => emit("change", -1)
8209
8206
  }, null), [[vShow, props.showCloseButton]])])]);
8210
8207
  }
@@ -8596,7 +8593,7 @@ var _DatetimePicker = defineComponent({
8596
8593
  }
8597
8594
  });
8598
8595
  var DatetimePicker = withInstall(_DatetimePicker);
8599
- var [name$A, bem$B, t$6] = createNamespace("dialog");
8596
+ var [name$A, bem$B, t$7] = createNamespace("dialog");
8600
8597
  var dialogProps = extend({}, popupSharedProps, {
8601
8598
  title: String,
8602
8599
  theme: String,
@@ -8714,7 +8711,7 @@ var VanDialog = defineComponent({
8714
8711
  "class": [BORDER_TOP, bem$B("footer")]
8715
8712
  }, [props.showCancelButton && createVNode(Button, {
8716
8713
  "size": "large",
8717
- "text": props.cancelButtonText || t$6("cancel"),
8714
+ "text": props.cancelButtonText || t$7("cancel"),
8718
8715
  "class": bem$B("cancel"),
8719
8716
  "style": {
8720
8717
  color: props.cancelButtonColor
@@ -8723,7 +8720,7 @@ var VanDialog = defineComponent({
8723
8720
  "onClick": onCancel
8724
8721
  }, null), props.showConfirmButton && createVNode(Button, {
8725
8722
  "size": "large",
8726
- "text": props.confirmButtonText || t$6("confirm"),
8723
+ "text": props.confirmButtonText || t$7("confirm"),
8727
8724
  "class": [bem$B("confirm"), {
8728
8725
  [BORDER_LEFT]: props.showCancelButton
8729
8726
  }],
@@ -8738,14 +8735,14 @@ var VanDialog = defineComponent({
8738
8735
  }, {
8739
8736
  default: () => [props.showCancelButton && createVNode(ActionBarButton, {
8740
8737
  "type": "warning",
8741
- "text": props.cancelButtonText || t$6("cancel"),
8738
+ "text": props.cancelButtonText || t$7("cancel"),
8742
8739
  "class": bem$B("cancel"),
8743
8740
  "color": props.cancelButtonColor,
8744
8741
  "loading": loading.cancel,
8745
8742
  "onClick": onCancel
8746
8743
  }, null), props.showConfirmButton && createVNode(ActionBarButton, {
8747
8744
  "type": "danger",
8748
- "text": props.confirmButtonText || t$6("confirm"),
8745
+ "text": props.confirmButtonText || t$7("confirm"),
8749
8746
  "class": bem$B("confirm"),
8750
8747
  "color": props.confirmButtonColor,
8751
8748
  "loading": loading.confirm,
@@ -8900,6 +8897,7 @@ var _DropdownMenu = defineComponent({
8900
8897
  var {
8901
8898
  slots
8902
8899
  } = _ref;
8900
+ var id = useId();
8903
8901
  var root = ref();
8904
8902
  var barRef = ref();
8905
8903
  var offset2 = ref(0);
@@ -8929,7 +8927,7 @@ var _DropdownMenu = defineComponent({
8929
8927
  if (props.direction === "down") {
8930
8928
  offset2.value = rect.bottom;
8931
8929
  } else {
8932
- offset2.value = window.innerHeight - rect.top;
8930
+ offset2.value = windowHeight.value - rect.top;
8933
8931
  }
8934
8932
  }
8935
8933
  };
@@ -8959,8 +8957,9 @@ var _DropdownMenu = defineComponent({
8959
8957
  titleClass
8960
8958
  } = item;
8961
8959
  return createVNode("div", {
8960
+ "id": id + "-" + index2,
8962
8961
  "role": "button",
8963
- "tabindex": disabled ? -1 : 0,
8962
+ "tabindex": disabled ? void 0 : 0,
8964
8963
  "class": [bem$z("item", {
8965
8964
  disabled
8966
8965
  }), {
@@ -8984,6 +8983,7 @@ var _DropdownMenu = defineComponent({
8984
8983
  }, [item.renderTitle()])])]);
8985
8984
  };
8986
8985
  linkChildren({
8986
+ id,
8987
8987
  props,
8988
8988
  offset: offset2
8989
8989
  });
@@ -9028,7 +9028,8 @@ var _DropdownItem = defineComponent({
9028
9028
  showWrapper: false
9029
9029
  });
9030
9030
  var {
9031
- parent
9031
+ parent,
9032
+ index: index2
9032
9033
  } = useParent(DROPDOWN_KEY);
9033
9034
  if (!parent) {
9034
9035
  return;
@@ -9094,7 +9095,7 @@ var _DropdownItem = defineComponent({
9094
9095
  }
9095
9096
  };
9096
9097
  return createVNode(Cell, {
9097
- "clickable": true,
9098
+ "role": "menuitem",
9098
9099
  "key": option.value,
9099
9100
  "icon": option.icon,
9100
9101
  "title": option.text,
@@ -9104,6 +9105,8 @@ var _DropdownItem = defineComponent({
9104
9105
  "style": {
9105
9106
  color: active ? activeColor : ""
9106
9107
  },
9108
+ "tabindex": active ? 0 : -1,
9109
+ "clickable": true,
9107
9110
  "onClick": onClick
9108
9111
  }, {
9109
9112
  value: renderIcon
@@ -9133,6 +9136,7 @@ var _DropdownItem = defineComponent({
9133
9136
  }, [createVNode(Popup, {
9134
9137
  "show": state.showPopup,
9135
9138
  "onUpdate:show": ($event) => state.showPopup = $event,
9139
+ "role": "menu",
9136
9140
  "class": bem$y("content"),
9137
9141
  "overlay": overlay,
9138
9142
  "position": direction === "down" ? "top" : "bottom",
@@ -9141,6 +9145,7 @@ var _DropdownItem = defineComponent({
9141
9145
  "overlayStyle": {
9142
9146
  position: "absolute"
9143
9147
  },
9148
+ "aria-labelledby": parent.id + "-" + index2.value,
9144
9149
  "closeOnClickOverlay": closeOnClickOverlay,
9145
9150
  "onOpen": onOpen,
9146
9151
  "onClose": onClose,
@@ -9179,71 +9184,59 @@ var Network = createVNode("svg", {
9179
9184
  "viewBox": "0 0 160 160"
9180
9185
  }, [createVNode("defs", null, [createVNode("linearGradient", {
9181
9186
  "id": prefix + "1",
9182
- "x1": "64.022%",
9187
+ "x1": "64%",
9183
9188
  "y1": "100%",
9184
- "x2": "64.022%"
9189
+ "x2": "64%"
9185
9190
  }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
9186
9191
  "id": prefix + "2",
9187
9192
  "x1": "50%",
9188
9193
  "x2": "50%",
9189
- "y2": "84.459%"
9194
+ "y2": "84%"
9190
9195
  }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
9191
9196
  "id": prefix + "3",
9192
9197
  "x1": "100%",
9193
9198
  "x2": "100%",
9194
9199
  "y2": "100%"
9195
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("linearGradient", {
9196
- "id": prefix + "4",
9197
- "x1": "100%",
9198
- "y1": "100%",
9199
- "x2": "100%"
9200
9200
  }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
9201
- "id": prefix + "5",
9201
+ "id": prefix + "4",
9202
9202
  "cx": "50%",
9203
9203
  "cy": "0%",
9204
9204
  "fx": "50%",
9205
9205
  "fy": "0%",
9206
9206
  "r": "100%",
9207
- "gradientTransform": "matrix(0 1 -.54835 0 .5 -.5)"
9207
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
9208
9208
  }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
9209
9209
  "fill": "none"
9210
9210
  }, [createVNode("g", {
9211
9211
  "opacity": ".8"
9212
9212
  }, [createVNode("path", {
9213
- "d": "M0 124V46h20v20h14v58H0z",
9214
- "fill": "url(#" + prefix + "1)",
9215
- "transform": "matrix(-1 0 0 1 36 7)"
9213
+ "d": "M36 131V53H16v20H2v58h34z",
9214
+ "fill": "url(#" + prefix + "1)"
9216
9215
  }, null), createVNode("path", {
9217
- "d": "M121 8h22.231v14H152v77.37h-31V8z",
9218
- "fill": "url(#" + prefix + "1)",
9219
- "transform": "translate(2 7)"
9216
+ "d": "M123 15h22v14h9v77h-31V15z",
9217
+ "fill": "url(#" + prefix + "1)"
9220
9218
  }, null)]), createVNode("path", {
9221
- "fill": "url(#" + prefix + "5)",
9219
+ "fill": "url(#" + prefix + "4)",
9222
9220
  "d": "M0 139h160v21H0z"
9223
9221
  }, null), createVNode("path", {
9224
- "d": "M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z",
9225
- "fill": "url(#" + prefix + "2)",
9226
- "transform": "translate(43 36)"
9222
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
9223
+ "fill": "url(#" + prefix + "2)"
9227
9224
  }, null), createVNode("g", {
9228
9225
  "opacity": ".6",
9229
9226
  "stroke-linecap": "round",
9230
9227
  "stroke-width": "7"
9231
9228
  }, [createVNode("path", {
9232
- "d": "M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",
9233
- "stroke": "url(#" + prefix + "3)",
9234
- "transform": "translate(43 36)"
9229
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
9230
+ "stroke": "url(#" + prefix + "3)"
9235
9231
  }, null), createVNode("path", {
9236
- "d": "M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",
9237
- "stroke": "url(#" + prefix + "3)",
9238
- "transform": "translate(43 36)"
9232
+ "d": "M53 36a34 34 0 0 0 0 48",
9233
+ "stroke": "url(#" + prefix + "3)"
9239
9234
  }, null), createVNode("path", {
9240
- "d": "M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",
9241
- "stroke": "url(#" + prefix + "4)",
9242
- "transform": "rotate(-180 76.483 42.257)"
9235
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
9236
+ "stroke": "url(#" + prefix + "3)"
9243
9237
  }, null), createVNode("path", {
9244
- "d": "M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145",
9245
- "stroke": "url(#" + prefix + "4)",
9246
- "transform": "rotate(-180 89.791 42.146)"
9238
+ "d": "M106 84a34 34 0 0 0 0-48",
9239
+ "stroke": "url(#" + prefix + "3)"
9247
9240
  }, null)]), createVNode("g", {
9248
9241
  "transform": "translate(31 105)"
9249
9242
  }, [createVNode("rect", {
@@ -9257,14 +9250,14 @@ var Network = createVNode("svg", {
9257
9250
  "y": "8",
9258
9251
  "width": "80",
9259
9252
  "height": "18",
9260
- "rx": "1.114"
9253
+ "rx": "1.1"
9261
9254
  }, null), createVNode("rect", {
9262
9255
  "fill": "#EBEDF0",
9263
9256
  "x": "15",
9264
9257
  "y": "12",
9265
9258
  "width": "18",
9266
9259
  "height": "6",
9267
- "rx": "1.114"
9260
+ "rx": "1.1"
9268
9261
  }, null)])])]);
9269
9262
  var [name$w, bem$x] = createNamespace("empty");
9270
9263
  var PRESET_IMAGES = ["error", "search", "default"];
@@ -9752,7 +9745,6 @@ var VanImagePreview = defineComponent({
9752
9745
  slots
9753
9746
  } = _ref;
9754
9747
  var swipeRef = ref();
9755
- var windowSize = useWindowSize();
9756
9748
  var state = reactive({
9757
9749
  active: 0,
9758
9750
  rootWidth: 0,
@@ -9838,7 +9830,7 @@ var VanImagePreview = defineComponent({
9838
9830
  swipeTo
9839
9831
  });
9840
9832
  onMounted(resize);
9841
- watch([windowSize.width, windowSize.height], resize);
9833
+ watch([windowWidth, windowHeight], resize);
9842
9834
  watch(() => props.startPosition, (value) => setActive(+value));
9843
9835
  watch(() => props.show, (value) => {
9844
9836
  var {
@@ -10318,8 +10310,7 @@ function off(el, type, func) {
10318
10310
  var loadImageAsync = (item, resolve, reject) => {
10319
10311
  var image = new Image();
10320
10312
  if (!item || !item.src) {
10321
- var err = new Error("image src is required");
10322
- return reject(err);
10313
+ return reject(new Error("image src is required"));
10323
10314
  }
10324
10315
  image.src = item.src;
10325
10316
  if (item.cors) {
@@ -10332,11 +10323,6 @@ var loadImageAsync = (item, resolve, reject) => {
10332
10323
  });
10333
10324
  image.onerror = (e) => reject(e);
10334
10325
  };
10335
- function isObject(obj) {
10336
- return obj !== null && typeof obj === "object";
10337
- }
10338
- function noop() {
10339
- }
10340
10326
  class ImageCache {
10341
10327
  constructor(_ref) {
10342
10328
  var {
@@ -10345,21 +10331,21 @@ class ImageCache {
10345
10331
  this.options = {
10346
10332
  max: max || 100
10347
10333
  };
10348
- this._caches = [];
10334
+ this.caches = [];
10349
10335
  }
10350
10336
  has(key) {
10351
- return this._caches.indexOf(key) > -1;
10337
+ return this.caches.indexOf(key) > -1;
10352
10338
  }
10353
10339
  add(key) {
10354
10340
  if (this.has(key))
10355
10341
  return;
10356
- this._caches.push(key);
10357
- if (this._caches.length > this.options.max) {
10342
+ this.caches.push(key);
10343
+ if (this.caches.length > this.options.max) {
10358
10344
  this.free();
10359
10345
  }
10360
10346
  }
10361
10347
  free() {
10362
- this._caches.shift();
10348
+ this.caches.shift();
10363
10349
  }
10364
10350
  }
10365
10351
  class ReactiveListener {
@@ -10386,10 +10372,9 @@ class ReactiveListener {
10386
10372
  this.naturalHeight = 0;
10387
10373
  this.naturalWidth = 0;
10388
10374
  this.options = options;
10389
- this.rect = null;
10390
10375
  this.$parent = $parent;
10391
10376
  this.elRenderer = elRenderer;
10392
- this._imageCache = imageCache;
10377
+ this.imageCache = imageCache;
10393
10378
  this.performanceData = {
10394
10379
  loadStart: 0,
10395
10380
  loadEnd: 0
@@ -10430,12 +10415,9 @@ class ReactiveListener {
10430
10415
  this.initState();
10431
10416
  }
10432
10417
  }
10433
- getRect() {
10434
- this.rect = this.el.getBoundingClientRect();
10435
- }
10436
10418
  checkInView() {
10437
- this.getRect();
10438
- return this.rect.top < window.innerHeight * this.options.preLoad && this.rect.bottom > this.options.preLoadTop && this.rect.left < window.innerWidth * this.options.preLoad && this.rect.right > 0;
10419
+ var rect = useRect(this.el);
10420
+ return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
10439
10421
  }
10440
10422
  filter() {
10441
10423
  Object.keys(this.options.filter).forEach((key) => {
@@ -10466,7 +10448,7 @@ class ReactiveListener {
10466
10448
  }
10467
10449
  if (this.state.rendered && this.state.loaded)
10468
10450
  return;
10469
- if (this._imageCache.has(this.src)) {
10451
+ if (this.imageCache.has(this.src)) {
10470
10452
  this.state.loaded = true;
10471
10453
  this.render("loaded", true);
10472
10454
  this.state.rendered = true;
@@ -10488,7 +10470,7 @@ class ReactiveListener {
10488
10470
  this.record("loadEnd");
10489
10471
  this.render("loaded", false);
10490
10472
  this.state.rendered = true;
10491
- this._imageCache.add(this.src);
10473
+ this.imageCache.add(this.src);
10492
10474
  onFinish();
10493
10475
  }, (err) => {
10494
10476
  !this.options.silent && console.error(err);
@@ -10551,9 +10533,9 @@ function Lazy() {
10551
10533
  observerOptions
10552
10534
  } = _ref;
10553
10535
  this.mode = modeType.event;
10554
- this.ListenerQueue = [];
10555
- this.TargetIndex = 0;
10556
- this.TargetQueue = [];
10536
+ this.listeners = [];
10537
+ this.targetIndex = 0;
10538
+ this.targets = [];
10557
10539
  this.options = {
10558
10540
  silent,
10559
10541
  dispatchEvent: !!dispatchEvent,
@@ -10565,18 +10547,17 @@ function Lazy() {
10565
10547
  attempt: attempt || 3,
10566
10548
  scale: scale || getDPR(scale),
10567
10549
  ListenEvents: listenEvents || DEFAULT_EVENTS,
10568
- hasbind: false,
10569
10550
  supportWebp: supportWebp(),
10570
10551
  filter: filter || {},
10571
10552
  adapter: adapter || {},
10572
10553
  observer: !!observer,
10573
10554
  observerOptions: observerOptions || DEFAULT_OBSERVER_OPTIONS
10574
10555
  };
10575
- this._initEvent();
10576
- this._imageCache = new ImageCache({
10556
+ this.initEvent();
10557
+ this.imageCache = new ImageCache({
10577
10558
  max: 200
10578
10559
  });
10579
- this.lazyLoadHandler = throttle(this._lazyLoadHandler.bind(this), this.options.throttleWait);
10560
+ this.lazyLoadHandler = throttle(this.lazyLoadHandler.bind(this), this.options.throttleWait);
10580
10561
  this.setMode(this.options.observer ? modeType.observer : modeType.event);
10581
10562
  }
10582
10563
  config(options) {
@@ -10586,30 +10567,30 @@ function Lazy() {
10586
10567
  Object.assign(this.options, options);
10587
10568
  }
10588
10569
  performance() {
10589
- return this.ListenerQueue.map((item) => item.performance());
10570
+ return this.listeners.map((item) => item.performance());
10590
10571
  }
10591
10572
  addLazyBox(vm) {
10592
- this.ListenerQueue.push(vm);
10573
+ this.listeners.push(vm);
10593
10574
  if (inBrowser) {
10594
- this._addListenerTarget(window);
10595
- this._observer && this._observer.observe(vm.el);
10575
+ this.addListenerTarget(window);
10576
+ this.observer && this.observer.observe(vm.el);
10596
10577
  if (vm.$el && vm.$el.parentNode) {
10597
- this._addListenerTarget(vm.$el.parentNode);
10578
+ this.addListenerTarget(vm.$el.parentNode);
10598
10579
  }
10599
10580
  }
10600
10581
  }
10601
10582
  add(el, binding, vnode) {
10602
- if (this.ListenerQueue.some((item) => item.el === el)) {
10583
+ if (this.listeners.some((item) => item.el === el)) {
10603
10584
  this.update(el, binding);
10604
10585
  return nextTick(this.lazyLoadHandler);
10605
10586
  }
10606
- var value = this._valueFormatter(binding.value);
10587
+ var value = this.valueFormatter(binding.value);
10607
10588
  var {
10608
10589
  src
10609
10590
  } = value;
10610
10591
  nextTick(() => {
10611
10592
  src = getBestSelectionFromSrcset(el, this.options.scale) || src;
10612
- this._observer && this._observer.observe(el);
10593
+ this.observer && this.observer.observe(el);
10613
10594
  var container = Object.keys(binding.modifiers)[0];
10614
10595
  var $parent;
10615
10596
  if (container) {
@@ -10627,26 +10608,26 @@ function Lazy() {
10627
10608
  loading: value.loading,
10628
10609
  error: value.error,
10629
10610
  cors: value.cors,
10630
- elRenderer: this._elRenderer.bind(this),
10611
+ elRenderer: this.elRenderer.bind(this),
10631
10612
  options: this.options,
10632
- imageCache: this._imageCache
10613
+ imageCache: this.imageCache
10633
10614
  });
10634
- this.ListenerQueue.push(newListener);
10615
+ this.listeners.push(newListener);
10635
10616
  if (inBrowser) {
10636
- this._addListenerTarget(window);
10637
- this._addListenerTarget($parent);
10617
+ this.addListenerTarget(window);
10618
+ this.addListenerTarget($parent);
10638
10619
  }
10639
10620
  this.lazyLoadHandler();
10640
10621
  nextTick(() => this.lazyLoadHandler());
10641
10622
  });
10642
10623
  }
10643
10624
  update(el, binding, vnode) {
10644
- var value = this._valueFormatter(binding.value);
10625
+ var value = this.valueFormatter(binding.value);
10645
10626
  var {
10646
10627
  src
10647
10628
  } = value;
10648
10629
  src = getBestSelectionFromSrcset(el, this.options.scale) || src;
10649
- var exist = this.ListenerQueue.find((item) => item.el === el);
10630
+ var exist = this.listeners.find((item) => item.el === el);
10650
10631
  if (!exist) {
10651
10632
  this.add(el, binding, vnode);
10652
10633
  } else {
@@ -10656,9 +10637,9 @@ function Lazy() {
10656
10637
  loading: value.loading
10657
10638
  });
10658
10639
  }
10659
- if (this._observer) {
10660
- this._observer.unobserve(el);
10661
- this._observer.observe(el);
10640
+ if (this.observer) {
10641
+ this.observer.unobserve(el);
10642
+ this.observer.observe(el);
10662
10643
  }
10663
10644
  this.lazyLoadHandler();
10664
10645
  nextTick(() => this.lazyLoadHandler());
@@ -10666,24 +10647,24 @@ function Lazy() {
10666
10647
  remove(el) {
10667
10648
  if (!el)
10668
10649
  return;
10669
- this._observer && this._observer.unobserve(el);
10670
- var existItem = this.ListenerQueue.find((item) => item.el === el);
10650
+ this.observer && this.observer.unobserve(el);
10651
+ var existItem = this.listeners.find((item) => item.el === el);
10671
10652
  if (existItem) {
10672
- this._removeListenerTarget(existItem.$parent);
10673
- this._removeListenerTarget(window);
10674
- remove(this.ListenerQueue, existItem);
10653
+ this.removeListenerTarget(existItem.$parent);
10654
+ this.removeListenerTarget(window);
10655
+ remove(this.listeners, existItem);
10675
10656
  existItem.$destroy();
10676
10657
  }
10677
10658
  }
10678
10659
  removeComponent(vm) {
10679
10660
  if (!vm)
10680
10661
  return;
10681
- remove(this.ListenerQueue, vm);
10682
- this._observer && this._observer.unobserve(vm.el);
10662
+ remove(this.listeners, vm);
10663
+ this.observer && this.observer.unobserve(vm.el);
10683
10664
  if (vm.$parent && vm.$el.parentNode) {
10684
- this._removeListenerTarget(vm.$el.parentNode);
10665
+ this.removeListenerTarget(vm.$el.parentNode);
10685
10666
  }
10686
- this._removeListenerTarget(window);
10667
+ this.removeListenerTarget(window);
10687
10668
  }
10688
10669
  setMode(mode) {
10689
10670
  if (!hasIntersectionObserver && mode === modeType.observer) {
@@ -10691,56 +10672,56 @@ function Lazy() {
10691
10672
  }
10692
10673
  this.mode = mode;
10693
10674
  if (mode === modeType.event) {
10694
- if (this._observer) {
10695
- this.ListenerQueue.forEach((listener) => {
10696
- this._observer.unobserve(listener.el);
10675
+ if (this.observer) {
10676
+ this.listeners.forEach((listener) => {
10677
+ this.observer.unobserve(listener.el);
10697
10678
  });
10698
- this._observer = null;
10679
+ this.observer = null;
10699
10680
  }
10700
- this.TargetQueue.forEach((target) => {
10701
- this._initListen(target.el, true);
10681
+ this.targets.forEach((target) => {
10682
+ this.initListen(target.el, true);
10702
10683
  });
10703
10684
  } else {
10704
- this.TargetQueue.forEach((target) => {
10705
- this._initListen(target.el, false);
10685
+ this.targets.forEach((target) => {
10686
+ this.initListen(target.el, false);
10706
10687
  });
10707
- this._initIntersectionObserver();
10688
+ this.initIntersectionObserver();
10708
10689
  }
10709
10690
  }
10710
- _addListenerTarget(el) {
10691
+ addListenerTarget(el) {
10711
10692
  if (!el)
10712
10693
  return;
10713
- var target = this.TargetQueue.find((target2) => target2.el === el);
10694
+ var target = this.targets.find((target2) => target2.el === el);
10714
10695
  if (!target) {
10715
10696
  target = {
10716
10697
  el,
10717
- id: ++this.TargetIndex,
10698
+ id: ++this.targetIndex,
10718
10699
  childrenCount: 1,
10719
10700
  listened: true
10720
10701
  };
10721
- this.mode === modeType.event && this._initListen(target.el, true);
10722
- this.TargetQueue.push(target);
10702
+ this.mode === modeType.event && this.initListen(target.el, true);
10703
+ this.targets.push(target);
10723
10704
  } else {
10724
10705
  target.childrenCount++;
10725
10706
  }
10726
- return this.TargetIndex;
10707
+ return this.targetIndex;
10727
10708
  }
10728
- _removeListenerTarget(el) {
10729
- this.TargetQueue.forEach((target, index2) => {
10709
+ removeListenerTarget(el) {
10710
+ this.targets.forEach((target, index2) => {
10730
10711
  if (target.el === el) {
10731
10712
  target.childrenCount--;
10732
10713
  if (!target.childrenCount) {
10733
- this._initListen(target.el, false);
10734
- this.TargetQueue.splice(index2, 1);
10714
+ this.initListen(target.el, false);
10715
+ this.targets.splice(index2, 1);
10735
10716
  target = null;
10736
10717
  }
10737
10718
  }
10738
10719
  });
10739
10720
  }
10740
- _initListen(el, start2) {
10721
+ initListen(el, start2) {
10741
10722
  this.options.ListenEvents.forEach((evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler));
10742
10723
  }
10743
- _initEvent() {
10724
+ initEvent() {
10744
10725
  var _this = this;
10745
10726
  this.Event = {
10746
10727
  listeners: {
@@ -10779,9 +10760,9 @@ function Lazy() {
10779
10760
  this.Event.listeners[event].forEach((func) => func(context, inCache));
10780
10761
  };
10781
10762
  }
10782
- _lazyLoadHandler() {
10763
+ lazyLoadHandler() {
10783
10764
  var freeList = [];
10784
- this.ListenerQueue.forEach((listener) => {
10765
+ this.listeners.forEach((listener) => {
10785
10766
  if (!listener.el || !listener.el.parentNode) {
10786
10767
  freeList.push(listener);
10787
10768
  }
@@ -10791,35 +10772,35 @@ function Lazy() {
10791
10772
  listener.load();
10792
10773
  });
10793
10774
  freeList.forEach((item) => {
10794
- remove(this.ListenerQueue, item);
10775
+ remove(this.listeners, item);
10795
10776
  item.$destroy();
10796
10777
  });
10797
10778
  }
10798
- _initIntersectionObserver() {
10779
+ initIntersectionObserver() {
10799
10780
  if (!hasIntersectionObserver) {
10800
10781
  return;
10801
10782
  }
10802
- this._observer = new IntersectionObserver(this._observerHandler.bind(this), this.options.observerOptions);
10803
- if (this.ListenerQueue.length) {
10804
- this.ListenerQueue.forEach((listener) => {
10805
- this._observer.observe(listener.el);
10783
+ this.observer = new IntersectionObserver(this.observerHandler.bind(this), this.options.observerOptions);
10784
+ if (this.listeners.length) {
10785
+ this.listeners.forEach((listener) => {
10786
+ this.observer.observe(listener.el);
10806
10787
  });
10807
10788
  }
10808
10789
  }
10809
- _observerHandler(entries) {
10790
+ observerHandler(entries) {
10810
10791
  entries.forEach((entry) => {
10811
10792
  if (entry.isIntersecting) {
10812
- this.ListenerQueue.forEach((listener) => {
10793
+ this.listeners.forEach((listener) => {
10813
10794
  if (listener.el === entry.target) {
10814
10795
  if (listener.state.loaded)
10815
- return this._observer.unobserve(listener.el);
10796
+ return this.observer.unobserve(listener.el);
10816
10797
  listener.load();
10817
10798
  }
10818
10799
  });
10819
10800
  }
10820
10801
  });
10821
10802
  }
10822
- _elRenderer(listener, state, cache) {
10803
+ elRenderer(listener, state, cache) {
10823
10804
  if (!listener.el)
10824
10805
  return;
10825
10806
  var {
@@ -10855,7 +10836,7 @@ function Lazy() {
10855
10836
  el.dispatchEvent(event);
10856
10837
  }
10857
10838
  }
10858
- _valueFormatter(value) {
10839
+ valueFormatter(value) {
10859
10840
  var src = value;
10860
10841
  var {
10861
10842
  loading,
@@ -10893,7 +10874,6 @@ var LazyComponent = (lazy) => ({
10893
10874
  state: {
10894
10875
  loaded: false
10895
10876
  },
10896
- rect: {},
10897
10877
  show: false
10898
10878
  };
10899
10879
  },
@@ -10906,12 +10886,9 @@ var LazyComponent = (lazy) => ({
10906
10886
  lazy.removeComponent(this);
10907
10887
  },
10908
10888
  methods: {
10909
- getRect() {
10910
- this.rect = this.$el.getBoundingClientRect();
10911
- },
10912
10889
  checkInView() {
10913
- this.getRect();
10914
- return inBrowser && this.rect.top < window.innerHeight * lazy.options.preLoad && this.rect.bottom > 0 && this.rect.left < window.innerWidth * lazy.options.preLoad && this.rect.right > 0;
10890
+ var rect = useRect(this.$el);
10891
+ return inBrowser && rect.top < window.innerHeight * lazy.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazy.options.preLoad && rect.right > 0;
10915
10892
  },
10916
10893
  load() {
10917
10894
  this.show = true;
@@ -10939,7 +10916,7 @@ class LazyContainer {
10939
10916
  this.binding = binding;
10940
10917
  this.options = {};
10941
10918
  this.lazy = lazy;
10942
- this._queue = [];
10919
+ this.queue = [];
10943
10920
  this.update({
10944
10921
  el,
10945
10922
  binding
@@ -10980,7 +10957,7 @@ class LazyContainerManager {
10980
10957
  lazy
10981
10958
  } = _ref3;
10982
10959
  this.lazy = lazy;
10983
- this._queue = [];
10960
+ this.queue = [];
10984
10961
  }
10985
10962
  bind(el, binding, vnode) {
10986
10963
  var container = new LazyContainer({
@@ -10989,10 +10966,10 @@ class LazyContainerManager {
10989
10966
  vnode,
10990
10967
  lazy: this.lazy
10991
10968
  });
10992
- this._queue.push(container);
10969
+ this.queue.push(container);
10993
10970
  }
10994
10971
  update(el, binding, vnode) {
10995
- var container = this._queue.find((item) => item.el === el);
10972
+ var container = this.queue.find((item) => item.el === el);
10996
10973
  if (!container)
10997
10974
  return;
10998
10975
  container.update({
@@ -11002,11 +10979,11 @@ class LazyContainerManager {
11002
10979
  });
11003
10980
  }
11004
10981
  unbind(el) {
11005
- var container = this._queue.find((item) => item.el === el);
10982
+ var container = this.queue.find((item) => item.el === el);
11006
10983
  if (!container)
11007
10984
  return;
11008
10985
  container.clear();
11009
- remove(this._queue, container);
10986
+ remove(this.queue, container);
11010
10987
  }
11011
10988
  }
11012
10989
  var LazyImage = (lazyManager) => ({
@@ -11038,7 +11015,6 @@ var LazyImage = (lazyManager) => ({
11038
11015
  error: false,
11039
11016
  attempt: 0
11040
11017
  },
11041
- rect: {},
11042
11018
  renderSrc: ""
11043
11019
  };
11044
11020
  },
@@ -11067,19 +11043,16 @@ var LazyImage = (lazyManager) => ({
11067
11043
  src,
11068
11044
  loading,
11069
11045
  error
11070
- } = lazyManager._valueFormatter(this.src);
11046
+ } = lazyManager.valueFormatter(this.src);
11071
11047
  this.state.loaded = false;
11072
11048
  this.options.src = src;
11073
11049
  this.options.error = error;
11074
11050
  this.options.loading = loading;
11075
11051
  this.renderSrc = this.options.loading;
11076
11052
  },
11077
- getRect() {
11078
- this.rect = this.$el.getBoundingClientRect();
11079
- },
11080
11053
  checkInView() {
11081
- this.getRect();
11082
- return inBrowser && this.rect.top < window.innerHeight * lazyManager.options.preLoad && this.rect.bottom > 0 && this.rect.left < window.innerWidth * lazyManager.options.preLoad && this.rect.right > 0;
11054
+ var rect = useRect(this.$el);
11055
+ return rect.top < window.innerHeight * lazyManager.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazyManager.options.preLoad && rect.right > 0;
11083
11056
  },
11084
11057
  load(onFinish) {
11085
11058
  if (onFinish === void 0) {
@@ -11137,7 +11110,7 @@ var Lazyload = {
11137
11110
  });
11138
11111
  }
11139
11112
  };
11140
- var [name$q, bem$q, t$5] = createNamespace("list");
11113
+ var [name$q, bem$q, t$6] = createNamespace("list");
11141
11114
  var listProps = {
11142
11115
  error: Boolean,
11143
11116
  offset: makeNumericProp(300),
@@ -11209,7 +11182,9 @@ var _List = defineComponent({
11209
11182
  var text = slots.error ? slots.error() : props.errorText;
11210
11183
  if (text) {
11211
11184
  return createVNode("div", {
11185
+ "role": "button",
11212
11186
  "class": bem$q("error-text"),
11187
+ "tabindex": 0,
11213
11188
  "onClick": clickErrorText
11214
11189
  }, [text]);
11215
11190
  }
@@ -11222,11 +11197,11 @@ var _List = defineComponent({
11222
11197
  }, [slots.loading ? slots.loading() : createVNode(Loading, {
11223
11198
  "class": bem$q("loading-icon")
11224
11199
  }, {
11225
- default: () => [props.loadingText || t$5("loading")]
11200
+ default: () => [props.loadingText || t$6("loading")]
11226
11201
  })]);
11227
11202
  }
11228
11203
  };
11229
- watch([() => props.loading, () => props.finished, () => props.error], check);
11204
+ watch(() => [props.loading, props.finished, props.error], check);
11230
11205
  if (tabStatus) {
11231
11206
  watch(tabStatus, (tabActive) => {
11232
11207
  if (tabActive) {
@@ -11552,7 +11527,7 @@ var VanNotify = defineComponent({
11552
11527
  });
11553
11528
  var timer;
11554
11529
  var instance;
11555
- var parseOptions = (message) => isObject$1(message) ? message : {
11530
+ var parseOptions = (message) => isObject(message) ? message : {
11556
11531
  message
11557
11532
  };
11558
11533
  function initInstance() {
@@ -11619,14 +11594,14 @@ var CollapseIcon = createVNode("svg", {
11619
11594
  "class": bem$m("collapse-icon"),
11620
11595
  "viewBox": "0 0 30 24"
11621
11596
  }, [createVNode("path", {
11622
- "d": "M25.877 12.843h-1.502c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.5c.187 0 .187 0 .187-.188v-1.511c0-.19 0-.191-.185-.191zM17.999 10.2c0 .188 0 .188.188.188h1.687c.188 0 .188 0 .188-.188V8.688c0-.187.004-.187-.186-.19h-1.69c-.187 0-.187 0-.187.19V10.2zm2.25-3.967h1.5c.188 0 .188 0 .188-.188v-1.7c0-.19 0-.19-.188-.19h-1.5c-.189 0-.189 0-.189.19v1.7c0 .188 0 .188.19.188zm2.063 4.157h3.563c.187 0 .187 0 .187-.189V4.346c0-.19.004-.19-.185-.19h-1.69c-.187 0-.187 0-.187.188v4.155h-1.688c-.187 0-.187 0-.187.189v1.514c0 .19 0 .19.187.19zM14.812 24l2.812-3.4H12l2.813 3.4zm-9-11.157H4.31c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.502c.187 0 .187 0 .187-.188v-1.511c0-.19.01-.191-.189-.191zm15.937 0H8.25c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h13.5c.188 0 .188 0 .188-.188v-1.511c0-.19 0-.191-.188-.191zm-11.438-2.454h1.5c.188 0 .188 0 .188-.188V8.688c0-.187 0-.187-.188-.189h-1.5c-.187 0-.187 0-.187.189V10.2c0 .188 0 .188.187.188zM27.94 0c.563 0 .917.21 1.313.567.518.466.748.757.748 1.51v14.92c0 .567-.188 1.134-.562 1.512-.376.378-.938.566-1.313.566H2.063c-.563 0-.938-.188-1.313-.566-.562-.378-.75-.945-.75-1.511V2.078C0 1.51.188.944.562.567.938.189 1.5 0 1.875 0zm-.062 2H2v14.92h25.877V2zM5.81 4.157c.19 0 .19 0 .19.189v1.762c-.003.126-.024.126-.188.126H4.249c-.126-.003-.126-.023-.126-.188v-1.7c-.187-.19 0-.19.188-.19zm10.5 2.077h1.503c.187 0 .187 0 .187-.188v-1.7c0-.19 0-.19-.187-.19h-1.502c-.188 0-.188.001-.188.19v1.7c0 .188 0 .188.188.188zM7.875 8.5c.187 0 .187.002.187.189V10.2c0 .188 0 .188-.187.188H4.249c-.126-.002-.126-.023-.126-.188V8.625c.003-.126.024-.126.188-.126zm7.875 0c.19.002.19.002.19.189v1.575c-.003.126-.024.126-.19.126h-1.563c-.126-.002-.126-.023-.126-.188V8.625c.002-.126.023-.126.189-.126zm-6-4.342c.187 0 .187 0 .187.189v1.7c0 .188 0 .188-.187.188H8.187c-.126-.003-.126-.023-.126-.188V4.283c.003-.126.024-.126.188-.126zm3.94 0c.185 0 .372 0 .372.189v1.762c-.002.126-.023.126-.187.126h-1.75C12 6.231 12 6.211 12 6.046v-1.7c0-.19.187-.19.187-.19z",
11597
+ "d": "M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z",
11623
11598
  "fill": "currentColor"
11624
11599
  }, null)]);
11625
11600
  var DeleteIcon = createVNode("svg", {
11626
11601
  "class": bem$m("delete-icon"),
11627
11602
  "viewBox": "0 0 32 22"
11628
11603
  }, [createVNode("path", {
11629
- "d": "M28.016 0A3.991 3.991 0 0132 3.987v14.026c0 2.2-1.787 3.987-3.98 3.987H10.382c-.509 0-.996-.206-1.374-.585L.89 13.09C.33 12.62 0 11.84 0 11.006c0-.86.325-1.62.887-2.08L9.01.585A1.936 1.936 0 0110.383 0zm0 1.947H10.368L2.24 10.28c-.224.226-.312.432-.312.73 0 .287.094.51.312.729l8.128 8.333h17.648a2.041 2.041 0 002.037-2.04V3.987c0-1.127-.915-2.04-2.037-2.04zM23.028 6a.96.96 0 01.678.292.95.95 0 01-.003 1.377l-3.342 3.348 3.326 3.333c.189.188.292.43.292.679 0 .248-.103.49-.292.679a.96.96 0 01-.678.292.959.959 0 01-.677-.292L18.99 12.36l-3.343 3.345a.96.96 0 01-.677.292.96.96 0 01-.678-.292.962.962 0 01-.292-.68c0-.248.104-.49.292-.679l3.342-3.348-3.342-3.348A.963.963 0 0114 6.971c0-.248.104-.49.292-.679A.96.96 0 0114.97 6a.96.96 0 01.677.292l3.358 3.348 3.345-3.348A.96.96 0 0123.028 6z",
11604
+ "d": "M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z",
11630
11605
  "fill": "currentColor"
11631
11606
  }, null)]);
11632
11607
  var NumberKeyboardKey = defineComponent({
@@ -11660,7 +11635,7 @@ var NumberKeyboardKey = defineComponent({
11660
11635
  var onTouchEnd = (event) => {
11661
11636
  if (active.value) {
11662
11637
  if (!slots.default) {
11663
- event.preventDefault();
11638
+ preventDefault(event);
11664
11639
  }
11665
11640
  active.value = false;
11666
11641
  emit("press", props.text, props.type);
@@ -11915,7 +11890,7 @@ var _NumberKeyboard = defineComponent({
11915
11890
  }
11916
11891
  });
11917
11892
  var NumberKeyboard = withInstall(_NumberKeyboard);
11918
- var [name$k, bem$k, t$4] = createNamespace("pagination");
11893
+ var [name$k, bem$k, t$5] = createNamespace("pagination");
11919
11894
  var makePage = (number, text, active) => ({
11920
11895
  number,
11921
11896
  text,
@@ -11958,9 +11933,6 @@ var _Pagination = defineComponent({
11958
11933
  modelValue,
11959
11934
  forceEllipses
11960
11935
  } = props;
11961
- if (props.mode !== "multi") {
11962
- return items;
11963
- }
11964
11936
  var startPage = 1;
11965
11937
  var endPage = pageCount;
11966
11938
  var isMaxSized = showPageSize < pageCount;
@@ -11988,52 +11960,73 @@ var _Pagination = defineComponent({
11988
11960
  }
11989
11961
  return items;
11990
11962
  });
11991
- var select = (page, emitChange) => {
11992
- page = Math.min(count.value, Math.max(1, page));
11993
- if (props.modelValue !== page) {
11994
- emit("update:modelValue", page);
11963
+ var updateModelValue = (value, emitChange) => {
11964
+ value = clamp(value, 1, count.value);
11965
+ if (props.modelValue !== value) {
11966
+ emit("update:modelValue", value);
11995
11967
  if (emitChange) {
11996
- emit("change", page);
11968
+ emit("change", value);
11997
11969
  }
11998
11970
  }
11999
11971
  };
12000
- watch(() => props.modelValue, (value) => {
12001
- select(value);
12002
- }, {
12003
- immediate: true
12004
- });
12005
- var renderDesc = () => {
12006
- if (props.mode !== "multi") {
12007
- return createVNode("li", {
12008
- "class": bem$k("page-desc")
12009
- }, [slots.pageDesc ? slots.pageDesc() : props.modelValue + "/" + count.value]);
12010
- }
12011
- };
12012
- return () => {
12013
- var value = props.modelValue;
12014
- var simple = props.mode !== "multi";
12015
- var onSelect = (value2) => () => select(value2, true);
12016
- return createVNode("ul", {
12017
- "class": bem$k({
12018
- simple
12019
- })
12020
- }, [createVNode("li", {
12021
- "class": [bem$k("item", {
12022
- disabled: value === 1
12023
- }), bem$k("prev"), BORDER],
12024
- "onClick": onSelect(value - 1)
12025
- }, [slots["prev-text"] ? slots["prev-text"]() : props.prevText || t$4("prev")]), pages.value.map((page) => createVNode("li", {
12026
- "class": [bem$k("item", {
12027
- active: page.active
12028
- }), bem$k("page"), BORDER],
12029
- "onClick": onSelect(page.number)
12030
- }, [slots.page ? slots.page(page) : page.text])), renderDesc(), createVNode("li", {
11972
+ watchEffect(() => updateModelValue(props.modelValue));
11973
+ var renderDesc = () => createVNode("li", {
11974
+ "class": bem$k("page-desc")
11975
+ }, [slots.pageDesc ? slots.pageDesc() : props.modelValue + "/" + count.value]);
11976
+ var renderPrevButton = () => {
11977
+ var {
11978
+ mode,
11979
+ modelValue
11980
+ } = props;
11981
+ var slot = slots["prev-text"];
11982
+ var disabled = modelValue === 1;
11983
+ return createVNode("li", {
12031
11984
  "class": [bem$k("item", {
12032
- disabled: value === count.value
12033
- }), bem$k("next"), BORDER],
12034
- "onClick": onSelect(value + 1)
12035
- }, [slots["next-text"] ? slots["next-text"]() : props.nextText || t$4("next")])]);
11985
+ disabled,
11986
+ border: mode === "simple",
11987
+ prev: true
11988
+ }), BORDER_SURROUND]
11989
+ }, [createVNode("button", {
11990
+ "type": "button",
11991
+ "disabled": disabled,
11992
+ "onClick": () => updateModelValue(modelValue - 1)
11993
+ }, [slot ? slot() : props.prevText || t$5("prev")])]);
12036
11994
  };
11995
+ var renderNextButton = () => {
11996
+ var {
11997
+ mode,
11998
+ modelValue
11999
+ } = props;
12000
+ var slot = slots["next-text"];
12001
+ var disabled = modelValue === count.value;
12002
+ return createVNode("li", {
12003
+ "class": [bem$k("item", {
12004
+ disabled,
12005
+ border: mode === "simple",
12006
+ next: true
12007
+ }), BORDER_SURROUND]
12008
+ }, [createVNode("button", {
12009
+ "type": "button",
12010
+ "disabled": disabled,
12011
+ "onClick": () => updateModelValue(modelValue + 1)
12012
+ }, [slot ? slot() : props.nextText || t$5("next")])]);
12013
+ };
12014
+ var renderPages = () => pages.value.map((page) => createVNode("li", {
12015
+ "class": [bem$k("item", {
12016
+ active: page.active,
12017
+ page: true
12018
+ }), BORDER_SURROUND]
12019
+ }, [createVNode("button", {
12020
+ "type": "button",
12021
+ "aria-current": page.active || void 0,
12022
+ "onClick": () => updateModelValue(page.number)
12023
+ }, [slots.page ? slots.page(page) : page.text])]));
12024
+ return () => createVNode("nav", {
12025
+ "role": "navigation",
12026
+ "class": bem$k()
12027
+ }, [createVNode("ul", {
12028
+ "class": bem$k("items")
12029
+ }, [renderPrevButton(), props.mode === "simple" ? renderDesc() : renderPages(), renderNextButton()])]);
12037
12030
  }
12038
12031
  });
12039
12032
  var Pagination = withInstall(_Pagination);
@@ -12388,12 +12381,12 @@ function getBasePlacement(placement) {
12388
12381
  return placement.split("-")[0];
12389
12382
  }
12390
12383
  function mergeByName(modifiers) {
12391
- var merged = modifiers.reduce(function(merged2, current) {
12392
- var existing = merged2[current.name];
12393
- merged2[current.name] = existing ? Object.assign({}, existing, current, {
12394
- options: Object.assign({}, existing.options, current.options),
12395
- data: Object.assign({}, existing.data, current.data)
12396
- }) : current;
12384
+ var merged = modifiers.reduce(function(merged2, current2) {
12385
+ var existing = merged2[current2.name];
12386
+ merged2[current2.name] = existing ? Object.assign({}, existing, current2, {
12387
+ options: Object.assign({}, existing.options, current2.options),
12388
+ data: Object.assign({}, existing.data, current2.data)
12389
+ }) : current2;
12397
12390
  return merged2;
12398
12391
  }, {});
12399
12392
  return Object.keys(merged).map(function(key) {
@@ -12955,6 +12948,8 @@ var _Popover = defineComponent({
12955
12948
  "style": {
12956
12949
  color
12957
12950
  },
12951
+ "tabindex": disabled ? void 0 : 0,
12952
+ "aria-disabled": disabled || void 0,
12958
12953
  "onClick": () => onClickAction(action, index2)
12959
12954
  }, [icon && createVNode(Icon, {
12960
12955
  "name": icon,
@@ -13069,7 +13064,7 @@ var _Progress = defineComponent({
13069
13064
  }
13070
13065
  });
13071
13066
  var Progress = withInstall(_Progress);
13072
- var [name$g, bem$g, t$3] = createNamespace("pull-refresh");
13067
+ var [name$g, bem$g, t$4] = createNamespace("pull-refresh");
13073
13068
  var DEFAULT_HEAD_HEIGHT = 50;
13074
13069
  var TEXT_STATUS = ["pulling", "loosing", "success"];
13075
13070
  var pullRefreshProps = {
@@ -13141,7 +13136,7 @@ var _PullRefresh = defineComponent({
13141
13136
  if (status === "normal") {
13142
13137
  return "";
13143
13138
  }
13144
- return props[status + "Text"] || t$3(status);
13139
+ return props[status + "Text"] || t$4(status);
13145
13140
  };
13146
13141
  var renderStatus = () => {
13147
13142
  var {
@@ -13389,8 +13384,8 @@ var _Rate = defineComponent({
13389
13384
  "role": "radio",
13390
13385
  "style": style,
13391
13386
  "class": bem$f("item"),
13392
- "tabindex": 0,
13393
- "aria-setsize": +count,
13387
+ "tabindex": disabled ? void 0 : 0,
13388
+ "aria-setsize": count,
13394
13389
  "aria-posinset": score,
13395
13390
  "aria-checked": !isVoid,
13396
13391
  "onClick": onClickItem
@@ -13424,7 +13419,9 @@ var _Rate = defineComponent({
13424
13419
  readonly: props.readonly,
13425
13420
  disabled: props.disabled
13426
13421
  }),
13427
- "tabindex": 0,
13422
+ "tabindex": props.disabled ? void 0 : 0,
13423
+ "aria-disabled": props.disabled,
13424
+ "aria-readonly": props.readonly,
13428
13425
  "onTouchstart": onTouchStart,
13429
13426
  "onTouchmove": onTouchMove
13430
13427
  }, [list.value.map(renderStar)]);
@@ -13432,7 +13429,7 @@ var _Rate = defineComponent({
13432
13429
  });
13433
13430
  var Rate = withInstall(_Rate);
13434
13431
  var Row = withInstall(_Row);
13435
- var [name$e, bem$e, t$2] = createNamespace("search");
13432
+ var [name$e, bem$e, t$3] = createNamespace("search");
13436
13433
  var searchProps = extend({}, fieldSharedProps, {
13437
13434
  label: String,
13438
13435
  shape: makeStringProp("square"),
@@ -13452,6 +13449,7 @@ var _Search = defineComponent({
13452
13449
  slots,
13453
13450
  attrs
13454
13451
  } = _ref;
13452
+ var id = useId();
13455
13453
  var filedRef = ref();
13456
13454
  var onCancel = () => {
13457
13455
  if (!slots.action) {
@@ -13466,17 +13464,18 @@ var _Search = defineComponent({
13466
13464
  emit("search", props.modelValue);
13467
13465
  }
13468
13466
  };
13467
+ var getInputId = () => props.id || id + "-input";
13469
13468
  var renderLabel = () => {
13470
13469
  if (slots.label || props.label) {
13471
13470
  return createVNode("label", {
13472
13471
  "class": bem$e("label"),
13473
- "for": props.id
13472
+ "for": getInputId()
13474
13473
  }, [slots.label ? slots.label() : props.label]);
13475
13474
  }
13476
13475
  };
13477
13476
  var renderAction = () => {
13478
13477
  if (props.showAction) {
13479
- var text = props.actionText || t$2("cancel");
13478
+ var text = props.actionText || t$3("cancel");
13480
13479
  return createVNode("div", {
13481
13480
  "class": bem$e("action"),
13482
13481
  "role": "button",
@@ -13495,7 +13494,9 @@ var _Search = defineComponent({
13495
13494
  };
13496
13495
  var fieldPropNames = Object.keys(fieldSharedProps);
13497
13496
  var renderField = () => {
13498
- var fieldAttrs = extend({}, attrs, pick(props, fieldPropNames));
13497
+ var fieldAttrs = extend({}, attrs, pick(props, fieldPropNames), {
13498
+ id: getInputId()
13499
+ });
13499
13500
  var onInput = (value) => emit("update:modelValue", value);
13500
13501
  return createVNode(Field, mergeProps({
13501
13502
  "ref": filedRef,
@@ -13531,7 +13532,7 @@ function getIconURL(icon) {
13531
13532
  }
13532
13533
  return icon;
13533
13534
  }
13534
- var [name$d, bem$d, t$1] = createNamespace("share-sheet");
13535
+ var [name$d, bem$d, t$2] = createNamespace("share-sheet");
13535
13536
  var shareSheetProps = extend({}, popupSharedProps, {
13536
13537
  title: String,
13537
13538
  round: truthProp,
@@ -13606,7 +13607,7 @@ var _ShareSheet = defineComponent({
13606
13607
  };
13607
13608
  var renderCancelButton = () => {
13608
13609
  var _props$cancelText;
13609
- var cancelText = (_props$cancelText = props.cancelText) != null ? _props$cancelText : t$1("cancel");
13610
+ var cancelText = (_props$cancelText = props.cancelText) != null ? _props$cancelText : t$2("cancel");
13610
13611
  if (slots.cancel || cancelText) {
13611
13612
  return createVNode("button", {
13612
13613
  "type": "button",
@@ -13654,6 +13655,7 @@ var _Sidebar = defineComponent({
13654
13655
  setActive
13655
13656
  });
13656
13657
  return () => createVNode("div", {
13658
+ "role": "tablist",
13657
13659
  "class": bem$c()
13658
13660
  }, [slots.default == null ? void 0 : slots.default()]);
13659
13661
  }
@@ -13699,11 +13701,14 @@ var _SidebarItem = defineComponent({
13699
13701
  disabled
13700
13702
  } = props;
13701
13703
  var selected = index2.value === parent.getActive();
13702
- return createVNode("a", {
13704
+ return createVNode("div", {
13705
+ "role": "tab",
13703
13706
  "class": bem$b({
13704
13707
  select: selected,
13705
13708
  disabled
13706
13709
  }),
13710
+ "tabindex": disabled ? void 0 : 0,
13711
+ "aria-selected": selected,
13707
13712
  "onClick": onClick
13708
13713
  }, [createVNode(Badge, {
13709
13714
  "dot": dot,
@@ -13822,7 +13827,7 @@ var _Slider = defineComponent({
13822
13827
  slots
13823
13828
  } = _ref;
13824
13829
  var buttonIndex;
13825
- var current;
13830
+ var current2;
13826
13831
  var startValue;
13827
13832
  var root = ref();
13828
13833
  var dragStatus = ref();
@@ -13945,11 +13950,11 @@ var _Slider = defineComponent({
13945
13950
  return;
13946
13951
  }
13947
13952
  touch.start(event);
13948
- current = props.modelValue;
13949
- if (isRange(current)) {
13950
- startValue = current.map(format2);
13953
+ current2 = props.modelValue;
13954
+ if (isRange(current2)) {
13955
+ startValue = current2.map(format2);
13951
13956
  } else {
13952
- startValue = format2(current);
13957
+ startValue = format2(current2);
13953
13958
  }
13954
13959
  dragStatus.value = "start";
13955
13960
  };
@@ -13972,18 +13977,18 @@ var _Slider = defineComponent({
13972
13977
  }
13973
13978
  if (isRange(startValue)) {
13974
13979
  var index2 = props.reverse ? 1 - buttonIndex : buttonIndex;
13975
- current[index2] = startValue[index2] + diff;
13980
+ current2[index2] = startValue[index2] + diff;
13976
13981
  } else {
13977
- current = startValue + diff;
13982
+ current2 = startValue + diff;
13978
13983
  }
13979
- updateValue(current);
13984
+ updateValue(current2);
13980
13985
  };
13981
13986
  var onTouchEnd = (event) => {
13982
13987
  if (props.disabled || props.readonly) {
13983
13988
  return;
13984
13989
  }
13985
13990
  if (dragStatus.value === "dragging") {
13986
- updateValue(current, true);
13991
+ updateValue(current2, true);
13987
13992
  emit("drag-end", event);
13988
13993
  }
13989
13994
  dragStatus.value = "";
@@ -14015,14 +14020,16 @@ var _Slider = defineComponent({
14015
14020
  }, null);
14016
14021
  };
14017
14022
  var renderButton = (index2) => {
14018
- var current2 = typeof index2 === "number" ? props.modelValue[index2] : props.modelValue;
14023
+ var current3 = typeof index2 === "number" ? props.modelValue[index2] : props.modelValue;
14019
14024
  return createVNode("div", {
14020
14025
  "role": "slider",
14021
14026
  "class": getButtonClassName(index2),
14022
- "tabindex": props.disabled || props.readonly ? -1 : 0,
14023
- "aria-valuemin": +props.min,
14024
- "aria-valuenow": current2,
14025
- "aria-valuemax": +props.max,
14027
+ "tabindex": props.disabled ? void 0 : 0,
14028
+ "aria-valuemin": props.min,
14029
+ "aria-valuenow": current3,
14030
+ "aria-valuemax": props.max,
14031
+ "aria-disabled": props.disabled || void 0,
14032
+ "aria-readonly": props.readonly || void 0,
14026
14033
  "aria-orientation": props.vertical ? "vertical" : "horizontal",
14027
14034
  "onTouchstart": (event) => {
14028
14035
  if (typeof index2 === "number") {
@@ -14034,7 +14041,7 @@ var _Slider = defineComponent({
14034
14041
  "onTouchend": onTouchEnd,
14035
14042
  "onTouchcancel": onTouchEnd,
14036
14043
  "onClick": stopPropagation
14037
- }, [renderButtonContent(current2, index2)]);
14044
+ }, [renderButtonContent(current3, index2)]);
14038
14045
  };
14039
14046
  updateValue(props.modelValue);
14040
14047
  useCustomFieldValue(() => props.modelValue);
@@ -14262,18 +14269,18 @@ var _Stepper = defineComponent({
14262
14269
  };
14263
14270
  var actionType;
14264
14271
  var inputRef = ref();
14265
- var current = ref(getInitialValue());
14266
- var minusDisabled = computed(() => props.disabled || props.disableMinus || current.value <= +props.min);
14267
- var plusDisabled = computed(() => props.disabled || props.disablePlus || current.value >= +props.max);
14272
+ var current2 = ref(getInitialValue());
14273
+ var minusDisabled = computed(() => props.disabled || props.disableMinus || current2.value <= +props.min);
14274
+ var plusDisabled = computed(() => props.disabled || props.disablePlus || current2.value >= +props.max);
14268
14275
  var inputStyle = computed(() => ({
14269
14276
  width: addUnit(props.inputWidth),
14270
14277
  height: addUnit(props.buttonSize)
14271
14278
  }));
14272
14279
  var buttonStyle = computed(() => getSizeStyle(props.buttonSize));
14273
14280
  var check = () => {
14274
- var value = format2(current.value);
14275
- if (!isEqual(value, current.value)) {
14276
- current.value = value;
14281
+ var value = format2(current2.value);
14282
+ if (!isEqual(value, current2.value)) {
14283
+ current2.value = value;
14277
14284
  }
14278
14285
  };
14279
14286
  var setValue = (value) => {
@@ -14281,11 +14288,11 @@ var _Stepper = defineComponent({
14281
14288
  callInterceptor(props.beforeChange, {
14282
14289
  args: [value],
14283
14290
  done() {
14284
- current.value = value;
14291
+ current2.value = value;
14285
14292
  }
14286
14293
  });
14287
14294
  } else {
14288
- current.value = value;
14295
+ current2.value = value;
14289
14296
  }
14290
14297
  };
14291
14298
  var onChange = () => {
@@ -14294,7 +14301,7 @@ var _Stepper = defineComponent({
14294
14301
  return;
14295
14302
  }
14296
14303
  var diff = actionType === "minus" ? -props.step : +props.step;
14297
- var value = format2(addNumber(+current.value, diff));
14304
+ var value = format2(addNumber(+current2.value, diff));
14298
14305
  setValue(value);
14299
14306
  emit(actionType);
14300
14307
  };
@@ -14312,7 +14319,7 @@ var _Stepper = defineComponent({
14312
14319
  formatted = pair[0] + "." + pair[1].slice(0, +decimalLength);
14313
14320
  }
14314
14321
  if (props.beforeChange) {
14315
- input.value = String(current.value);
14322
+ input.value = String(current2.value);
14316
14323
  } else if (!isEqual(value, formatted)) {
14317
14324
  input.value = formatted;
14318
14325
  }
@@ -14331,7 +14338,7 @@ var _Stepper = defineComponent({
14331
14338
  var input = event.target;
14332
14339
  var value = format2(input.value);
14333
14340
  input.value = String(value);
14334
- current.value = value;
14341
+ current2.value = value;
14335
14342
  nextTick(() => {
14336
14343
  emit("blur", event);
14337
14344
  resetScroll();
@@ -14366,12 +14373,12 @@ var _Stepper = defineComponent({
14366
14373
  };
14367
14374
  var onMousedown = (event) => {
14368
14375
  if (props.disableInput) {
14369
- event.preventDefault();
14376
+ preventDefault(event);
14370
14377
  }
14371
14378
  };
14372
14379
  var createListeners = (type) => ({
14373
14380
  onClick: (event) => {
14374
- event.preventDefault();
14381
+ preventDefault(event);
14375
14382
  actionType = type;
14376
14383
  onChange();
14377
14384
  },
@@ -14382,13 +14389,13 @@ var _Stepper = defineComponent({
14382
14389
  onTouchend: onTouchEnd,
14383
14390
  onTouchcancel: onTouchEnd
14384
14391
  });
14385
- watch([() => props.max, () => props.min, () => props.integer, () => props.decimalLength], check);
14392
+ watch(() => [props.max, props.min, props.integer, props.decimalLength], check);
14386
14393
  watch(() => props.modelValue, (value) => {
14387
- if (!isEqual(value, current.value)) {
14388
- current.value = format2(value);
14394
+ if (!isEqual(value, current2.value)) {
14395
+ current2.value = format2(value);
14389
14396
  }
14390
14397
  });
14391
- watch(current, (value) => {
14398
+ watch(current2, (value) => {
14392
14399
  emit("update:modelValue", value);
14393
14400
  emit("change", value, {
14394
14401
  name: props.name
@@ -14396,6 +14403,7 @@ var _Stepper = defineComponent({
14396
14403
  });
14397
14404
  useCustomFieldValue(() => props.modelValue);
14398
14405
  return () => createVNode("div", {
14406
+ "role": "group",
14399
14407
  "class": bem$6([props.theme])
14400
14408
  }, [withDirectives(createVNode("button", mergeProps({
14401
14409
  "type": "button",
@@ -14404,21 +14412,22 @@ var _Stepper = defineComponent({
14404
14412
  disabled: minusDisabled.value
14405
14413
  }), {
14406
14414
  [HAPTICS_FEEDBACK]: !minusDisabled.value
14407
- }]
14415
+ }],
14416
+ "aria-disabled": minusDisabled.value || void 0
14408
14417
  }, createListeners("minus")), null), [[vShow, props.showMinus]]), withDirectives(createVNode("input", {
14409
14418
  "ref": inputRef,
14410
14419
  "type": props.integer ? "tel" : "text",
14411
14420
  "role": "spinbutton",
14412
14421
  "class": bem$6("input"),
14413
- "value": current.value,
14422
+ "value": current2.value,
14414
14423
  "style": inputStyle.value,
14415
14424
  "disabled": props.disabled,
14416
14425
  "readonly": props.disableInput,
14417
14426
  "inputmode": props.integer ? "numeric" : "decimal",
14418
14427
  "placeholder": props.placeholder,
14419
- "aria-valuemax": +props.max,
14420
- "aria-valuemin": +props.min,
14421
- "aria-valuenow": +current.value,
14428
+ "aria-valuemax": props.max,
14429
+ "aria-valuemin": props.min,
14430
+ "aria-valuenow": current2.value,
14422
14431
  "onBlur": onBlur,
14423
14432
  "onInput": onInput,
14424
14433
  "onFocus": onFocus,
@@ -14430,13 +14439,14 @@ var _Stepper = defineComponent({
14430
14439
  disabled: plusDisabled.value
14431
14440
  }), {
14432
14441
  [HAPTICS_FEEDBACK]: !plusDisabled.value
14433
- }]
14442
+ }],
14443
+ "aria-disabled": plusDisabled.value || void 0
14434
14444
  }, createListeners("plus")), null), [[vShow, props.showPlus]])]);
14435
14445
  }
14436
14446
  });
14437
14447
  var Stepper = withInstall(_Stepper);
14438
14448
  var Steps = withInstall(_Steps);
14439
- var [name$5, bem$5, t] = createNamespace("submit-bar");
14449
+ var [name$5, bem$5, t$1] = createNamespace("submit-bar");
14440
14450
  var submitBarProps = {
14441
14451
  tip: String,
14442
14452
  label: String,
@@ -14479,7 +14489,7 @@ var _SubmitBar = defineComponent({
14479
14489
  "style": {
14480
14490
  textAlign
14481
14491
  }
14482
- }, [createVNode("span", null, [label || t("label")]), createVNode("span", {
14492
+ }, [createVNode("span", null, [label || t$1("label")]), createVNode("span", {
14483
14493
  "class": bem$5("price")
14484
14494
  }, [currency, createVNode("span", {
14485
14495
  "class": bem$5("price-integer")
@@ -14726,6 +14736,7 @@ var _Tabbar = defineComponent({
14726
14736
  } = props;
14727
14737
  return createVNode("div", {
14728
14738
  "ref": root,
14739
+ "role": "tablist",
14729
14740
  "style": getZIndexStyle(zIndex),
14730
14741
  "class": [bem$3({
14731
14742
  fixed
@@ -14735,16 +14746,15 @@ var _Tabbar = defineComponent({
14735
14746
  }]
14736
14747
  }, [slots.default == null ? void 0 : slots.default()]);
14737
14748
  };
14738
- var setActive = (active) => {
14739
- if (active !== props.modelValue) {
14740
- callInterceptor(props.beforeChange, {
14741
- args: [active],
14742
- done() {
14743
- emit("update:modelValue", active);
14744
- emit("change", active);
14745
- }
14746
- });
14747
- }
14749
+ var setActive = (active, afterChange) => {
14750
+ callInterceptor(props.beforeChange, {
14751
+ args: [active],
14752
+ done() {
14753
+ emit("update:modelValue", active);
14754
+ emit("change", active);
14755
+ afterChange();
14756
+ }
14757
+ });
14748
14758
  };
14749
14759
  linkChildren({
14750
14760
  props,
@@ -14786,6 +14796,7 @@ var _TabbarItem = defineComponent({
14786
14796
  return;
14787
14797
  }
14788
14798
  var active = computed(() => {
14799
+ var _props$name;
14789
14800
  var {
14790
14801
  route: route3,
14791
14802
  modelValue
@@ -14797,20 +14808,21 @@ var _TabbarItem = defineComponent({
14797
14808
  var {
14798
14809
  to
14799
14810
  } = props;
14800
- var config = isObject$1(to) ? to : {
14811
+ var config = isObject(to) ? to : {
14801
14812
  path: to
14802
14813
  };
14803
14814
  var pathMatched = "path" in config && config.path === $route.path;
14804
14815
  var nameMatched = "name" in config && config.name === $route.name;
14805
14816
  return pathMatched || nameMatched;
14806
14817
  }
14807
- return (props.name || index2.value) === modelValue;
14818
+ return ((_props$name = props.name) != null ? _props$name : index2.value) === modelValue;
14808
14819
  });
14809
14820
  var onClick = (event) => {
14810
- var _props$name;
14811
- parent.setActive((_props$name = props.name) != null ? _props$name : index2.value);
14821
+ if (!active.value) {
14822
+ var _props$name2;
14823
+ parent.setActive((_props$name2 = props.name) != null ? _props$name2 : index2.value, route2);
14824
+ }
14812
14825
  emit("click", event);
14813
- route2();
14814
14826
  };
14815
14827
  var renderIcon = () => {
14816
14828
  if (slots.icon) {
@@ -14836,12 +14848,15 @@ var _TabbarItem = defineComponent({
14836
14848
  } = parent.props;
14837
14849
  var color = active.value ? activeColor : inactiveColor;
14838
14850
  return createVNode("div", {
14851
+ "role": "tab",
14839
14852
  "class": bem$2({
14840
14853
  active: active.value
14841
14854
  }),
14842
14855
  "style": {
14843
14856
  color
14844
14857
  },
14858
+ "tabindex": 0,
14859
+ "aria-selected": active.value,
14845
14860
  "onClick": onClick
14846
14861
  }, [createVNode(Badge, {
14847
14862
  "dot": dot,
@@ -14952,7 +14967,7 @@ var _TreeSelect = defineComponent({
14952
14967
  }
14953
14968
  });
14954
14969
  var TreeSelect = withInstall(_TreeSelect);
14955
- var [name, bem] = createNamespace("uploader");
14970
+ var [name, bem, t] = createNamespace("uploader");
14956
14971
  var toArray = (item) => Array.isArray(item) ? item : [item];
14957
14972
  function readFileContent(file, resultType) {
14958
14973
  return new Promise((resolve) => {
@@ -15071,7 +15086,10 @@ var UploaderPreviewItem = defineComponent({
15071
15086
  var renderDeleteIcon = () => {
15072
15087
  if (props.deletable && props.item.status !== "uploading") {
15073
15088
  return createVNode("div", {
15089
+ "role": "button",
15074
15090
  "class": bem("preview-delete"),
15091
+ "tabindex": 0,
15092
+ "aria-label": t("delete"),
15075
15093
  "onClick": onDelete
15076
15094
  }, [createVNode(Icon, {
15077
15095
  "name": "cross",
@@ -15359,7 +15377,7 @@ var _Uploader = defineComponent({
15359
15377
  }
15360
15378
  });
15361
15379
  var Uploader = withInstall(_Uploader);
15362
- var version = "3.2.8";
15380
+ var version = "3.3.0";
15363
15381
  function install(app) {
15364
15382
  var components = [ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1, ImagePreview, IndexAnchor, IndexBar, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
15365
15383
  components.forEach((item) => {