vant 3.2.8 → 3.3.3-beta.nuxt3

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 (189) hide show
  1. package/es/address-edit/AddressEdit.js +154 -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/Calendar.js +8 -14
  6. package/es/calendar/CalendarHeader.js +1 -3
  7. package/es/calendar/CalendarMonth.js +11 -10
  8. package/es/calendar/types.d.ts +1 -1
  9. package/es/cascader/Cascader.js +10 -2
  10. package/es/checkbox/Checker.js +1 -1
  11. package/es/checkbox/types.d.ts +2 -6
  12. package/es/composables/use-id.d.ts +1 -0
  13. package/es/composables/use-id.js +14 -0
  14. package/es/composables/use-route.d.ts +1 -1
  15. package/es/composables/use-route.js +4 -4
  16. package/es/count-down/CountDown.js +1 -0
  17. package/es/coupon-list/CouponList.js +40 -24
  18. package/es/coupon-list/index.css +1 -1
  19. package/es/coupon-list/index.less +0 -5
  20. package/es/dropdown-item/DropdownItem.js +7 -2
  21. package/es/dropdown-item/types.d.ts +2 -6
  22. package/es/dropdown-menu/DropdownMenu.js +7 -3
  23. package/es/dropdown-menu/types.d.ts +1 -0
  24. package/es/empty/Network.js +22 -34
  25. package/es/field/Field.d.ts +1 -1
  26. package/es/field/Field.js +13 -5
  27. package/es/field/index.d.ts +2 -2
  28. package/es/field/types.d.ts +7 -6
  29. package/es/form/Form.js +2 -2
  30. package/es/image/Image.js +4 -9
  31. package/es/image-preview/ImagePreview.js +3 -4
  32. package/es/index.d.ts +1 -1
  33. package/es/index.js +1 -1
  34. package/es/lazyload/index.d.ts +1 -1
  35. package/es/lazyload/index.js +1 -1
  36. package/es/lazyload/vue-lazyload/index.d.ts +55 -0
  37. package/es/lazyload/vue-lazyload/index.js +46 -0
  38. package/es/lazyload/vue-lazyload/lazy-component.js +53 -0
  39. package/es/lazyload/vue-lazyload/lazy-container.js +98 -0
  40. package/es/lazyload/vue-lazyload/lazy-image.js +115 -0
  41. package/es/lazyload/vue-lazyload/lazy.js +507 -0
  42. package/es/lazyload/vue-lazyload/listener.js +241 -0
  43. package/es/lazyload/vue-lazyload/util.js +183 -0
  44. package/es/list/List.js +3 -1
  45. package/es/locale/lang/pt-BR.d.ts +73 -0
  46. package/es/locale/lang/pt-BR.js +72 -0
  47. package/es/number-keyboard/NumberKeyboardKey.js +4 -4
  48. package/es/pagination/Pagination.js +67 -49
  49. package/es/pagination/index.css +1 -1
  50. package/es/pagination/index.less +32 -31
  51. package/es/password-input/PasswordInput.d.ts +1 -1
  52. package/es/password-input/index.d.ts +1 -1
  53. package/es/popover/Popover.js +2 -0
  54. package/es/popup/Popup.d.ts +1 -2
  55. package/es/popup/Popup.js +2 -5
  56. package/es/popup/index.d.ts +1 -2
  57. package/es/rate/Rate.js +5 -3
  58. package/es/search/Search.js +8 -2
  59. package/es/sidebar/Sidebar.js +1 -0
  60. package/es/sidebar-item/SidebarItem.js +4 -1
  61. package/es/slider/Slider.js +5 -3
  62. package/es/stepper/Stepper.js +11 -8
  63. package/es/swipe/Swipe.js +11 -6
  64. package/es/swipe/index.css +1 -1
  65. package/es/swipe/index.less +2 -0
  66. package/es/swipe/types.d.ts +1 -3
  67. package/es/switch/Switch.js +1 -0
  68. package/es/switch/index.css +1 -1
  69. package/es/switch/index.less +2 -0
  70. package/es/tab/Tab.js +18 -5
  71. package/es/tab/index.css +1 -1
  72. package/es/tab/index.less +1 -1
  73. package/es/tabbar/Tabbar.d.ts +1 -1
  74. package/es/tabbar/Tabbar.js +10 -10
  75. package/es/tabbar-item/TabbarItem.js +16 -7
  76. package/es/tabs/Tabs.js +10 -5
  77. package/es/tabs/TabsTitle.d.ts +6 -0
  78. package/es/tabs/TabsTitle.js +7 -1
  79. package/es/tabs/types.d.ts +1 -0
  80. package/es/uploader/UploaderPreviewItem.js +4 -1
  81. package/es/uploader/utils.d.ts +2 -2
  82. package/es/uploader/utils.js +2 -2
  83. package/es/utils/dom.d.ts +1 -0
  84. package/es/utils/dom.js +6 -2
  85. package/es/utils/format.js +6 -5
  86. package/es/vue-tsx-shim.d.ts +1 -0
  87. package/lib/address-edit/AddressEdit.js +155 -180
  88. package/lib/address-edit/AddressEditDetail.d.ts +10 -9
  89. package/lib/address-edit/AddressEditDetail.js +6 -6
  90. package/lib/button/Button.js +1 -1
  91. package/lib/calendar/Calendar.js +8 -14
  92. package/lib/calendar/CalendarHeader.js +1 -3
  93. package/lib/calendar/CalendarMonth.js +11 -10
  94. package/lib/calendar/types.d.ts +1 -1
  95. package/lib/cascader/Cascader.js +10 -2
  96. package/lib/checkbox/Checker.js +1 -1
  97. package/lib/checkbox/types.d.ts +2 -6
  98. package/lib/composables/use-id.d.ts +1 -0
  99. package/lib/composables/use-id.js +21 -0
  100. package/lib/composables/use-route.d.ts +1 -1
  101. package/lib/composables/use-route.js +4 -4
  102. package/lib/count-down/CountDown.js +1 -0
  103. package/lib/coupon-list/CouponList.js +39 -22
  104. package/lib/coupon-list/index.css +1 -1
  105. package/lib/coupon-list/index.less +0 -5
  106. package/lib/dropdown-item/DropdownItem.js +7 -2
  107. package/lib/dropdown-item/types.d.ts +2 -6
  108. package/lib/dropdown-menu/DropdownMenu.js +7 -2
  109. package/lib/dropdown-menu/types.d.ts +1 -0
  110. package/lib/empty/Network.js +22 -34
  111. package/lib/field/Field.d.ts +1 -1
  112. package/lib/field/Field.js +14 -5
  113. package/lib/field/index.d.ts +2 -2
  114. package/lib/field/types.d.ts +7 -6
  115. package/lib/form/Form.js +1 -1
  116. package/lib/image/Image.js +4 -9
  117. package/lib/image-preview/ImagePreview.js +1 -2
  118. package/lib/index.css +1 -1
  119. package/lib/index.d.ts +1 -1
  120. package/lib/index.js +1 -1
  121. package/lib/lazyload/index.d.ts +1 -1
  122. package/lib/lazyload/index.js +3 -3
  123. package/lib/lazyload/vue-lazyload/index.d.ts +55 -0
  124. package/lib/lazyload/vue-lazyload/index.js +58 -0
  125. package/lib/lazyload/vue-lazyload/lazy-component.js +62 -0
  126. package/lib/lazyload/vue-lazyload/lazy-container.js +106 -0
  127. package/lib/lazyload/vue-lazyload/lazy-image.js +125 -0
  128. package/lib/lazyload/vue-lazyload/lazy.js +520 -0
  129. package/lib/lazyload/vue-lazyload/listener.js +251 -0
  130. package/lib/lazyload/vue-lazyload/util.js +213 -0
  131. package/lib/list/List.js +3 -1
  132. package/lib/locale/lang/pt-BR.d.ts +73 -0
  133. package/lib/locale/lang/pt-BR.js +77 -0
  134. package/lib/number-keyboard/NumberKeyboardKey.js +3 -3
  135. package/lib/pagination/Pagination.js +65 -47
  136. package/lib/pagination/index.css +1 -1
  137. package/lib/pagination/index.less +32 -31
  138. package/lib/password-input/PasswordInput.d.ts +1 -1
  139. package/lib/password-input/index.d.ts +1 -1
  140. package/lib/popover/Popover.js +2 -0
  141. package/lib/popup/Popup.d.ts +1 -2
  142. package/lib/popup/Popup.js +2 -5
  143. package/lib/popup/index.d.ts +1 -2
  144. package/lib/rate/Rate.js +5 -3
  145. package/lib/search/Search.js +9 -2
  146. package/lib/sidebar/Sidebar.js +1 -0
  147. package/lib/sidebar-item/SidebarItem.js +4 -1
  148. package/lib/slider/Slider.js +5 -3
  149. package/lib/ssr.js +7 -0
  150. package/lib/ssr.mjs +1 -0
  151. package/lib/stepper/Stepper.js +11 -8
  152. package/lib/swipe/Swipe.js +9 -4
  153. package/lib/swipe/index.css +1 -1
  154. package/lib/swipe/index.less +2 -0
  155. package/lib/swipe/types.d.ts +1 -3
  156. package/lib/switch/Switch.js +1 -0
  157. package/lib/switch/index.css +1 -1
  158. package/lib/switch/index.less +2 -0
  159. package/lib/tab/Tab.js +20 -5
  160. package/lib/tab/index.css +1 -1
  161. package/lib/tab/index.less +1 -1
  162. package/lib/tabbar/Tabbar.d.ts +1 -1
  163. package/lib/tabbar/Tabbar.js +10 -10
  164. package/lib/tabbar-item/TabbarItem.js +16 -7
  165. package/lib/tabs/Tabs.js +9 -3
  166. package/lib/tabs/TabsTitle.d.ts +6 -0
  167. package/lib/tabs/TabsTitle.js +7 -1
  168. package/lib/tabs/types.d.ts +1 -0
  169. package/lib/uploader/UploaderPreviewItem.js +3 -0
  170. package/lib/uploader/utils.d.ts +2 -2
  171. package/lib/uploader/utils.js +3 -2
  172. package/lib/utils/dom.d.ts +1 -0
  173. package/lib/utils/dom.js +9 -2
  174. package/lib/utils/format.js +7 -5
  175. package/lib/vant.cjs.js +14407 -0
  176. package/lib/vant.cjs.min.js +1 -0
  177. package/lib/vant.es.js +1125 -2186
  178. package/lib/vant.es.min.js +1125 -2186
  179. package/lib/vant.js +1109 -1089
  180. package/lib/vant.min.js +1 -1
  181. package/lib/vue-tsx-shim.d.ts +1 -0
  182. package/package.json +26 -11
  183. package/vetur/attributes.json +557 -557
  184. package/vetur/tags.json +183 -183
  185. package/vetur/web-types.json +1577 -1577
  186. package/es/composables/use-link-field.d.ts +0 -0
  187. package/es/composables/use-link-field.js +0 -0
  188. package/lib/composables/use-link-field.d.ts +0 -0
  189. package/lib/composables/use-link-field.js +0 -1
package/lib/vant.js CHANGED
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.vant = {}, global.Vue));
3
3
  })(this, function(exports2, vue) {
4
4
  "use strict";
5
- function noop$1() {
5
+ function noop() {
6
6
  }
7
7
  var extend = Object.assign;
8
8
  var inBrowser$1 = typeof window !== "undefined";
@@ -49,7 +49,7 @@
49
49
  type: String,
50
50
  default: defaultVal
51
51
  });
52
- var inBrowser = typeof window !== "undefined";
52
+ const inBrowser = typeof window !== "undefined";
53
53
  function raf(fn) {
54
54
  return inBrowser ? requestAnimationFrame(fn) : -1;
55
55
  }
@@ -61,56 +61,42 @@
61
61
  function doubleRaf(fn) {
62
62
  raf(() => raf(fn));
63
63
  }
64
- function isWindow(val) {
65
- return val === window;
66
- }
67
- function makeDOMRect(width2, height2) {
68
- return {
69
- top: 0,
70
- left: 0,
71
- right: width2,
72
- bottom: height2,
73
- width: width2,
74
- height: height2
75
- };
76
- }
77
- var useRect = (elementOrRef) => {
78
- var element = vue.unref(elementOrRef);
64
+ const isWindow = (val) => val === window;
65
+ const makeDOMRect = (width2, height2) => ({
66
+ top: 0,
67
+ left: 0,
68
+ right: width2,
69
+ bottom: height2,
70
+ width: width2,
71
+ height: height2
72
+ });
73
+ const useRect = (elementOrRef) => {
74
+ const element = vue.unref(elementOrRef);
79
75
  if (isWindow(element)) {
80
- var width2 = element.innerWidth;
81
- var height2 = element.innerHeight;
76
+ const width2 = element.innerWidth;
77
+ const height2 = element.innerHeight;
82
78
  return makeDOMRect(width2, height2);
83
79
  }
84
- if (element && element.getBoundingClientRect) {
80
+ if (element == null ? void 0 : element.getBoundingClientRect) {
85
81
  return element.getBoundingClientRect();
86
82
  }
87
83
  return makeDOMRect(0, 0);
88
84
  };
89
- function useToggle(defaultValue) {
90
- if (defaultValue === void 0) {
91
- defaultValue = false;
92
- }
93
- var state = vue.ref(defaultValue);
94
- var toggle = function(value) {
95
- if (value === void 0) {
96
- value = !state.value;
97
- }
85
+ function useToggle(defaultValue = false) {
86
+ const state = vue.ref(defaultValue);
87
+ const toggle = (value = !state.value) => {
98
88
  state.value = value;
99
89
  };
100
90
  return [state, toggle];
101
91
  }
102
92
  function useParent(key) {
103
- var parent = vue.inject(key, null);
93
+ const parent = vue.inject(key, null);
104
94
  if (parent) {
105
- var instance2 = vue.getCurrentInstance();
106
- var {
107
- link: _link,
108
- unlink: _unlink,
109
- internalChildren
110
- } = parent;
111
- _link(instance2);
112
- vue.onUnmounted(() => _unlink(instance2));
113
- var index2 = vue.computed(() => internalChildren.indexOf(instance2));
95
+ const instance2 = vue.getCurrentInstance();
96
+ const { link, unlink, internalChildren } = parent;
97
+ link(instance2);
98
+ vue.onUnmounted(() => unlink(instance2));
99
+ const index2 = vue.computed(() => internalChildren.indexOf(instance2));
114
100
  return {
115
101
  parent,
116
102
  index: index2
@@ -122,14 +108,14 @@
122
108
  };
123
109
  }
124
110
  function flattenVNodes(children) {
125
- var result = [];
126
- var traverse = (children2) => {
111
+ const result = [];
112
+ const traverse = (children2) => {
127
113
  if (Array.isArray(children2)) {
128
114
  children2.forEach((child) => {
115
+ var _a;
129
116
  if (vue.isVNode(child)) {
130
- var _child$component;
131
117
  result.push(child);
132
- if ((_child$component = child.component) != null && _child$component.subTree) {
118
+ if ((_a = child.component) == null ? void 0 : _a.subTree) {
133
119
  traverse(child.component.subTree.children);
134
120
  }
135
121
  if (child.children) {
@@ -143,29 +129,29 @@
143
129
  return result;
144
130
  }
145
131
  function sortChildren(parent, publicChildren, internalChildren) {
146
- var vnodes = flattenVNodes(parent.subTree.children);
132
+ const vnodes = flattenVNodes(parent.subTree.children);
147
133
  internalChildren.sort((a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode));
148
- var orderedPublicChildren = internalChildren.map((item) => item.proxy);
134
+ const orderedPublicChildren = internalChildren.map((item) => item.proxy);
149
135
  publicChildren.sort((a, b) => {
150
- var indexA = orderedPublicChildren.indexOf(a);
151
- var indexB = orderedPublicChildren.indexOf(b);
136
+ const indexA = orderedPublicChildren.indexOf(a);
137
+ const indexB = orderedPublicChildren.indexOf(b);
152
138
  return indexA - indexB;
153
139
  });
154
140
  }
155
141
  function useChildren(key) {
156
- var publicChildren = vue.reactive([]);
157
- var internalChildren = vue.reactive([]);
158
- var parent = vue.getCurrentInstance();
159
- var linkChildren = (value) => {
160
- var link = (child) => {
142
+ const publicChildren = vue.reactive([]);
143
+ const internalChildren = vue.reactive([]);
144
+ const parent = vue.getCurrentInstance();
145
+ const linkChildren = (value) => {
146
+ const link = (child) => {
161
147
  if (child.proxy) {
162
148
  internalChildren.push(child);
163
149
  publicChildren.push(child.proxy);
164
150
  sortChildren(parent, publicChildren, internalChildren);
165
151
  }
166
152
  };
167
- var unlink = (child) => {
168
- var index2 = internalChildren.indexOf(child);
153
+ const unlink = (child) => {
154
+ const index2 = internalChildren.indexOf(child);
169
155
  publicChildren.splice(index2, 1);
170
156
  internalChildren.splice(index2, 1);
171
157
  };
@@ -181,16 +167,16 @@
181
167
  linkChildren
182
168
  };
183
169
  }
184
- var SECOND = 1e3;
185
- var MINUTE = 60 * SECOND;
186
- var HOUR = 60 * MINUTE;
187
- var DAY = 24 * HOUR;
170
+ const SECOND = 1e3;
171
+ const MINUTE = 60 * SECOND;
172
+ const HOUR = 60 * MINUTE;
173
+ const DAY = 24 * HOUR;
188
174
  function parseTime(time) {
189
- var days = Math.floor(time / DAY);
190
- var hours = Math.floor(time % DAY / HOUR);
191
- var minutes = Math.floor(time % HOUR / MINUTE);
192
- var seconds = Math.floor(time % MINUTE / SECOND);
193
- var milliseconds = Math.floor(time % SECOND);
175
+ const days = Math.floor(time / DAY);
176
+ const hours = Math.floor(time % DAY / HOUR);
177
+ const minutes = Math.floor(time % HOUR / MINUTE);
178
+ const seconds = Math.floor(time % MINUTE / SECOND);
179
+ const milliseconds = Math.floor(time % SECOND);
194
180
  return {
195
181
  total: time,
196
182
  days,
@@ -204,26 +190,27 @@
204
190
  return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
205
191
  }
206
192
  function useCountDown(options) {
207
- var rafId;
208
- var endTime;
209
- var counting;
210
- var deactivated;
211
- var remain = vue.ref(options.time);
212
- var current = vue.computed(() => parseTime(remain.value));
213
- var pause = () => {
193
+ let rafId;
194
+ let endTime;
195
+ let counting;
196
+ let deactivated;
197
+ const remain = vue.ref(options.time);
198
+ const current2 = vue.computed(() => parseTime(remain.value));
199
+ const pause = () => {
214
200
  counting = false;
215
201
  cancelRaf(rafId);
216
202
  };
217
- var getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
218
- var setRemain = (value) => {
203
+ const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
204
+ const setRemain = (value) => {
205
+ var _a, _b;
219
206
  remain.value = value;
220
- options.onChange == null ? void 0 : options.onChange(current.value);
207
+ (_a = options.onChange) == null ? void 0 : _a.call(options, current2.value);
221
208
  if (value === 0) {
222
209
  pause();
223
- options.onFinish == null ? void 0 : options.onFinish();
210
+ (_b = options.onFinish) == null ? void 0 : _b.call(options);
224
211
  }
225
212
  };
226
- var microTick = () => {
213
+ const microTick = () => {
227
214
  rafId = raf(() => {
228
215
  if (counting) {
229
216
  setRemain(getCurrentRemain());
@@ -233,10 +220,10 @@
233
220
  }
234
221
  });
235
222
  };
236
- var macroTick = () => {
223
+ const macroTick = () => {
237
224
  rafId = raf(() => {
238
225
  if (counting) {
239
- var remainRemain = getCurrentRemain();
226
+ const remainRemain = getCurrentRemain();
240
227
  if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
241
228
  setRemain(remainRemain);
242
229
  }
@@ -246,7 +233,7 @@
246
233
  }
247
234
  });
248
235
  };
249
- var tick = () => {
236
+ const tick = () => {
250
237
  if (!inBrowser) {
251
238
  return;
252
239
  }
@@ -256,17 +243,14 @@
256
243
  macroTick();
257
244
  }
258
245
  };
259
- var start2 = () => {
246
+ const start2 = () => {
260
247
  if (!counting) {
261
248
  endTime = Date.now() + remain.value;
262
249
  counting = true;
263
250
  tick();
264
251
  }
265
252
  };
266
- var reset = function(totalTime) {
267
- if (totalTime === void 0) {
268
- totalTime = options.time;
269
- }
253
+ const reset = (totalTime = options.time) => {
270
254
  pause();
271
255
  remain.value = totalTime;
272
256
  };
@@ -288,11 +272,11 @@
288
272
  start: start2,
289
273
  pause,
290
274
  reset,
291
- current
275
+ current: current2
292
276
  };
293
277
  }
294
278
  function onMountedOrActivated(hook) {
295
- var mounted;
279
+ let mounted;
296
280
  vue.onMounted(() => {
297
281
  hook();
298
282
  vue.nextTick(() => {
@@ -305,31 +289,21 @@
305
289
  }
306
290
  });
307
291
  }
308
- function useEventListener(type, listener, options) {
309
- if (options === void 0) {
310
- options = {};
311
- }
292
+ function useEventListener(type, listener, options = {}) {
312
293
  if (!inBrowser) {
313
294
  return;
314
295
  }
315
- var {
316
- target = window,
317
- passive: passive2 = false,
318
- capture = false
319
- } = options;
320
- var attached;
321
- var add = (target2) => {
322
- var element = vue.unref(target2);
296
+ const { target = window, passive: passive2 = false, capture = false } = options;
297
+ let attached;
298
+ const add = (target2) => {
299
+ const element = vue.unref(target2);
323
300
  if (element && !attached) {
324
- element.addEventListener(type, listener, {
325
- capture,
326
- passive: passive2
327
- });
301
+ element.addEventListener(type, listener, { capture, passive: passive2 });
328
302
  attached = true;
329
303
  }
330
304
  };
331
- var remove2 = (target2) => {
332
- var element = vue.unref(target2);
305
+ const remove2 = (target2) => {
306
+ const element = vue.unref(target2);
333
307
  if (element && attached) {
334
308
  element.removeEventListener(type, listener, capture);
335
309
  attached = false;
@@ -345,62 +319,47 @@
345
319
  });
346
320
  }
347
321
  }
348
- function useClickAway(target, listener, options) {
349
- if (options === void 0) {
350
- options = {};
351
- }
322
+ function useClickAway(target, listener, options = {}) {
352
323
  if (!inBrowser) {
353
324
  return;
354
325
  }
355
- var {
356
- eventName = "click"
357
- } = options;
358
- var onClick = (event) => {
359
- var element = vue.unref(target);
326
+ const { eventName = "click" } = options;
327
+ const onClick = (event) => {
328
+ const element = vue.unref(target);
360
329
  if (element && !element.contains(event.target)) {
361
330
  listener(event);
362
331
  }
363
332
  };
364
- useEventListener(eventName, onClick, {
365
- target: document
366
- });
333
+ useEventListener(eventName, onClick, { target: document });
367
334
  }
368
- var width;
369
- var height;
335
+ let width;
336
+ let height;
370
337
  function useWindowSize() {
371
338
  if (!width) {
372
339
  width = vue.ref(0);
373
340
  height = vue.ref(0);
374
- var update = () => {
375
- if (inBrowser) {
341
+ if (inBrowser) {
342
+ const update = () => {
376
343
  width.value = window.innerWidth;
377
344
  height.value = window.innerHeight;
378
- }
379
- };
380
- update();
381
- useEventListener("resize", update);
382
- useEventListener("orientationchange", update);
345
+ };
346
+ update();
347
+ window.addEventListener("resize", update, { passive: true });
348
+ window.addEventListener("orientationchange", update, { passive: true });
349
+ }
383
350
  }
384
- return {
385
- width,
386
- height
387
- };
351
+ return { width, height };
388
352
  }
389
- var overflowScrollReg = /scroll|auto/i;
390
- var defaultRoot = inBrowser ? window : void 0;
353
+ const overflowScrollReg = /scroll|auto/i;
354
+ const defaultRoot = inBrowser ? window : void 0;
391
355
  function isElement$1(node) {
392
- var ELEMENT_NODE_TYPE = 1;
356
+ const ELEMENT_NODE_TYPE = 1;
393
357
  return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
394
358
  }
395
- function getScrollParent$1(el, root) {
396
- if (root === void 0) {
397
- root = defaultRoot;
398
- }
399
- var node = el;
359
+ function getScrollParent$1(el, root = defaultRoot) {
360
+ let node = el;
400
361
  while (node && node !== root && isElement$1(node)) {
401
- var {
402
- overflowY
403
- } = window.getComputedStyle(node);
362
+ const { overflowY } = window.getComputedStyle(node);
404
363
  if (overflowScrollReg.test(overflowY)) {
405
364
  return node;
406
365
  }
@@ -408,11 +367,8 @@
408
367
  }
409
368
  return root;
410
369
  }
411
- function useScrollParent(el, root) {
412
- if (root === void 0) {
413
- root = defaultRoot;
414
- }
415
- var scrollParent = vue.ref();
370
+ function useScrollParent(el, root = defaultRoot) {
371
+ const scrollParent = vue.ref();
416
372
  vue.onMounted(() => {
417
373
  if (el.value) {
418
374
  scrollParent.value = getScrollParent$1(el.value, root);
@@ -420,20 +376,23 @@
420
376
  });
421
377
  return scrollParent;
422
378
  }
379
+ let visibility;
423
380
  function usePageVisibility() {
424
- var visibility = vue.ref("visible");
425
- var setVisibility = () => {
381
+ if (!visibility) {
382
+ visibility = vue.ref("visible");
426
383
  if (inBrowser) {
427
- visibility.value = document.hidden ? "hidden" : "visible";
384
+ const update = () => {
385
+ visibility.value = document.hidden ? "hidden" : "visible";
386
+ };
387
+ update();
388
+ window.addEventListener("visibilitychange", update);
428
389
  }
429
- };
430
- setVisibility();
431
- useEventListener("visibilitychange", setVisibility);
390
+ }
432
391
  return visibility;
433
392
  }
434
- var CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
393
+ const CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
435
394
  function useCustomFieldValue(customValue) {
436
- var field = vue.inject(CUSTOM_FIELD_INJECTION_KEY, null);
395
+ const field = vue.inject(CUSTOM_FIELD_INJECTION_KEY, null);
437
396
  if (field && !field.customValue.value) {
438
397
  field.customValue.value = customValue;
439
398
  vue.watch(customValue, () => {
@@ -444,8 +403,8 @@
444
403
  }
445
404
  var isDef = (val) => val !== void 0 && val !== null;
446
405
  var isFunction = (val) => typeof val === "function";
447
- var isObject$1 = (val) => val !== null && typeof val === "object";
448
- var isPromise = (val) => isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
406
+ var isObject = (val) => val !== null && typeof val === "object";
407
+ var isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
449
408
  var isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
450
409
  function isMobile(value) {
451
410
  value = value.replace(/[^-|\d]/g, "");
@@ -503,11 +462,15 @@
503
462
  var parentHidden = el.offsetParent === null && style.position !== "fixed";
504
463
  return hidden || parentHidden;
505
464
  }
465
+ var {
466
+ width: windowWidth,
467
+ height: windowHeight
468
+ } = useWindowSize();
506
469
  function addUnit(value) {
507
- if (!isDef(value)) {
508
- return void 0;
470
+ if (isDef(value)) {
471
+ return isNumeric(value) ? value + "px" : String(value);
509
472
  }
510
- return isNumeric(value) ? value + "px" : String(value);
473
+ return void 0;
511
474
  }
512
475
  function getSizeStyle(originSize) {
513
476
  if (isDef(originSize)) {
@@ -540,11 +503,11 @@
540
503
  }
541
504
  function convertVw(value) {
542
505
  value = value.replace(/vw/g, "");
543
- return +value * window.innerWidth / 100;
506
+ return +value * windowWidth.value / 100;
544
507
  }
545
508
  function convertVh(value) {
546
509
  value = value.replace(/vh/g, "");
547
- return +value * window.innerHeight / 100;
510
+ return +value * windowHeight.value / 100;
548
511
  }
549
512
  function unitToPx(value) {
550
513
  if (typeof value === "number") {
@@ -619,7 +582,7 @@
619
582
  if (!isDef(val)) {
620
583
  return;
621
584
  }
622
- if (!hasOwnProperty.call(to, key) || !isObject$1(val)) {
585
+ if (!hasOwnProperty.call(to, key) || !isObject(val)) {
623
586
  to[key] = val;
624
587
  } else {
625
588
  to[key] = deepAssign(Object(to[key]), val);
@@ -786,7 +749,7 @@
786
749
  } else if (canceled) {
787
750
  canceled();
788
751
  }
789
- }).catch(noop$1);
752
+ }).catch(noop);
790
753
  } else if (returnVal) {
791
754
  done();
792
755
  } else if (canceled) {
@@ -841,13 +804,13 @@
841
804
  url: String,
842
805
  replace: Boolean
843
806
  };
844
- function route(vm) {
845
- var router = vm.$router;
807
+ function route(_ref) {
846
808
  var {
847
809
  to,
848
810
  url,
849
- replace
850
- } = vm;
811
+ replace,
812
+ $router: router
813
+ } = _ref;
851
814
  if (to && router) {
852
815
  router[replace ? "replace" : "push"](to);
853
816
  } else if (url) {
@@ -1186,7 +1149,7 @@
1186
1149
  };
1187
1150
  var onClick = (event) => {
1188
1151
  if (props.loading) {
1189
- event.preventDefault();
1152
+ preventDefault(event);
1190
1153
  } else if (!props.disabled) {
1191
1154
  emit("click", event);
1192
1155
  route2();
@@ -1527,7 +1490,7 @@
1527
1490
  return vue.withDirectives(vue.createVNode("div", {
1528
1491
  "style": style,
1529
1492
  "class": [bem$1i(), props.className],
1530
- "onTouchmove": props.lockScroll ? preventTouchMove : noop$1
1493
+ "onTouchmove": props.lockScroll ? preventTouchMove : noop
1531
1494
  }, [slots.default == null ? void 0 : slots.default()]), [[vue.vShow, props.show]]);
1532
1495
  });
1533
1496
  return () => vue.createVNode(vue.Transition, {
@@ -1556,7 +1519,7 @@
1556
1519
  name: name$1l,
1557
1520
  inheritAttrs: false,
1558
1521
  props: popupProps$2,
1559
- emits: ["open", "close", "click", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
1522
+ emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
1560
1523
  setup(props, _ref) {
1561
1524
  var {
1562
1525
  emit,
@@ -1635,7 +1598,6 @@
1635
1598
  }, null);
1636
1599
  }
1637
1600
  };
1638
- var onClick = (event) => emit("click", event);
1639
1601
  var onOpened = () => emit("opened");
1640
1602
  var onClosed = () => emit("closed");
1641
1603
  var renderPopup = lazyRender(() => {
@@ -1652,8 +1614,7 @@
1652
1614
  [position]: position
1653
1615
  }), {
1654
1616
  "van-safe-area-bottom": safeAreaInsetBottom
1655
- }],
1656
- "onClick": onClick
1617
+ }]
1657
1618
  }, attrs), [slots.default == null ? void 0 : slots.default(), renderCloseIcon()]), [[vue.vShow, props.show]]);
1658
1619
  });
1659
1620
  var renderTransition = () => {
@@ -1839,7 +1800,7 @@
1839
1800
  if (Array.isArray(obj)) {
1840
1801
  return obj.map((item) => deepClone(item));
1841
1802
  }
1842
- if (isObject$1(obj)) {
1803
+ if (isObject(obj)) {
1843
1804
  var to = {};
1844
1805
  Object.keys(obj).forEach((key) => {
1845
1806
  to[key] = deepClone(obj[key]);
@@ -1860,7 +1821,7 @@
1860
1821
  return Number(translateY);
1861
1822
  }
1862
1823
  var PICKER_KEY = Symbol(name$1j);
1863
- var isOptionDisabled = (option) => isObject$1(option) && option.disabled;
1824
+ var isOptionDisabled = (option) => isObject(option) && option.disabled;
1864
1825
  var Column = vue.defineComponent({
1865
1826
  name: name$1j,
1866
1827
  props: {
@@ -1939,7 +1900,7 @@
1939
1900
  setIndex(index2, true);
1940
1901
  };
1941
1902
  var getOptionText = (option) => {
1942
- if (isObject$1(option) && props.textKey in option) {
1903
+ if (isObject(option) && props.textKey in option) {
1943
1904
  return option[props.textKey];
1944
1905
  }
1945
1906
  return option;
@@ -2076,7 +2037,7 @@
2076
2037
  }, [renderOptions()])]);
2077
2038
  }
2078
2039
  });
2079
- var [name$1i, bem$1e, t$i] = createNamespace("picker");
2040
+ var [name$1i, bem$1e, t$j] = createNamespace("picker");
2080
2041
  var pickerSharedProps = {
2081
2042
  title: String,
2082
2043
  loading: Boolean,
@@ -2275,7 +2236,7 @@
2275
2236
  }
2276
2237
  };
2277
2238
  var renderCancel = () => {
2278
- var text = props.cancelButtonText || t$i("cancel");
2239
+ var text = props.cancelButtonText || t$j("cancel");
2279
2240
  return vue.createVNode("button", {
2280
2241
  "type": "button",
2281
2242
  "class": [bem$1e("cancel"), HAPTICS_FEEDBACK],
@@ -2283,7 +2244,7 @@
2283
2244
  }, [slots.cancel ? slots.cancel() : text]);
2284
2245
  };
2285
2246
  var renderConfirm = () => {
2286
- var text = props.confirmButtonText || t$i("confirm");
2247
+ var text = props.confirmButtonText || t$j("confirm");
2287
2248
  return vue.createVNode("button", {
2288
2249
  "type": "button",
2289
2250
  "class": [bem$1e("confirm"), HAPTICS_FEEDBACK],
@@ -2716,6 +2677,146 @@
2716
2677
  }
2717
2678
  });
2718
2679
  var Cell = withInstall(_Cell);
2680
+ var [name$1f, bem$1b] = createNamespace("form");
2681
+ var formProps = {
2682
+ colon: Boolean,
2683
+ disabled: Boolean,
2684
+ readonly: Boolean,
2685
+ showError: Boolean,
2686
+ labelWidth: numericProp,
2687
+ labelAlign: String,
2688
+ inputAlign: String,
2689
+ scrollToError: Boolean,
2690
+ validateFirst: Boolean,
2691
+ submitOnEnter: truthProp,
2692
+ validateTrigger: makeStringProp("onBlur"),
2693
+ showErrorMessage: truthProp,
2694
+ errorMessageAlign: String
2695
+ };
2696
+ var _Form = vue.defineComponent({
2697
+ name: name$1f,
2698
+ props: formProps,
2699
+ emits: ["submit", "failed"],
2700
+ setup(props, _ref) {
2701
+ var {
2702
+ emit,
2703
+ slots
2704
+ } = _ref;
2705
+ var {
2706
+ children,
2707
+ linkChildren
2708
+ } = useChildren(FORM_KEY);
2709
+ var getFieldsByNames = (names) => {
2710
+ if (names) {
2711
+ return children.filter((field) => names.includes(field.name));
2712
+ }
2713
+ return children;
2714
+ };
2715
+ var validateSeq = (names) => new Promise((resolve, reject) => {
2716
+ var errors = [];
2717
+ var fields = getFieldsByNames(names);
2718
+ fields.reduce((promise, field) => promise.then(() => {
2719
+ if (!errors.length) {
2720
+ return field.validate().then((error) => {
2721
+ if (error) {
2722
+ errors.push(error);
2723
+ }
2724
+ });
2725
+ }
2726
+ }), Promise.resolve()).then(() => {
2727
+ if (errors.length) {
2728
+ reject(errors);
2729
+ } else {
2730
+ resolve();
2731
+ }
2732
+ });
2733
+ });
2734
+ var validateAll = (names) => new Promise((resolve, reject) => {
2735
+ var fields = getFieldsByNames(names);
2736
+ Promise.all(fields.map((item) => item.validate())).then((errors) => {
2737
+ errors = errors.filter(Boolean);
2738
+ if (errors.length) {
2739
+ reject(errors);
2740
+ } else {
2741
+ resolve();
2742
+ }
2743
+ });
2744
+ });
2745
+ var validateField = (name2) => {
2746
+ var matched = children.find((item) => item.name === name2);
2747
+ if (matched) {
2748
+ return new Promise((resolve, reject) => {
2749
+ matched.validate().then((error) => {
2750
+ if (error) {
2751
+ reject(error);
2752
+ } else {
2753
+ resolve();
2754
+ }
2755
+ });
2756
+ });
2757
+ }
2758
+ return Promise.reject();
2759
+ };
2760
+ var validate = (name2) => {
2761
+ if (typeof name2 === "string") {
2762
+ return validateField(name2);
2763
+ }
2764
+ return props.validateFirst ? validateSeq(name2) : validateAll(name2);
2765
+ };
2766
+ var resetValidation = (name2) => {
2767
+ if (typeof name2 === "string") {
2768
+ name2 = [name2];
2769
+ }
2770
+ var fields = getFieldsByNames(name2);
2771
+ fields.forEach((item) => {
2772
+ item.resetValidation();
2773
+ });
2774
+ };
2775
+ var scrollToField = (name2, options) => {
2776
+ children.some((item) => {
2777
+ if (item.name === name2) {
2778
+ item.$el.scrollIntoView(options);
2779
+ return true;
2780
+ }
2781
+ return false;
2782
+ });
2783
+ };
2784
+ var getValues = () => children.reduce((form, field) => {
2785
+ form[field.name] = field.formValue.value;
2786
+ return form;
2787
+ }, {});
2788
+ var submit = () => {
2789
+ var values = getValues();
2790
+ validate().then(() => emit("submit", values)).catch((errors) => {
2791
+ emit("failed", {
2792
+ values,
2793
+ errors
2794
+ });
2795
+ if (props.scrollToError && errors[0].name) {
2796
+ scrollToField(errors[0].name);
2797
+ }
2798
+ });
2799
+ };
2800
+ var onSubmit = (event) => {
2801
+ preventDefault(event);
2802
+ submit();
2803
+ };
2804
+ linkChildren({
2805
+ props
2806
+ });
2807
+ useExpose({
2808
+ submit,
2809
+ validate,
2810
+ scrollToField,
2811
+ resetValidation
2812
+ });
2813
+ return () => vue.createVNode("form", {
2814
+ "class": bem$1b(),
2815
+ "onSubmit": onSubmit
2816
+ }, [slots.default == null ? void 0 : slots.default()]);
2817
+ }
2818
+ });
2819
+ var Form = withInstall(_Form);
2719
2820
  function isEmptyValue(value) {
2720
2821
  if (Array.isArray(value)) {
2721
2822
  return !value.length;
@@ -2771,7 +2872,7 @@
2771
2872
  var scrollTop = getRootScrollTop();
2772
2873
  input.style.height = "auto";
2773
2874
  var height2 = input.scrollHeight;
2774
- if (isObject$1(autosize)) {
2875
+ if (isObject(autosize)) {
2775
2876
  var {
2776
2877
  maxHeight,
2777
2878
  minHeight
@@ -2805,7 +2906,15 @@
2805
2906
  type
2806
2907
  };
2807
2908
  }
2808
- var [name$1f, bem$1b] = createNamespace("field");
2909
+ var current = 0;
2910
+ function useId() {
2911
+ var vm = vue.getCurrentInstance();
2912
+ var {
2913
+ name: name2 = "unknown"
2914
+ } = (vm == null ? void 0 : vm.type) || {};
2915
+ return name2 + "-" + ++current;
2916
+ }
2917
+ var [name$1e, bem$1a] = createNamespace("field");
2809
2918
  var fieldSharedProps = {
2810
2919
  id: String,
2811
2920
  name: String,
@@ -2852,7 +2961,7 @@
2852
2961
  }
2853
2962
  });
2854
2963
  var _Field = vue.defineComponent({
2855
- name: name$1f,
2964
+ name: name$1e,
2856
2965
  props: fieldProps,
2857
2966
  emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2858
2967
  setup(props, _ref) {
@@ -2860,6 +2969,7 @@
2860
2969
  emit,
2861
2970
  slots
2862
2971
  } = _ref;
2972
+ var id = useId();
2863
2973
  var state = vue.reactive({
2864
2974
  focused: false,
2865
2975
  validateFailed: false,
@@ -3021,12 +3131,14 @@
3021
3131
  state.focused = true;
3022
3132
  emit("focus", event);
3023
3133
  vue.nextTick(adjustTextareaSize);
3024
- var readonly = getProp("readonly");
3025
- if (readonly) {
3134
+ if (getProp("readonly")) {
3026
3135
  blur();
3027
3136
  }
3028
3137
  };
3029
3138
  var onBlur = (event) => {
3139
+ if (getProp("readonly")) {
3140
+ return;
3141
+ }
3030
3142
  state.focused = false;
3031
3143
  updateValue(getModelValue(), "onBlur");
3032
3144
  emit("blur", event);
@@ -3071,8 +3183,9 @@
3071
3183
  }
3072
3184
  emit("keypress", event);
3073
3185
  };
3186
+ var getInputId = () => props.id || id + "-input";
3074
3187
  var renderInput = () => {
3075
- var controlClass = bem$1b("control", [getProp("inputAlign"), {
3188
+ var controlClass = bem$1a("control", [getProp("inputAlign"), {
3076
3189
  error: showError.value,
3077
3190
  custom: !!slots.input,
3078
3191
  "min-height": props.type === "textarea" && !props.autosize
@@ -3084,7 +3197,7 @@
3084
3197
  }, [slots.input()]);
3085
3198
  }
3086
3199
  var inputAttrs = {
3087
- id: props.id,
3200
+ id: getInputId(),
3088
3201
  ref: inputRef,
3089
3202
  name: props.name,
3090
3203
  rows: props.rows !== void 0 ? +props.rows : void 0,
@@ -3095,6 +3208,7 @@
3095
3208
  autofocus: props.autofocus,
3096
3209
  placeholder: props.placeholder,
3097
3210
  autocomplete: props.autocomplete,
3211
+ "aria-labelledby": props.label ? id + "-label" : void 0,
3098
3212
  onBlur,
3099
3213
  onFocus,
3100
3214
  onInput,
@@ -3113,7 +3227,7 @@
3113
3227
  var leftIconSlot = slots["left-icon"];
3114
3228
  if (props.leftIcon || leftIconSlot) {
3115
3229
  return vue.createVNode("div", {
3116
- "class": bem$1b("left-icon"),
3230
+ "class": bem$1a("left-icon"),
3117
3231
  "onClick": onClickLeftIcon
3118
3232
  }, [leftIconSlot ? leftIconSlot() : vue.createVNode(Icon, {
3119
3233
  "name": props.leftIcon,
@@ -3125,7 +3239,7 @@
3125
3239
  var rightIconSlot = slots["right-icon"];
3126
3240
  if (props.rightIcon || rightIconSlot) {
3127
3241
  return vue.createVNode("div", {
3128
- "class": bem$1b("right-icon"),
3242
+ "class": bem$1a("right-icon"),
3129
3243
  "onClick": onClickRightIcon
3130
3244
  }, [rightIconSlot ? rightIconSlot() : vue.createVNode(Icon, {
3131
3245
  "name": props.rightIcon,
@@ -3137,9 +3251,9 @@
3137
3251
  if (props.showWordLimit && props.maxlength) {
3138
3252
  var count = getModelValue().length;
3139
3253
  return vue.createVNode("div", {
3140
- "class": bem$1b("word-limit")
3254
+ "class": bem$1a("word-limit")
3141
3255
  }, [vue.createVNode("span", {
3142
- "class": bem$1b("word-num")
3256
+ "class": bem$1a("word-num")
3143
3257
  }, [count]), vue.createTextVNode("/"), props.maxlength]);
3144
3258
  }
3145
3259
  };
@@ -3152,7 +3266,7 @@
3152
3266
  var slot = slots["error-message"];
3153
3267
  var errorMessageAlign = getProp("errorMessageAlign");
3154
3268
  return vue.createVNode("div", {
3155
- "class": bem$1b("error-message", errorMessageAlign)
3269
+ "class": bem$1a("error-message", errorMessageAlign)
3156
3270
  }, [slot ? slot({
3157
3271
  message
3158
3272
  }) : message]);
@@ -3165,18 +3279,19 @@
3165
3279
  }
3166
3280
  if (props.label) {
3167
3281
  return vue.createVNode("label", {
3168
- "for": props.id
3282
+ "id": id + "-label",
3283
+ "for": getInputId()
3169
3284
  }, [props.label + colon]);
3170
3285
  }
3171
3286
  };
3172
3287
  var renderFieldBody = () => [vue.createVNode("div", {
3173
- "class": bem$1b("body")
3288
+ "class": bem$1a("body")
3174
3289
  }, [renderInput(), showClear.value && vue.createVNode(Icon, {
3175
3290
  "name": props.clearIcon,
3176
- "class": bem$1b("clear"),
3291
+ "class": bem$1a("clear"),
3177
3292
  "onTouchstart": onClear
3178
3293
  }, null), renderRightIcon(), slots.button && vue.createVNode("div", {
3179
- "class": bem$1b("button")
3294
+ "class": bem$1a("button")
3180
3295
  }, [slots.button()])]), renderWordLimit(), renderMessage()];
3181
3296
  useExpose({
3182
3297
  blur,
@@ -3208,7 +3323,7 @@
3208
3323
  return vue.createVNode(Cell, {
3209
3324
  "size": props.size,
3210
3325
  "icon": props.leftIcon,
3211
- "class": bem$1b({
3326
+ "class": bem$1a({
3212
3327
  error: showError.value,
3213
3328
  disabled,
3214
3329
  ["label-" + labelAlign]: labelAlign
@@ -3218,8 +3333,8 @@
3218
3333
  "isLink": props.isLink,
3219
3334
  "clickable": props.clickable,
3220
3335
  "titleStyle": labelStyle.value,
3221
- "valueClass": bem$1b("value"),
3222
- "titleClass": [bem$1b("label", [labelAlign, {
3336
+ "valueClass": bem$1a("value"),
3337
+ "titleClass": [bem$1a("label", [labelAlign, {
3223
3338
  required: props.required
3224
3339
  }]), props.labelClass],
3225
3340
  "arrowDirection": props.arrowDirection
@@ -3285,7 +3400,7 @@
3285
3400
  }
3286
3401
  }
3287
3402
  }
3288
- var [name$1e, bem$1a] = createNamespace("toast");
3403
+ var [name$1d, bem$19] = createNamespace("toast");
3289
3404
  var popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
3290
3405
  var toastProps = {
3291
3406
  icon: String,
@@ -3307,7 +3422,7 @@
3307
3422
  closeOnClickOverlay: Boolean
3308
3423
  };
3309
3424
  var VanToast = vue.defineComponent({
3310
- name: name$1e,
3425
+ name: name$1d,
3311
3426
  props: toastProps,
3312
3427
  emits: ["update:show"],
3313
3428
  setup(props, _ref) {
@@ -3343,13 +3458,13 @@
3343
3458
  return vue.createVNode(Icon, {
3344
3459
  "name": icon || type,
3345
3460
  "size": iconSize,
3346
- "class": bem$1a("icon"),
3461
+ "class": bem$19("icon"),
3347
3462
  "classPrefix": iconPrefix
3348
3463
  }, null);
3349
3464
  }
3350
3465
  if (type === "loading") {
3351
3466
  return vue.createVNode(Loading, {
3352
- "class": bem$1a("loading"),
3467
+ "class": bem$19("loading"),
3353
3468
  "size": iconSize,
3354
3469
  "type": loadingType
3355
3470
  }, null);
@@ -3362,10 +3477,10 @@
3362
3477
  } = props;
3363
3478
  if (isDef(message) && message !== "") {
3364
3479
  return type === "html" ? vue.createVNode("div", {
3365
- "class": bem$1a("text"),
3480
+ "class": bem$19("text"),
3366
3481
  "innerHTML": String(message)
3367
3482
  }, null) : vue.createVNode("div", {
3368
- "class": bem$1a("text")
3483
+ "class": bem$19("text")
3369
3484
  }, [message]);
3370
3485
  }
3371
3486
  };
@@ -3381,7 +3496,7 @@
3381
3496
  vue.onMounted(toggleClickable);
3382
3497
  vue.onUnmounted(toggleClickable);
3383
3498
  return () => vue.createVNode(Popup, vue.mergeProps({
3384
- "class": [bem$1a([props.position, {
3499
+ "class": [bem$19([props.position, {
3385
3500
  [props.type]: !props.icon
3386
3501
  }]), props.className],
3387
3502
  "lockScroll": false,
@@ -3419,7 +3534,7 @@
3419
3534
  var currentOptions = extend({}, defaultOptions$1);
3420
3535
  var defaultOptionsMap = new Map();
3421
3536
  function parseOptions$1(message) {
3422
- if (isObject$1(message)) {
3537
+ if (isObject(message)) {
3423
3538
  return message;
3424
3539
  }
3425
3540
  return {
@@ -3531,7 +3646,7 @@
3531
3646
  app.use(withInstall(VanToast));
3532
3647
  app.config.globalProperties.$toast = Toast;
3533
3648
  };
3534
- var [name$1d, bem$19] = createNamespace("switch");
3649
+ var [name$1c, bem$18] = createNamespace("switch");
3535
3650
  var switchProps = {
3536
3651
  size: numericProp,
3537
3652
  loading: Boolean,
@@ -3549,7 +3664,7 @@
3549
3664
  }
3550
3665
  };
3551
3666
  var _Switch = vue.defineComponent({
3552
- name: name$1d,
3667
+ name: name$1c,
3553
3668
  props: switchProps,
3554
3669
  emits: ["change", "update:modelValue"],
3555
3670
  setup(props, _ref) {
@@ -3568,7 +3683,7 @@
3568
3683
  if (props.loading) {
3569
3684
  var color = isChecked() ? props.activeColor : props.inactiveColor;
3570
3685
  return vue.createVNode(Loading, {
3571
- "class": bem$19("loading"),
3686
+ "class": bem$18("loading"),
3572
3687
  "color": color
3573
3688
  }, null);
3574
3689
  }
@@ -3589,32 +3704,33 @@
3589
3704
  };
3590
3705
  return vue.createVNode("div", {
3591
3706
  "role": "switch",
3592
- "class": bem$19({
3707
+ "class": bem$18({
3593
3708
  on: checked,
3594
3709
  loading,
3595
3710
  disabled
3596
3711
  }),
3597
3712
  "style": style,
3713
+ "tabindex": disabled ? void 0 : 0,
3598
3714
  "aria-checked": checked,
3599
3715
  "onClick": onClick
3600
3716
  }, [vue.createVNode("div", {
3601
- "class": bem$19("node")
3717
+ "class": bem$18("node")
3602
3718
  }, [renderLoading()])]);
3603
3719
  };
3604
3720
  }
3605
3721
  });
3606
3722
  var Switch = withInstall(_Switch);
3607
- var [name$1c, bem$18, t$h] = createNamespace("address-edit-detail");
3723
+ var [name$1b, bem$17, t$i] = createNamespace("address-edit-detail");
3608
3724
  var AddressEditDetail = vue.defineComponent({
3609
- name: name$1c,
3725
+ name: name$1b,
3610
3726
  props: {
3611
3727
  show: Boolean,
3728
+ rows: numericProp,
3612
3729
  value: String,
3730
+ rules: Array,
3613
3731
  focused: Boolean,
3614
- detailRows: numericProp,
3732
+ maxlength: numericProp,
3615
3733
  searchResult: Array,
3616
- errorMessage: String,
3617
- detailMaxlength: numericProp,
3618
3734
  showSearchResult: Boolean
3619
3735
  },
3620
3736
  emits: ["blur", "focus", "input", "select-search"],
@@ -3630,7 +3746,7 @@
3630
3746
  };
3631
3747
  var renderSearchTitle = (express) => {
3632
3748
  if (express.name) {
3633
- var text = express.name.replace(props.value, "<span class=" + bem$18("keyword") + ">" + props.value + "</span>");
3749
+ var text = express.name.replace(props.value, "<span class=" + bem$17("keyword") + ">" + props.value + "</span>");
3634
3750
  return vue.createVNode("div", {
3635
3751
  "innerHTML": text
3636
3752
  }, null);
@@ -3648,7 +3764,7 @@
3648
3764
  "key": express.name + express.address,
3649
3765
  "icon": "location-o",
3650
3766
  "label": express.address,
3651
- "class": bem$18("search-item"),
3767
+ "class": bem$17("search-item"),
3652
3768
  "border": false,
3653
3769
  "onClick": () => onSelect(express)
3654
3770
  }, {
@@ -3664,15 +3780,15 @@
3664
3780
  "autosize": true,
3665
3781
  "clearable": true,
3666
3782
  "ref": field,
3667
- "class": bem$18(),
3668
- "rows": props.detailRows,
3783
+ "class": bem$17(),
3784
+ "rows": props.rows,
3669
3785
  "type": "textarea",
3670
- "label": t$h("label"),
3786
+ "rules": props.rules,
3787
+ "label": t$i("label"),
3671
3788
  "border": !showSearchResult(),
3672
- "maxlength": props.detailMaxlength,
3789
+ "maxlength": props.maxlength,
3673
3790
  "modelValue": props.value,
3674
- "placeholder": t$h("placeholder"),
3675
- "errorMessage": props.errorMessage,
3791
+ "placeholder": t$i("placeholder"),
3676
3792
  "onBlur": onBlur,
3677
3793
  "onFocus": onFocus,
3678
3794
  "onUpdate:modelValue": onInput
@@ -3681,7 +3797,7 @@
3681
3797
  };
3682
3798
  }
3683
3799
  });
3684
- var [name$1b, bem$17, t$g] = createNamespace("address-edit");
3800
+ var [name$1a, bem$16, t$h] = createNamespace("address-edit");
3685
3801
  var DEFAULT_DATA = {
3686
3802
  name: "",
3687
3803
  tel: "",
@@ -3729,7 +3845,7 @@
3729
3845
  }
3730
3846
  };
3731
3847
  var _AddressEdit = vue.defineComponent({
3732
- name: name$1b,
3848
+ name: name$1a,
3733
3849
  props: addressEditProps,
3734
3850
  emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
3735
3851
  setup(props, _ref) {
@@ -3738,19 +3854,10 @@
3738
3854
  slots
3739
3855
  } = _ref;
3740
3856
  var areaRef = vue.ref();
3741
- var state = vue.reactive({
3742
- data: {},
3743
- showAreaPopup: false,
3744
- detailFocused: false,
3745
- errorInfo: {
3746
- tel: "",
3747
- name: "",
3748
- areaCode: "",
3749
- postalCode: "",
3750
- addressDetail: ""
3751
- }
3752
- });
3753
- var areaListLoaded = vue.computed(() => isObject$1(props.areaList) && Object.keys(props.areaList).length);
3857
+ var data = vue.reactive({});
3858
+ var showAreaPopup = vue.ref(false);
3859
+ var detailFocused = vue.ref(false);
3860
+ var areaListLoaded = vue.computed(() => isObject(props.areaList) && Object.keys(props.areaList).length);
3754
3861
  var areaText = vue.computed(() => {
3755
3862
  var {
3756
3863
  country,
@@ -3758,7 +3865,7 @@
3758
3865
  city,
3759
3866
  county,
3760
3867
  areaCode
3761
- } = state.data;
3868
+ } = data;
3762
3869
  if (areaCode) {
3763
3870
  var arr = [country, province, city, county];
3764
3871
  if (province && province === city) {
@@ -3770,231 +3877,223 @@
3770
3877
  });
3771
3878
  var hideBottomFields = vue.computed(() => {
3772
3879
  var _props$searchResult;
3773
- return ((_props$searchResult = props.searchResult) == null ? void 0 : _props$searchResult.length) && state.detailFocused;
3880
+ return ((_props$searchResult = props.searchResult) == null ? void 0 : _props$searchResult.length) && detailFocused.value;
3774
3881
  });
3775
3882
  var assignAreaValues = () => {
3776
3883
  if (areaRef.value) {
3777
3884
  var detail = areaRef.value.getArea();
3778
3885
  detail.areaCode = detail.code;
3779
3886
  delete detail.code;
3780
- extend(state.data, detail);
3887
+ extend(data, detail);
3781
3888
  }
3782
3889
  };
3783
3890
  var onFocus = (key) => {
3784
- state.errorInfo[key] = "";
3785
- state.detailFocused = key === "addressDetail";
3891
+ detailFocused.value = key === "addressDetail";
3786
3892
  emit("focus", key);
3787
3893
  };
3788
- var getErrorMessage = (key) => {
3789
- var value = String(state.data[key] || "").trim();
3790
- if (props.validator) {
3791
- var message = props.validator(key, value);
3792
- if (message) {
3793
- return message;
3794
- }
3795
- }
3796
- switch (key) {
3797
- case "name":
3798
- return value ? "" : t$g("nameEmpty");
3799
- case "tel":
3800
- return props.telValidator(value) ? "" : t$g("telInvalid");
3801
- case "areaCode":
3802
- return value ? "" : t$g("areaEmpty");
3803
- case "addressDetail":
3804
- return value ? "" : t$g("addressEmpty");
3805
- case "postalCode":
3806
- return value && !props.postalValidator(value) ? t$g("postalEmpty") : "";
3807
- }
3808
- };
3809
- var onSave = () => {
3810
- var items = ["name", "tel"];
3811
- if (props.showArea) {
3812
- items.push("areaCode");
3813
- }
3814
- if (props.showDetail) {
3815
- items.push("addressDetail");
3816
- }
3817
- if (props.showPostal) {
3818
- items.push("postalCode");
3819
- }
3820
- var isValid = items.every((item) => {
3821
- var msg = getErrorMessage(item);
3822
- if (msg) {
3823
- state.errorInfo[item] = msg;
3894
+ var rules = vue.computed(() => {
3895
+ var {
3896
+ validator,
3897
+ telValidator,
3898
+ postalValidator
3899
+ } = props;
3900
+ var makeRule = (name2, emptyMessage) => ({
3901
+ validator: (value) => {
3902
+ if (validator) {
3903
+ var message = validator(name2, value);
3904
+ if (message) {
3905
+ return message;
3906
+ }
3907
+ }
3908
+ if (!value) {
3909
+ return emptyMessage;
3910
+ }
3911
+ return true;
3824
3912
  }
3825
- return !msg;
3826
3913
  });
3827
- if (isValid && !props.isSaving) {
3828
- emit("save", state.data);
3829
- }
3830
- };
3914
+ return {
3915
+ name: [makeRule("name", t$h("nameEmpty"))],
3916
+ tel: [makeRule("tel", t$h("telInvalid")), {
3917
+ validator: telValidator,
3918
+ message: t$h("telInvalid")
3919
+ }],
3920
+ areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
3921
+ addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))],
3922
+ postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
3923
+ validator: postalValidator,
3924
+ message: t$h("postalEmpty")
3925
+ }]
3926
+ };
3927
+ });
3928
+ var onSave = () => emit("save", data);
3831
3929
  var onChangeDetail = (val) => {
3832
- state.data.addressDetail = val;
3930
+ data.addressDetail = val;
3833
3931
  emit("change-detail", val);
3834
3932
  };
3835
3933
  var onAreaConfirm = (values) => {
3836
3934
  values = values.filter(Boolean);
3837
3935
  if (values.some((value) => !value.code)) {
3838
- Toast(t$g("areaEmpty"));
3839
- return;
3936
+ Toast(t$h("areaEmpty"));
3937
+ } else {
3938
+ showAreaPopup.value = false;
3939
+ assignAreaValues();
3940
+ emit("change-area", values);
3840
3941
  }
3841
- state.showAreaPopup = false;
3842
- assignAreaValues();
3843
- emit("change-area", values);
3844
3942
  };
3845
- var onDelete = () => emit("delete", state.data);
3846
- var getArea = () => areaRef.value ? areaRef.value.getValues() : [];
3943
+ var onDelete = () => emit("delete", data);
3944
+ var getArea = () => {
3945
+ var _areaRef$value;
3946
+ return ((_areaRef$value = areaRef.value) == null ? void 0 : _areaRef$value.getValues()) || [];
3947
+ };
3847
3948
  var setAreaCode = (code) => {
3848
- state.data.areaCode = code || "";
3949
+ data.areaCode = code || "";
3849
3950
  if (code) {
3850
3951
  vue.nextTick(assignAreaValues);
3851
3952
  }
3852
3953
  };
3853
3954
  var onDetailBlur = () => {
3854
3955
  setTimeout(() => {
3855
- state.detailFocused = false;
3956
+ detailFocused.value = false;
3856
3957
  });
3857
3958
  };
3858
3959
  var setAddressDetail = (value) => {
3859
- state.data.addressDetail = value;
3960
+ data.addressDetail = value;
3860
3961
  };
3861
3962
  var renderSetDefaultCell = () => {
3862
3963
  if (props.showSetDefault) {
3863
3964
  var _slots = {
3864
3965
  "right-icon": () => vue.createVNode(Switch, {
3865
- "modelValue": state.data.isDefault,
3866
- "onUpdate:modelValue": ($event) => state.data.isDefault = $event,
3966
+ "modelValue": data.isDefault,
3967
+ "onUpdate:modelValue": ($event) => data.isDefault = $event,
3867
3968
  "size": "24",
3868
3969
  "onChange": (event) => emit("change-default", event)
3869
3970
  }, null)
3870
3971
  };
3871
3972
  return vue.withDirectives(vue.createVNode(Cell, {
3872
3973
  "center": true,
3873
- "title": t$g("defaultAddress"),
3874
- "class": bem$17("default")
3974
+ "title": t$h("defaultAddress"),
3975
+ "class": bem$16("default")
3875
3976
  }, _slots), [[vue.vShow, !hideBottomFields.value]]);
3876
3977
  }
3877
- return null;
3878
3978
  };
3879
3979
  useExpose({
3880
3980
  getArea,
3881
3981
  setAreaCode,
3882
3982
  setAddressDetail
3883
3983
  });
3884
- vue.watch(() => props.areaList, () => setAreaCode(state.data.areaCode));
3984
+ vue.watch(() => props.areaList, () => setAreaCode(data.areaCode));
3885
3985
  vue.watch(() => props.addressInfo, (value) => {
3886
- state.data = extend({}, DEFAULT_DATA, value);
3986
+ extend(data, DEFAULT_DATA, value);
3887
3987
  setAreaCode(value.areaCode);
3888
3988
  }, {
3889
3989
  deep: true,
3890
3990
  immediate: true
3891
3991
  });
3892
3992
  return () => {
3893
- var {
3894
- data,
3895
- errorInfo
3896
- } = state;
3897
3993
  var {
3898
3994
  disableArea
3899
3995
  } = props;
3900
- return vue.createVNode("div", {
3901
- "class": bem$17()
3902
- }, [vue.createVNode("div", {
3903
- "class": bem$17("fields")
3904
- }, [vue.createVNode(Field, {
3905
- "modelValue": data.name,
3906
- "onUpdate:modelValue": ($event) => data.name = $event,
3907
- "clearable": true,
3908
- "label": t$g("name"),
3909
- "placeholder": t$g("name"),
3910
- "errorMessage": errorInfo.name,
3911
- "onFocus": () => onFocus("name")
3912
- }, null), vue.createVNode(Field, {
3913
- "modelValue": data.tel,
3914
- "onUpdate:modelValue": ($event) => data.tel = $event,
3915
- "clearable": true,
3916
- "type": "tel",
3917
- "label": t$g("tel"),
3918
- "maxlength": props.telMaxlength,
3919
- "placeholder": t$g("tel"),
3920
- "errorMessage": errorInfo.tel,
3921
- "onFocus": () => onFocus("tel")
3922
- }, null), vue.withDirectives(vue.createVNode(Field, {
3923
- "readonly": true,
3924
- "label": t$g("area"),
3925
- "is-link": !disableArea,
3926
- "modelValue": areaText.value,
3927
- "placeholder": props.areaPlaceholder || t$g("area"),
3928
- "errorMessage": errorInfo.areaCode,
3929
- "onFocus": () => onFocus("areaCode"),
3930
- "onClick": () => {
3931
- emit("click-area");
3932
- state.showAreaPopup = !disableArea;
3933
- }
3934
- }, null), [[vue.vShow, props.showArea]]), vue.createVNode(AddressEditDetail, {
3935
- "show": props.showDetail,
3936
- "value": data.addressDetail,
3937
- "focused": state.detailFocused,
3938
- "detailRows": props.detailRows,
3939
- "errorMessage": errorInfo.addressDetail,
3940
- "searchResult": props.searchResult,
3941
- "detailMaxlength": props.detailMaxlength,
3942
- "showSearchResult": props.showSearchResult,
3943
- "onBlur": onDetailBlur,
3944
- "onFocus": () => onFocus("addressDetail"),
3945
- "onInput": onChangeDetail,
3946
- "onSelect-search": (event) => emit("select-search", event)
3947
- }, null), props.showPostal && vue.withDirectives(vue.createVNode(Field, {
3948
- "modelValue": data.postalCode,
3949
- "onUpdate:modelValue": ($event) => data.postalCode = $event,
3950
- "type": "tel",
3951
- "label": t$g("postal"),
3952
- "maxlength": "6",
3953
- "placeholder": t$g("postal"),
3954
- "errorMessage": errorInfo.postalCode,
3955
- "onFocus": () => onFocus("postalCode")
3956
- }, null), [[vue.vShow, !hideBottomFields.value]]), slots.default == null ? void 0 : slots.default()]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
3957
- "class": bem$17("buttons")
3958
- }, [vue.createVNode(Button, {
3959
- "block": true,
3960
- "round": true,
3961
- "type": "danger",
3962
- "text": props.saveButtonText || t$g("save"),
3963
- "class": bem$17("button"),
3964
- "loading": props.isSaving,
3965
- "onClick": onSave
3966
- }, null), props.showDelete && vue.createVNode(Button, {
3967
- "block": true,
3968
- "round": true,
3969
- "class": bem$17("button"),
3970
- "loading": props.isDeleting,
3971
- "text": props.deleteButtonText || t$g("delete"),
3972
- "onClick": onDelete
3973
- }, null)]), [[vue.vShow, !hideBottomFields.value]]), vue.createVNode(Popup, {
3974
- "show": state.showAreaPopup,
3975
- "onUpdate:show": ($event) => state.showAreaPopup = $event,
3976
- "round": true,
3977
- "teleport": "body",
3978
- "position": "bottom",
3979
- "lazyRender": false
3996
+ return vue.createVNode(Form, {
3997
+ "class": bem$16(),
3998
+ "onSubmit": onSave
3980
3999
  }, {
3981
- default: () => [vue.createVNode(Area, {
3982
- "ref": areaRef,
3983
- "value": data.areaCode,
3984
- "loading": !areaListLoaded.value,
3985
- "areaList": props.areaList,
3986
- "columnsPlaceholder": props.areaColumnsPlaceholder,
3987
- "onConfirm": onAreaConfirm,
3988
- "onCancel": () => {
3989
- state.showAreaPopup = false;
4000
+ default: () => [vue.createVNode("div", {
4001
+ "class": bem$16("fields")
4002
+ }, [vue.createVNode(Field, {
4003
+ "modelValue": data.name,
4004
+ "onUpdate:modelValue": ($event) => data.name = $event,
4005
+ "clearable": true,
4006
+ "label": t$h("name"),
4007
+ "rules": rules.value.name,
4008
+ "placeholder": t$h("name"),
4009
+ "onFocus": () => onFocus("name")
4010
+ }, null), vue.createVNode(Field, {
4011
+ "modelValue": data.tel,
4012
+ "onUpdate:modelValue": ($event) => data.tel = $event,
4013
+ "clearable": true,
4014
+ "type": "tel",
4015
+ "label": t$h("tel"),
4016
+ "rules": rules.value.tel,
4017
+ "maxlength": props.telMaxlength,
4018
+ "placeholder": t$h("tel"),
4019
+ "onFocus": () => onFocus("tel")
4020
+ }, null), vue.withDirectives(vue.createVNode(Field, {
4021
+ "readonly": true,
4022
+ "label": t$h("area"),
4023
+ "is-link": !disableArea,
4024
+ "modelValue": areaText.value,
4025
+ "rules": rules.value.areaCode,
4026
+ "placeholder": props.areaPlaceholder || t$h("area"),
4027
+ "onFocus": () => onFocus("areaCode"),
4028
+ "onClick": () => {
4029
+ emit("click-area");
4030
+ showAreaPopup.value = !disableArea;
3990
4031
  }
3991
- }, null)]
3992
- })]);
4032
+ }, null), [[vue.vShow, props.showArea]]), vue.createVNode(AddressEditDetail, {
4033
+ "show": props.showDetail,
4034
+ "rows": props.detailRows,
4035
+ "rules": rules.value.addressDetail,
4036
+ "value": data.addressDetail,
4037
+ "focused": detailFocused.value,
4038
+ "maxlength": props.detailMaxlength,
4039
+ "searchResult": props.searchResult,
4040
+ "showSearchResult": props.showSearchResult,
4041
+ "onBlur": onDetailBlur,
4042
+ "onFocus": () => onFocus("addressDetail"),
4043
+ "onInput": onChangeDetail,
4044
+ "onSelect-search": (event) => emit("select-search", event)
4045
+ }, null), props.showPostal && vue.withDirectives(vue.createVNode(Field, {
4046
+ "modelValue": data.postalCode,
4047
+ "onUpdate:modelValue": ($event) => data.postalCode = $event,
4048
+ "type": "tel",
4049
+ "rules": rules.value.postalCode,
4050
+ "label": t$h("postal"),
4051
+ "maxlength": "6",
4052
+ "placeholder": t$h("postal"),
4053
+ "onFocus": () => onFocus("postalCode")
4054
+ }, null), [[vue.vShow, !hideBottomFields.value]]), slots.default == null ? void 0 : slots.default()]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
4055
+ "class": bem$16("buttons")
4056
+ }, [vue.createVNode(Button, {
4057
+ "block": true,
4058
+ "round": true,
4059
+ "type": "danger",
4060
+ "text": props.saveButtonText || t$h("save"),
4061
+ "class": bem$16("button"),
4062
+ "loading": props.isSaving,
4063
+ "nativeType": "submit"
4064
+ }, null), props.showDelete && vue.createVNode(Button, {
4065
+ "block": true,
4066
+ "round": true,
4067
+ "class": bem$16("button"),
4068
+ "loading": props.isDeleting,
4069
+ "text": props.deleteButtonText || t$h("delete"),
4070
+ "onClick": onDelete
4071
+ }, null)]), [[vue.vShow, !hideBottomFields.value]]), vue.createVNode(Popup, {
4072
+ "show": showAreaPopup.value,
4073
+ "onUpdate:show": ($event) => showAreaPopup.value = $event,
4074
+ "round": true,
4075
+ "teleport": "body",
4076
+ "position": "bottom",
4077
+ "lazyRender": false
4078
+ }, {
4079
+ default: () => [vue.createVNode(Area, {
4080
+ "ref": areaRef,
4081
+ "value": data.areaCode,
4082
+ "loading": !areaListLoaded.value,
4083
+ "areaList": props.areaList,
4084
+ "columnsPlaceholder": props.areaColumnsPlaceholder,
4085
+ "onConfirm": onAreaConfirm,
4086
+ "onCancel": () => {
4087
+ showAreaPopup.value = false;
4088
+ }
4089
+ }, null)]
4090
+ })]
4091
+ });
3993
4092
  };
3994
4093
  }
3995
4094
  });
3996
4095
  var AddressEdit = withInstall(_AddressEdit);
3997
- var [name$1a, bem$16] = createNamespace("radio-group");
4096
+ var [name$19, bem$15] = createNamespace("radio-group");
3998
4097
  var radioGroupProps = {
3999
4098
  disabled: Boolean,
4000
4099
  iconSize: numericProp,
@@ -4002,9 +4101,9 @@
4002
4101
  modelValue: unknownProp,
4003
4102
  checkedColor: String
4004
4103
  };
4005
- var RADIO_KEY = Symbol(name$1a);
4104
+ var RADIO_KEY = Symbol(name$19);
4006
4105
  var _RadioGroup = vue.defineComponent({
4007
- name: name$1a,
4106
+ name: name$19,
4008
4107
  props: radioGroupProps,
4009
4108
  emits: ["change", "update:modelValue"],
4010
4109
  setup(props, _ref) {
@@ -4023,13 +4122,13 @@
4023
4122
  });
4024
4123
  useCustomFieldValue(() => props.modelValue);
4025
4124
  return () => vue.createVNode("div", {
4026
- "class": bem$16([props.direction]),
4125
+ "class": bem$15([props.direction]),
4027
4126
  "role": "radiogroup"
4028
4127
  }, [slots.default == null ? void 0 : slots.default()]);
4029
4128
  }
4030
4129
  });
4031
4130
  var RadioGroup = withInstall(_RadioGroup);
4032
- var [name$19, bem$15] = createNamespace("tag");
4131
+ var [name$18, bem$14] = createNamespace("tag");
4033
4132
  var tagProps = {
4034
4133
  size: String,
4035
4134
  mark: Boolean,
@@ -4042,7 +4141,7 @@
4042
4141
  closeable: Boolean
4043
4142
  };
4044
4143
  var _Tag = vue.defineComponent({
4045
- name: name$19,
4144
+ name: name$18,
4046
4145
  props: tagProps,
4047
4146
  emits: ["close"],
4048
4147
  setup(props, _ref) {
@@ -4085,12 +4184,12 @@
4085
4184
  }
4086
4185
  var CloseIcon = closeable && vue.createVNode(Icon, {
4087
4186
  "name": "cross",
4088
- "class": bem$15("close"),
4187
+ "class": bem$14("close"),
4089
4188
  "onClick": onClose
4090
4189
  }, null);
4091
4190
  return vue.createVNode("span", {
4092
4191
  "style": getStyle(),
4093
- "class": bem$15([classes, type])
4192
+ "class": bem$14([classes, type])
4094
4193
  }, [slots.default == null ? void 0 : slots.default(), CloseIcon]);
4095
4194
  };
4096
4195
  return () => vue.createVNode(vue.Transition, {
@@ -4194,16 +4293,16 @@
4194
4293
  disabled: disabled.value,
4195
4294
  "label-disabled": props.labelDisabled
4196
4295
  }, direction.value]),
4197
- "tabindex": disabled.value ? -1 : 0,
4296
+ "tabindex": disabled.value ? void 0 : 0,
4198
4297
  "aria-checked": props.checked,
4199
4298
  "onClick": onClick
4200
4299
  }, [nodes]);
4201
4300
  };
4202
4301
  }
4203
4302
  });
4204
- var [name$18, bem$14] = createNamespace("radio");
4303
+ var [name$17, bem$13] = createNamespace("radio");
4205
4304
  var _Radio = vue.defineComponent({
4206
- name: name$18,
4305
+ name: name$17,
4207
4306
  props: checkerProps,
4208
4307
  emits: ["update:modelValue"],
4209
4308
  setup(props, _ref) {
@@ -4226,7 +4325,7 @@
4226
4325
  }
4227
4326
  };
4228
4327
  return () => vue.createVNode(Checker, vue.mergeProps({
4229
- "bem": bem$14,
4328
+ "bem": bem$13,
4230
4329
  "role": "radio",
4231
4330
  "parent": parent,
4232
4331
  "checked": checked(),
@@ -4235,9 +4334,9 @@
4235
4334
  }
4236
4335
  });
4237
4336
  var Radio = withInstall(_Radio);
4238
- var [name$17, bem$13] = createNamespace("address-item");
4337
+ var [name$16, bem$12] = createNamespace("address-item");
4239
4338
  var AddressListItem = vue.defineComponent({
4240
- name: name$17,
4339
+ name: name$16,
4241
4340
  props: {
4242
4341
  address: makeRequiredProp(Object),
4243
4342
  disabled: Boolean,
@@ -4258,7 +4357,7 @@
4258
4357
  };
4259
4358
  var renderRightIcon = () => vue.createVNode(Icon, {
4260
4359
  "name": "edit",
4261
- "class": bem$13("edit"),
4360
+ "class": bem$12("edit"),
4262
4361
  "onClick": (event) => {
4263
4362
  event.stopPropagation();
4264
4363
  emit("edit");
@@ -4273,7 +4372,7 @@
4273
4372
  return vue.createVNode(Tag, {
4274
4373
  "type": "danger",
4275
4374
  "round": true,
4276
- "class": bem$13("tag")
4375
+ "class": bem$12("tag")
4277
4376
  }, {
4278
4377
  default: () => [props.defaultTagText]
4279
4378
  });
@@ -4286,9 +4385,9 @@
4286
4385
  switchable
4287
4386
  } = props;
4288
4387
  var Info = [vue.createVNode("div", {
4289
- "class": bem$13("name")
4388
+ "class": bem$12("name")
4290
4389
  }, [address.name + " " + address.tel, renderTag()]), vue.createVNode("div", {
4291
- "class": bem$13("address")
4390
+ "class": bem$12("address")
4292
4391
  }, [address.address])];
4293
4392
  if (switchable && !disabled) {
4294
4393
  return vue.createVNode(Radio, {
@@ -4305,13 +4404,13 @@
4305
4404
  disabled
4306
4405
  } = props;
4307
4406
  return vue.createVNode("div", {
4308
- "class": bem$13({
4407
+ "class": bem$12({
4309
4408
  disabled
4310
4409
  }),
4311
4410
  "onClick": onClick
4312
4411
  }, [vue.createVNode(Cell, {
4313
4412
  "border": false,
4314
- "valueClass": bem$13("value")
4413
+ "valueClass": bem$12("value")
4315
4414
  }, {
4316
4415
  value: renderContent,
4317
4416
  "right-icon": renderRightIcon
@@ -4321,7 +4420,7 @@
4321
4420
  };
4322
4421
  }
4323
4422
  });
4324
- var [name$16, bem$12, t$f] = createNamespace("address-list");
4423
+ var [name$15, bem$11, t$g] = createNamespace("address-list");
4325
4424
  var addressListProps = {
4326
4425
  list: makeArrayProp(),
4327
4426
  modelValue: numericProp,
@@ -4332,7 +4431,7 @@
4332
4431
  defaultTagText: String
4333
4432
  };
4334
4433
  var _AddressList = vue.defineComponent({
4335
- name: name$16,
4434
+ name: name$15,
4336
4435
  props: addressListProps,
4337
4436
  emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
4338
4437
  setup(props, _ref) {
@@ -4369,23 +4468,23 @@
4369
4468
  }
4370
4469
  };
4371
4470
  var renderBottom = () => vue.createVNode("div", {
4372
- "class": [bem$12("bottom"), "van-safe-area-bottom"]
4471
+ "class": [bem$11("bottom"), "van-safe-area-bottom"]
4373
4472
  }, [vue.createVNode(Button, {
4374
4473
  "round": true,
4375
4474
  "block": true,
4376
4475
  "type": "danger",
4377
- "text": props.addButtonText || t$f("add"),
4378
- "class": bem$12("add"),
4476
+ "text": props.addButtonText || t$g("add"),
4477
+ "class": bem$11("add"),
4379
4478
  "onClick": () => emit("add")
4380
4479
  }, null)]);
4381
4480
  return () => {
4382
4481
  var List2 = renderList(props.list);
4383
4482
  var DisabledList = renderList(props.disabledList, true);
4384
4483
  var DisabledText = props.disabledText && vue.createVNode("div", {
4385
- "class": bem$12("disabled-text")
4484
+ "class": bem$11("disabled-text")
4386
4485
  }, [props.disabledText]);
4387
4486
  return vue.createVNode("div", {
4388
- "class": bem$12()
4487
+ "class": bem$11()
4389
4488
  }, [slots.top == null ? void 0 : slots.top(), vue.createVNode(RadioGroup, {
4390
4489
  "modelValue": props.modelValue
4391
4490
  }, {
@@ -4395,8 +4494,8 @@
4395
4494
  }
4396
4495
  });
4397
4496
  var AddressList = withInstall(_AddressList);
4398
- var [name$15, bem$11, t$e] = createNamespace("calendar");
4399
- var formatMonthTitle = (date) => t$e("monthTitle", date.getFullYear(), date.getMonth() + 1);
4497
+ var [name$14, bem$10, t$f] = createNamespace("calendar");
4498
+ var formatMonthTitle = (date) => t$f("monthTitle", date.getFullYear(), date.getMonth() + 1);
4400
4499
  function compareMonth(date1, date2) {
4401
4500
  var year1 = date1.getFullYear();
4402
4501
  var year2 = date2.getFullYear();
@@ -4483,9 +4582,9 @@
4483
4582
  }));
4484
4583
  return height2;
4485
4584
  };
4486
- var [name$14] = createNamespace("calendar-day");
4585
+ var [name$13] = createNamespace("calendar-day");
4487
4586
  var CalendarDay = vue.defineComponent({
4488
- name: name$14,
4587
+ name: name$13,
4489
4588
  props: {
4490
4589
  item: makeRequiredProp(Object),
4491
4590
  color: String,
@@ -4544,7 +4643,7 @@
4544
4643
  } = props.item;
4545
4644
  if (topInfo || slots["top-info"]) {
4546
4645
  return vue.createVNode("div", {
4547
- "class": bem$11("top-info")
4646
+ "class": bem$10("top-info")
4548
4647
  }, [slots["top-info"] ? slots["top-info"](props.item) : topInfo]);
4549
4648
  }
4550
4649
  };
@@ -4554,7 +4653,7 @@
4554
4653
  } = props.item;
4555
4654
  if (bottomInfo || slots["bottom-info"]) {
4556
4655
  return vue.createVNode("div", {
4557
- "class": bem$11("bottom-info")
4656
+ "class": bem$10("bottom-info")
4558
4657
  }, [slots["bottom-info"] ? slots["bottom-info"](props.item) : bottomInfo]);
4559
4658
  }
4560
4659
  };
@@ -4571,7 +4670,7 @@
4571
4670
  var Nodes = [renderTopInfo(), text, renderBottomInfo()];
4572
4671
  if (type === "selected") {
4573
4672
  return vue.createVNode("div", {
4574
- "class": bem$11("selected-day"),
4673
+ "class": bem$10("selected-day"),
4575
4674
  "style": {
4576
4675
  width: rowHeight,
4577
4676
  height: rowHeight,
@@ -4588,21 +4687,21 @@
4588
4687
  } = props.item;
4589
4688
  if (type === "placeholder") {
4590
4689
  return vue.createVNode("div", {
4591
- "class": bem$11("day"),
4690
+ "class": bem$10("day"),
4592
4691
  "style": style.value
4593
4692
  }, null);
4594
4693
  }
4595
4694
  return vue.createVNode("div", {
4596
4695
  "role": "gridcell",
4597
4696
  "style": style.value,
4598
- "class": [bem$11("day", type), className],
4697
+ "class": [bem$10("day", type), className],
4599
4698
  "tabindex": type === "disabled" ? void 0 : -1,
4600
4699
  "onClick": onClick
4601
4700
  }, [renderContent()]);
4602
4701
  };
4603
4702
  }
4604
4703
  });
4605
- var [name$13] = createNamespace("calendar-month");
4704
+ var [name$12] = createNamespace("calendar-month");
4606
4705
  var calendarMonthProps = {
4607
4706
  date: makeRequiredProp(Date),
4608
4707
  type: String,
@@ -4620,7 +4719,7 @@
4620
4719
  firstDayOfWeek: Number
4621
4720
  };
4622
4721
  var CalendarMonth = vue.defineComponent({
4623
- name: name$13,
4722
+ name: name$12,
4624
4723
  props: calendarMonthProps,
4625
4724
  emits: ["click", "update-height"],
4626
4725
  setup(props, _ref) {
@@ -4644,13 +4743,6 @@
4644
4743
  var totalDay = vue.computed(() => getMonthEndDay(props.date.getFullYear(), props.date.getMonth() + 1));
4645
4744
  var shouldRender = vue.computed(() => visible.value || !props.lazyRender);
4646
4745
  var getTitle = () => title.value;
4647
- var scrollIntoView = (body) => {
4648
- var el = props.showSubtitle ? daysRef.value : monthRef.value;
4649
- if (el) {
4650
- var scrollTop = useRect(el).top - useRect(body).top + body.scrollTop;
4651
- setScrollTop(body, scrollTop);
4652
- }
4653
- };
4654
4746
  var getMultipleDayType = (day) => {
4655
4747
  var isSelected = (date) => props.currentDate.some((item) => compareDay(item, date) === 0);
4656
4748
  if (isSelected(day)) {
@@ -4723,24 +4815,24 @@
4723
4815
  var getBottomInfo = (dayType) => {
4724
4816
  if (props.type === "range") {
4725
4817
  if (dayType === "start" || dayType === "end") {
4726
- return t$e(dayType);
4818
+ return t$f(dayType);
4727
4819
  }
4728
4820
  if (dayType === "start-end") {
4729
- return t$e("startEnd");
4821
+ return t$f("startEnd");
4730
4822
  }
4731
4823
  }
4732
4824
  };
4733
4825
  var renderTitle = () => {
4734
4826
  if (props.showMonthTitle) {
4735
4827
  return vue.createVNode("div", {
4736
- "class": bem$11("month-title")
4828
+ "class": bem$10("month-title")
4737
4829
  }, [title.value]);
4738
4830
  }
4739
4831
  };
4740
4832
  var renderMark = () => {
4741
4833
  if (props.showMark && shouldRender.value) {
4742
4834
  return vue.createVNode("div", {
4743
- "class": bem$11("month-mark")
4835
+ "class": bem$10("month-mark")
4744
4836
  }, [props.date.getMonth() + 1]);
4745
4837
  }
4746
4838
  };
@@ -4771,6 +4863,15 @@
4771
4863
  return days2;
4772
4864
  });
4773
4865
  var disabledDays = vue.computed(() => days.value.filter((day) => day.type === "disabled"));
4866
+ var scrollToDate = (body, targetDate) => {
4867
+ if (daysRef.value) {
4868
+ var daysRect = useRect(daysRef.value);
4869
+ var totalRows = placeholders.value.length;
4870
+ var currentRow = Math.ceil((targetDate.getDate() + offset2.value) / 7);
4871
+ var rowOffset = (currentRow - 1) * daysRect.height / totalRows;
4872
+ setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
4873
+ }
4874
+ };
4774
4875
  var renderDay = (item, index2) => vue.createVNode(CalendarDay, {
4775
4876
  "item": item,
4776
4877
  "index": index2,
@@ -4782,24 +4883,24 @@
4782
4883
  var renderDays = () => vue.createVNode("div", {
4783
4884
  "ref": daysRef,
4784
4885
  "role": "grid",
4785
- "class": bem$11("days")
4886
+ "class": bem$10("days")
4786
4887
  }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
4787
4888
  useExpose({
4788
4889
  getTitle,
4789
4890
  getHeight: () => height2.value,
4790
4891
  setVisible,
4791
- scrollIntoView,
4892
+ scrollToDate,
4792
4893
  disabledDays
4793
4894
  });
4794
4895
  return () => vue.createVNode("div", {
4795
- "class": bem$11("month"),
4896
+ "class": bem$10("month"),
4796
4897
  "ref": monthRef
4797
4898
  }, [renderTitle(), renderDays()]);
4798
4899
  }
4799
4900
  });
4800
- var [name$12] = createNamespace("calendar-header");
4901
+ var [name$11] = createNamespace("calendar-header");
4801
4902
  var CalendarHeader = vue.defineComponent({
4802
- name: name$12,
4903
+ name: name$11,
4803
4904
  props: {
4804
4905
  title: String,
4805
4906
  subtitle: String,
@@ -4815,21 +4916,19 @@
4815
4916
  } = _ref;
4816
4917
  var renderTitle = () => {
4817
4918
  if (props.showTitle) {
4818
- var text = props.title || t$e("title");
4919
+ var text = props.title || t$f("title");
4819
4920
  var title = slots.title ? slots.title() : text;
4820
4921
  return vue.createVNode("div", {
4821
- "class": bem$11("header-title")
4922
+ "class": bem$10("header-title")
4822
4923
  }, [title]);
4823
4924
  }
4824
4925
  };
4825
- var onClickSubtitle = (event) => {
4826
- emit("click-subtitle", event);
4827
- };
4926
+ var onClickSubtitle = (event) => emit("click-subtitle", event);
4828
4927
  var renderSubtitle = () => {
4829
4928
  if (props.showSubtitle) {
4830
4929
  var title = slots.subtitle ? slots.subtitle() : props.subtitle;
4831
4930
  return vue.createVNode("div", {
4832
- "class": bem$11("header-subtitle"),
4931
+ "class": bem$10("header-subtitle"),
4833
4932
  "onClick": onClickSubtitle
4834
4933
  }, [title]);
4835
4934
  }
@@ -4838,16 +4937,16 @@
4838
4937
  var {
4839
4938
  firstDayOfWeek
4840
4939
  } = props;
4841
- var weekdays = t$e("weekdays");
4940
+ var weekdays = t$f("weekdays");
4842
4941
  var renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
4843
4942
  return vue.createVNode("div", {
4844
- "class": bem$11("weekdays")
4943
+ "class": bem$10("weekdays")
4845
4944
  }, [renderWeekDays2.map((text) => vue.createVNode("span", {
4846
- "class": bem$11("weekday")
4945
+ "class": bem$10("weekday")
4847
4946
  }, [text]))]);
4848
4947
  };
4849
4948
  return () => vue.createVNode("div", {
4850
- "class": bem$11("header")
4949
+ "class": bem$10("header")
4851
4950
  }, [renderTitle(), renderSubtitle(), renderWeekDays()]);
4852
4951
  }
4853
4952
  });
@@ -4898,7 +4997,7 @@
4898
4997
  }
4899
4998
  };
4900
4999
  var _Calendar = vue.defineComponent({
4901
- name: name$15,
5000
+ name: name$14,
4902
5001
  props: calendarProps,
4903
5002
  emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
4904
5003
  setup(props, _ref) {
@@ -5023,7 +5122,7 @@
5023
5122
  months.value.some((month, index2) => {
5024
5123
  if (compareMonth(month, targetDate) === 0) {
5025
5124
  if (bodyRef.value) {
5026
- monthRefs.value[index2].scrollIntoView(bodyRef.value);
5125
+ monthRefs.value[index2].scrollToDate(bodyRef.value, targetDate);
5027
5126
  }
5028
5127
  return true;
5029
5128
  }
@@ -5032,7 +5131,7 @@
5032
5131
  onScroll();
5033
5132
  });
5034
5133
  };
5035
- var scrollIntoView = () => {
5134
+ var scrollToCurrentDate = () => {
5036
5135
  if (props.poppable && !props.show) {
5037
5136
  return;
5038
5137
  }
@@ -5049,7 +5148,7 @@
5049
5148
  }
5050
5149
  raf(() => {
5051
5150
  bodyHeight = Math.floor(useRect(bodyRef).height);
5052
- scrollIntoView();
5151
+ scrollToCurrentDate();
5053
5152
  });
5054
5153
  };
5055
5154
  var reset = function(date) {
@@ -5057,7 +5156,7 @@
5057
5156
  date = getInitialDate();
5058
5157
  }
5059
5158
  currentDate.value = date;
5060
- scrollIntoView();
5159
+ scrollToCurrentDate();
5061
5160
  };
5062
5161
  var checkRange = (date) => {
5063
5162
  var {
@@ -5067,7 +5166,7 @@
5067
5166
  } = props;
5068
5167
  if (maxRange && calcDateNum(date) > maxRange) {
5069
5168
  if (showRangePrompt) {
5070
- Toast(rangePrompt || t$e("rangePrompt", maxRange));
5169
+ Toast(rangePrompt || t$f("rangePrompt", maxRange));
5071
5170
  }
5072
5171
  emit("over-range");
5073
5172
  return false;
@@ -5086,11 +5185,7 @@
5086
5185
  if (complete && props.type === "range") {
5087
5186
  var valid = checkRange(date);
5088
5187
  if (!valid) {
5089
- if (props.showConfirm) {
5090
- setCurrentDate([date[0], getDayByOffset(date[0], +props.maxRange - 1)]);
5091
- } else {
5092
- setCurrentDate(date);
5093
- }
5188
+ setCurrentDate([date[0], getDayByOffset(date[0], +props.maxRange - 1)]);
5094
5189
  return;
5095
5190
  }
5096
5191
  }
@@ -5152,7 +5247,7 @@
5152
5247
  var [unselectedDate] = dates.splice(selectedIndex, 1);
5153
5248
  emit("unselect", cloneDate(unselectedDate));
5154
5249
  } else if (props.maxRange && dates.length >= props.maxRange) {
5155
- Toast(props.rangePrompt || t$e("rangePrompt", props.maxRange));
5250
+ Toast(props.rangePrompt || t$f("rangePrompt", props.maxRange));
5156
5251
  } else {
5157
5252
  select([...dates, date]);
5158
5253
  }
@@ -5186,24 +5281,24 @@
5186
5281
  "block": true,
5187
5282
  "type": "danger",
5188
5283
  "color": props.color,
5189
- "class": bem$11("confirm"),
5284
+ "class": bem$10("confirm"),
5190
5285
  "disabled": disabled,
5191
5286
  "nativeType": "button",
5192
5287
  "onClick": onConfirm
5193
5288
  }, {
5194
5289
  default: () => [slot ? slot({
5195
5290
  disabled
5196
- }) : text || t$e("confirm")]
5291
+ }) : text || t$f("confirm")]
5197
5292
  });
5198
5293
  }
5199
5294
  };
5200
5295
  var renderFooter = () => vue.createVNode("div", {
5201
- "class": [bem$11("footer"), {
5296
+ "class": [bem$10("footer"), {
5202
5297
  "van-safe-area-bottom": props.safeAreaInsetBottom
5203
5298
  }]
5204
5299
  }, [renderFooterButton()]);
5205
5300
  var renderCalendar = () => vue.createVNode("div", {
5206
- "class": bem$11()
5301
+ "class": bem$10()
5207
5302
  }, [vue.createVNode(CalendarHeader, {
5208
5303
  "title": props.title,
5209
5304
  "subtitle": subtitle.value,
@@ -5213,7 +5308,7 @@
5213
5308
  "onClick-subtitle": (event) => emit("click-subtitle", event)
5214
5309
  }, pick(slots, ["title", "subtitle"])), vue.createVNode("div", {
5215
5310
  "ref": bodyRef,
5216
- "class": bem$11("body"),
5311
+ "class": bem$10("body"),
5217
5312
  "onScroll": onScroll
5218
5313
  }, [months.value.map(renderMonth)]), renderFooter()]);
5219
5314
  vue.watch(() => props.show, init);
@@ -5223,7 +5318,7 @@
5223
5318
  value = null;
5224
5319
  }
5225
5320
  currentDate.value = value;
5226
- scrollIntoView();
5321
+ scrollToCurrentDate();
5227
5322
  });
5228
5323
  useExpose({
5229
5324
  reset,
@@ -5234,7 +5329,7 @@
5234
5329
  if (props.poppable) {
5235
5330
  return vue.createVNode(Popup, {
5236
5331
  "show": props.show,
5237
- "class": bem$11("popup"),
5332
+ "class": bem$10("popup"),
5238
5333
  "round": props.round,
5239
5334
  "position": props.position,
5240
5335
  "closeable": props.showTitle || props.showSubtitle,
@@ -5251,7 +5346,7 @@
5251
5346
  }
5252
5347
  });
5253
5348
  var Calendar = withInstall(_Calendar);
5254
- var [name$11, bem$10] = createNamespace("image");
5349
+ var [name$10, bem$$] = createNamespace("image");
5255
5350
  var imageProps = {
5256
5351
  src: String,
5257
5352
  alt: String,
@@ -5269,7 +5364,7 @@
5269
5364
  loadingIcon: makeStringProp("photo")
5270
5365
  };
5271
5366
  var _Image = vue.defineComponent({
5272
- name: name$11,
5367
+ name: name$10,
5273
5368
  props: imageProps,
5274
5369
  emits: ["load", "error"],
5275
5370
  setup(props, _ref) {
@@ -5284,13 +5379,10 @@
5284
5379
  $Lazyload
5285
5380
  } = vue.getCurrentInstance().proxy;
5286
5381
  var style = vue.computed(() => {
5287
- var style2 = {};
5288
- if (isDef(props.width)) {
5289
- style2.width = addUnit(props.width);
5290
- }
5291
- if (isDef(props.height)) {
5292
- style2.height = addUnit(props.height);
5293
- }
5382
+ var style2 = {
5383
+ width: addUnit(props.width),
5384
+ height: addUnit(props.height)
5385
+ };
5294
5386
  if (isDef(props.radius)) {
5295
5387
  style2.overflow = "hidden";
5296
5388
  style2.borderRadius = addUnit(props.radius);
@@ -5324,13 +5416,13 @@
5324
5416
  var renderPlaceholder = () => {
5325
5417
  if (loading.value && props.showLoading) {
5326
5418
  return vue.createVNode("div", {
5327
- "class": bem$10("loading")
5328
- }, [renderIcon(props.loadingIcon, bem$10("loading-icon"), slots.loading)]);
5419
+ "class": bem$$("loading")
5420
+ }, [renderIcon(props.loadingIcon, bem$$("loading-icon"), slots.loading)]);
5329
5421
  }
5330
5422
  if (error.value && props.showError) {
5331
5423
  return vue.createVNode("div", {
5332
- "class": bem$10("error")
5333
- }, [renderIcon(props.errorIcon, bem$10("error-icon"), slots.error)]);
5424
+ "class": bem$$("error")
5425
+ }, [renderIcon(props.errorIcon, bem$$("error-icon"), slots.error)]);
5334
5426
  }
5335
5427
  };
5336
5428
  var renderImage = () => {
@@ -5339,7 +5431,7 @@
5339
5431
  }
5340
5432
  var attrs = {
5341
5433
  alt: props.alt,
5342
- class: bem$10("img"),
5434
+ class: bem$$("img"),
5343
5435
  style: {
5344
5436
  objectFit: props.fit
5345
5437
  }
@@ -5380,7 +5472,7 @@
5380
5472
  });
5381
5473
  }
5382
5474
  return () => vue.createVNode("div", {
5383
- "class": bem$10({
5475
+ "class": bem$$({
5384
5476
  round: props.round
5385
5477
  }),
5386
5478
  "style": style.value
@@ -5388,7 +5480,7 @@
5388
5480
  }
5389
5481
  });
5390
5482
  var Image$1 = withInstall(_Image);
5391
- var [name$10, bem$$] = createNamespace("card");
5483
+ var [name$$, bem$_] = createNamespace("card");
5392
5484
  var cardProps = {
5393
5485
  tag: String,
5394
5486
  num: numericProp,
@@ -5403,7 +5495,7 @@
5403
5495
  originPrice: numericProp
5404
5496
  };
5405
5497
  var _Card = vue.defineComponent({
5406
- name: name$10,
5498
+ name: name$$,
5407
5499
  props: cardProps,
5408
5500
  emits: ["click-thumb"],
5409
5501
  setup(props, _ref) {
@@ -5417,14 +5509,14 @@
5417
5509
  }
5418
5510
  if (props.title) {
5419
5511
  return vue.createVNode("div", {
5420
- "class": [bem$$("title"), "van-multi-ellipsis--l2"]
5512
+ "class": [bem$_("title"), "van-multi-ellipsis--l2"]
5421
5513
  }, [props.title]);
5422
5514
  }
5423
5515
  };
5424
5516
  var renderThumbTag = () => {
5425
5517
  if (slots.tag || props.tag) {
5426
5518
  return vue.createVNode("div", {
5427
- "class": bem$$("tag")
5519
+ "class": bem$_("tag")
5428
5520
  }, [slots.tag ? slots.tag() : vue.createVNode(Tag, {
5429
5521
  "mark": true,
5430
5522
  "type": "danger"
@@ -5449,7 +5541,7 @@
5449
5541
  if (slots.thumb || props.thumb) {
5450
5542
  return vue.createVNode("a", {
5451
5543
  "href": props.thumbLink,
5452
- "class": bem$$("thumb"),
5544
+ "class": bem$_("thumb"),
5453
5545
  "onClick": (event) => emit("click-thumb", event)
5454
5546
  }, [renderThumbImage(), renderThumbTag()]);
5455
5547
  }
@@ -5460,18 +5552,18 @@
5460
5552
  }
5461
5553
  if (props.desc) {
5462
5554
  return vue.createVNode("div", {
5463
- "class": [bem$$("desc"), "van-ellipsis"]
5555
+ "class": [bem$_("desc"), "van-ellipsis"]
5464
5556
  }, [props.desc]);
5465
5557
  }
5466
5558
  };
5467
5559
  var renderPriceText = () => {
5468
5560
  var priceArr = props.price.toString().split(".");
5469
5561
  return vue.createVNode("div", null, [vue.createVNode("span", {
5470
- "class": bem$$("price-currency")
5562
+ "class": bem$_("price-currency")
5471
5563
  }, [props.currency]), vue.createVNode("span", {
5472
- "class": bem$$("price-integer")
5564
+ "class": bem$_("price-integer")
5473
5565
  }, [priceArr[0]]), vue.createTextVNode("."), vue.createVNode("span", {
5474
- "class": bem$$("price-decimal")
5566
+ "class": bem$_("price-decimal")
5475
5567
  }, [priceArr[1]])]);
5476
5568
  };
5477
5569
  return () => {
@@ -5481,26 +5573,26 @@
5481
5573
  var showOriginPrice = slots["origin-price"] || isDef(props.originPrice);
5482
5574
  var showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
5483
5575
  var Price = showPrice && vue.createVNode("div", {
5484
- "class": bem$$("price")
5576
+ "class": bem$_("price")
5485
5577
  }, [slots.price ? slots.price() : renderPriceText()]);
5486
5578
  var OriginPrice = showOriginPrice && vue.createVNode("div", {
5487
- "class": bem$$("origin-price")
5579
+ "class": bem$_("origin-price")
5488
5580
  }, [slots["origin-price"] ? slots["origin-price"]() : props.currency + " " + props.originPrice]);
5489
5581
  var Num = showNum && vue.createVNode("div", {
5490
- "class": bem$$("num")
5582
+ "class": bem$_("num")
5491
5583
  }, [slots.num ? slots.num() : "x" + props.num]);
5492
5584
  var Footer = slots.footer && vue.createVNode("div", {
5493
- "class": bem$$("footer")
5585
+ "class": bem$_("footer")
5494
5586
  }, [slots.footer()]);
5495
5587
  var Bottom = showBottom && vue.createVNode("div", {
5496
- "class": bem$$("bottom")
5588
+ "class": bem$_("bottom")
5497
5589
  }, [(_slots$priceTop = slots["price-top"]) == null ? void 0 : _slots$priceTop.call(slots), Price, OriginPrice, Num, slots.bottom == null ? void 0 : slots.bottom()]);
5498
5590
  return vue.createVNode("div", {
5499
- "class": bem$$()
5591
+ "class": bem$_()
5500
5592
  }, [vue.createVNode("div", {
5501
- "class": bem$$("header")
5593
+ "class": bem$_("header")
5502
5594
  }, [renderThumb(), vue.createVNode("div", {
5503
- "class": bem$$("content", {
5595
+ "class": bem$_("content", {
5504
5596
  centered: props.centered
5505
5597
  })
5506
5598
  }, [vue.createVNode("div", null, [renderTitle(), renderDesc(), slots.tags == null ? void 0 : slots.tags()]), Bottom])]), Footer]);
@@ -5521,17 +5613,17 @@
5521
5613
  animate();
5522
5614
  }
5523
5615
  function scrollTopTo(scroller, to, duration, callback) {
5524
- var current = getScrollTop(scroller);
5525
- var isDown = current < to;
5616
+ var current2 = getScrollTop(scroller);
5617
+ var isDown = current2 < to;
5526
5618
  var frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
5527
- var step = (to - current) / frames;
5619
+ var step = (to - current2) / frames;
5528
5620
  function animate() {
5529
- current += step;
5530
- if (isDown && current > to || !isDown && current < to) {
5531
- current = to;
5621
+ current2 += step;
5622
+ if (isDown && current2 > to || !isDown && current2 < to) {
5623
+ current2 = to;
5532
5624
  }
5533
- setScrollTop(scroller, current);
5534
- if (isDown && current < to || !isDown && current > to) {
5625
+ setScrollTop(scroller, current2);
5626
+ if (isDown && current2 < to || !isDown && current2 > to) {
5535
5627
  raf(animate);
5536
5628
  } else if (callback) {
5537
5629
  raf(callback);
@@ -5562,7 +5654,7 @@
5562
5654
  vue.onBeforeUnmount(unobserve);
5563
5655
  onMountedOrActivated(observe);
5564
5656
  }
5565
- var [name$$, bem$_] = createNamespace("sticky");
5657
+ var [name$_, bem$Z] = createNamespace("sticky");
5566
5658
  var stickyProps = {
5567
5659
  zIndex: numericProp,
5568
5660
  position: makeStringProp("top"),
@@ -5571,7 +5663,7 @@
5571
5663
  offsetBottom: makeNumericProp(0)
5572
5664
  };
5573
5665
  var _Sticky = vue.defineComponent({
5574
- name: name$$,
5666
+ name: name$_,
5575
5667
  props: stickyProps,
5576
5668
  emits: ["scroll", "change"],
5577
5669
  setup(props, _ref) {
@@ -5664,7 +5756,7 @@
5664
5756
  "ref": root,
5665
5757
  "style": rootStyle.value
5666
5758
  }, [vue.createVNode("div", {
5667
- "class": bem$_({
5759
+ "class": bem$Z({
5668
5760
  fixed: state.fixed
5669
5761
  }),
5670
5762
  "style": stickyStyle.value
@@ -5672,10 +5764,11 @@
5672
5764
  }
5673
5765
  });
5674
5766
  var Sticky = withInstall(_Sticky);
5675
- var [name$_, bem$Z] = createNamespace("tab");
5767
+ var [name$Z, bem$Y] = createNamespace("tab");
5676
5768
  var TabsTitle = vue.defineComponent({
5677
- name: name$_,
5769
+ name: name$Z,
5678
5770
  props: {
5771
+ id: String,
5679
5772
  dot: Boolean,
5680
5773
  type: String,
5681
5774
  color: String,
@@ -5683,6 +5776,7 @@
5683
5776
  badge: numericProp,
5684
5777
  isActive: Boolean,
5685
5778
  disabled: Boolean,
5779
+ controls: String,
5686
5780
  scrollable: Boolean,
5687
5781
  activeColor: String,
5688
5782
  renderTitle: Function,
@@ -5719,7 +5813,7 @@
5719
5813
  });
5720
5814
  var renderText = () => {
5721
5815
  var Text = vue.createVNode("span", {
5722
- "class": bem$Z("text", {
5816
+ "class": bem$Y("text", {
5723
5817
  ellipsis: !props.scrollable
5724
5818
  })
5725
5819
  }, [props.renderTitle ? props.renderTitle() : props.title]);
@@ -5735,17 +5829,21 @@
5735
5829
  return Text;
5736
5830
  };
5737
5831
  return () => vue.createVNode("div", {
5832
+ "id": props.id,
5738
5833
  "role": "tab",
5739
- "class": [bem$Z({
5834
+ "class": [bem$Y({
5740
5835
  active: props.isActive,
5741
5836
  disabled: props.disabled
5742
5837
  })],
5743
5838
  "style": style.value,
5744
- "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
5745
5843
  }, [renderText()]);
5746
5844
  }
5747
5845
  });
5748
- var [name$Z, bem$Y] = createNamespace("swipe");
5846
+ var [name$Y, bem$X] = createNamespace("swipe");
5749
5847
  var swipeProps = {
5750
5848
  loop: truthProp,
5751
5849
  width: numericProp,
@@ -5760,9 +5858,9 @@
5760
5858
  showIndicators: truthProp,
5761
5859
  stopPropagation: truthProp
5762
5860
  };
5763
- var SWIPE_KEY = Symbol(name$Z);
5861
+ var SWIPE_KEY = Symbol(name$Y);
5764
5862
  var _Swipe = vue.defineComponent({
5765
- name: name$Z,
5863
+ name: name$Y,
5766
5864
  props: swipeProps,
5767
5865
  emits: ["change"],
5768
5866
  setup(props, _ref) {
@@ -5780,7 +5878,6 @@
5780
5878
  swiping: false
5781
5879
  });
5782
5880
  var touch = useTouch();
5783
- var windowSize = useWindowSize();
5784
5881
  var {
5785
5882
  children,
5786
5883
  linkChildren
@@ -5957,8 +6054,11 @@
5957
6054
  var onTouchMove = (event) => {
5958
6055
  if (props.touchable && state.swiping) {
5959
6056
  touch.move(event);
5960
- if (isCorrectDirection.value) {
6057
+ var shouldPrevent = isCorrectDirection.value || touch.offsetY.value > touch.offsetX.value === props.vertical;
6058
+ if (shouldPrevent) {
5961
6059
  preventDefault(event, props.stopPropagation);
6060
+ }
6061
+ if (isCorrectDirection.value) {
5962
6062
  move({
5963
6063
  offset: delta.value
5964
6064
  });
@@ -6025,7 +6125,7 @@
6025
6125
  } : void 0;
6026
6126
  return vue.createVNode("i", {
6027
6127
  "style": style,
6028
- "class": bem$Y("indicator", {
6128
+ "class": bem$X("indicator", {
6029
6129
  active
6030
6130
  })
6031
6131
  }, null);
@@ -6038,7 +6138,7 @@
6038
6138
  }
6039
6139
  if (props.showIndicators && count.value > 1) {
6040
6140
  return vue.createVNode("div", {
6041
- "class": bem$Y("indicators", {
6141
+ "class": bem$X("indicators", {
6042
6142
  vertical: props.vertical
6043
6143
  })
6044
6144
  }, [Array(count.value).fill("").map(renderDot)]);
@@ -6060,7 +6160,7 @@
6060
6160
  vue.watch(() => props.initialSwipe, (value) => initialize(+value));
6061
6161
  vue.watch(count, () => initialize(state.active));
6062
6162
  vue.watch(() => props.autoplay, autoplay);
6063
- vue.watch([windowSize.width, windowSize.height], resize);
6163
+ vue.watch([windowWidth, windowHeight], resize);
6064
6164
  vue.watch(usePageVisibility(), (visible) => {
6065
6165
  if (visible === "visible") {
6066
6166
  autoplay();
@@ -6075,10 +6175,10 @@
6075
6175
  vue.onBeforeUnmount(stopAutoplay);
6076
6176
  return () => vue.createVNode("div", {
6077
6177
  "ref": root,
6078
- "class": bem$Y()
6178
+ "class": bem$X()
6079
6179
  }, [vue.createVNode("div", {
6080
6180
  "style": trackStyle.value,
6081
- "class": bem$Y("track", {
6181
+ "class": bem$X("track", {
6082
6182
  vertical: props.vertical
6083
6183
  }),
6084
6184
  "onTouchstart": onTouchStart,
@@ -6089,9 +6189,9 @@
6089
6189
  }
6090
6190
  });
6091
6191
  var Swipe = withInstall(_Swipe);
6092
- var [name$Y, bem$X] = createNamespace("tabs");
6192
+ var [name$X, bem$W] = createNamespace("tabs");
6093
6193
  var TabsContent = vue.defineComponent({
6094
- name: name$Y,
6194
+ name: name$X,
6095
6195
  props: {
6096
6196
  count: makeRequiredProp(Number),
6097
6197
  inited: Boolean,
@@ -6115,7 +6215,7 @@
6115
6215
  return vue.createVNode(Swipe, {
6116
6216
  "ref": swipeRef,
6117
6217
  "loop": false,
6118
- "class": bem$X("track"),
6218
+ "class": bem$W("track"),
6119
6219
  "duration": +props.duration * 1e3,
6120
6220
  "touchable": props.swipeable,
6121
6221
  "lazyRender": props.lazyRender,
@@ -6140,13 +6240,13 @@
6140
6240
  swipeToCurrentTab(props.currentIndex);
6141
6241
  });
6142
6242
  return () => vue.createVNode("div", {
6143
- "class": bem$X("content", {
6243
+ "class": bem$W("content", {
6144
6244
  animated: props.animated || props.swipeable
6145
6245
  })
6146
6246
  }, [renderChildren()]);
6147
6247
  }
6148
6248
  });
6149
- var [name$X, bem$W] = createNamespace("tabs");
6249
+ var [name$W, bem$V] = createNamespace("tabs");
6150
6250
  var tabsProps = {
6151
6251
  type: makeStringProp("line"),
6152
6252
  color: String,
@@ -6168,9 +6268,9 @@
6168
6268
  titleActiveColor: String,
6169
6269
  titleInactiveColor: String
6170
6270
  };
6171
- var TABS_KEY = Symbol(name$X);
6271
+ var TABS_KEY = Symbol(name$W);
6172
6272
  var _Tabs = vue.defineComponent({
6173
- name: name$X,
6273
+ name: name$W,
6174
6274
  props: tabsProps,
6175
6275
  emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active"],
6176
6276
  setup(props, _ref) {
@@ -6184,7 +6284,7 @@
6184
6284
  var root = vue.ref();
6185
6285
  var navRef = vue.ref();
6186
6286
  var wrapRef = vue.ref();
6187
- var windowSize = useWindowSize();
6287
+ var id = useId();
6188
6288
  var scroller = useScrollParent(root);
6189
6289
  var [titleRefs, setTitleRefs] = useRefs();
6190
6290
  var {
@@ -6357,12 +6457,14 @@
6357
6457
  }
6358
6458
  };
6359
6459
  var renderNav = () => children.map((item, index2) => vue.createVNode(TabsTitle, vue.mergeProps({
6460
+ "id": id + "-" + index2,
6360
6461
  "ref": setTitleRefs(index2),
6361
6462
  "type": props.type,
6362
6463
  "color": props.color,
6363
6464
  "style": item.titleStyle,
6364
6465
  "class": item.titleClass,
6365
6466
  "isActive": index2 === state.currentIndex,
6467
+ "controls": item.id,
6366
6468
  "scrollable": scrollable.value,
6367
6469
  "renderTitle": item.$slots.title,
6368
6470
  "activeColor": props.titleActiveColor,
@@ -6377,7 +6479,7 @@
6377
6479
  } = props;
6378
6480
  return vue.createVNode("div", {
6379
6481
  "ref": wrapRef,
6380
- "class": [bem$W("wrap", {
6482
+ "class": [bem$V("wrap", {
6381
6483
  scrollable: scrollable.value
6382
6484
  }), {
6383
6485
  [BORDER_TOP_BOTTOM]: type === "line" && border
@@ -6385,16 +6487,17 @@
6385
6487
  }, [vue.createVNode("div", {
6386
6488
  "ref": navRef,
6387
6489
  "role": "tablist",
6388
- "class": bem$W("nav", [type, {
6490
+ "class": bem$V("nav", [type, {
6389
6491
  complete: scrollable.value
6390
6492
  }]),
6391
- "style": navStyle.value
6493
+ "style": navStyle.value,
6494
+ "aria-orientation": "horizontal"
6392
6495
  }, [(_slots$navLeft = slots["nav-left"]) == null ? void 0 : _slots$navLeft.call(slots), renderNav(), type === "line" && vue.createVNode("div", {
6393
- "class": bem$W("line"),
6496
+ "class": bem$V("line"),
6394
6497
  "style": state.lineStyle
6395
6498
  }, null), (_slots$navRight = slots["nav-right"]) == null ? void 0 : _slots$navRight.call(slots)])]);
6396
6499
  };
6397
- vue.watch([() => props.color, windowSize.width], setLine);
6500
+ vue.watch([() => props.color, windowWidth], setLine);
6398
6501
  vue.watch(() => props.active, (value) => {
6399
6502
  if (value !== currentName.value) {
6400
6503
  setCurrentIndexByName(value);
@@ -6438,6 +6541,7 @@
6438
6541
  target: scroller
6439
6542
  });
6440
6543
  linkChildren({
6544
+ id,
6441
6545
  props,
6442
6546
  setLine,
6443
6547
  onRendered,
@@ -6448,7 +6552,7 @@
6448
6552
  var _slots$navBottom, _slots$navBottom2;
6449
6553
  return vue.createVNode("div", {
6450
6554
  "ref": root,
6451
- "class": bem$W([props.type])
6555
+ "class": bem$V([props.type])
6452
6556
  }, [props.sticky ? vue.createVNode(Sticky, {
6453
6557
  "container": root.value,
6454
6558
  "offsetTop": offsetTopPx.value,
@@ -6472,9 +6576,9 @@
6472
6576
  });
6473
6577
  var TAB_STATUS_KEY = Symbol();
6474
6578
  var useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
6475
- var [name$W, bem$V] = createNamespace("swipe-item");
6579
+ var [name$V, bem$U] = createNamespace("swipe-item");
6476
6580
  var _SwipeItem = vue.defineComponent({
6477
- name: name$W,
6581
+ name: name$V,
6478
6582
  setup(props, _ref) {
6479
6583
  var {
6480
6584
  slots
@@ -6535,13 +6639,13 @@
6535
6639
  setOffset
6536
6640
  });
6537
6641
  return () => vue.createVNode("div", {
6538
- "class": bem$V(),
6642
+ "class": bem$U(),
6539
6643
  "style": style.value
6540
6644
  }, [shouldRender.value ? slots.default == null ? void 0 : slots.default() : null]);
6541
6645
  }
6542
6646
  });
6543
6647
  var SwipeItem = withInstall(_SwipeItem);
6544
- var [name$V, bem$U] = createNamespace("tab");
6648
+ var [name$U, bem$T] = createNamespace("tab");
6545
6649
  var tabProps = extend({}, routeProps, {
6546
6650
  dot: Boolean,
6547
6651
  name: numericProp,
@@ -6553,12 +6657,13 @@
6553
6657
  showZeroBadge: truthProp
6554
6658
  });
6555
6659
  var _Tab = vue.defineComponent({
6556
- name: name$V,
6660
+ name: name$U,
6557
6661
  props: tabProps,
6558
6662
  setup(props, _ref) {
6559
6663
  var {
6560
6664
  slots
6561
6665
  } = _ref;
6666
+ var id = useId();
6562
6667
  var inited = vue.ref(false);
6563
6668
  var {
6564
6669
  parent,
@@ -6592,6 +6697,7 @@
6592
6697
  });
6593
6698
  vue.provide(TAB_STATUS_KEY, active);
6594
6699
  return () => {
6700
+ var label = parent.id + "-" + index2.value;
6595
6701
  var {
6596
6702
  animated,
6597
6703
  swipeable,
@@ -6604,29 +6710,38 @@
6604
6710
  var show = scrollspy || active.value;
6605
6711
  if (animated || swipeable) {
6606
6712
  return vue.createVNode(SwipeItem, {
6713
+ "id": id,
6607
6714
  "role": "tabpanel",
6608
- "aria-hidden": !active.value,
6609
- "class": bem$U("pane-wrapper", {
6715
+ "class": bem$T("panel-wrapper", {
6610
6716
  inactive: !active.value
6611
- })
6717
+ }),
6718
+ "tabindex": active.value ? 0 : -1,
6719
+ "aria-hidden": !active.value,
6720
+ "aria-labelledby": label
6612
6721
  }, {
6613
6722
  default: () => [vue.createVNode("div", {
6614
- "class": bem$U("pane")
6723
+ "class": bem$T("panel")
6615
6724
  }, [slots.default == null ? void 0 : slots.default()])]
6616
6725
  });
6617
6726
  }
6618
6727
  var shouldRender = inited.value || scrollspy || !lazyRender;
6619
6728
  var Content = shouldRender ? slots.default == null ? void 0 : slots.default() : null;
6729
+ useExpose({
6730
+ id
6731
+ });
6620
6732
  return vue.withDirectives(vue.createVNode("div", {
6733
+ "id": id,
6621
6734
  "role": "tabpanel",
6622
- "class": bem$U("pane")
6735
+ "class": bem$T("panel"),
6736
+ "tabindex": show ? 0 : -1,
6737
+ "aria-labelledby": label
6623
6738
  }, [Content]), [[vue.vShow, show]]);
6624
6739
  };
6625
6740
  }
6626
6741
  });
6627
6742
  var Tab = withInstall(_Tab);
6628
6743
  var Tabs = withInstall(_Tabs);
6629
- var [name$U, bem$T, t$d] = createNamespace("cascader");
6744
+ var [name$T, bem$S, t$e] = createNamespace("cascader");
6630
6745
  var cascaderProps = {
6631
6746
  title: String,
6632
6747
  options: makeArrayProp(),
@@ -6639,7 +6754,7 @@
6639
6754
  activeColor: String
6640
6755
  };
6641
6756
  var _Cascader = vue.defineComponent({
6642
- name: name$U,
6757
+ name: name$T,
6643
6758
  props: cascaderProps,
6644
6759
  emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
6645
6760
  setup(props, _ref) {
@@ -6751,37 +6866,45 @@
6751
6866
  return emit("click-tab", name2, title);
6752
6867
  };
6753
6868
  var renderHeader = () => vue.createVNode("div", {
6754
- "class": bem$T("header")
6869
+ "class": bem$S("header")
6755
6870
  }, [vue.createVNode("h2", {
6756
- "class": bem$T("title")
6871
+ "class": bem$S("title")
6757
6872
  }, [slots.title ? slots.title() : props.title]), props.closeable ? vue.createVNode(Icon, {
6758
6873
  "name": props.closeIcon,
6759
- "class": [bem$T("close-icon"), HAPTICS_FEEDBACK],
6874
+ "class": [bem$S("close-icon"), HAPTICS_FEEDBACK],
6760
6875
  "onClick": onClose
6761
6876
  }, null) : null]);
6762
6877
  var renderOption = (option, selectedOption, tabIndex) => {
6763
- var selected = selectedOption && option[valueKey] === selectedOption[valueKey];
6878
+ var {
6879
+ disabled
6880
+ } = option;
6881
+ var selected = !!(selectedOption && option[valueKey] === selectedOption[valueKey]);
6764
6882
  var color = option.color || (selected ? props.activeColor : void 0);
6765
6883
  var Text = slots.option ? slots.option({
6766
6884
  option,
6767
6885
  selected
6768
6886
  }) : vue.createVNode("span", null, [option[textKey]]);
6769
6887
  return vue.createVNode("li", {
6770
- "class": [bem$T("option", {
6888
+ "role": "menuitemradio",
6889
+ "class": [bem$S("option", {
6771
6890
  selected,
6772
- disabled: option.disabled
6891
+ disabled
6773
6892
  }), option.className],
6774
6893
  "style": {
6775
6894
  color
6776
6895
  },
6896
+ "tabindex": disabled ? void 0 : selected ? 0 : -1,
6897
+ "aria-checked": selected,
6898
+ "aria-disabled": disabled || void 0,
6777
6899
  "onClick": () => onSelect(option, tabIndex)
6778
6900
  }, [Text, selected ? vue.createVNode(Icon, {
6779
6901
  "name": "success",
6780
- "class": bem$T("selected-icon")
6902
+ "class": bem$S("selected-icon")
6781
6903
  }, null) : null]);
6782
6904
  };
6783
6905
  var renderOptions = (options, selectedOption, tabIndex) => vue.createVNode("ul", {
6784
- "class": bem$T("options")
6906
+ "role": "menu",
6907
+ "class": bem$S("options")
6785
6908
  }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
6786
6909
  var renderTab = (tab, tabIndex) => {
6787
6910
  var _slots$optionsTop, _slots$optionsBottom;
@@ -6789,11 +6912,11 @@
6789
6912
  options,
6790
6913
  selected
6791
6914
  } = tab;
6792
- var placeholder = props.placeholder || t$d("select");
6915
+ var placeholder = props.placeholder || t$e("select");
6793
6916
  var title = selected ? selected[textKey] : placeholder;
6794
6917
  return vue.createVNode(Tab, {
6795
6918
  "title": title,
6796
- "titleClass": bem$T("tab", {
6919
+ "titleClass": bem$S("tab", {
6797
6920
  unselected: !selected
6798
6921
  })
6799
6922
  }, {
@@ -6808,7 +6931,7 @@
6808
6931
  "active": activeTab.value,
6809
6932
  "onUpdate:active": ($event) => activeTab.value = $event,
6810
6933
  "animated": true,
6811
- "class": bem$T("tabs"),
6934
+ "class": bem$S("tabs"),
6812
6935
  "color": props.activeColor,
6813
6936
  "swipeThreshold": 0,
6814
6937
  "swipeable": props.swipeable,
@@ -6833,19 +6956,19 @@
6833
6956
  updateTabs();
6834
6957
  });
6835
6958
  return () => vue.createVNode("div", {
6836
- "class": bem$T()
6959
+ "class": bem$S()
6837
6960
  }, [renderHeader(), renderTabs()]);
6838
6961
  }
6839
6962
  });
6840
6963
  var Cascader = withInstall(_Cascader);
6841
- var [name$T, bem$S] = createNamespace("cell-group");
6964
+ var [name$S, bem$R] = createNamespace("cell-group");
6842
6965
  var cellGroupProps = {
6843
6966
  title: String,
6844
6967
  inset: Boolean,
6845
6968
  border: truthProp
6846
6969
  };
6847
6970
  var _CellGroup = vue.defineComponent({
6848
- name: name$T,
6971
+ name: name$S,
6849
6972
  inheritAttrs: false,
6850
6973
  props: cellGroupProps,
6851
6974
  setup(props, _ref) {
@@ -6854,14 +6977,14 @@
6854
6977
  attrs
6855
6978
  } = _ref;
6856
6979
  var renderGroup = () => vue.createVNode("div", vue.mergeProps({
6857
- "class": [bem$S({
6980
+ "class": [bem$R({
6858
6981
  inset: props.inset
6859
6982
  }), {
6860
6983
  [BORDER_TOP_BOTTOM]: props.border && !props.inset
6861
6984
  }]
6862
6985
  }, attrs), [slots.default == null ? void 0 : slots.default()]);
6863
6986
  var renderTitle = () => vue.createVNode("div", {
6864
- "class": bem$S("title", {
6987
+ "class": bem$R("title", {
6865
6988
  inset: props.inset
6866
6989
  })
6867
6990
  }, [slots.title ? slots.title() : props.title]);
@@ -6874,7 +6997,7 @@
6874
6997
  }
6875
6998
  });
6876
6999
  var CellGroup = withInstall(_CellGroup);
6877
- var [name$S, bem$R] = createNamespace("checkbox-group");
7000
+ var [name$R, bem$Q] = createNamespace("checkbox-group");
6878
7001
  var checkboxGroupProps = {
6879
7002
  max: numericProp,
6880
7003
  disabled: Boolean,
@@ -6883,9 +7006,9 @@
6883
7006
  modelValue: makeArrayProp(),
6884
7007
  checkedColor: String
6885
7008
  };
6886
- var CHECKBOX_GROUP_KEY = Symbol(name$S);
7009
+ var CHECKBOX_GROUP_KEY = Symbol(name$R);
6887
7010
  var _CheckboxGroup = vue.defineComponent({
6888
- name: name$S,
7011
+ name: name$R,
6889
7012
  props: checkboxGroupProps,
6890
7013
  emits: ["change", "update:modelValue"],
6891
7014
  setup(props, _ref) {
@@ -6933,16 +7056,16 @@
6933
7056
  updateValue
6934
7057
  });
6935
7058
  return () => vue.createVNode("div", {
6936
- "class": bem$R([props.direction])
7059
+ "class": bem$Q([props.direction])
6937
7060
  }, [slots.default == null ? void 0 : slots.default()]);
6938
7061
  }
6939
7062
  });
6940
- var [name$R, bem$Q] = createNamespace("checkbox");
7063
+ var [name$Q, bem$P] = createNamespace("checkbox");
6941
7064
  var checkboxProps = extend({}, checkerProps, {
6942
7065
  bindGroup: truthProp
6943
7066
  });
6944
7067
  var _Checkbox = vue.defineComponent({
6945
- name: name$R,
7068
+ name: name$Q,
6946
7069
  props: checkboxProps,
6947
7070
  emits: ["change", "update:modelValue"],
6948
7071
  setup(props, _ref) {
@@ -7004,7 +7127,7 @@
7004
7127
  });
7005
7128
  useCustomFieldValue(() => props.modelValue);
7006
7129
  return () => vue.createVNode(Checker, vue.mergeProps({
7007
- "bem": bem$Q,
7130
+ "bem": bem$P,
7008
7131
  "role": "checkbox",
7009
7132
  "parent": parent,
7010
7133
  "checked": checked.value,
@@ -7014,7 +7137,7 @@
7014
7137
  });
7015
7138
  var Checkbox = withInstall(_Checkbox);
7016
7139
  var CheckboxGroup = withInstall(_CheckboxGroup);
7017
- var [name$Q, bem$P] = createNamespace("circle");
7140
+ var [name$P, bem$O] = createNamespace("circle");
7018
7141
  var uid = 0;
7019
7142
  var format = (rate) => Math.min(Math.max(+rate, 0), 100);
7020
7143
  function getPath(clockwise, viewBoxSize) {
@@ -7036,7 +7159,7 @@
7036
7159
  startPosition: makeStringProp("top")
7037
7160
  };
7038
7161
  var _Circle = vue.defineComponent({
7039
- name: name$Q,
7162
+ name: name$P,
7040
7163
  props: circleProps,
7041
7164
  emits: ["update:currentRate"],
7042
7165
  setup(props, _ref) {
@@ -7095,7 +7218,7 @@
7095
7218
  strokeLinecap
7096
7219
  } = props;
7097
7220
  var offset2 = PERIMETER * currentRate / 100;
7098
- var color = isObject$1(props.color) ? "url(#" + id + ")" : props.color;
7221
+ var color = isObject(props.color) ? "url(#" + id + ")" : props.color;
7099
7222
  var style = {
7100
7223
  stroke: color,
7101
7224
  strokeWidth: +strokeWidth + 1 + "px",
@@ -7105,7 +7228,7 @@
7105
7228
  return vue.createVNode("path", {
7106
7229
  "d": path.value,
7107
7230
  "style": style,
7108
- "class": bem$P("hover"),
7231
+ "class": bem$O("hover"),
7109
7232
  "stroke": color
7110
7233
  }, null);
7111
7234
  };
@@ -7116,7 +7239,7 @@
7116
7239
  strokeWidth: props.strokeWidth + "px"
7117
7240
  };
7118
7241
  return vue.createVNode("path", {
7119
- "class": bem$P("layer"),
7242
+ "class": bem$O("layer"),
7120
7243
  "style": style,
7121
7244
  "d": path.value
7122
7245
  }, null);
@@ -7125,7 +7248,7 @@
7125
7248
  var {
7126
7249
  color
7127
7250
  } = props;
7128
- if (!isObject$1(color)) {
7251
+ if (!isObject(color)) {
7129
7252
  return;
7130
7253
  }
7131
7254
  var Stops = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key, index2) => vue.createVNode("stop", {
@@ -7147,12 +7270,12 @@
7147
7270
  }
7148
7271
  if (props.text) {
7149
7272
  return vue.createVNode("div", {
7150
- "class": bem$P("text")
7273
+ "class": bem$O("text")
7151
7274
  }, [props.text]);
7152
7275
  }
7153
7276
  };
7154
7277
  return () => vue.createVNode("div", {
7155
- "class": bem$P(),
7278
+ "class": bem$O(),
7156
7279
  "style": getSizeStyle(props.size)
7157
7280
  }, [vue.createVNode("svg", {
7158
7281
  "viewBox": "0 0 " + viewBoxSize.value + " " + viewBoxSize.value,
@@ -7161,8 +7284,8 @@
7161
7284
  }
7162
7285
  });
7163
7286
  var Circle = withInstall(_Circle);
7164
- var [name$P, bem$O] = createNamespace("row");
7165
- var ROW_KEY = Symbol(name$P);
7287
+ var [name$O, bem$N] = createNamespace("row");
7288
+ var ROW_KEY = Symbol(name$O);
7166
7289
  var rowProps = {
7167
7290
  tag: makeStringProp("div"),
7168
7291
  wrap: truthProp,
@@ -7171,7 +7294,7 @@
7171
7294
  justify: String
7172
7295
  };
7173
7296
  var _Row = vue.defineComponent({
7174
- name: name$P,
7297
+ name: name$O,
7175
7298
  props: rowProps,
7176
7299
  setup(props, _ref) {
7177
7300
  var {
@@ -7231,7 +7354,7 @@
7231
7354
  justify
7232
7355
  } = props;
7233
7356
  return vue.createVNode(tag, {
7234
- "class": bem$O({
7357
+ "class": bem$N({
7235
7358
  ["align-" + align]: align,
7236
7359
  ["justify-" + justify]: justify,
7237
7360
  nowrap: !wrap
@@ -7242,14 +7365,14 @@
7242
7365
  };
7243
7366
  }
7244
7367
  });
7245
- var [name$O, bem$N] = createNamespace("col");
7368
+ var [name$N, bem$M] = createNamespace("col");
7246
7369
  var colProps = {
7247
7370
  tag: makeStringProp("div"),
7248
7371
  span: makeNumericProp(0),
7249
7372
  offset: numericProp
7250
7373
  };
7251
7374
  var _Col = vue.defineComponent({
7252
- name: name$O,
7375
+ name: name$N,
7253
7376
  props: colProps,
7254
7377
  setup(props, _ref) {
7255
7378
  var {
@@ -7285,7 +7408,7 @@
7285
7408
  } = props;
7286
7409
  return vue.createVNode(tag, {
7287
7410
  "style": style.value,
7288
- "class": bem$N({
7411
+ "class": bem$M({
7289
7412
  [span]: span,
7290
7413
  ["offset-" + offset2]: offset2
7291
7414
  })
@@ -7296,8 +7419,8 @@
7296
7419
  }
7297
7420
  });
7298
7421
  var Col = withInstall(_Col);
7299
- var [name$N, bem$M] = createNamespace("collapse");
7300
- var COLLAPSE_KEY = Symbol(name$N);
7422
+ var [name$M, bem$L] = createNamespace("collapse");
7423
+ var COLLAPSE_KEY = Symbol(name$M);
7301
7424
  var collapseProps = {
7302
7425
  border: truthProp,
7303
7426
  accordion: Boolean,
@@ -7307,7 +7430,7 @@
7307
7430
  }
7308
7431
  };
7309
7432
  var _Collapse = vue.defineComponent({
7310
- name: name$N,
7433
+ name: name$M,
7311
7434
  props: collapseProps,
7312
7435
  emits: ["change", "update:modelValue"],
7313
7436
  setup(props, _ref) {
@@ -7347,14 +7470,14 @@
7347
7470
  isExpanded
7348
7471
  });
7349
7472
  return () => vue.createVNode("div", {
7350
- "class": [bem$M(), {
7473
+ "class": [bem$L(), {
7351
7474
  [BORDER_TOP_BOTTOM]: props.border
7352
7475
  }]
7353
7476
  }, [slots.default == null ? void 0 : slots.default()]);
7354
7477
  }
7355
7478
  });
7356
7479
  var Collapse = withInstall(_Collapse);
7357
- var [name$M, bem$L] = createNamespace("collapse-item");
7480
+ var [name$L, bem$K] = createNamespace("collapse-item");
7358
7481
  var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
7359
7482
  var collapseItemProps = extend({}, cellSharedProps, {
7360
7483
  name: numericProp,
@@ -7363,7 +7486,7 @@
7363
7486
  readonly: Boolean
7364
7487
  });
7365
7488
  var _CollapseItem = vue.defineComponent({
7366
- name: name$M,
7489
+ name: name$L,
7367
7490
  props: collapseItemProps,
7368
7491
  setup(props, _ref) {
7369
7492
  var {
@@ -7446,7 +7569,7 @@
7446
7569
  }
7447
7570
  return vue.createVNode(Cell, vue.mergeProps({
7448
7571
  "role": "button",
7449
- "class": bem$L("title", {
7572
+ "class": bem$K("title", {
7450
7573
  disabled,
7451
7574
  expanded: expanded.value,
7452
7575
  borderless: !border
@@ -7457,17 +7580,17 @@
7457
7580
  };
7458
7581
  var renderContent = lazyRender(() => vue.withDirectives(vue.createVNode("div", {
7459
7582
  "ref": wrapperRef,
7460
- "class": bem$L("wrapper"),
7583
+ "class": bem$K("wrapper"),
7461
7584
  "onTransitionend": onTransitionEnd
7462
7585
  }, [vue.createVNode("div", {
7463
7586
  "ref": contentRef,
7464
- "class": bem$L("content")
7587
+ "class": bem$K("content")
7465
7588
  }, [slots.default == null ? void 0 : slots.default()])]), [[vue.vShow, show.value]]));
7466
7589
  useExpose({
7467
7590
  toggle
7468
7591
  });
7469
7592
  return () => vue.createVNode("div", {
7470
- "class": [bem$L({
7593
+ "class": [bem$K({
7471
7594
  border: index2.value && props.border
7472
7595
  })]
7473
7596
  }, [renderTitle(), renderContent()]);
@@ -7475,7 +7598,7 @@
7475
7598
  });
7476
7599
  var CollapseItem = withInstall(_CollapseItem);
7477
7600
  var ConfigProvider = withInstall(_ConfigProvider);
7478
- var [name$L, bem$K, t$c] = createNamespace("contact-card");
7601
+ var [name$K, bem$J, t$d] = createNamespace("contact-card");
7479
7602
  var contactCardProps = {
7480
7603
  tel: String,
7481
7604
  name: String,
@@ -7484,7 +7607,7 @@
7484
7607
  editable: truthProp
7485
7608
  };
7486
7609
  var _ContactCard = vue.defineComponent({
7487
- name: name$L,
7610
+ name: name$K,
7488
7611
  props: contactCardProps,
7489
7612
  emits: ["click"],
7490
7613
  setup(props, _ref) {
@@ -7498,17 +7621,17 @@
7498
7621
  };
7499
7622
  var renderContent = () => {
7500
7623
  if (props.type === "add") {
7501
- return props.addText || t$c("addText");
7624
+ return props.addText || t$d("addText");
7502
7625
  }
7503
- return [vue.createVNode("div", null, [t$c("name") + "\uFF1A" + props.name]), vue.createVNode("div", null, [t$c("tel") + "\uFF1A" + props.tel])];
7626
+ return [vue.createVNode("div", null, [t$d("name") + "\uFF1A" + props.name]), vue.createVNode("div", null, [t$d("tel") + "\uFF1A" + props.tel])];
7504
7627
  };
7505
7628
  return () => vue.createVNode(Cell, {
7506
7629
  "center": true,
7507
7630
  "icon": props.type === "edit" ? "contact" : "add-square",
7508
- "class": bem$K([props.type]),
7631
+ "class": bem$J([props.type]),
7509
7632
  "border": false,
7510
7633
  "isLink": props.editable,
7511
- "valueClass": bem$K("value"),
7634
+ "valueClass": bem$J("value"),
7512
7635
  "onClick": onClick
7513
7636
  }, {
7514
7637
  value: renderContent
@@ -7516,147 +7639,7 @@
7516
7639
  }
7517
7640
  });
7518
7641
  var ContactCard = withInstall(_ContactCard);
7519
- var [name$K, bem$J] = createNamespace("form");
7520
- var formProps = {
7521
- colon: Boolean,
7522
- disabled: Boolean,
7523
- readonly: Boolean,
7524
- showError: Boolean,
7525
- labelWidth: numericProp,
7526
- labelAlign: String,
7527
- inputAlign: String,
7528
- scrollToError: Boolean,
7529
- validateFirst: Boolean,
7530
- submitOnEnter: truthProp,
7531
- validateTrigger: makeStringProp("onBlur"),
7532
- showErrorMessage: truthProp,
7533
- errorMessageAlign: String
7534
- };
7535
- var _Form = vue.defineComponent({
7536
- name: name$K,
7537
- props: formProps,
7538
- emits: ["submit", "failed"],
7539
- setup(props, _ref) {
7540
- var {
7541
- emit,
7542
- slots
7543
- } = _ref;
7544
- var {
7545
- children,
7546
- linkChildren
7547
- } = useChildren(FORM_KEY);
7548
- var getFieldsByNames = (names) => {
7549
- if (names) {
7550
- return children.filter((field) => names.includes(field.name));
7551
- }
7552
- return children;
7553
- };
7554
- var validateSeq = (names) => new Promise((resolve, reject) => {
7555
- var errors = [];
7556
- var fields = getFieldsByNames(names);
7557
- fields.reduce((promise, field) => promise.then(() => {
7558
- if (!errors.length) {
7559
- return field.validate().then((error) => {
7560
- if (error) {
7561
- errors.push(error);
7562
- }
7563
- });
7564
- }
7565
- }), Promise.resolve()).then(() => {
7566
- if (errors.length) {
7567
- reject(errors);
7568
- } else {
7569
- resolve();
7570
- }
7571
- });
7572
- });
7573
- var validateAll = (names) => new Promise((resolve, reject) => {
7574
- var fields = getFieldsByNames(names);
7575
- Promise.all(fields.map((item) => item.validate())).then((errors) => {
7576
- errors = errors.filter(Boolean);
7577
- if (errors.length) {
7578
- reject(errors);
7579
- } else {
7580
- resolve();
7581
- }
7582
- });
7583
- });
7584
- var validateField = (name2) => {
7585
- var matched = children.find((item) => item.name === name2);
7586
- if (matched) {
7587
- return new Promise((resolve, reject) => {
7588
- matched.validate().then((error) => {
7589
- if (error) {
7590
- reject(error);
7591
- } else {
7592
- resolve();
7593
- }
7594
- });
7595
- });
7596
- }
7597
- return Promise.reject();
7598
- };
7599
- var validate = (name2) => {
7600
- if (typeof name2 === "string") {
7601
- return validateField(name2);
7602
- }
7603
- return props.validateFirst ? validateSeq(name2) : validateAll(name2);
7604
- };
7605
- var resetValidation = (name2) => {
7606
- if (typeof name2 === "string") {
7607
- name2 = [name2];
7608
- }
7609
- var fields = getFieldsByNames(name2);
7610
- fields.forEach((item) => {
7611
- item.resetValidation();
7612
- });
7613
- };
7614
- var scrollToField = (name2, options) => {
7615
- children.some((item) => {
7616
- if (item.name === name2) {
7617
- item.$el.scrollIntoView(options);
7618
- return true;
7619
- }
7620
- return false;
7621
- });
7622
- };
7623
- var getValues = () => children.reduce((form, field) => {
7624
- form[field.name] = field.formValue.value;
7625
- return form;
7626
- }, {});
7627
- var submit = () => {
7628
- var values = getValues();
7629
- validate().then(() => emit("submit", values)).catch((errors) => {
7630
- emit("failed", {
7631
- values,
7632
- errors
7633
- });
7634
- if (props.scrollToError && errors[0].name) {
7635
- scrollToField(errors[0].name);
7636
- }
7637
- });
7638
- };
7639
- var onSubmit = (event) => {
7640
- event.preventDefault();
7641
- submit();
7642
- };
7643
- linkChildren({
7644
- props
7645
- });
7646
- useExpose({
7647
- submit,
7648
- validate,
7649
- scrollToField,
7650
- resetValidation
7651
- });
7652
- return () => vue.createVNode("form", {
7653
- "class": bem$J(),
7654
- "onSubmit": onSubmit
7655
- }, [slots.default == null ? void 0 : slots.default()]);
7656
- }
7657
- });
7658
- var Form = withInstall(_Form);
7659
- var [name$J, bem$I, t$b] = createNamespace("contact-edit");
7642
+ var [name$J, bem$I, t$c] = createNamespace("contact-edit");
7660
7643
  var DEFAULT_CONTACT = {
7661
7644
  tel: "",
7662
7645
  name: ""
@@ -7697,14 +7680,14 @@
7697
7680
  "block": true,
7698
7681
  "round": true,
7699
7682
  "type": "danger",
7700
- "text": t$b("save"),
7683
+ "text": t$c("save"),
7701
7684
  "class": bem$I("button"),
7702
7685
  "loading": props.isSaving,
7703
7686
  "nativeType": "submit"
7704
7687
  }, null), props.isEdit && vue.createVNode(Button, {
7705
7688
  "block": true,
7706
7689
  "round": true,
7707
- "text": t$b("delete"),
7690
+ "text": t$c("delete"),
7708
7691
  "class": bem$I("button"),
7709
7692
  "loading": props.isDeleting,
7710
7693
  "onClick": onDelete
@@ -7737,30 +7720,30 @@
7737
7720
  "modelValue": contact.name,
7738
7721
  "onUpdate:modelValue": ($event) => contact.name = $event,
7739
7722
  "clearable": true,
7740
- "label": t$b("name"),
7723
+ "label": t$c("name"),
7741
7724
  "rules": [{
7742
7725
  required: true,
7743
- message: t$b("nameEmpty")
7726
+ message: t$c("nameEmpty")
7744
7727
  }],
7745
7728
  "maxlength": "30",
7746
- "placeholder": t$b("name")
7729
+ "placeholder": t$c("name")
7747
7730
  }, null), vue.createVNode(Field, {
7748
7731
  "modelValue": contact.tel,
7749
7732
  "onUpdate:modelValue": ($event) => contact.tel = $event,
7750
7733
  "clearable": true,
7751
7734
  "type": "tel",
7752
- "label": t$b("tel"),
7735
+ "label": t$c("tel"),
7753
7736
  "rules": [{
7754
7737
  validator: props.telValidator,
7755
- message: t$b("telInvalid")
7738
+ message: t$c("telInvalid")
7756
7739
  }],
7757
- "placeholder": t$b("tel")
7740
+ "placeholder": t$c("tel")
7758
7741
  }, null)]), renderSetDefault(), renderButtons()]
7759
7742
  });
7760
7743
  }
7761
7744
  });
7762
7745
  var ContactEdit = withInstall(_ContactEdit);
7763
- var [name$I, bem$H, t$a] = createNamespace("contact-list");
7746
+ var [name$I, bem$H, t$b] = createNamespace("contact-list");
7764
7747
  var contactListProps = {
7765
7748
  list: Array,
7766
7749
  addText: String,
@@ -7833,7 +7816,7 @@
7833
7816
  "block": true,
7834
7817
  "type": "danger",
7835
7818
  "class": bem$H("add"),
7836
- "text": props.addText || t$a("addText"),
7819
+ "text": props.addText || t$b("addText"),
7837
7820
  "onClick": () => emit("add")
7838
7821
  }, null)])]);
7839
7822
  }
@@ -7901,14 +7884,14 @@
7901
7884
  start: start2,
7902
7885
  pause,
7903
7886
  reset,
7904
- current
7887
+ current: current2
7905
7888
  } = useCountDown({
7906
7889
  time: +props.time,
7907
7890
  millisecond: props.millisecond,
7908
- onChange: (current2) => emit("change", current2),
7891
+ onChange: (current3) => emit("change", current3),
7909
7892
  onFinish: () => emit("finish")
7910
7893
  });
7911
- var timeText = vue.computed(() => parseFormat(props.format, current.value));
7894
+ var timeText = vue.computed(() => parseFormat(props.format, current2.value));
7912
7895
  var resetTime = () => {
7913
7896
  reset(+props.time);
7914
7897
  if (props.autoStart) {
@@ -7924,8 +7907,9 @@
7924
7907
  reset: resetTime
7925
7908
  });
7926
7909
  return () => vue.createVNode("div", {
7910
+ "role": "timer",
7927
7911
  "class": bem$G()
7928
- }, [slots.default ? slots.default(current.value) : timeText.value]);
7912
+ }, [slots.default ? slots.default(current2.value) : timeText.value]);
7929
7913
  }
7930
7914
  });
7931
7915
  var CountDown = withInstall(_CountDown);
@@ -7935,7 +7919,7 @@
7935
7919
  }
7936
7920
  var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
7937
7921
  var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
7938
- var [name$G, bem$F, t$9] = createNamespace("coupon");
7922
+ var [name$G, bem$F, t$a] = createNamespace("coupon");
7939
7923
  var _Coupon = vue.defineComponent({
7940
7924
  name: name$G,
7941
7925
  props: {
@@ -7965,13 +7949,13 @@
7965
7949
  return [vue.createVNode("span", null, [currency]), " " + denominations];
7966
7950
  }
7967
7951
  if (coupon.discount) {
7968
- return t$9("discount", formatDiscount(coupon.discount));
7952
+ return t$a("discount", formatDiscount(coupon.discount));
7969
7953
  }
7970
7954
  return "";
7971
7955
  });
7972
7956
  var conditionMessage = vue.computed(() => {
7973
7957
  var condition = formatAmount(props.coupon.originCondition || 0);
7974
- return condition === "0" ? t$9("unlimited") : t$9("condition", condition);
7958
+ return condition === "0" ? t$a("unlimited") : t$a("condition", condition);
7975
7959
  });
7976
7960
  return () => {
7977
7961
  var {
@@ -8008,7 +7992,7 @@
8008
7992
  }
8009
7993
  });
8010
7994
  var Coupon = withInstall(_Coupon);
8011
- var [name$F, bem$E, t$8] = createNamespace("coupon-cell");
7995
+ var [name$F, bem$E, t$9] = createNamespace("coupon-cell");
8012
7996
  var couponCellProps = {
8013
7997
  title: String,
8014
7998
  border: truthProp,
@@ -8035,7 +8019,7 @@
8035
8019
  }
8036
8020
  return "-" + currency + " " + (value / 100).toFixed(2);
8037
8021
  }
8038
- return coupons.length === 0 ? t$8("noCoupon") : t$8("count", coupons.length);
8022
+ return coupons.length === 0 ? t$9("noCoupon") : t$9("count", coupons.length);
8039
8023
  }
8040
8024
  var _CouponCell = vue.defineComponent({
8041
8025
  name: name$F,
@@ -8046,7 +8030,7 @@
8046
8030
  return vue.createVNode(Cell, {
8047
8031
  "class": bem$E(),
8048
8032
  "value": formatValue(props),
8049
- "title": props.title || t$8("title"),
8033
+ "title": props.title || t$9("title"),
8050
8034
  "border": props.border,
8051
8035
  "isLink": props.editable,
8052
8036
  "valueClass": bem$E("value", {
@@ -8057,7 +8041,7 @@
8057
8041
  }
8058
8042
  });
8059
8043
  var CouponCell = withInstall(_CouponCell);
8060
- var [name$E, bem$D, t$7] = createNamespace("coupon-list");
8044
+ var [name$E, bem$D, t$8] = createNamespace("coupon-list");
8061
8045
  var EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
8062
8046
  var couponListProps = {
8063
8047
  code: makeStringProp(""),
@@ -8089,46 +8073,53 @@
8089
8073
  slots
8090
8074
  } = _ref;
8091
8075
  var [couponRefs, setCouponRefs] = useRefs();
8092
- var state = vue.reactive({
8093
- tab: 0,
8094
- code: props.code
8095
- });
8096
- var buttonDisabled = vue.computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !state.code || state.code.length < props.exchangeMinLength));
8076
+ var root = vue.ref();
8077
+ var barRef = vue.ref();
8078
+ var activeTab = vue.ref(0);
8079
+ var listHeight = vue.ref(0);
8080
+ var currentCode = vue.ref(props.code);
8081
+ var buttonDisabled = vue.computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !currentCode.value || currentCode.value.length < props.exchangeMinLength));
8082
+ var updateListHeight = () => {
8083
+ var TABS_HEIGHT = 44;
8084
+ var rootHeight = useRect(root).height;
8085
+ var headerHeight = useRect(barRef).height + TABS_HEIGHT;
8086
+ listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight.value) - headerHeight;
8087
+ };
8097
8088
  var onExchange = () => {
8098
- emit("exchange", state.code);
8089
+ emit("exchange", currentCode.value);
8099
8090
  if (!props.code) {
8100
- state.code = "";
8091
+ currentCode.value = "";
8101
8092
  }
8102
8093
  };
8103
8094
  var scrollToCoupon = (index2) => {
8104
8095
  vue.nextTick(() => {
8105
- if (couponRefs.value[index2]) {
8106
- couponRefs.value[index2].scrollIntoView();
8107
- }
8096
+ var _couponRefs$value$ind;
8097
+ return (_couponRefs$value$ind = couponRefs.value[index2]) == null ? void 0 : _couponRefs$value$ind.scrollIntoView();
8108
8098
  });
8109
8099
  };
8110
8100
  var renderEmpty = () => vue.createVNode("div", {
8111
8101
  "class": bem$D("empty")
8112
8102
  }, [vue.createVNode("img", {
8113
8103
  "src": props.emptyImage
8114
- }, null), vue.createVNode("p", null, [t$7("noCoupon")])]);
8104
+ }, null), vue.createVNode("p", null, [t$8("noCoupon")])]);
8115
8105
  var renderExchangeBar = () => {
8116
8106
  if (props.showExchangeBar) {
8117
8107
  return vue.createVNode("div", {
8108
+ "ref": barRef,
8118
8109
  "class": bem$D("exchange-bar")
8119
8110
  }, [vue.createVNode(Field, {
8120
- "modelValue": state.code,
8121
- "onUpdate:modelValue": ($event) => state.code = $event,
8111
+ "modelValue": currentCode.value,
8112
+ "onUpdate:modelValue": ($event) => currentCode.value = $event,
8122
8113
  "clearable": true,
8123
8114
  "border": false,
8124
8115
  "class": bem$D("field"),
8125
- "placeholder": props.inputPlaceholder || t$7("placeholder"),
8116
+ "placeholder": props.inputPlaceholder || t$8("placeholder"),
8126
8117
  "maxlength": "20"
8127
8118
  }, null), vue.createVNode(Button, {
8128
8119
  "plain": true,
8129
8120
  "type": "danger",
8130
8121
  "class": bem$D("exchange"),
8131
- "text": props.exchangeButtonText || t$7("exchange"),
8122
+ "text": props.exchangeButtonText || t$8("exchange"),
8132
8123
  "loading": props.exchangeButtonLoading,
8133
8124
  "disabled": buttonDisabled.value,
8134
8125
  "onClick": onExchange
@@ -8141,15 +8132,17 @@
8141
8132
  coupons
8142
8133
  } = props;
8143
8134
  var count = props.showCount ? " (" + coupons.length + ")" : "";
8144
- var title = (props.enabledTitle || t$7("enable")) + count;
8135
+ var title = (props.enabledTitle || t$8("enable")) + count;
8145
8136
  return vue.createVNode(Tab, {
8146
8137
  "title": title
8147
8138
  }, {
8148
8139
  default: () => [vue.createVNode("div", {
8149
8140
  "class": bem$D("list", {
8150
- "with-bar": props.showExchangeBar,
8151
8141
  "with-bottom": props.showCloseButton
8152
- })
8142
+ }),
8143
+ "style": {
8144
+ height: listHeight.value + "px"
8145
+ }
8153
8146
  }, [coupons.map((coupon, index2) => vue.createVNode(Coupon, {
8154
8147
  "key": coupon.id,
8155
8148
  "ref": setCouponRefs(index2),
@@ -8166,15 +8159,17 @@
8166
8159
  disabledCoupons
8167
8160
  } = props;
8168
8161
  var count = props.showCount ? " (" + disabledCoupons.length + ")" : "";
8169
- var title = (props.disabledTitle || t$7("disabled")) + count;
8162
+ var title = (props.disabledTitle || t$8("disabled")) + count;
8170
8163
  return vue.createVNode(Tab, {
8171
8164
  "title": title
8172
8165
  }, {
8173
8166
  default: () => [vue.createVNode("div", {
8174
8167
  "class": bem$D("list", {
8175
- "with-bar": props.showExchangeBar,
8176
8168
  "with-bottom": props.showCloseButton
8177
- })
8169
+ }),
8170
+ "style": {
8171
+ height: listHeight.value + "px"
8172
+ }
8178
8173
  }, [disabledCoupons.map((coupon) => vue.createVNode(Coupon, {
8179
8174
  "disabled": true,
8180
8175
  "key": coupon.id,
@@ -8184,20 +8179,22 @@
8184
8179
  });
8185
8180
  };
8186
8181
  vue.watch(() => props.code, (value) => {
8187
- state.code = value;
8182
+ currentCode.value = value;
8188
8183
  });
8189
- vue.watch(() => state.code, (value) => emit("update:code", value));
8184
+ vue.watch(windowHeight, updateListHeight);
8185
+ vue.watch(currentCode, (value) => emit("update:code", value));
8190
8186
  vue.watch(() => props.displayedCouponIndex, scrollToCoupon);
8191
8187
  vue.onMounted(() => {
8188
+ updateListHeight();
8192
8189
  scrollToCoupon(props.displayedCouponIndex);
8193
8190
  });
8194
8191
  return () => vue.createVNode("div", {
8192
+ "ref": root,
8195
8193
  "class": bem$D()
8196
8194
  }, [renderExchangeBar(), vue.createVNode(Tabs, {
8197
- "active": state.tab,
8198
- "onUpdate:active": ($event) => state.tab = $event,
8199
- "class": bem$D("tab"),
8200
- "border": false
8195
+ "active": activeTab.value,
8196
+ "onUpdate:active": ($event) => activeTab.value = $event,
8197
+ "class": bem$D("tab")
8201
8198
  }, {
8202
8199
  default: () => [renderCouponTab(), renderDisabledTab()]
8203
8200
  }), vue.createVNode("div", {
@@ -8207,7 +8204,7 @@
8207
8204
  "block": true,
8208
8205
  "type": "danger",
8209
8206
  "class": bem$D("close"),
8210
- "text": props.closeButtonText || t$7("close"),
8207
+ "text": props.closeButtonText || t$8("close"),
8211
8208
  "onClick": () => emit("change", -1)
8212
8209
  }, null), [[vue.vShow, props.showCloseButton]])])]);
8213
8210
  }
@@ -8599,7 +8596,7 @@
8599
8596
  }
8600
8597
  });
8601
8598
  var DatetimePicker = withInstall(_DatetimePicker);
8602
- var [name$A, bem$B, t$6] = createNamespace("dialog");
8599
+ var [name$A, bem$B, t$7] = createNamespace("dialog");
8603
8600
  var dialogProps = extend({}, popupSharedProps, {
8604
8601
  title: String,
8605
8602
  theme: String,
@@ -8717,7 +8714,7 @@
8717
8714
  "class": [BORDER_TOP, bem$B("footer")]
8718
8715
  }, [props.showCancelButton && vue.createVNode(Button, {
8719
8716
  "size": "large",
8720
- "text": props.cancelButtonText || t$6("cancel"),
8717
+ "text": props.cancelButtonText || t$7("cancel"),
8721
8718
  "class": bem$B("cancel"),
8722
8719
  "style": {
8723
8720
  color: props.cancelButtonColor
@@ -8726,7 +8723,7 @@
8726
8723
  "onClick": onCancel
8727
8724
  }, null), props.showConfirmButton && vue.createVNode(Button, {
8728
8725
  "size": "large",
8729
- "text": props.confirmButtonText || t$6("confirm"),
8726
+ "text": props.confirmButtonText || t$7("confirm"),
8730
8727
  "class": [bem$B("confirm"), {
8731
8728
  [BORDER_LEFT]: props.showCancelButton
8732
8729
  }],
@@ -8741,14 +8738,14 @@
8741
8738
  }, {
8742
8739
  default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
8743
8740
  "type": "warning",
8744
- "text": props.cancelButtonText || t$6("cancel"),
8741
+ "text": props.cancelButtonText || t$7("cancel"),
8745
8742
  "class": bem$B("cancel"),
8746
8743
  "color": props.cancelButtonColor,
8747
8744
  "loading": loading.cancel,
8748
8745
  "onClick": onCancel
8749
8746
  }, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
8750
8747
  "type": "danger",
8751
- "text": props.confirmButtonText || t$6("confirm"),
8748
+ "text": props.confirmButtonText || t$7("confirm"),
8752
8749
  "class": bem$B("confirm"),
8753
8750
  "color": props.confirmButtonColor,
8754
8751
  "loading": loading.confirm,
@@ -8903,6 +8900,7 @@
8903
8900
  var {
8904
8901
  slots
8905
8902
  } = _ref;
8903
+ var id = useId();
8906
8904
  var root = vue.ref();
8907
8905
  var barRef = vue.ref();
8908
8906
  var offset2 = vue.ref(0);
@@ -8932,7 +8930,7 @@
8932
8930
  if (props.direction === "down") {
8933
8931
  offset2.value = rect.bottom;
8934
8932
  } else {
8935
- offset2.value = window.innerHeight - rect.top;
8933
+ offset2.value = windowHeight.value - rect.top;
8936
8934
  }
8937
8935
  }
8938
8936
  };
@@ -8962,8 +8960,9 @@
8962
8960
  titleClass
8963
8961
  } = item;
8964
8962
  return vue.createVNode("div", {
8963
+ "id": id + "-" + index2,
8965
8964
  "role": "button",
8966
- "tabindex": disabled ? -1 : 0,
8965
+ "tabindex": disabled ? void 0 : 0,
8967
8966
  "class": [bem$z("item", {
8968
8967
  disabled
8969
8968
  }), {
@@ -8987,6 +8986,7 @@
8987
8986
  }, [item.renderTitle()])])]);
8988
8987
  };
8989
8988
  linkChildren({
8989
+ id,
8990
8990
  props,
8991
8991
  offset: offset2
8992
8992
  });
@@ -9031,7 +9031,8 @@
9031
9031
  showWrapper: false
9032
9032
  });
9033
9033
  var {
9034
- parent
9034
+ parent,
9035
+ index: index2
9035
9036
  } = useParent(DROPDOWN_KEY);
9036
9037
  if (!parent) {
9037
9038
  return;
@@ -9097,7 +9098,7 @@
9097
9098
  }
9098
9099
  };
9099
9100
  return vue.createVNode(Cell, {
9100
- "clickable": true,
9101
+ "role": "menuitem",
9101
9102
  "key": option.value,
9102
9103
  "icon": option.icon,
9103
9104
  "title": option.text,
@@ -9107,6 +9108,8 @@
9107
9108
  "style": {
9108
9109
  color: active ? activeColor : ""
9109
9110
  },
9111
+ "tabindex": active ? 0 : -1,
9112
+ "clickable": true,
9110
9113
  "onClick": onClick
9111
9114
  }, {
9112
9115
  value: renderIcon
@@ -9136,6 +9139,7 @@
9136
9139
  }, [vue.createVNode(Popup, {
9137
9140
  "show": state.showPopup,
9138
9141
  "onUpdate:show": ($event) => state.showPopup = $event,
9142
+ "role": "menu",
9139
9143
  "class": bem$y("content"),
9140
9144
  "overlay": overlay,
9141
9145
  "position": direction === "down" ? "top" : "bottom",
@@ -9144,6 +9148,7 @@
9144
9148
  "overlayStyle": {
9145
9149
  position: "absolute"
9146
9150
  },
9151
+ "aria-labelledby": parent.id + "-" + index2.value,
9147
9152
  "closeOnClickOverlay": closeOnClickOverlay,
9148
9153
  "onOpen": onOpen,
9149
9154
  "onClose": onClose,
@@ -9182,71 +9187,59 @@
9182
9187
  "viewBox": "0 0 160 160"
9183
9188
  }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
9184
9189
  "id": prefix + "1",
9185
- "x1": "64.022%",
9190
+ "x1": "64%",
9186
9191
  "y1": "100%",
9187
- "x2": "64.022%"
9192
+ "x2": "64%"
9188
9193
  }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
9189
9194
  "id": prefix + "2",
9190
9195
  "x1": "50%",
9191
9196
  "x2": "50%",
9192
- "y2": "84.459%"
9197
+ "y2": "84%"
9193
9198
  }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
9194
9199
  "id": prefix + "3",
9195
9200
  "x1": "100%",
9196
9201
  "x2": "100%",
9197
9202
  "y2": "100%"
9198
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("linearGradient", {
9199
- "id": prefix + "4",
9200
- "x1": "100%",
9201
- "y1": "100%",
9202
- "x2": "100%"
9203
9203
  }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
9204
- "id": prefix + "5",
9204
+ "id": prefix + "4",
9205
9205
  "cx": "50%",
9206
9206
  "cy": "0%",
9207
9207
  "fx": "50%",
9208
9208
  "fy": "0%",
9209
9209
  "r": "100%",
9210
- "gradientTransform": "matrix(0 1 -.54835 0 .5 -.5)"
9210
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
9211
9211
  }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
9212
9212
  "fill": "none"
9213
9213
  }, [vue.createVNode("g", {
9214
9214
  "opacity": ".8"
9215
9215
  }, [vue.createVNode("path", {
9216
- "d": "M0 124V46h20v20h14v58H0z",
9217
- "fill": "url(#" + prefix + "1)",
9218
- "transform": "matrix(-1 0 0 1 36 7)"
9216
+ "d": "M36 131V53H16v20H2v58h34z",
9217
+ "fill": "url(#" + prefix + "1)"
9219
9218
  }, null), vue.createVNode("path", {
9220
- "d": "M121 8h22.231v14H152v77.37h-31V8z",
9221
- "fill": "url(#" + prefix + "1)",
9222
- "transform": "translate(2 7)"
9219
+ "d": "M123 15h22v14h9v77h-31V15z",
9220
+ "fill": "url(#" + prefix + "1)"
9223
9221
  }, null)]), vue.createVNode("path", {
9224
- "fill": "url(#" + prefix + "5)",
9222
+ "fill": "url(#" + prefix + "4)",
9225
9223
  "d": "M0 139h160v21H0z"
9226
9224
  }, null), vue.createVNode("path", {
9227
- "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",
9228
- "fill": "url(#" + prefix + "2)",
9229
- "transform": "translate(43 36)"
9225
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
9226
+ "fill": "url(#" + prefix + "2)"
9230
9227
  }, null), vue.createVNode("g", {
9231
9228
  "opacity": ".6",
9232
9229
  "stroke-linecap": "round",
9233
9230
  "stroke-width": "7"
9234
9231
  }, [vue.createVNode("path", {
9235
- "d": "M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",
9236
- "stroke": "url(#" + prefix + "3)",
9237
- "transform": "translate(43 36)"
9232
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
9233
+ "stroke": "url(#" + prefix + "3)"
9238
9234
  }, null), vue.createVNode("path", {
9239
- "d": "M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",
9240
- "stroke": "url(#" + prefix + "3)",
9241
- "transform": "translate(43 36)"
9235
+ "d": "M53 36a34 34 0 0 0 0 48",
9236
+ "stroke": "url(#" + prefix + "3)"
9242
9237
  }, null), vue.createVNode("path", {
9243
- "d": "M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",
9244
- "stroke": "url(#" + prefix + "4)",
9245
- "transform": "rotate(-180 76.483 42.257)"
9238
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
9239
+ "stroke": "url(#" + prefix + "3)"
9246
9240
  }, null), vue.createVNode("path", {
9247
- "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",
9248
- "stroke": "url(#" + prefix + "4)",
9249
- "transform": "rotate(-180 89.791 42.146)"
9241
+ "d": "M106 84a34 34 0 0 0 0-48",
9242
+ "stroke": "url(#" + prefix + "3)"
9250
9243
  }, null)]), vue.createVNode("g", {
9251
9244
  "transform": "translate(31 105)"
9252
9245
  }, [vue.createVNode("rect", {
@@ -9260,14 +9253,14 @@
9260
9253
  "y": "8",
9261
9254
  "width": "80",
9262
9255
  "height": "18",
9263
- "rx": "1.114"
9256
+ "rx": "1.1"
9264
9257
  }, null), vue.createVNode("rect", {
9265
9258
  "fill": "#EBEDF0",
9266
9259
  "x": "15",
9267
9260
  "y": "12",
9268
9261
  "width": "18",
9269
9262
  "height": "6",
9270
- "rx": "1.114"
9263
+ "rx": "1.1"
9271
9264
  }, null)])])]);
9272
9265
  var [name$w, bem$x] = createNamespace("empty");
9273
9266
  var PRESET_IMAGES = ["error", "search", "default"];
@@ -9755,7 +9748,6 @@
9755
9748
  slots
9756
9749
  } = _ref;
9757
9750
  var swipeRef = vue.ref();
9758
- var windowSize = useWindowSize();
9759
9751
  var state = vue.reactive({
9760
9752
  active: 0,
9761
9753
  rootWidth: 0,
@@ -9841,7 +9833,7 @@
9841
9833
  swipeTo
9842
9834
  });
9843
9835
  vue.onMounted(resize);
9844
- vue.watch([windowSize.width, windowSize.height], resize);
9836
+ vue.watch([windowWidth, windowHeight], resize);
9845
9837
  vue.watch(() => props.startPosition, (value) => setActive(+value));
9846
9838
  vue.watch(() => props.show, (value) => {
9847
9839
  var {
@@ -10321,8 +10313,7 @@
10321
10313
  var loadImageAsync = (item, resolve, reject) => {
10322
10314
  var image = new Image();
10323
10315
  if (!item || !item.src) {
10324
- var err = new Error("image src is required");
10325
- return reject(err);
10316
+ return reject(new Error("image src is required"));
10326
10317
  }
10327
10318
  image.src = item.src;
10328
10319
  if (item.cors) {
@@ -10335,11 +10326,6 @@
10335
10326
  });
10336
10327
  image.onerror = (e) => reject(e);
10337
10328
  };
10338
- function isObject(obj) {
10339
- return obj !== null && typeof obj === "object";
10340
- }
10341
- function noop() {
10342
- }
10343
10329
  class ImageCache {
10344
10330
  constructor(_ref) {
10345
10331
  var {
@@ -10348,21 +10334,21 @@
10348
10334
  this.options = {
10349
10335
  max: max || 100
10350
10336
  };
10351
- this._caches = [];
10337
+ this.caches = [];
10352
10338
  }
10353
10339
  has(key) {
10354
- return this._caches.indexOf(key) > -1;
10340
+ return this.caches.indexOf(key) > -1;
10355
10341
  }
10356
10342
  add(key) {
10357
10343
  if (this.has(key))
10358
10344
  return;
10359
- this._caches.push(key);
10360
- if (this._caches.length > this.options.max) {
10345
+ this.caches.push(key);
10346
+ if (this.caches.length > this.options.max) {
10361
10347
  this.free();
10362
10348
  }
10363
10349
  }
10364
10350
  free() {
10365
- this._caches.shift();
10351
+ this.caches.shift();
10366
10352
  }
10367
10353
  }
10368
10354
  class ReactiveListener {
@@ -10389,10 +10375,9 @@
10389
10375
  this.naturalHeight = 0;
10390
10376
  this.naturalWidth = 0;
10391
10377
  this.options = options;
10392
- this.rect = null;
10393
10378
  this.$parent = $parent;
10394
10379
  this.elRenderer = elRenderer;
10395
- this._imageCache = imageCache;
10380
+ this.imageCache = imageCache;
10396
10381
  this.performanceData = {
10397
10382
  loadStart: 0,
10398
10383
  loadEnd: 0
@@ -10433,12 +10418,9 @@
10433
10418
  this.initState();
10434
10419
  }
10435
10420
  }
10436
- getRect() {
10437
- this.rect = this.el.getBoundingClientRect();
10438
- }
10439
10421
  checkInView() {
10440
- this.getRect();
10441
- 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;
10422
+ var rect = useRect(this.el);
10423
+ return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
10442
10424
  }
10443
10425
  filter() {
10444
10426
  Object.keys(this.options.filter).forEach((key) => {
@@ -10469,7 +10451,7 @@
10469
10451
  }
10470
10452
  if (this.state.rendered && this.state.loaded)
10471
10453
  return;
10472
- if (this._imageCache.has(this.src)) {
10454
+ if (this.imageCache.has(this.src)) {
10473
10455
  this.state.loaded = true;
10474
10456
  this.render("loaded", true);
10475
10457
  this.state.rendered = true;
@@ -10491,7 +10473,7 @@
10491
10473
  this.record("loadEnd");
10492
10474
  this.render("loaded", false);
10493
10475
  this.state.rendered = true;
10494
- this._imageCache.add(this.src);
10476
+ this.imageCache.add(this.src);
10495
10477
  onFinish();
10496
10478
  }, (err) => {
10497
10479
  !this.options.silent && console.error(err);
@@ -10554,9 +10536,9 @@
10554
10536
  observerOptions
10555
10537
  } = _ref;
10556
10538
  this.mode = modeType.event;
10557
- this.ListenerQueue = [];
10558
- this.TargetIndex = 0;
10559
- this.TargetQueue = [];
10539
+ this.listeners = [];
10540
+ this.targetIndex = 0;
10541
+ this.targets = [];
10560
10542
  this.options = {
10561
10543
  silent,
10562
10544
  dispatchEvent: !!dispatchEvent,
@@ -10568,18 +10550,17 @@
10568
10550
  attempt: attempt || 3,
10569
10551
  scale: scale || getDPR(scale),
10570
10552
  ListenEvents: listenEvents || DEFAULT_EVENTS,
10571
- hasbind: false,
10572
10553
  supportWebp: supportWebp(),
10573
10554
  filter: filter || {},
10574
10555
  adapter: adapter || {},
10575
10556
  observer: !!observer,
10576
10557
  observerOptions: observerOptions || DEFAULT_OBSERVER_OPTIONS
10577
10558
  };
10578
- this._initEvent();
10579
- this._imageCache = new ImageCache({
10559
+ this.initEvent();
10560
+ this.imageCache = new ImageCache({
10580
10561
  max: 200
10581
10562
  });
10582
- this.lazyLoadHandler = throttle(this._lazyLoadHandler.bind(this), this.options.throttleWait);
10563
+ this.lazyLoadHandler = throttle(this.lazyLoadHandler.bind(this), this.options.throttleWait);
10583
10564
  this.setMode(this.options.observer ? modeType.observer : modeType.event);
10584
10565
  }
10585
10566
  config(options) {
@@ -10589,30 +10570,30 @@
10589
10570
  Object.assign(this.options, options);
10590
10571
  }
10591
10572
  performance() {
10592
- return this.ListenerQueue.map((item) => item.performance());
10573
+ return this.listeners.map((item) => item.performance());
10593
10574
  }
10594
10575
  addLazyBox(vm) {
10595
- this.ListenerQueue.push(vm);
10576
+ this.listeners.push(vm);
10596
10577
  if (inBrowser) {
10597
- this._addListenerTarget(window);
10598
- this._observer && this._observer.observe(vm.el);
10578
+ this.addListenerTarget(window);
10579
+ this.observer && this.observer.observe(vm.el);
10599
10580
  if (vm.$el && vm.$el.parentNode) {
10600
- this._addListenerTarget(vm.$el.parentNode);
10581
+ this.addListenerTarget(vm.$el.parentNode);
10601
10582
  }
10602
10583
  }
10603
10584
  }
10604
10585
  add(el, binding, vnode) {
10605
- if (this.ListenerQueue.some((item) => item.el === el)) {
10586
+ if (this.listeners.some((item) => item.el === el)) {
10606
10587
  this.update(el, binding);
10607
10588
  return vue.nextTick(this.lazyLoadHandler);
10608
10589
  }
10609
- var value = this._valueFormatter(binding.value);
10590
+ var value = this.valueFormatter(binding.value);
10610
10591
  var {
10611
10592
  src
10612
10593
  } = value;
10613
10594
  vue.nextTick(() => {
10614
10595
  src = getBestSelectionFromSrcset(el, this.options.scale) || src;
10615
- this._observer && this._observer.observe(el);
10596
+ this.observer && this.observer.observe(el);
10616
10597
  var container = Object.keys(binding.modifiers)[0];
10617
10598
  var $parent;
10618
10599
  if (container) {
@@ -10630,26 +10611,26 @@
10630
10611
  loading: value.loading,
10631
10612
  error: value.error,
10632
10613
  cors: value.cors,
10633
- elRenderer: this._elRenderer.bind(this),
10614
+ elRenderer: this.elRenderer.bind(this),
10634
10615
  options: this.options,
10635
- imageCache: this._imageCache
10616
+ imageCache: this.imageCache
10636
10617
  });
10637
- this.ListenerQueue.push(newListener);
10618
+ this.listeners.push(newListener);
10638
10619
  if (inBrowser) {
10639
- this._addListenerTarget(window);
10640
- this._addListenerTarget($parent);
10620
+ this.addListenerTarget(window);
10621
+ this.addListenerTarget($parent);
10641
10622
  }
10642
10623
  this.lazyLoadHandler();
10643
10624
  vue.nextTick(() => this.lazyLoadHandler());
10644
10625
  });
10645
10626
  }
10646
10627
  update(el, binding, vnode) {
10647
- var value = this._valueFormatter(binding.value);
10628
+ var value = this.valueFormatter(binding.value);
10648
10629
  var {
10649
10630
  src
10650
10631
  } = value;
10651
10632
  src = getBestSelectionFromSrcset(el, this.options.scale) || src;
10652
- var exist = this.ListenerQueue.find((item) => item.el === el);
10633
+ var exist = this.listeners.find((item) => item.el === el);
10653
10634
  if (!exist) {
10654
10635
  this.add(el, binding, vnode);
10655
10636
  } else {
@@ -10659,9 +10640,9 @@
10659
10640
  loading: value.loading
10660
10641
  });
10661
10642
  }
10662
- if (this._observer) {
10663
- this._observer.unobserve(el);
10664
- this._observer.observe(el);
10643
+ if (this.observer) {
10644
+ this.observer.unobserve(el);
10645
+ this.observer.observe(el);
10665
10646
  }
10666
10647
  this.lazyLoadHandler();
10667
10648
  vue.nextTick(() => this.lazyLoadHandler());
@@ -10669,24 +10650,24 @@
10669
10650
  remove(el) {
10670
10651
  if (!el)
10671
10652
  return;
10672
- this._observer && this._observer.unobserve(el);
10673
- var existItem = this.ListenerQueue.find((item) => item.el === el);
10653
+ this.observer && this.observer.unobserve(el);
10654
+ var existItem = this.listeners.find((item) => item.el === el);
10674
10655
  if (existItem) {
10675
- this._removeListenerTarget(existItem.$parent);
10676
- this._removeListenerTarget(window);
10677
- remove(this.ListenerQueue, existItem);
10656
+ this.removeListenerTarget(existItem.$parent);
10657
+ this.removeListenerTarget(window);
10658
+ remove(this.listeners, existItem);
10678
10659
  existItem.$destroy();
10679
10660
  }
10680
10661
  }
10681
10662
  removeComponent(vm) {
10682
10663
  if (!vm)
10683
10664
  return;
10684
- remove(this.ListenerQueue, vm);
10685
- this._observer && this._observer.unobserve(vm.el);
10665
+ remove(this.listeners, vm);
10666
+ this.observer && this.observer.unobserve(vm.el);
10686
10667
  if (vm.$parent && vm.$el.parentNode) {
10687
- this._removeListenerTarget(vm.$el.parentNode);
10668
+ this.removeListenerTarget(vm.$el.parentNode);
10688
10669
  }
10689
- this._removeListenerTarget(window);
10670
+ this.removeListenerTarget(window);
10690
10671
  }
10691
10672
  setMode(mode) {
10692
10673
  if (!hasIntersectionObserver && mode === modeType.observer) {
@@ -10694,56 +10675,56 @@
10694
10675
  }
10695
10676
  this.mode = mode;
10696
10677
  if (mode === modeType.event) {
10697
- if (this._observer) {
10698
- this.ListenerQueue.forEach((listener) => {
10699
- this._observer.unobserve(listener.el);
10678
+ if (this.observer) {
10679
+ this.listeners.forEach((listener) => {
10680
+ this.observer.unobserve(listener.el);
10700
10681
  });
10701
- this._observer = null;
10682
+ this.observer = null;
10702
10683
  }
10703
- this.TargetQueue.forEach((target) => {
10704
- this._initListen(target.el, true);
10684
+ this.targets.forEach((target) => {
10685
+ this.initListen(target.el, true);
10705
10686
  });
10706
10687
  } else {
10707
- this.TargetQueue.forEach((target) => {
10708
- this._initListen(target.el, false);
10688
+ this.targets.forEach((target) => {
10689
+ this.initListen(target.el, false);
10709
10690
  });
10710
- this._initIntersectionObserver();
10691
+ this.initIntersectionObserver();
10711
10692
  }
10712
10693
  }
10713
- _addListenerTarget(el) {
10694
+ addListenerTarget(el) {
10714
10695
  if (!el)
10715
10696
  return;
10716
- var target = this.TargetQueue.find((target2) => target2.el === el);
10697
+ var target = this.targets.find((target2) => target2.el === el);
10717
10698
  if (!target) {
10718
10699
  target = {
10719
10700
  el,
10720
- id: ++this.TargetIndex,
10701
+ id: ++this.targetIndex,
10721
10702
  childrenCount: 1,
10722
10703
  listened: true
10723
10704
  };
10724
- this.mode === modeType.event && this._initListen(target.el, true);
10725
- this.TargetQueue.push(target);
10705
+ this.mode === modeType.event && this.initListen(target.el, true);
10706
+ this.targets.push(target);
10726
10707
  } else {
10727
10708
  target.childrenCount++;
10728
10709
  }
10729
- return this.TargetIndex;
10710
+ return this.targetIndex;
10730
10711
  }
10731
- _removeListenerTarget(el) {
10732
- this.TargetQueue.forEach((target, index2) => {
10712
+ removeListenerTarget(el) {
10713
+ this.targets.forEach((target, index2) => {
10733
10714
  if (target.el === el) {
10734
10715
  target.childrenCount--;
10735
10716
  if (!target.childrenCount) {
10736
- this._initListen(target.el, false);
10737
- this.TargetQueue.splice(index2, 1);
10717
+ this.initListen(target.el, false);
10718
+ this.targets.splice(index2, 1);
10738
10719
  target = null;
10739
10720
  }
10740
10721
  }
10741
10722
  });
10742
10723
  }
10743
- _initListen(el, start2) {
10724
+ initListen(el, start2) {
10744
10725
  this.options.ListenEvents.forEach((evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler));
10745
10726
  }
10746
- _initEvent() {
10727
+ initEvent() {
10747
10728
  var _this = this;
10748
10729
  this.Event = {
10749
10730
  listeners: {
@@ -10782,9 +10763,9 @@
10782
10763
  this.Event.listeners[event].forEach((func) => func(context, inCache));
10783
10764
  };
10784
10765
  }
10785
- _lazyLoadHandler() {
10766
+ lazyLoadHandler() {
10786
10767
  var freeList = [];
10787
- this.ListenerQueue.forEach((listener) => {
10768
+ this.listeners.forEach((listener) => {
10788
10769
  if (!listener.el || !listener.el.parentNode) {
10789
10770
  freeList.push(listener);
10790
10771
  }
@@ -10794,35 +10775,35 @@
10794
10775
  listener.load();
10795
10776
  });
10796
10777
  freeList.forEach((item) => {
10797
- remove(this.ListenerQueue, item);
10778
+ remove(this.listeners, item);
10798
10779
  item.$destroy();
10799
10780
  });
10800
10781
  }
10801
- _initIntersectionObserver() {
10782
+ initIntersectionObserver() {
10802
10783
  if (!hasIntersectionObserver) {
10803
10784
  return;
10804
10785
  }
10805
- this._observer = new IntersectionObserver(this._observerHandler.bind(this), this.options.observerOptions);
10806
- if (this.ListenerQueue.length) {
10807
- this.ListenerQueue.forEach((listener) => {
10808
- this._observer.observe(listener.el);
10786
+ this.observer = new IntersectionObserver(this.observerHandler.bind(this), this.options.observerOptions);
10787
+ if (this.listeners.length) {
10788
+ this.listeners.forEach((listener) => {
10789
+ this.observer.observe(listener.el);
10809
10790
  });
10810
10791
  }
10811
10792
  }
10812
- _observerHandler(entries) {
10793
+ observerHandler(entries) {
10813
10794
  entries.forEach((entry) => {
10814
10795
  if (entry.isIntersecting) {
10815
- this.ListenerQueue.forEach((listener) => {
10796
+ this.listeners.forEach((listener) => {
10816
10797
  if (listener.el === entry.target) {
10817
10798
  if (listener.state.loaded)
10818
- return this._observer.unobserve(listener.el);
10799
+ return this.observer.unobserve(listener.el);
10819
10800
  listener.load();
10820
10801
  }
10821
10802
  });
10822
10803
  }
10823
10804
  });
10824
10805
  }
10825
- _elRenderer(listener, state, cache) {
10806
+ elRenderer(listener, state, cache) {
10826
10807
  if (!listener.el)
10827
10808
  return;
10828
10809
  var {
@@ -10858,7 +10839,7 @@
10858
10839
  el.dispatchEvent(event);
10859
10840
  }
10860
10841
  }
10861
- _valueFormatter(value) {
10842
+ valueFormatter(value) {
10862
10843
  var src = value;
10863
10844
  var {
10864
10845
  loading,
@@ -10896,7 +10877,6 @@
10896
10877
  state: {
10897
10878
  loaded: false
10898
10879
  },
10899
- rect: {},
10900
10880
  show: false
10901
10881
  };
10902
10882
  },
@@ -10909,12 +10889,9 @@
10909
10889
  lazy.removeComponent(this);
10910
10890
  },
10911
10891
  methods: {
10912
- getRect() {
10913
- this.rect = this.$el.getBoundingClientRect();
10914
- },
10915
10892
  checkInView() {
10916
- this.getRect();
10917
- 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;
10893
+ var rect = useRect(this.$el);
10894
+ return inBrowser && rect.top < window.innerHeight * lazy.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazy.options.preLoad && rect.right > 0;
10918
10895
  },
10919
10896
  load() {
10920
10897
  this.show = true;
@@ -10942,7 +10919,7 @@
10942
10919
  this.binding = binding;
10943
10920
  this.options = {};
10944
10921
  this.lazy = lazy;
10945
- this._queue = [];
10922
+ this.queue = [];
10946
10923
  this.update({
10947
10924
  el,
10948
10925
  binding
@@ -10983,7 +10960,7 @@
10983
10960
  lazy
10984
10961
  } = _ref3;
10985
10962
  this.lazy = lazy;
10986
- this._queue = [];
10963
+ this.queue = [];
10987
10964
  }
10988
10965
  bind(el, binding, vnode) {
10989
10966
  var container = new LazyContainer({
@@ -10992,10 +10969,10 @@
10992
10969
  vnode,
10993
10970
  lazy: this.lazy
10994
10971
  });
10995
- this._queue.push(container);
10972
+ this.queue.push(container);
10996
10973
  }
10997
10974
  update(el, binding, vnode) {
10998
- var container = this._queue.find((item) => item.el === el);
10975
+ var container = this.queue.find((item) => item.el === el);
10999
10976
  if (!container)
11000
10977
  return;
11001
10978
  container.update({
@@ -11005,11 +10982,11 @@
11005
10982
  });
11006
10983
  }
11007
10984
  unbind(el) {
11008
- var container = this._queue.find((item) => item.el === el);
10985
+ var container = this.queue.find((item) => item.el === el);
11009
10986
  if (!container)
11010
10987
  return;
11011
10988
  container.clear();
11012
- remove(this._queue, container);
10989
+ remove(this.queue, container);
11013
10990
  }
11014
10991
  }
11015
10992
  var LazyImage = (lazyManager) => ({
@@ -11041,7 +11018,6 @@
11041
11018
  error: false,
11042
11019
  attempt: 0
11043
11020
  },
11044
- rect: {},
11045
11021
  renderSrc: ""
11046
11022
  };
11047
11023
  },
@@ -11070,19 +11046,16 @@
11070
11046
  src,
11071
11047
  loading,
11072
11048
  error
11073
- } = lazyManager._valueFormatter(this.src);
11049
+ } = lazyManager.valueFormatter(this.src);
11074
11050
  this.state.loaded = false;
11075
11051
  this.options.src = src;
11076
11052
  this.options.error = error;
11077
11053
  this.options.loading = loading;
11078
11054
  this.renderSrc = this.options.loading;
11079
11055
  },
11080
- getRect() {
11081
- this.rect = this.$el.getBoundingClientRect();
11082
- },
11083
11056
  checkInView() {
11084
- this.getRect();
11085
- 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;
11057
+ var rect = useRect(this.$el);
11058
+ return rect.top < window.innerHeight * lazyManager.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazyManager.options.preLoad && rect.right > 0;
11086
11059
  },
11087
11060
  load(onFinish) {
11088
11061
  if (onFinish === void 0) {
@@ -11140,7 +11113,7 @@
11140
11113
  });
11141
11114
  }
11142
11115
  };
11143
- var [name$q, bem$q, t$5] = createNamespace("list");
11116
+ var [name$q, bem$q, t$6] = createNamespace("list");
11144
11117
  var listProps = {
11145
11118
  error: Boolean,
11146
11119
  offset: makeNumericProp(300),
@@ -11212,7 +11185,9 @@
11212
11185
  var text = slots.error ? slots.error() : props.errorText;
11213
11186
  if (text) {
11214
11187
  return vue.createVNode("div", {
11188
+ "role": "button",
11215
11189
  "class": bem$q("error-text"),
11190
+ "tabindex": 0,
11216
11191
  "onClick": clickErrorText
11217
11192
  }, [text]);
11218
11193
  }
@@ -11225,11 +11200,11 @@
11225
11200
  }, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
11226
11201
  "class": bem$q("loading-icon")
11227
11202
  }, {
11228
- default: () => [props.loadingText || t$5("loading")]
11203
+ default: () => [props.loadingText || t$6("loading")]
11229
11204
  })]);
11230
11205
  }
11231
11206
  };
11232
- vue.watch([() => props.loading, () => props.finished, () => props.error], check);
11207
+ vue.watch(() => [props.loading, props.finished, props.error], check);
11233
11208
  if (tabStatus) {
11234
11209
  vue.watch(tabStatus, (tabActive) => {
11235
11210
  if (tabActive) {
@@ -11555,7 +11530,7 @@
11555
11530
  });
11556
11531
  var timer;
11557
11532
  var instance;
11558
- var parseOptions = (message) => isObject$1(message) ? message : {
11533
+ var parseOptions = (message) => isObject(message) ? message : {
11559
11534
  message
11560
11535
  };
11561
11536
  function initInstance() {
@@ -11622,14 +11597,14 @@
11622
11597
  "class": bem$m("collapse-icon"),
11623
11598
  "viewBox": "0 0 30 24"
11624
11599
  }, [vue.createVNode("path", {
11625
- "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",
11600
+ "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",
11626
11601
  "fill": "currentColor"
11627
11602
  }, null)]);
11628
11603
  var DeleteIcon = vue.createVNode("svg", {
11629
11604
  "class": bem$m("delete-icon"),
11630
11605
  "viewBox": "0 0 32 22"
11631
11606
  }, [vue.createVNode("path", {
11632
- "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",
11607
+ "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",
11633
11608
  "fill": "currentColor"
11634
11609
  }, null)]);
11635
11610
  var NumberKeyboardKey = vue.defineComponent({
@@ -11663,7 +11638,7 @@
11663
11638
  var onTouchEnd = (event) => {
11664
11639
  if (active.value) {
11665
11640
  if (!slots.default) {
11666
- event.preventDefault();
11641
+ preventDefault(event);
11667
11642
  }
11668
11643
  active.value = false;
11669
11644
  emit("press", props.text, props.type);
@@ -11918,7 +11893,7 @@
11918
11893
  }
11919
11894
  });
11920
11895
  var NumberKeyboard = withInstall(_NumberKeyboard);
11921
- var [name$k, bem$k, t$4] = createNamespace("pagination");
11896
+ var [name$k, bem$k, t$5] = createNamespace("pagination");
11922
11897
  var makePage = (number, text, active) => ({
11923
11898
  number,
11924
11899
  text,
@@ -11961,9 +11936,6 @@
11961
11936
  modelValue,
11962
11937
  forceEllipses
11963
11938
  } = props;
11964
- if (props.mode !== "multi") {
11965
- return items;
11966
- }
11967
11939
  var startPage = 1;
11968
11940
  var endPage = pageCount;
11969
11941
  var isMaxSized = showPageSize < pageCount;
@@ -11991,52 +11963,73 @@
11991
11963
  }
11992
11964
  return items;
11993
11965
  });
11994
- var select = (page, emitChange) => {
11995
- page = Math.min(count.value, Math.max(1, page));
11996
- if (props.modelValue !== page) {
11997
- emit("update:modelValue", page);
11966
+ var updateModelValue = (value, emitChange) => {
11967
+ value = clamp(value, 1, count.value);
11968
+ if (props.modelValue !== value) {
11969
+ emit("update:modelValue", value);
11998
11970
  if (emitChange) {
11999
- emit("change", page);
11971
+ emit("change", value);
12000
11972
  }
12001
11973
  }
12002
11974
  };
12003
- vue.watch(() => props.modelValue, (value) => {
12004
- select(value);
12005
- }, {
12006
- immediate: true
12007
- });
12008
- var renderDesc = () => {
12009
- if (props.mode !== "multi") {
12010
- return vue.createVNode("li", {
12011
- "class": bem$k("page-desc")
12012
- }, [slots.pageDesc ? slots.pageDesc() : props.modelValue + "/" + count.value]);
12013
- }
12014
- };
12015
- return () => {
12016
- var value = props.modelValue;
12017
- var simple = props.mode !== "multi";
12018
- var onSelect = (value2) => () => select(value2, true);
12019
- return vue.createVNode("ul", {
12020
- "class": bem$k({
12021
- simple
12022
- })
12023
- }, [vue.createVNode("li", {
12024
- "class": [bem$k("item", {
12025
- disabled: value === 1
12026
- }), bem$k("prev"), BORDER],
12027
- "onClick": onSelect(value - 1)
12028
- }, [slots["prev-text"] ? slots["prev-text"]() : props.prevText || t$4("prev")]), pages.value.map((page) => vue.createVNode("li", {
12029
- "class": [bem$k("item", {
12030
- active: page.active
12031
- }), bem$k("page"), BORDER],
12032
- "onClick": onSelect(page.number)
12033
- }, [slots.page ? slots.page(page) : page.text])), renderDesc(), vue.createVNode("li", {
11975
+ vue.watchEffect(() => updateModelValue(props.modelValue));
11976
+ var renderDesc = () => vue.createVNode("li", {
11977
+ "class": bem$k("page-desc")
11978
+ }, [slots.pageDesc ? slots.pageDesc() : props.modelValue + "/" + count.value]);
11979
+ var renderPrevButton = () => {
11980
+ var {
11981
+ mode,
11982
+ modelValue
11983
+ } = props;
11984
+ var slot = slots["prev-text"];
11985
+ var disabled = modelValue === 1;
11986
+ return vue.createVNode("li", {
12034
11987
  "class": [bem$k("item", {
12035
- disabled: value === count.value
12036
- }), bem$k("next"), BORDER],
12037
- "onClick": onSelect(value + 1)
12038
- }, [slots["next-text"] ? slots["next-text"]() : props.nextText || t$4("next")])]);
11988
+ disabled,
11989
+ border: mode === "simple",
11990
+ prev: true
11991
+ }), BORDER_SURROUND]
11992
+ }, [vue.createVNode("button", {
11993
+ "type": "button",
11994
+ "disabled": disabled,
11995
+ "onClick": () => updateModelValue(modelValue - 1)
11996
+ }, [slot ? slot() : props.prevText || t$5("prev")])]);
12039
11997
  };
11998
+ var renderNextButton = () => {
11999
+ var {
12000
+ mode,
12001
+ modelValue
12002
+ } = props;
12003
+ var slot = slots["next-text"];
12004
+ var disabled = modelValue === count.value;
12005
+ return vue.createVNode("li", {
12006
+ "class": [bem$k("item", {
12007
+ disabled,
12008
+ border: mode === "simple",
12009
+ next: true
12010
+ }), BORDER_SURROUND]
12011
+ }, [vue.createVNode("button", {
12012
+ "type": "button",
12013
+ "disabled": disabled,
12014
+ "onClick": () => updateModelValue(modelValue + 1)
12015
+ }, [slot ? slot() : props.nextText || t$5("next")])]);
12016
+ };
12017
+ var renderPages = () => pages.value.map((page) => vue.createVNode("li", {
12018
+ "class": [bem$k("item", {
12019
+ active: page.active,
12020
+ page: true
12021
+ }), BORDER_SURROUND]
12022
+ }, [vue.createVNode("button", {
12023
+ "type": "button",
12024
+ "aria-current": page.active || void 0,
12025
+ "onClick": () => updateModelValue(page.number)
12026
+ }, [slots.page ? slots.page(page) : page.text])]));
12027
+ return () => vue.createVNode("nav", {
12028
+ "role": "navigation",
12029
+ "class": bem$k()
12030
+ }, [vue.createVNode("ul", {
12031
+ "class": bem$k("items")
12032
+ }, [renderPrevButton(), props.mode === "simple" ? renderDesc() : renderPages(), renderNextButton()])]);
12040
12033
  }
12041
12034
  });
12042
12035
  var Pagination = withInstall(_Pagination);
@@ -12391,12 +12384,12 @@
12391
12384
  return placement.split("-")[0];
12392
12385
  }
12393
12386
  function mergeByName(modifiers) {
12394
- var merged = modifiers.reduce(function(merged2, current) {
12395
- var existing = merged2[current.name];
12396
- merged2[current.name] = existing ? Object.assign({}, existing, current, {
12397
- options: Object.assign({}, existing.options, current.options),
12398
- data: Object.assign({}, existing.data, current.data)
12399
- }) : current;
12387
+ var merged = modifiers.reduce(function(merged2, current2) {
12388
+ var existing = merged2[current2.name];
12389
+ merged2[current2.name] = existing ? Object.assign({}, existing, current2, {
12390
+ options: Object.assign({}, existing.options, current2.options),
12391
+ data: Object.assign({}, existing.data, current2.data)
12392
+ }) : current2;
12400
12393
  return merged2;
12401
12394
  }, {});
12402
12395
  return Object.keys(merged).map(function(key) {
@@ -12958,6 +12951,8 @@
12958
12951
  "style": {
12959
12952
  color
12960
12953
  },
12954
+ "tabindex": disabled ? void 0 : 0,
12955
+ "aria-disabled": disabled || void 0,
12961
12956
  "onClick": () => onClickAction(action, index2)
12962
12957
  }, [icon && vue.createVNode(Icon, {
12963
12958
  "name": icon,
@@ -13072,7 +13067,7 @@
13072
13067
  }
13073
13068
  });
13074
13069
  var Progress = withInstall(_Progress);
13075
- var [name$g, bem$g, t$3] = createNamespace("pull-refresh");
13070
+ var [name$g, bem$g, t$4] = createNamespace("pull-refresh");
13076
13071
  var DEFAULT_HEAD_HEIGHT = 50;
13077
13072
  var TEXT_STATUS = ["pulling", "loosing", "success"];
13078
13073
  var pullRefreshProps = {
@@ -13144,7 +13139,7 @@
13144
13139
  if (status === "normal") {
13145
13140
  return "";
13146
13141
  }
13147
- return props[status + "Text"] || t$3(status);
13142
+ return props[status + "Text"] || t$4(status);
13148
13143
  };
13149
13144
  var renderStatus = () => {
13150
13145
  var {
@@ -13392,8 +13387,8 @@
13392
13387
  "role": "radio",
13393
13388
  "style": style,
13394
13389
  "class": bem$f("item"),
13395
- "tabindex": 0,
13396
- "aria-setsize": +count,
13390
+ "tabindex": disabled ? void 0 : 0,
13391
+ "aria-setsize": count,
13397
13392
  "aria-posinset": score,
13398
13393
  "aria-checked": !isVoid,
13399
13394
  "onClick": onClickItem
@@ -13427,7 +13422,9 @@
13427
13422
  readonly: props.readonly,
13428
13423
  disabled: props.disabled
13429
13424
  }),
13430
- "tabindex": 0,
13425
+ "tabindex": props.disabled ? void 0 : 0,
13426
+ "aria-disabled": props.disabled,
13427
+ "aria-readonly": props.readonly,
13431
13428
  "onTouchstart": onTouchStart,
13432
13429
  "onTouchmove": onTouchMove
13433
13430
  }, [list.value.map(renderStar)]);
@@ -13435,7 +13432,7 @@
13435
13432
  });
13436
13433
  var Rate = withInstall(_Rate);
13437
13434
  var Row = withInstall(_Row);
13438
- var [name$e, bem$e, t$2] = createNamespace("search");
13435
+ var [name$e, bem$e, t$3] = createNamespace("search");
13439
13436
  var searchProps = extend({}, fieldSharedProps, {
13440
13437
  label: String,
13441
13438
  shape: makeStringProp("square"),
@@ -13455,6 +13452,7 @@
13455
13452
  slots,
13456
13453
  attrs
13457
13454
  } = _ref;
13455
+ var id = useId();
13458
13456
  var filedRef = vue.ref();
13459
13457
  var onCancel = () => {
13460
13458
  if (!slots.action) {
@@ -13469,17 +13467,18 @@
13469
13467
  emit("search", props.modelValue);
13470
13468
  }
13471
13469
  };
13470
+ var getInputId = () => props.id || id + "-input";
13472
13471
  var renderLabel = () => {
13473
13472
  if (slots.label || props.label) {
13474
13473
  return vue.createVNode("label", {
13475
13474
  "class": bem$e("label"),
13476
- "for": props.id
13475
+ "for": getInputId()
13477
13476
  }, [slots.label ? slots.label() : props.label]);
13478
13477
  }
13479
13478
  };
13480
13479
  var renderAction = () => {
13481
13480
  if (props.showAction) {
13482
- var text = props.actionText || t$2("cancel");
13481
+ var text = props.actionText || t$3("cancel");
13483
13482
  return vue.createVNode("div", {
13484
13483
  "class": bem$e("action"),
13485
13484
  "role": "button",
@@ -13498,7 +13497,9 @@
13498
13497
  };
13499
13498
  var fieldPropNames = Object.keys(fieldSharedProps);
13500
13499
  var renderField = () => {
13501
- var fieldAttrs = extend({}, attrs, pick(props, fieldPropNames));
13500
+ var fieldAttrs = extend({}, attrs, pick(props, fieldPropNames), {
13501
+ id: getInputId()
13502
+ });
13502
13503
  var onInput = (value) => emit("update:modelValue", value);
13503
13504
  return vue.createVNode(Field, vue.mergeProps({
13504
13505
  "ref": filedRef,
@@ -13534,7 +13535,7 @@
13534
13535
  }
13535
13536
  return icon;
13536
13537
  }
13537
- var [name$d, bem$d, t$1] = createNamespace("share-sheet");
13538
+ var [name$d, bem$d, t$2] = createNamespace("share-sheet");
13538
13539
  var shareSheetProps = extend({}, popupSharedProps, {
13539
13540
  title: String,
13540
13541
  round: truthProp,
@@ -13609,7 +13610,7 @@
13609
13610
  };
13610
13611
  var renderCancelButton = () => {
13611
13612
  var _props$cancelText;
13612
- var cancelText = (_props$cancelText = props.cancelText) != null ? _props$cancelText : t$1("cancel");
13613
+ var cancelText = (_props$cancelText = props.cancelText) != null ? _props$cancelText : t$2("cancel");
13613
13614
  if (slots.cancel || cancelText) {
13614
13615
  return vue.createVNode("button", {
13615
13616
  "type": "button",
@@ -13657,6 +13658,7 @@
13657
13658
  setActive
13658
13659
  });
13659
13660
  return () => vue.createVNode("div", {
13661
+ "role": "tablist",
13660
13662
  "class": bem$c()
13661
13663
  }, [slots.default == null ? void 0 : slots.default()]);
13662
13664
  }
@@ -13702,11 +13704,14 @@
13702
13704
  disabled
13703
13705
  } = props;
13704
13706
  var selected = index2.value === parent.getActive();
13705
- return vue.createVNode("a", {
13707
+ return vue.createVNode("div", {
13708
+ "role": "tab",
13706
13709
  "class": bem$b({
13707
13710
  select: selected,
13708
13711
  disabled
13709
13712
  }),
13713
+ "tabindex": disabled ? void 0 : 0,
13714
+ "aria-selected": selected,
13710
13715
  "onClick": onClick
13711
13716
  }, [vue.createVNode(Badge, {
13712
13717
  "dot": dot,
@@ -13825,7 +13830,7 @@
13825
13830
  slots
13826
13831
  } = _ref;
13827
13832
  var buttonIndex;
13828
- var current;
13833
+ var current2;
13829
13834
  var startValue;
13830
13835
  var root = vue.ref();
13831
13836
  var dragStatus = vue.ref();
@@ -13948,11 +13953,11 @@
13948
13953
  return;
13949
13954
  }
13950
13955
  touch.start(event);
13951
- current = props.modelValue;
13952
- if (isRange(current)) {
13953
- startValue = current.map(format2);
13956
+ current2 = props.modelValue;
13957
+ if (isRange(current2)) {
13958
+ startValue = current2.map(format2);
13954
13959
  } else {
13955
- startValue = format2(current);
13960
+ startValue = format2(current2);
13956
13961
  }
13957
13962
  dragStatus.value = "start";
13958
13963
  };
@@ -13975,18 +13980,18 @@
13975
13980
  }
13976
13981
  if (isRange(startValue)) {
13977
13982
  var index2 = props.reverse ? 1 - buttonIndex : buttonIndex;
13978
- current[index2] = startValue[index2] + diff;
13983
+ current2[index2] = startValue[index2] + diff;
13979
13984
  } else {
13980
- current = startValue + diff;
13985
+ current2 = startValue + diff;
13981
13986
  }
13982
- updateValue(current);
13987
+ updateValue(current2);
13983
13988
  };
13984
13989
  var onTouchEnd = (event) => {
13985
13990
  if (props.disabled || props.readonly) {
13986
13991
  return;
13987
13992
  }
13988
13993
  if (dragStatus.value === "dragging") {
13989
- updateValue(current, true);
13994
+ updateValue(current2, true);
13990
13995
  emit("drag-end", event);
13991
13996
  }
13992
13997
  dragStatus.value = "";
@@ -14018,14 +14023,16 @@
14018
14023
  }, null);
14019
14024
  };
14020
14025
  var renderButton = (index2) => {
14021
- var current2 = typeof index2 === "number" ? props.modelValue[index2] : props.modelValue;
14026
+ var current3 = typeof index2 === "number" ? props.modelValue[index2] : props.modelValue;
14022
14027
  return vue.createVNode("div", {
14023
14028
  "role": "slider",
14024
14029
  "class": getButtonClassName(index2),
14025
- "tabindex": props.disabled || props.readonly ? -1 : 0,
14026
- "aria-valuemin": +props.min,
14027
- "aria-valuenow": current2,
14028
- "aria-valuemax": +props.max,
14030
+ "tabindex": props.disabled ? void 0 : 0,
14031
+ "aria-valuemin": props.min,
14032
+ "aria-valuenow": current3,
14033
+ "aria-valuemax": props.max,
14034
+ "aria-disabled": props.disabled || void 0,
14035
+ "aria-readonly": props.readonly || void 0,
14029
14036
  "aria-orientation": props.vertical ? "vertical" : "horizontal",
14030
14037
  "onTouchstart": (event) => {
14031
14038
  if (typeof index2 === "number") {
@@ -14037,7 +14044,7 @@
14037
14044
  "onTouchend": onTouchEnd,
14038
14045
  "onTouchcancel": onTouchEnd,
14039
14046
  "onClick": stopPropagation
14040
- }, [renderButtonContent(current2, index2)]);
14047
+ }, [renderButtonContent(current3, index2)]);
14041
14048
  };
14042
14049
  updateValue(props.modelValue);
14043
14050
  useCustomFieldValue(() => props.modelValue);
@@ -14265,18 +14272,18 @@
14265
14272
  };
14266
14273
  var actionType;
14267
14274
  var inputRef = vue.ref();
14268
- var current = vue.ref(getInitialValue());
14269
- var minusDisabled = vue.computed(() => props.disabled || props.disableMinus || current.value <= +props.min);
14270
- var plusDisabled = vue.computed(() => props.disabled || props.disablePlus || current.value >= +props.max);
14275
+ var current2 = vue.ref(getInitialValue());
14276
+ var minusDisabled = vue.computed(() => props.disabled || props.disableMinus || current2.value <= +props.min);
14277
+ var plusDisabled = vue.computed(() => props.disabled || props.disablePlus || current2.value >= +props.max);
14271
14278
  var inputStyle = vue.computed(() => ({
14272
14279
  width: addUnit(props.inputWidth),
14273
14280
  height: addUnit(props.buttonSize)
14274
14281
  }));
14275
14282
  var buttonStyle = vue.computed(() => getSizeStyle(props.buttonSize));
14276
14283
  var check = () => {
14277
- var value = format2(current.value);
14278
- if (!isEqual(value, current.value)) {
14279
- current.value = value;
14284
+ var value = format2(current2.value);
14285
+ if (!isEqual(value, current2.value)) {
14286
+ current2.value = value;
14280
14287
  }
14281
14288
  };
14282
14289
  var setValue = (value) => {
@@ -14284,11 +14291,11 @@
14284
14291
  callInterceptor(props.beforeChange, {
14285
14292
  args: [value],
14286
14293
  done() {
14287
- current.value = value;
14294
+ current2.value = value;
14288
14295
  }
14289
14296
  });
14290
14297
  } else {
14291
- current.value = value;
14298
+ current2.value = value;
14292
14299
  }
14293
14300
  };
14294
14301
  var onChange = () => {
@@ -14297,7 +14304,7 @@
14297
14304
  return;
14298
14305
  }
14299
14306
  var diff = actionType === "minus" ? -props.step : +props.step;
14300
- var value = format2(addNumber(+current.value, diff));
14307
+ var value = format2(addNumber(+current2.value, diff));
14301
14308
  setValue(value);
14302
14309
  emit(actionType);
14303
14310
  };
@@ -14315,7 +14322,7 @@
14315
14322
  formatted = pair[0] + "." + pair[1].slice(0, +decimalLength);
14316
14323
  }
14317
14324
  if (props.beforeChange) {
14318
- input.value = String(current.value);
14325
+ input.value = String(current2.value);
14319
14326
  } else if (!isEqual(value, formatted)) {
14320
14327
  input.value = formatted;
14321
14328
  }
@@ -14334,7 +14341,7 @@
14334
14341
  var input = event.target;
14335
14342
  var value = format2(input.value);
14336
14343
  input.value = String(value);
14337
- current.value = value;
14344
+ current2.value = value;
14338
14345
  vue.nextTick(() => {
14339
14346
  emit("blur", event);
14340
14347
  resetScroll();
@@ -14369,12 +14376,12 @@
14369
14376
  };
14370
14377
  var onMousedown = (event) => {
14371
14378
  if (props.disableInput) {
14372
- event.preventDefault();
14379
+ preventDefault(event);
14373
14380
  }
14374
14381
  };
14375
14382
  var createListeners = (type) => ({
14376
14383
  onClick: (event) => {
14377
- event.preventDefault();
14384
+ preventDefault(event);
14378
14385
  actionType = type;
14379
14386
  onChange();
14380
14387
  },
@@ -14385,13 +14392,13 @@
14385
14392
  onTouchend: onTouchEnd,
14386
14393
  onTouchcancel: onTouchEnd
14387
14394
  });
14388
- vue.watch([() => props.max, () => props.min, () => props.integer, () => props.decimalLength], check);
14395
+ vue.watch(() => [props.max, props.min, props.integer, props.decimalLength], check);
14389
14396
  vue.watch(() => props.modelValue, (value) => {
14390
- if (!isEqual(value, current.value)) {
14391
- current.value = format2(value);
14397
+ if (!isEqual(value, current2.value)) {
14398
+ current2.value = format2(value);
14392
14399
  }
14393
14400
  });
14394
- vue.watch(current, (value) => {
14401
+ vue.watch(current2, (value) => {
14395
14402
  emit("update:modelValue", value);
14396
14403
  emit("change", value, {
14397
14404
  name: props.name
@@ -14399,6 +14406,7 @@
14399
14406
  });
14400
14407
  useCustomFieldValue(() => props.modelValue);
14401
14408
  return () => vue.createVNode("div", {
14409
+ "role": "group",
14402
14410
  "class": bem$6([props.theme])
14403
14411
  }, [vue.withDirectives(vue.createVNode("button", vue.mergeProps({
14404
14412
  "type": "button",
@@ -14407,21 +14415,22 @@
14407
14415
  disabled: minusDisabled.value
14408
14416
  }), {
14409
14417
  [HAPTICS_FEEDBACK]: !minusDisabled.value
14410
- }]
14418
+ }],
14419
+ "aria-disabled": minusDisabled.value || void 0
14411
14420
  }, createListeners("minus")), null), [[vue.vShow, props.showMinus]]), vue.withDirectives(vue.createVNode("input", {
14412
14421
  "ref": inputRef,
14413
14422
  "type": props.integer ? "tel" : "text",
14414
14423
  "role": "spinbutton",
14415
14424
  "class": bem$6("input"),
14416
- "value": current.value,
14425
+ "value": current2.value,
14417
14426
  "style": inputStyle.value,
14418
14427
  "disabled": props.disabled,
14419
14428
  "readonly": props.disableInput,
14420
14429
  "inputmode": props.integer ? "numeric" : "decimal",
14421
14430
  "placeholder": props.placeholder,
14422
- "aria-valuemax": +props.max,
14423
- "aria-valuemin": +props.min,
14424
- "aria-valuenow": +current.value,
14431
+ "aria-valuemax": props.max,
14432
+ "aria-valuemin": props.min,
14433
+ "aria-valuenow": current2.value,
14425
14434
  "onBlur": onBlur,
14426
14435
  "onInput": onInput,
14427
14436
  "onFocus": onFocus,
@@ -14433,13 +14442,14 @@
14433
14442
  disabled: plusDisabled.value
14434
14443
  }), {
14435
14444
  [HAPTICS_FEEDBACK]: !plusDisabled.value
14436
- }]
14445
+ }],
14446
+ "aria-disabled": plusDisabled.value || void 0
14437
14447
  }, createListeners("plus")), null), [[vue.vShow, props.showPlus]])]);
14438
14448
  }
14439
14449
  });
14440
14450
  var Stepper = withInstall(_Stepper);
14441
14451
  var Steps = withInstall(_Steps);
14442
- var [name$5, bem$5, t] = createNamespace("submit-bar");
14452
+ var [name$5, bem$5, t$1] = createNamespace("submit-bar");
14443
14453
  var submitBarProps = {
14444
14454
  tip: String,
14445
14455
  label: String,
@@ -14482,7 +14492,7 @@
14482
14492
  "style": {
14483
14493
  textAlign
14484
14494
  }
14485
- }, [vue.createVNode("span", null, [label || t("label")]), vue.createVNode("span", {
14495
+ }, [vue.createVNode("span", null, [label || t$1("label")]), vue.createVNode("span", {
14486
14496
  "class": bem$5("price")
14487
14497
  }, [currency, vue.createVNode("span", {
14488
14498
  "class": bem$5("price-integer")
@@ -14729,6 +14739,7 @@
14729
14739
  } = props;
14730
14740
  return vue.createVNode("div", {
14731
14741
  "ref": root,
14742
+ "role": "tablist",
14732
14743
  "style": getZIndexStyle(zIndex),
14733
14744
  "class": [bem$3({
14734
14745
  fixed
@@ -14738,16 +14749,15 @@
14738
14749
  }]
14739
14750
  }, [slots.default == null ? void 0 : slots.default()]);
14740
14751
  };
14741
- var setActive = (active) => {
14742
- if (active !== props.modelValue) {
14743
- callInterceptor(props.beforeChange, {
14744
- args: [active],
14745
- done() {
14746
- emit("update:modelValue", active);
14747
- emit("change", active);
14748
- }
14749
- });
14750
- }
14752
+ var setActive = (active, afterChange) => {
14753
+ callInterceptor(props.beforeChange, {
14754
+ args: [active],
14755
+ done() {
14756
+ emit("update:modelValue", active);
14757
+ emit("change", active);
14758
+ afterChange();
14759
+ }
14760
+ });
14751
14761
  };
14752
14762
  linkChildren({
14753
14763
  props,
@@ -14789,6 +14799,7 @@
14789
14799
  return;
14790
14800
  }
14791
14801
  var active = vue.computed(() => {
14802
+ var _props$name;
14792
14803
  var {
14793
14804
  route: route3,
14794
14805
  modelValue
@@ -14800,20 +14811,23 @@
14800
14811
  var {
14801
14812
  to
14802
14813
  } = props;
14803
- var config = isObject$1(to) ? to : {
14814
+ var config = isObject(to) ? to : {
14804
14815
  path: to
14805
14816
  };
14806
- var pathMatched = "path" in config && config.path === $route.path;
14807
- var nameMatched = "name" in config && config.name === $route.name;
14808
- return pathMatched || nameMatched;
14817
+ return !!$route.matched.find((val) => {
14818
+ var pathMatched = "path" in config && config.path === val.path;
14819
+ var nameMatched = "name" in config && config.name === val.name;
14820
+ return pathMatched || nameMatched;
14821
+ });
14809
14822
  }
14810
- return (props.name || index2.value) === modelValue;
14823
+ return ((_props$name = props.name) != null ? _props$name : index2.value) === modelValue;
14811
14824
  });
14812
14825
  var onClick = (event) => {
14813
- var _props$name;
14814
- parent.setActive((_props$name = props.name) != null ? _props$name : index2.value);
14826
+ if (!active.value) {
14827
+ var _props$name2;
14828
+ parent.setActive((_props$name2 = props.name) != null ? _props$name2 : index2.value, route2);
14829
+ }
14815
14830
  emit("click", event);
14816
- route2();
14817
14831
  };
14818
14832
  var renderIcon = () => {
14819
14833
  if (slots.icon) {
@@ -14839,12 +14853,15 @@
14839
14853
  } = parent.props;
14840
14854
  var color = active.value ? activeColor : inactiveColor;
14841
14855
  return vue.createVNode("div", {
14856
+ "role": "tab",
14842
14857
  "class": bem$2({
14843
14858
  active: active.value
14844
14859
  }),
14845
14860
  "style": {
14846
14861
  color
14847
14862
  },
14863
+ "tabindex": 0,
14864
+ "aria-selected": active.value,
14848
14865
  "onClick": onClick
14849
14866
  }, [vue.createVNode(Badge, {
14850
14867
  "dot": dot,
@@ -14955,7 +14972,7 @@
14955
14972
  }
14956
14973
  });
14957
14974
  var TreeSelect = withInstall(_TreeSelect);
14958
- var [name, bem] = createNamespace("uploader");
14975
+ var [name, bem, t] = createNamespace("uploader");
14959
14976
  var toArray = (item) => Array.isArray(item) ? item : [item];
14960
14977
  function readFileContent(file, resultType) {
14961
14978
  return new Promise((resolve) => {
@@ -15074,7 +15091,10 @@
15074
15091
  var renderDeleteIcon = () => {
15075
15092
  if (props.deletable && props.item.status !== "uploading") {
15076
15093
  return vue.createVNode("div", {
15094
+ "role": "button",
15077
15095
  "class": bem("preview-delete"),
15096
+ "tabindex": 0,
15097
+ "aria-label": t("delete"),
15078
15098
  "onClick": onDelete
15079
15099
  }, [vue.createVNode(Icon, {
15080
15100
  "name": "cross",
@@ -15362,7 +15382,7 @@
15362
15382
  }
15363
15383
  });
15364
15384
  var Uploader = withInstall(_Uploader);
15365
- var version = "3.2.8";
15385
+ var version = "3.3.2";
15366
15386
  function install(app) {
15367
15387
  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];
15368
15388
  components.forEach((item) => {