vant 3.2.5 → 3.2.6

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 (375) hide show
  1. package/es/action-bar/index.css +1 -1
  2. package/es/action-bar/index.less +1 -1
  3. package/es/action-bar-icon/ActionBarIcon.js +2 -2
  4. package/es/action-bar-icon/index.css +1 -1
  5. package/es/action-bar-icon/index.less +1 -1
  6. package/es/action-sheet/ActionSheet.d.ts +15 -9
  7. package/es/action-sheet/ActionSheet.js +7 -15
  8. package/es/action-sheet/index.css +1 -1
  9. package/es/action-sheet/index.d.ts +10 -3
  10. package/es/action-sheet/index.less +2 -2
  11. package/es/address-edit/AddressEdit.d.ts +1 -2
  12. package/es/address-edit/AddressEdit.js +3 -8
  13. package/es/address-edit/AddressEditDetail.js +5 -6
  14. package/es/address-edit/index.css +1 -1
  15. package/es/address-edit/index.d.ts +1 -2
  16. package/es/address-edit/index.less +2 -2
  17. package/es/address-edit/style/index.js +0 -3
  18. package/es/address-edit/style/less.js +0 -3
  19. package/es/address-list/AddressList.js +2 -6
  20. package/es/badge/index.css +1 -1
  21. package/es/badge/index.less +4 -2
  22. package/es/calendar/Calendar.js +11 -8
  23. package/es/calendar/index.css +1 -1
  24. package/es/calendar/index.less +3 -3
  25. package/es/card/index.css +1 -1
  26. package/es/card/index.less +1 -1
  27. package/es/cascader/Cascader.d.ts +25 -14
  28. package/es/cascader/Cascader.js +49 -46
  29. package/es/cascader/index.d.ts +8 -6
  30. package/es/cascader/types.d.ts +18 -0
  31. package/es/cascader/types.js +1 -0
  32. package/es/cell/index.css +1 -1
  33. package/es/cell/index.less +1 -1
  34. package/es/cell-group/index.css +1 -1
  35. package/es/cell-group/index.less +1 -1
  36. package/es/checkbox/Checker.js +1 -8
  37. package/es/checkbox/index.d.ts +1 -1
  38. package/es/checkbox/types.d.ts +3 -0
  39. package/es/checkbox-group/index.d.ts +1 -1
  40. package/es/checkbox-group/types.d.ts +2 -1
  41. package/es/collapse-item/index.css +1 -1
  42. package/es/collapse-item/index.less +1 -1
  43. package/es/contact-edit/ContactEdit.js +1 -4
  44. package/es/contact-edit/style/index.js +0 -5
  45. package/es/contact-edit/style/less.js +0 -5
  46. package/es/coupon/index.css +1 -1
  47. package/es/coupon/index.less +1 -1
  48. package/es/coupon-list/CouponList.js +1 -1
  49. package/es/coupon-list/index.css +1 -1
  50. package/es/coupon-list/index.less +1 -1
  51. package/es/dialog/Dialog.js +5 -10
  52. package/es/dialog/function-call.d.ts +2 -2
  53. package/es/dialog/function-call.js +2 -2
  54. package/es/dialog/index.css +1 -1
  55. package/es/dialog/index.less +1 -1
  56. package/es/dropdown-item/DropdownItem.js +1 -1
  57. package/es/dropdown-menu/index.css +1 -1
  58. package/es/dropdown-menu/index.less +1 -1
  59. package/es/empty/Network.js +8 -27
  60. package/es/grid-item/GridItem.js +2 -2
  61. package/es/grid-item/index.css +1 -1
  62. package/es/grid-item/index.less +1 -1
  63. package/es/image/Image.js +7 -20
  64. package/es/image/index.css +1 -1
  65. package/es/image/index.less +1 -1
  66. package/es/image-preview/ImagePreview.js +5 -6
  67. package/es/image-preview/function-call.js +2 -2
  68. package/es/image-preview/index.css +1 -1
  69. package/es/image-preview/index.less +1 -1
  70. package/es/index-anchor/index.css +1 -1
  71. package/es/index-anchor/index.less +2 -2
  72. package/es/index-bar/IndexBar.js +1 -12
  73. package/es/index.d.ts +1 -1
  74. package/es/index.js +1 -1
  75. package/es/locale/lang/de-DE-formal.d.ts +0 -1
  76. package/es/locale/lang/de-DE-formal.js +0 -1
  77. package/es/locale/lang/de-DE.d.ts +0 -1
  78. package/es/locale/lang/de-DE.js +0 -1
  79. package/es/locale/lang/en-US.d.ts +0 -1
  80. package/es/locale/lang/en-US.js +0 -1
  81. package/es/locale/lang/es-ES.d.ts +0 -1
  82. package/es/locale/lang/es-ES.js +0 -1
  83. package/es/locale/lang/fr-FR.d.ts +0 -1
  84. package/es/locale/lang/fr-FR.js +0 -1
  85. package/es/locale/lang/ja-JP.d.ts +0 -1
  86. package/es/locale/lang/ja-JP.js +0 -1
  87. package/es/locale/lang/nb-NO.d.ts +0 -1
  88. package/es/locale/lang/nb-NO.js +0 -1
  89. package/es/locale/lang/ro-RO.d.ts +0 -1
  90. package/es/locale/lang/ro-RO.js +0 -1
  91. package/es/locale/lang/ru-RU.d.ts +0 -1
  92. package/es/locale/lang/ru-RU.js +0 -1
  93. package/es/locale/lang/th-TH.d.ts +0 -1
  94. package/es/locale/lang/th-TH.js +0 -1
  95. package/es/locale/lang/tr-TR.d.ts +0 -1
  96. package/es/locale/lang/tr-TR.js +0 -1
  97. package/es/locale/lang/zh-CN.d.ts +0 -1
  98. package/es/locale/lang/zh-CN.js +0 -1
  99. package/es/locale/lang/zh-HK.d.ts +0 -1
  100. package/es/locale/lang/zh-HK.js +0 -1
  101. package/es/locale/lang/zh-TW.d.ts +0 -1
  102. package/es/locale/lang/zh-TW.js +0 -1
  103. package/es/nav-bar/index.css +1 -1
  104. package/es/nav-bar/index.less +1 -1
  105. package/es/notice-bar/NoticeBar.d.ts +1 -1
  106. package/es/notice-bar/index.css +1 -1
  107. package/es/notice-bar/index.d.ts +1 -1
  108. package/es/notice-bar/index.less +1 -1
  109. package/es/notify/Notify.d.ts +4 -2
  110. package/es/notify/Notify.js +6 -1
  111. package/es/notify/function-call.d.ts +4 -2
  112. package/es/notify/function-call.js +1 -1
  113. package/es/notify/index.css +1 -1
  114. package/es/notify/index.less +4 -4
  115. package/es/number-keyboard/index.css +1 -1
  116. package/es/number-keyboard/index.less +3 -3
  117. package/es/overlay/Overlay.js +2 -2
  118. package/es/overlay/index.css +1 -1
  119. package/es/overlay/index.less +1 -1
  120. package/es/pagination/index.css +1 -1
  121. package/es/pagination/index.less +1 -1
  122. package/es/password-input/index.css +1 -1
  123. package/es/password-input/index.less +3 -3
  124. package/es/picker/index.css +1 -1
  125. package/es/picker/index.less +2 -2
  126. package/es/popover/Popover.js +3 -4
  127. package/es/popover/index.css +1 -1
  128. package/es/popover/index.less +2 -2
  129. package/es/popup/Popup.js +2 -4
  130. package/es/popup/index.css +1 -1
  131. package/es/popup/index.less +1 -1
  132. package/es/progress/Progress.js +7 -3
  133. package/es/progress/index.css +1 -1
  134. package/es/progress/index.less +10 -1
  135. package/es/progress/var.less +1 -0
  136. package/es/pull-refresh/PullRefresh.js +2 -2
  137. package/es/radio/Radio.d.ts +9 -6
  138. package/es/radio/index.d.ts +2 -0
  139. package/es/radio-group/RadioGroup.d.ts +1 -0
  140. package/es/radio-group/index.d.ts +2 -0
  141. package/es/search/Search.js +3 -4
  142. package/es/search/index.css +1 -1
  143. package/es/search/index.less +2 -2
  144. package/es/share-sheet/ShareSheet.d.ts +7 -0
  145. package/es/share-sheet/ShareSheet.js +5 -6
  146. package/es/share-sheet/index.d.ts +7 -0
  147. package/es/sidebar-item/index.css +1 -1
  148. package/es/sidebar-item/index.less +1 -1
  149. package/es/skeleton/index.css +1 -1
  150. package/es/skeleton/index.less +2 -2
  151. package/es/slider/index.css +1 -1
  152. package/es/slider/index.less +3 -3
  153. package/es/stepper/Stepper.d.ts +1 -1
  154. package/es/stepper/Stepper.js +1 -2
  155. package/es/stepper/index.css +1 -1
  156. package/es/stepper/index.d.ts +1 -1
  157. package/es/stepper/index.less +3 -3
  158. package/es/steps/index.d.ts +6 -4
  159. package/es/submit-bar/index.css +1 -1
  160. package/es/submit-bar/index.less +2 -2
  161. package/es/swipe-cell/SwipeCell.js +1 -2
  162. package/es/switch/index.css +1 -1
  163. package/es/switch/index.less +3 -3
  164. package/es/tabbar/Tabbar.js +1 -2
  165. package/es/tabbar/index.css +1 -1
  166. package/es/tabbar/index.less +1 -1
  167. package/es/tabbar-item/TabbarItem.js +2 -2
  168. package/es/tabs/Tabs.js +2 -5
  169. package/es/tabs/index.css +1 -1
  170. package/es/tabs/index.less +2 -2
  171. package/es/tag/index.css +1 -1
  172. package/es/tag/index.less +6 -6
  173. package/es/toast/Toast.js +5 -11
  174. package/es/toast/index.css +1 -1
  175. package/es/toast/index.less +1 -1
  176. package/es/tree-select/index.css +1 -1
  177. package/es/tree-select/index.less +2 -2
  178. package/es/uploader/UploaderPreviewItem.js +3 -4
  179. package/es/uploader/index.css +1 -1
  180. package/es/uploader/index.less +4 -4
  181. package/es/utils/interceptor.d.ts +1 -2
  182. package/es/utils/interceptor.js +6 -9
  183. package/lib/action-bar/index.css +1 -1
  184. package/lib/action-bar/index.less +1 -1
  185. package/lib/action-bar-icon/ActionBarIcon.js +1 -1
  186. package/lib/action-bar-icon/index.css +1 -1
  187. package/lib/action-bar-icon/index.less +1 -1
  188. package/lib/action-sheet/ActionSheet.d.ts +15 -9
  189. package/lib/action-sheet/ActionSheet.js +6 -14
  190. package/lib/action-sheet/index.css +1 -1
  191. package/lib/action-sheet/index.d.ts +10 -3
  192. package/lib/action-sheet/index.less +2 -2
  193. package/lib/address-edit/AddressEdit.d.ts +1 -2
  194. package/lib/address-edit/AddressEdit.js +3 -9
  195. package/lib/address-edit/AddressEditDetail.js +4 -5
  196. package/lib/address-edit/index.css +1 -1
  197. package/lib/address-edit/index.d.ts +1 -2
  198. package/lib/address-edit/index.less +2 -2
  199. package/lib/address-edit/style/index.js +0 -6
  200. package/lib/address-edit/style/less.js +0 -6
  201. package/lib/address-list/AddressList.js +2 -6
  202. package/lib/badge/index.css +1 -1
  203. package/lib/badge/index.less +4 -2
  204. package/lib/calendar/Calendar.js +11 -8
  205. package/lib/calendar/index.css +1 -1
  206. package/lib/calendar/index.less +3 -3
  207. package/lib/card/index.css +1 -1
  208. package/lib/card/index.less +1 -1
  209. package/lib/cascader/Cascader.d.ts +25 -14
  210. package/lib/cascader/Cascader.js +48 -45
  211. package/lib/cascader/index.d.ts +8 -6
  212. package/lib/cascader/types.d.ts +18 -0
  213. package/lib/cascader/types.js +3 -0
  214. package/lib/cell/index.css +1 -1
  215. package/lib/cell/index.less +1 -1
  216. package/lib/cell-group/index.css +1 -1
  217. package/lib/cell-group/index.less +1 -1
  218. package/lib/checkbox/Checker.js +1 -8
  219. package/lib/checkbox/index.d.ts +1 -1
  220. package/lib/checkbox/types.d.ts +3 -0
  221. package/lib/checkbox-group/index.d.ts +1 -1
  222. package/lib/checkbox-group/types.d.ts +2 -1
  223. package/lib/collapse-item/index.css +1 -1
  224. package/lib/collapse-item/index.less +1 -1
  225. package/lib/contact-edit/ContactEdit.js +1 -5
  226. package/lib/contact-edit/style/index.js +0 -10
  227. package/lib/contact-edit/style/less.js +0 -10
  228. package/lib/coupon/index.css +1 -1
  229. package/lib/coupon/index.less +1 -1
  230. package/lib/coupon-list/CouponList.js +1 -1
  231. package/lib/coupon-list/index.css +1 -1
  232. package/lib/coupon-list/index.less +1 -1
  233. package/lib/dialog/Dialog.js +5 -10
  234. package/lib/dialog/function-call.d.ts +2 -2
  235. package/lib/dialog/function-call.js +2 -2
  236. package/lib/dialog/index.css +1 -1
  237. package/lib/dialog/index.less +1 -1
  238. package/lib/dropdown-item/DropdownItem.js +1 -1
  239. package/lib/dropdown-menu/index.css +1 -1
  240. package/lib/dropdown-menu/index.less +1 -1
  241. package/lib/empty/Network.js +8 -27
  242. package/lib/grid-item/GridItem.js +1 -1
  243. package/lib/grid-item/index.css +1 -1
  244. package/lib/grid-item/index.less +1 -1
  245. package/lib/image/Image.js +7 -20
  246. package/lib/image/index.css +1 -1
  247. package/lib/image/index.less +1 -1
  248. package/lib/image-preview/ImagePreview.js +5 -6
  249. package/lib/image-preview/function-call.js +2 -2
  250. package/lib/image-preview/index.css +1 -1
  251. package/lib/image-preview/index.less +1 -1
  252. package/lib/index-anchor/index.css +1 -1
  253. package/lib/index-anchor/index.less +2 -2
  254. package/lib/index-bar/IndexBar.js +1 -12
  255. package/lib/index.css +1 -1
  256. package/lib/index.d.ts +1 -1
  257. package/lib/index.js +1 -1
  258. package/lib/index.less +1 -1
  259. package/lib/locale/lang/de-DE-formal.d.ts +0 -1
  260. package/lib/locale/lang/de-DE-formal.js +0 -1
  261. package/lib/locale/lang/de-DE.d.ts +0 -1
  262. package/lib/locale/lang/de-DE.js +0 -1
  263. package/lib/locale/lang/en-US.d.ts +0 -1
  264. package/lib/locale/lang/en-US.js +0 -1
  265. package/lib/locale/lang/es-ES.d.ts +0 -1
  266. package/lib/locale/lang/es-ES.js +0 -1
  267. package/lib/locale/lang/fr-FR.d.ts +0 -1
  268. package/lib/locale/lang/fr-FR.js +0 -1
  269. package/lib/locale/lang/ja-JP.d.ts +0 -1
  270. package/lib/locale/lang/ja-JP.js +0 -1
  271. package/lib/locale/lang/nb-NO.d.ts +0 -1
  272. package/lib/locale/lang/nb-NO.js +0 -1
  273. package/lib/locale/lang/ro-RO.d.ts +0 -1
  274. package/lib/locale/lang/ro-RO.js +0 -1
  275. package/lib/locale/lang/ru-RU.d.ts +0 -1
  276. package/lib/locale/lang/ru-RU.js +0 -1
  277. package/lib/locale/lang/th-TH.d.ts +0 -1
  278. package/lib/locale/lang/th-TH.js +0 -1
  279. package/lib/locale/lang/tr-TR.d.ts +0 -1
  280. package/lib/locale/lang/tr-TR.js +0 -1
  281. package/lib/locale/lang/zh-CN.d.ts +0 -1
  282. package/lib/locale/lang/zh-CN.js +0 -1
  283. package/lib/locale/lang/zh-HK.d.ts +0 -1
  284. package/lib/locale/lang/zh-HK.js +0 -1
  285. package/lib/locale/lang/zh-TW.d.ts +0 -1
  286. package/lib/locale/lang/zh-TW.js +0 -1
  287. package/lib/nav-bar/index.css +1 -1
  288. package/lib/nav-bar/index.less +1 -1
  289. package/lib/notice-bar/NoticeBar.d.ts +1 -1
  290. package/lib/notice-bar/index.css +1 -1
  291. package/lib/notice-bar/index.d.ts +1 -1
  292. package/lib/notice-bar/index.less +1 -1
  293. package/lib/notify/Notify.d.ts +4 -2
  294. package/lib/notify/Notify.js +6 -1
  295. package/lib/notify/function-call.d.ts +4 -2
  296. package/lib/notify/function-call.js +1 -1
  297. package/lib/notify/index.css +1 -1
  298. package/lib/notify/index.less +4 -4
  299. package/lib/number-keyboard/index.css +1 -1
  300. package/lib/number-keyboard/index.less +3 -3
  301. package/lib/overlay/Overlay.js +1 -1
  302. package/lib/overlay/index.css +1 -1
  303. package/lib/overlay/index.less +1 -1
  304. package/lib/pagination/index.css +1 -1
  305. package/lib/pagination/index.less +1 -1
  306. package/lib/password-input/index.css +1 -1
  307. package/lib/password-input/index.less +3 -3
  308. package/lib/picker/index.css +1 -1
  309. package/lib/picker/index.less +2 -2
  310. package/lib/popover/Popover.js +3 -4
  311. package/lib/popover/index.css +1 -1
  312. package/lib/popover/index.less +2 -2
  313. package/lib/popup/Popup.js +2 -4
  314. package/lib/popup/index.css +1 -1
  315. package/lib/popup/index.less +1 -1
  316. package/lib/progress/Progress.js +7 -3
  317. package/lib/progress/index.css +1 -1
  318. package/lib/progress/index.less +10 -1
  319. package/lib/progress/var.less +1 -0
  320. package/lib/pull-refresh/PullRefresh.js +1 -1
  321. package/lib/radio/Radio.d.ts +9 -6
  322. package/lib/radio/index.d.ts +2 -0
  323. package/lib/radio-group/RadioGroup.d.ts +1 -0
  324. package/lib/radio-group/index.d.ts +2 -0
  325. package/lib/search/Search.js +3 -4
  326. package/lib/search/index.css +1 -1
  327. package/lib/search/index.less +2 -2
  328. package/lib/share-sheet/ShareSheet.d.ts +7 -0
  329. package/lib/share-sheet/ShareSheet.js +5 -6
  330. package/lib/share-sheet/index.d.ts +7 -0
  331. package/lib/sidebar-item/index.css +1 -1
  332. package/lib/sidebar-item/index.less +1 -1
  333. package/lib/skeleton/index.css +1 -1
  334. package/lib/skeleton/index.less +2 -2
  335. package/lib/slider/index.css +1 -1
  336. package/lib/slider/index.less +3 -3
  337. package/lib/stepper/Stepper.d.ts +1 -1
  338. package/lib/stepper/Stepper.js +1 -2
  339. package/lib/stepper/index.css +1 -1
  340. package/lib/stepper/index.d.ts +1 -1
  341. package/lib/stepper/index.less +3 -3
  342. package/lib/steps/index.d.ts +6 -4
  343. package/lib/submit-bar/index.css +1 -1
  344. package/lib/submit-bar/index.less +2 -2
  345. package/lib/swipe-cell/SwipeCell.js +1 -2
  346. package/lib/switch/index.css +1 -1
  347. package/lib/switch/index.less +3 -3
  348. package/lib/tabbar/Tabbar.js +1 -2
  349. package/lib/tabbar/index.css +1 -1
  350. package/lib/tabbar/index.less +1 -1
  351. package/lib/tabbar-item/TabbarItem.js +1 -1
  352. package/lib/tabs/Tabs.js +2 -5
  353. package/lib/tabs/index.css +1 -1
  354. package/lib/tabs/index.less +2 -2
  355. package/lib/tag/index.css +1 -1
  356. package/lib/tag/index.less +6 -6
  357. package/lib/toast/Toast.js +4 -10
  358. package/lib/toast/index.css +1 -1
  359. package/lib/toast/index.less +1 -1
  360. package/lib/tree-select/index.css +1 -1
  361. package/lib/tree-select/index.less +2 -2
  362. package/lib/uploader/UploaderPreviewItem.js +2 -3
  363. package/lib/uploader/index.css +1 -1
  364. package/lib/uploader/index.less +4 -4
  365. package/lib/utils/interceptor.d.ts +1 -2
  366. package/lib/utils/interceptor.js +6 -9
  367. package/lib/vant.es.js +758 -831
  368. package/lib/vant.es.min.js +758 -831
  369. package/lib/vant.js +758 -831
  370. package/lib/vant.min.js +1 -1
  371. package/package.json +1 -1
  372. package/vetur/attributes.json +60 -56
  373. package/vetur/tags.json +18 -17
  374. package/vetur/web-types.json +198 -184
  375. package/changelog.generated.md +0 -148
@@ -606,7 +606,6 @@ var defaultMessages = {
606
606
  loading: "\u52A0\u8F7D\u4E2D...",
607
607
  noCoupon: "\u6682\u65E0\u4F18\u60E0\u5238",
608
608
  nameEmpty: "\u8BF7\u586B\u5199\u59D3\u540D",
609
- confirmDelete: "\u786E\u5B9A\u8981\u5220\u9664\u5417",
610
609
  telInvalid: "\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",
611
610
  vanCalendar: {
612
611
  end: "\u7ED3\u675F",
@@ -730,15 +729,13 @@ var BORDER_SURROUND = BORDER + "--surround";
730
729
  var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
731
730
  var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
732
731
  var FORM_KEY = Symbol("van-form");
733
- function callInterceptor(options) {
734
- var {
735
- interceptor,
736
- args,
737
- done,
738
- canceled
739
- } = options;
732
+ function callInterceptor(interceptor, {
733
+ args = [],
734
+ done,
735
+ canceled
736
+ }) {
740
737
  if (interceptor) {
741
- var returnVal = interceptor.apply(null, args || []);
738
+ var returnVal = interceptor.apply(null, args);
742
739
  if (isPromise(returnVal)) {
743
740
  returnVal.then((value) => {
744
741
  if (value) {
@@ -1275,7 +1272,7 @@ var _ActionBarIcon = defineComponent({
1275
1272
  "content": badge,
1276
1273
  "class": bem$1j("icon")
1277
1274
  }, {
1278
- default: () => [slots.icon()]
1275
+ default: slots.icon
1279
1276
  });
1280
1277
  }
1281
1278
  return createVNode(Icon, {
@@ -1476,7 +1473,7 @@ var _Overlay = defineComponent({
1476
1473
  "name": "van-fade",
1477
1474
  "appear": true
1478
1475
  }, {
1479
- default: () => [renderOverlay()]
1476
+ default: renderOverlay
1480
1477
  });
1481
1478
  }
1482
1479
  });
@@ -1530,8 +1527,7 @@ var _Popup = defineComponent({
1530
1527
  };
1531
1528
  var close = () => {
1532
1529
  if (opened) {
1533
- callInterceptor({
1534
- interceptor: props2.beforeClose,
1530
+ callInterceptor(props2.beforeClose, {
1535
1531
  done() {
1536
1532
  opened = false;
1537
1533
  emit("close");
@@ -1610,7 +1606,7 @@ var _Popup = defineComponent({
1610
1606
  "onAfterEnter": onOpened,
1611
1607
  "onAfterLeave": onClosed
1612
1608
  }, {
1613
- default: () => [renderPopup()]
1609
+ default: renderPopup
1614
1610
  });
1615
1611
  };
1616
1612
  watch(() => props2.show, (value) => {
@@ -1663,17 +1659,18 @@ var _Popup = defineComponent({
1663
1659
  });
1664
1660
  var Popup = withInstall(_Popup);
1665
1661
  var [name$1k, bem$1g] = createNamespace("action-sheet");
1662
+ var popupKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
1666
1663
  var _ActionSheet = defineComponent({
1667
1664
  name: name$1k,
1668
1665
  props: extend({}, popupSharedProps, {
1669
1666
  title: String,
1670
1667
  round: truthProp,
1671
- actions: Array,
1668
+ actions: makeArrayProp(),
1672
1669
  closeIcon: makeStringProp("cross"),
1673
1670
  closeable: truthProp,
1674
1671
  cancelText: String,
1675
1672
  description: String,
1676
- closeOnPopstate: Boolean,
1673
+ closeOnPopstate: truthProp,
1677
1674
  closeOnClickAction: Boolean,
1678
1675
  safeAreaInsetBottom: truthProp
1679
1676
  }),
@@ -1758,22 +1755,14 @@ var _ActionSheet = defineComponent({
1758
1755
  }, [content]);
1759
1756
  }
1760
1757
  };
1761
- var renderOptions = () => {
1762
- if (props2.actions) {
1763
- return props2.actions.map(renderOption);
1764
- }
1765
- };
1766
1758
  return () => createVNode(Popup, mergeProps({
1767
1759
  "class": bem$1g(),
1768
- "round": props2.round,
1769
1760
  "position": "bottom",
1770
- "safeAreaInsetBottom": props2.safeAreaInsetBottom
1771
- }, pick(props2, popupSharedPropKeys), {
1772
1761
  "onUpdate:show": updateShow
1773
- }), {
1762
+ }, pick(props2, popupKeys$2)), {
1774
1763
  default: () => [renderHeader(), renderDescription(), createVNode("div", {
1775
1764
  "class": bem$1g("content")
1776
- }, [renderOptions(), slots.default == null ? void 0 : slots.default()]), renderCancel()]
1765
+ }, [props2.actions.map(renderOption), slots.default == null ? void 0 : slots.default()]), renderCancel()]
1777
1766
  });
1778
1767
  }
1779
1768
  });
@@ -2313,7 +2302,7 @@ var EMPTY_CODE = "000000";
2313
2302
  var INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
2314
2303
  var INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
2315
2304
  var isOverseaCode = (code) => code[0] === "9";
2316
- var props$q = extend({}, pickerProps, {
2305
+ var props$r = extend({}, pickerProps, {
2317
2306
  value: String,
2318
2307
  columnsNum: makeNumericProp(3),
2319
2308
  columnsPlaceholder: makeArrayProp(),
@@ -2328,7 +2317,7 @@ var props$q = extend({}, pickerProps, {
2328
2317
  });
2329
2318
  var _Area = defineComponent({
2330
2319
  name: name$1h,
2331
- props: props$q,
2320
+ props: props$r,
2332
2321
  emits: ["change", "confirm", "cancel"],
2333
2322
  setup(props2, {
2334
2323
  emit,
@@ -2765,7 +2754,7 @@ var fieldSharedProps = {
2765
2754
  default: null
2766
2755
  }
2767
2756
  };
2768
- var props$p = extend({}, cellProps, fieldSharedProps, {
2757
+ var props$q = extend({}, cellProps, fieldSharedProps, {
2769
2758
  rows: numericProp,
2770
2759
  type: makeStringProp("text"),
2771
2760
  rules: Array,
@@ -2782,7 +2771,7 @@ var props$p = extend({}, cellProps, fieldSharedProps, {
2782
2771
  });
2783
2772
  var _Field = defineComponent({
2784
2773
  name: name$1f,
2785
- props: props$p,
2774
+ props: props$q,
2786
2775
  emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2787
2776
  setup(props2, {
2788
2777
  emit,
@@ -3204,6 +3193,7 @@ function lockClick(lock) {
3204
3193
  }
3205
3194
  }
3206
3195
  var [name$1e, bem$1a] = createNamespace("toast");
3196
+ var popupProps$2 = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
3207
3197
  var VanToast = defineComponent({
3208
3198
  name: name$1e,
3209
3199
  props: {
@@ -3296,21 +3286,14 @@ var VanToast = defineComponent({
3296
3286
  onMounted(toggleClickable);
3297
3287
  onUnmounted(toggleClickable);
3298
3288
  return () => createVNode(Popup, mergeProps({
3299
- "show": props2.show,
3300
3289
  "class": [bem$1a([props2.position, {
3301
3290
  [props2.type]: !props2.icon
3302
3291
  }]), props2.className],
3303
- "overlay": props2.overlay,
3304
3292
  "lockScroll": false,
3305
- "transition": props2.transition,
3306
- "overlayClass": props2.overlayClass,
3307
- "overlayStyle": props2.overlayStyle,
3308
- "closeOnClickOverlay": props2.closeOnClickOverlay,
3309
3293
  "onClick": onClick,
3310
- "onClosed": clearTimer
3311
- }, {
3294
+ "onClosed": clearTimer,
3312
3295
  "onUpdate:show": updateShow
3313
- }), {
3296
+ }, pick(props2, popupProps$2)), {
3314
3297
  default: () => [renderIcon(), renderMessage()]
3315
3298
  });
3316
3299
  }
@@ -3447,273 +3430,9 @@ Toast.install = (app) => {
3447
3430
  app.use(withInstall(VanToast));
3448
3431
  app.config.globalProperties.$toast = Toast;
3449
3432
  };
3450
- var [name$1d, bem$19, t$h] = createNamespace("dialog");
3451
- var popupKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
3452
- var VanDialog = defineComponent({
3453
- name: name$1d,
3454
- props: extend({}, popupSharedProps, {
3455
- title: String,
3456
- theme: String,
3457
- width: numericProp,
3458
- message: [String, Function],
3459
- callback: Function,
3460
- allowHtml: Boolean,
3461
- className: unknownProp,
3462
- transition: makeStringProp("van-dialog-bounce"),
3463
- messageAlign: String,
3464
- closeOnPopstate: truthProp,
3465
- showCancelButton: Boolean,
3466
- cancelButtonText: String,
3467
- cancelButtonColor: String,
3468
- confirmButtonText: String,
3469
- confirmButtonColor: String,
3470
- showConfirmButton: truthProp,
3471
- closeOnClickOverlay: Boolean
3472
- }),
3473
- emits: ["confirm", "cancel", "update:show"],
3474
- setup(props2, {
3475
- emit,
3476
- slots
3477
- }) {
3478
- var loading = reactive({
3479
- confirm: false,
3480
- cancel: false
3481
- });
3482
- var updateShow = (value) => emit("update:show", value);
3483
- var close = (action) => {
3484
- updateShow(false);
3485
- if (props2.callback) {
3486
- props2.callback(action);
3487
- }
3488
- };
3489
- var getActionHandler = (action) => () => {
3490
- if (!props2.show) {
3491
- return;
3492
- }
3493
- emit(action);
3494
- if (props2.beforeClose) {
3495
- loading[action] = true;
3496
- callInterceptor({
3497
- interceptor: props2.beforeClose,
3498
- args: [action],
3499
- done() {
3500
- close(action);
3501
- loading[action] = false;
3502
- },
3503
- canceled() {
3504
- loading[action] = false;
3505
- }
3506
- });
3507
- } else {
3508
- close(action);
3509
- }
3510
- };
3511
- var onCancel = getActionHandler("cancel");
3512
- var onConfirm = getActionHandler("confirm");
3513
- var renderTitle = () => {
3514
- var title = slots.title ? slots.title() : props2.title;
3515
- if (title) {
3516
- return createVNode("div", {
3517
- "class": bem$19("header", {
3518
- isolated: !props2.message && !slots.default
3519
- })
3520
- }, [title]);
3521
- }
3522
- };
3523
- var renderMessage = (hasTitle) => {
3524
- var {
3525
- message,
3526
- allowHtml,
3527
- messageAlign
3528
- } = props2;
3529
- var classNames = bem$19("message", {
3530
- "has-title": hasTitle,
3531
- [messageAlign]: messageAlign
3532
- });
3533
- var content = isFunction(message) ? message() : message;
3534
- if (allowHtml && typeof content === "string") {
3535
- return createVNode("div", {
3536
- "class": classNames,
3537
- "innerHTML": content
3538
- }, null);
3539
- }
3540
- return createVNode("div", {
3541
- "class": classNames
3542
- }, [content]);
3543
- };
3544
- var renderContent = () => {
3545
- if (slots.default) {
3546
- return createVNode("div", {
3547
- "class": bem$19("content")
3548
- }, [slots.default()]);
3549
- }
3550
- var {
3551
- title,
3552
- message,
3553
- allowHtml
3554
- } = props2;
3555
- if (message) {
3556
- var hasTitle = !!(title || slots.title);
3557
- return createVNode("div", {
3558
- "key": allowHtml ? 1 : 0,
3559
- "class": bem$19("content", {
3560
- isolated: !hasTitle
3561
- })
3562
- }, [renderMessage(hasTitle)]);
3563
- }
3564
- };
3565
- var renderButtons = () => createVNode("div", {
3566
- "class": [BORDER_TOP, bem$19("footer")]
3567
- }, [props2.showCancelButton && createVNode(Button, {
3568
- "size": "large",
3569
- "text": props2.cancelButtonText || t$h("cancel"),
3570
- "class": bem$19("cancel"),
3571
- "style": {
3572
- color: props2.cancelButtonColor
3573
- },
3574
- "loading": loading.cancel,
3575
- "onClick": onCancel
3576
- }, null), props2.showConfirmButton && createVNode(Button, {
3577
- "size": "large",
3578
- "text": props2.confirmButtonText || t$h("confirm"),
3579
- "class": [bem$19("confirm"), {
3580
- [BORDER_LEFT]: props2.showCancelButton
3581
- }],
3582
- "style": {
3583
- color: props2.confirmButtonColor
3584
- },
3585
- "loading": loading.confirm,
3586
- "onClick": onConfirm
3587
- }, null)]);
3588
- var renderRoundButtons = () => createVNode(ActionBar, {
3589
- "class": bem$19("footer")
3590
- }, {
3591
- default: () => [props2.showCancelButton && createVNode(ActionBarButton, {
3592
- "type": "warning",
3593
- "text": props2.cancelButtonText || t$h("cancel"),
3594
- "class": bem$19("cancel"),
3595
- "color": props2.cancelButtonColor,
3596
- "loading": loading.cancel,
3597
- "onClick": onCancel
3598
- }, null), props2.showConfirmButton && createVNode(ActionBarButton, {
3599
- "type": "danger",
3600
- "text": props2.confirmButtonText || t$h("confirm"),
3601
- "class": bem$19("confirm"),
3602
- "color": props2.confirmButtonColor,
3603
- "loading": loading.confirm,
3604
- "onClick": onConfirm
3605
- }, null)]
3606
- });
3607
- var renderFooter = () => {
3608
- if (slots.footer) {
3609
- return slots.footer();
3610
- }
3611
- return props2.theme === "round-button" ? renderRoundButtons() : renderButtons();
3612
- };
3613
- return () => {
3614
- var {
3615
- width,
3616
- title,
3617
- theme,
3618
- message,
3619
- className
3620
- } = props2;
3621
- return createVNode(Popup, mergeProps({
3622
- "role": "dialog",
3623
- "class": [bem$19([theme]), className],
3624
- "style": {
3625
- width: addUnit(width)
3626
- },
3627
- "aria-labelledby": title || message
3628
- }, pick(props2, popupKeys$1), {
3629
- "onUpdate:show": updateShow
3630
- }), {
3631
- default: () => [renderTitle(), renderContent(), renderFooter()]
3632
- });
3633
- };
3634
- }
3635
- });
3636
- var instance$2;
3637
- function initInstance$2() {
3638
- var Wrapper = {
3639
- setup() {
3640
- var {
3641
- state,
3642
- toggle
3643
- } = usePopupState();
3644
- return () => createVNode(VanDialog, mergeProps(state, {
3645
- "onUpdate:show": toggle
3646
- }), null);
3647
- }
3648
- };
3649
- ({
3650
- instance: instance$2
3651
- } = mountComponent(Wrapper));
3652
- }
3653
- function Dialog(options) {
3654
- if (!inBrowser$1) {
3655
- return Promise.resolve();
3656
- }
3657
- return new Promise((resolve, reject) => {
3658
- if (!instance$2) {
3659
- initInstance$2();
3660
- }
3661
- instance$2.open(extend({}, Dialog.currentOptions, options, {
3662
- callback: (action) => {
3663
- (action === "confirm" ? resolve : reject)(action);
3664
- }
3665
- }));
3666
- });
3667
- }
3668
- Dialog.defaultOptions = {
3669
- title: "",
3670
- width: "",
3671
- theme: null,
3672
- message: "",
3673
- overlay: true,
3674
- callback: null,
3675
- teleport: "body",
3676
- className: "",
3677
- allowHtml: false,
3678
- lockScroll: true,
3679
- transition: "van-dialog-bounce",
3680
- beforeClose: null,
3681
- overlayClass: "",
3682
- overlayStyle: void 0,
3683
- messageAlign: "",
3684
- cancelButtonText: "",
3685
- cancelButtonColor: null,
3686
- confirmButtonText: "",
3687
- confirmButtonColor: null,
3688
- showConfirmButton: true,
3689
- showCancelButton: false,
3690
- closeOnPopstate: true,
3691
- closeOnClickOverlay: false
3692
- };
3693
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
3694
- Dialog.alert = Dialog;
3695
- Dialog.confirm = (options) => Dialog(extend({
3696
- showCancelButton: true
3697
- }, options));
3698
- Dialog.close = () => {
3699
- if (instance$2) {
3700
- instance$2.toggle(false);
3701
- }
3702
- };
3703
- Dialog.setDefaultOptions = (options) => {
3704
- extend(Dialog.currentOptions, options);
3705
- };
3706
- Dialog.resetDefaultOptions = () => {
3707
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
3708
- };
3709
- Dialog.Component = withInstall(VanDialog);
3710
- Dialog.install = (app) => {
3711
- app.use(Dialog.Component);
3712
- app.config.globalProperties.$dialog = Dialog;
3713
- };
3714
- var [name$1c, bem$18] = createNamespace("switch");
3433
+ var [name$1d, bem$19] = createNamespace("switch");
3715
3434
  var _Switch = defineComponent({
3716
- name: name$1c,
3435
+ name: name$1d,
3717
3436
  props: {
3718
3437
  size: numericProp,
3719
3438
  loading: Boolean,
@@ -3746,7 +3465,7 @@ var _Switch = defineComponent({
3746
3465
  if (props2.loading) {
3747
3466
  var color = isChecked() ? props2.activeColor : props2.inactiveColor;
3748
3467
  return createVNode(Loading, {
3749
- "class": bem$18("loading"),
3468
+ "class": bem$19("loading"),
3750
3469
  "color": color
3751
3470
  }, null);
3752
3471
  }
@@ -3767,7 +3486,7 @@ var _Switch = defineComponent({
3767
3486
  };
3768
3487
  return createVNode("div", {
3769
3488
  "role": "switch",
3770
- "class": bem$18({
3489
+ "class": bem$19({
3771
3490
  on: checked,
3772
3491
  loading,
3773
3492
  disabled
@@ -3776,15 +3495,15 @@ var _Switch = defineComponent({
3776
3495
  "aria-checked": checked,
3777
3496
  "onClick": onClick
3778
3497
  }, [createVNode("div", {
3779
- "class": bem$18("node")
3498
+ "class": bem$19("node")
3780
3499
  }, [renderLoading()])]);
3781
3500
  };
3782
3501
  }
3783
3502
  });
3784
3503
  var Switch = withInstall(_Switch);
3785
- var [name$1b, bem$17, t$g] = createNamespace("address-edit-detail");
3504
+ var [name$1c, bem$18, t$h] = createNamespace("address-edit-detail");
3786
3505
  var AddressEditDetail = defineComponent({
3787
- name: name$1b,
3506
+ name: name$1c,
3788
3507
  props: {
3789
3508
  show: Boolean,
3790
3509
  value: String,
@@ -3807,7 +3526,7 @@ var AddressEditDetail = defineComponent({
3807
3526
  };
3808
3527
  var renderSearchTitle = (express) => {
3809
3528
  if (express.name) {
3810
- var text = express.name.replace(props2.value, "<span class=" + bem$17("keyword") + ">" + props2.value + "</span>");
3529
+ var text = express.name.replace(props2.value, "<span class=" + bem$18("keyword") + ">" + props2.value + "</span>");
3811
3530
  return createVNode("div", {
3812
3531
  "innerHTML": text
3813
3532
  }, null);
@@ -3825,7 +3544,7 @@ var AddressEditDetail = defineComponent({
3825
3544
  "key": express.name + express.address,
3826
3545
  "icon": "location-o",
3827
3546
  "label": express.address,
3828
- "class": bem$17("search-item"),
3547
+ "class": bem$18("search-item"),
3829
3548
  "border": false,
3830
3549
  "onClick": () => onSelect(express)
3831
3550
  }, {
@@ -3837,29 +3556,28 @@ var AddressEditDetail = defineComponent({
3837
3556
  var onInput = (value) => emit("input", value);
3838
3557
  return () => {
3839
3558
  if (props2.show) {
3840
- return createVNode(Fragment, null, [createVNode(Field, mergeProps({
3559
+ return createVNode(Fragment, null, [createVNode(Field, {
3841
3560
  "autosize": true,
3842
3561
  "clearable": true,
3843
3562
  "ref": field,
3844
- "class": bem$17(),
3563
+ "class": bem$18(),
3845
3564
  "rows": props2.detailRows,
3846
3565
  "type": "textarea",
3847
- "label": t$g("label"),
3566
+ "label": t$h("label"),
3848
3567
  "border": !showSearchResult(),
3849
3568
  "maxlength": props2.detailMaxlength,
3850
3569
  "modelValue": props2.value,
3851
- "placeholder": t$g("placeholder"),
3570
+ "placeholder": t$h("placeholder"),
3852
3571
  "errorMessage": props2.errorMessage,
3853
3572
  "onBlur": onBlur,
3854
- "onFocus": onFocus
3855
- }, {
3573
+ "onFocus": onFocus,
3856
3574
  "onUpdate:modelValue": onInput
3857
- }), null), renderSearchResult()]);
3575
+ }, null), renderSearchResult()]);
3858
3576
  }
3859
3577
  };
3860
3578
  }
3861
3579
  });
3862
- var [name$1a, bem$16, t$f] = createNamespace("address-edit");
3580
+ var [name$1b, bem$17, t$g] = createNamespace("address-edit");
3863
3581
  var DEFAULT_DATA = {
3864
3582
  name: "",
3865
3583
  tel: "",
@@ -3873,7 +3591,7 @@ var DEFAULT_DATA = {
3873
3591
  addressDetail: ""
3874
3592
  };
3875
3593
  var isPostal = (value) => /^\d{6}$/.test(value);
3876
- var props$o = {
3594
+ var props$p = {
3877
3595
  areaList: Object,
3878
3596
  isSaving: Boolean,
3879
3597
  isDeleting: Boolean,
@@ -3907,9 +3625,9 @@ var props$o = {
3907
3625
  }
3908
3626
  };
3909
3627
  var _AddressEdit = defineComponent({
3910
- name: name$1a,
3911
- props: props$o,
3912
- emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "cancel-delete", "select-search", "change-default"],
3628
+ name: name$1b,
3629
+ props: props$p,
3630
+ emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
3913
3631
  setup(props2, {
3914
3632
  emit,
3915
3633
  slots
@@ -3972,15 +3690,15 @@ var _AddressEdit = defineComponent({
3972
3690
  }
3973
3691
  switch (key) {
3974
3692
  case "name":
3975
- return value ? "" : t$f("nameEmpty");
3693
+ return value ? "" : t$g("nameEmpty");
3976
3694
  case "tel":
3977
- return props2.telValidator(value) ? "" : t$f("telInvalid");
3695
+ return props2.telValidator(value) ? "" : t$g("telInvalid");
3978
3696
  case "areaCode":
3979
- return value ? "" : t$f("areaEmpty");
3697
+ return value ? "" : t$g("areaEmpty");
3980
3698
  case "addressDetail":
3981
- return value ? "" : t$f("addressEmpty");
3699
+ return value ? "" : t$g("addressEmpty");
3982
3700
  case "postalCode":
3983
- return value && !props2.postalValidator(value) ? t$f("postalEmpty") : "";
3701
+ return value && !props2.postalValidator(value) ? t$g("postalEmpty") : "";
3984
3702
  }
3985
3703
  };
3986
3704
  var onSave = () => {
@@ -4012,18 +3730,14 @@ var _AddressEdit = defineComponent({
4012
3730
  var onAreaConfirm = (values) => {
4013
3731
  values = values.filter(Boolean);
4014
3732
  if (values.some((value) => !value.code)) {
4015
- Toast(t$f("areaEmpty"));
3733
+ Toast(t$g("areaEmpty"));
4016
3734
  return;
4017
3735
  }
4018
3736
  state.showAreaPopup = false;
4019
3737
  assignAreaValues();
4020
3738
  emit("change-area", values);
4021
3739
  };
4022
- var onDelete = () => {
4023
- Dialog.confirm({
4024
- title: t$f("confirmDelete")
4025
- }).then(() => emit("delete", state.data)).catch(() => emit("cancel-delete", state.data));
4026
- };
3740
+ var onDelete = () => emit("delete", state.data);
4027
3741
  var getArea = () => areaRef.value ? areaRef.value.getValues() : [];
4028
3742
  var setAreaCode = (code) => {
4029
3743
  state.data.areaCode = code || "";
@@ -4051,8 +3765,8 @@ var _AddressEdit = defineComponent({
4051
3765
  };
4052
3766
  return withDirectives(createVNode(Cell, {
4053
3767
  "center": true,
4054
- "title": t$f("defaultAddress"),
4055
- "class": bem$16("default")
3768
+ "title": t$g("defaultAddress"),
3769
+ "class": bem$17("default")
4056
3770
  }, _slots), [[vShow, !hideBottomFields.value]]);
4057
3771
  }
4058
3772
  return null;
@@ -4079,15 +3793,15 @@ var _AddressEdit = defineComponent({
4079
3793
  disableArea
4080
3794
  } = props2;
4081
3795
  return createVNode("div", {
4082
- "class": bem$16()
3796
+ "class": bem$17()
4083
3797
  }, [createVNode("div", {
4084
- "class": bem$16("fields")
3798
+ "class": bem$17("fields")
4085
3799
  }, [createVNode(Field, {
4086
3800
  "modelValue": data.name,
4087
3801
  "onUpdate:modelValue": ($event) => data.name = $event,
4088
3802
  "clearable": true,
4089
- "label": t$f("name"),
4090
- "placeholder": t$f("name"),
3803
+ "label": t$g("name"),
3804
+ "placeholder": t$g("name"),
4091
3805
  "errorMessage": errorInfo.name,
4092
3806
  "onFocus": () => onFocus("name")
4093
3807
  }, null), createVNode(Field, {
@@ -4095,17 +3809,17 @@ var _AddressEdit = defineComponent({
4095
3809
  "onUpdate:modelValue": ($event) => data.tel = $event,
4096
3810
  "clearable": true,
4097
3811
  "type": "tel",
4098
- "label": t$f("tel"),
3812
+ "label": t$g("tel"),
4099
3813
  "maxlength": props2.telMaxlength,
4100
- "placeholder": t$f("tel"),
3814
+ "placeholder": t$g("tel"),
4101
3815
  "errorMessage": errorInfo.tel,
4102
3816
  "onFocus": () => onFocus("tel")
4103
3817
  }, null), withDirectives(createVNode(Field, {
4104
3818
  "readonly": true,
4105
- "label": t$f("area"),
3819
+ "label": t$g("area"),
4106
3820
  "is-link": !disableArea,
4107
3821
  "modelValue": areaText.value,
4108
- "placeholder": props2.areaPlaceholder || t$f("area"),
3822
+ "placeholder": props2.areaPlaceholder || t$g("area"),
4109
3823
  "errorMessage": errorInfo.areaCode,
4110
3824
  "onFocus": () => onFocus("areaCode"),
4111
3825
  "onClick": () => {
@@ -4129,27 +3843,27 @@ var _AddressEdit = defineComponent({
4129
3843
  "modelValue": data.postalCode,
4130
3844
  "onUpdate:modelValue": ($event) => data.postalCode = $event,
4131
3845
  "type": "tel",
4132
- "label": t$f("postal"),
3846
+ "label": t$g("postal"),
4133
3847
  "maxlength": "6",
4134
- "placeholder": t$f("postal"),
3848
+ "placeholder": t$g("postal"),
4135
3849
  "errorMessage": errorInfo.postalCode,
4136
3850
  "onFocus": () => onFocus("postalCode")
4137
3851
  }, null), [[vShow, !hideBottomFields.value]]), slots.default == null ? void 0 : slots.default()]), renderSetDefaultCell(), withDirectives(createVNode("div", {
4138
- "class": bem$16("buttons")
3852
+ "class": bem$17("buttons")
4139
3853
  }, [createVNode(Button, {
4140
3854
  "block": true,
4141
3855
  "round": true,
4142
3856
  "type": "danger",
4143
- "text": props2.saveButtonText || t$f("save"),
4144
- "class": bem$16("button"),
3857
+ "text": props2.saveButtonText || t$g("save"),
3858
+ "class": bem$17("button"),
4145
3859
  "loading": props2.isSaving,
4146
3860
  "onClick": onSave
4147
3861
  }, null), props2.showDelete && createVNode(Button, {
4148
3862
  "block": true,
4149
3863
  "round": true,
4150
- "class": bem$16("button"),
3864
+ "class": bem$17("button"),
4151
3865
  "loading": props2.isDeleting,
4152
- "text": props2.deleteButtonText || t$f("delete"),
3866
+ "text": props2.deleteButtonText || t$g("delete"),
4153
3867
  "onClick": onDelete
4154
3868
  }, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
4155
3869
  "show": state.showAreaPopup,
@@ -4175,18 +3889,18 @@ var _AddressEdit = defineComponent({
4175
3889
  }
4176
3890
  });
4177
3891
  var AddressEdit = withInstall(_AddressEdit);
4178
- var [name$19, bem$15] = createNamespace("radio-group");
4179
- var props$n = {
3892
+ var [name$1a, bem$16] = createNamespace("radio-group");
3893
+ var props$o = {
4180
3894
  disabled: Boolean,
4181
3895
  iconSize: numericProp,
4182
3896
  direction: String,
4183
3897
  modelValue: unknownProp,
4184
3898
  checkedColor: String
4185
3899
  };
4186
- var RADIO_KEY = Symbol(name$19);
3900
+ var RADIO_KEY = Symbol(name$1a);
4187
3901
  var _RadioGroup = defineComponent({
4188
- name: name$19,
4189
- props: props$n,
3902
+ name: name$1a,
3903
+ props: props$o,
4190
3904
  emits: ["change", "update:modelValue"],
4191
3905
  setup(props2, {
4192
3906
  emit,
@@ -4203,15 +3917,15 @@ var _RadioGroup = defineComponent({
4203
3917
  });
4204
3918
  useCustomFieldValue(() => props2.modelValue);
4205
3919
  return () => createVNode("div", {
4206
- "class": bem$15([props2.direction]),
3920
+ "class": bem$16([props2.direction]),
4207
3921
  "role": "radiogroup"
4208
3922
  }, [slots.default == null ? void 0 : slots.default()]);
4209
3923
  }
4210
3924
  });
4211
3925
  var RadioGroup = withInstall(_RadioGroup);
4212
- var [name$18, bem$14] = createNamespace("tag");
3926
+ var [name$19, bem$15] = createNamespace("tag");
4213
3927
  var _Tag = defineComponent({
4214
- name: name$18,
3928
+ name: name$19,
4215
3929
  props: {
4216
3930
  size: String,
4217
3931
  mark: Boolean,
@@ -4263,12 +3977,12 @@ var _Tag = defineComponent({
4263
3977
  }
4264
3978
  var CloseIcon = closeable && createVNode(Icon, {
4265
3979
  "name": "cross",
4266
- "class": bem$14("close"),
3980
+ "class": bem$15("close"),
4267
3981
  "onClick": onClose
4268
3982
  }, null);
4269
3983
  return createVNode("span", {
4270
3984
  "style": getStyle(),
4271
- "class": bem$14([classes, type])
3985
+ "class": bem$15([classes, type])
4272
3986
  }, [slots.default == null ? void 0 : slots.default(), CloseIcon]);
4273
3987
  };
4274
3988
  return () => createVNode(Transition, {
@@ -4364,12 +4078,7 @@ var Checker = defineComponent({
4364
4078
  }
4365
4079
  };
4366
4080
  return () => {
4367
- var nodes = [renderIcon()];
4368
- if (props2.labelPosition === "left") {
4369
- nodes.unshift(renderLabel());
4370
- } else {
4371
- nodes.push(renderLabel());
4372
- }
4081
+ var nodes = props2.labelPosition === "left" ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
4373
4082
  return createVNode("div", {
4374
4083
  "role": props2.role,
4375
4084
  "class": props2.bem([{
@@ -4383,9 +4092,9 @@ var Checker = defineComponent({
4383
4092
  };
4384
4093
  }
4385
4094
  });
4386
- var [name$17, bem$13] = createNamespace("radio");
4095
+ var [name$18, bem$14] = createNamespace("radio");
4387
4096
  var _Radio = defineComponent({
4388
- name: name$17,
4097
+ name: name$18,
4389
4098
  props: checkerProps,
4390
4099
  emits: ["update:modelValue"],
4391
4100
  setup(props2, {
@@ -4407,7 +4116,7 @@ var _Radio = defineComponent({
4407
4116
  }
4408
4117
  };
4409
4118
  return () => createVNode(Checker, mergeProps({
4410
- "bem": bem$13,
4119
+ "bem": bem$14,
4411
4120
  "role": "radio",
4412
4121
  "parent": parent,
4413
4122
  "checked": checked(),
@@ -4416,9 +4125,9 @@ var _Radio = defineComponent({
4416
4125
  }
4417
4126
  });
4418
4127
  var Radio = withInstall(_Radio);
4419
- var [name$16, bem$12] = createNamespace("address-item");
4128
+ var [name$17, bem$13] = createNamespace("address-item");
4420
4129
  var AddressListItem = defineComponent({
4421
- name: name$16,
4130
+ name: name$17,
4422
4131
  props: {
4423
4132
  address: makeRequiredProp(Object),
4424
4133
  disabled: Boolean,
@@ -4438,7 +4147,7 @@ var AddressListItem = defineComponent({
4438
4147
  };
4439
4148
  var renderRightIcon = () => createVNode(Icon, {
4440
4149
  "name": "edit",
4441
- "class": bem$12("edit"),
4150
+ "class": bem$13("edit"),
4442
4151
  "onClick": (event) => {
4443
4152
  event.stopPropagation();
4444
4153
  emit("edit");
@@ -4453,7 +4162,7 @@ var AddressListItem = defineComponent({
4453
4162
  return createVNode(Tag, {
4454
4163
  "type": "danger",
4455
4164
  "round": true,
4456
- "class": bem$12("tag")
4165
+ "class": bem$13("tag")
4457
4166
  }, {
4458
4167
  default: () => [props2.defaultTagText]
4459
4168
  });
@@ -4466,9 +4175,9 @@ var AddressListItem = defineComponent({
4466
4175
  switchable
4467
4176
  } = props2;
4468
4177
  var Info = [createVNode("div", {
4469
- "class": bem$12("name")
4178
+ "class": bem$13("name")
4470
4179
  }, [address.name + " " + address.tel, renderTag()]), createVNode("div", {
4471
- "class": bem$12("address")
4180
+ "class": bem$13("address")
4472
4181
  }, [address.address])];
4473
4182
  if (switchable && !disabled) {
4474
4183
  return createVNode(Radio, {
@@ -4485,13 +4194,13 @@ var AddressListItem = defineComponent({
4485
4194
  disabled
4486
4195
  } = props2;
4487
4196
  return createVNode("div", {
4488
- "class": bem$12({
4197
+ "class": bem$13({
4489
4198
  disabled
4490
4199
  }),
4491
4200
  "onClick": onClick
4492
4201
  }, [createVNode(Cell, {
4493
4202
  "border": false,
4494
- "valueClass": bem$12("value")
4203
+ "valueClass": bem$13("value")
4495
4204
  }, {
4496
4205
  value: renderContent,
4497
4206
  "right-icon": renderRightIcon
@@ -4501,9 +4210,9 @@ var AddressListItem = defineComponent({
4501
4210
  };
4502
4211
  }
4503
4212
  });
4504
- var [name$15, bem$11, t$e] = createNamespace("address-list");
4213
+ var [name$16, bem$12, t$f] = createNamespace("address-list");
4505
4214
  var _AddressList = defineComponent({
4506
- name: name$15,
4215
+ name: name$16,
4507
4216
  props: {
4508
4217
  list: makeArrayProp(),
4509
4218
  modelValue: numericProp,
@@ -4519,14 +4228,10 @@ var _AddressList = defineComponent({
4519
4228
  emit
4520
4229
  }) {
4521
4230
  var renderItem = (item, index2, disabled) => {
4522
- var onEdit = () => {
4523
- var name2 = disabled ? "edit-disabled" : "edit";
4524
- emit(name2, item, index2);
4525
- };
4231
+ var onEdit = () => emit(disabled ? "edit-disabled" : "edit", item, index2);
4526
4232
  var onClick = () => emit("click-item", item, index2);
4527
4233
  var onSelect = () => {
4528
- var name2 = disabled ? "select-disabled" : "select";
4529
- emit(name2, item, index2);
4234
+ emit(disabled ? "select-disabled" : "select", item, index2);
4530
4235
  if (!disabled) {
4531
4236
  emit("update:modelValue", item.id);
4532
4237
  }
@@ -4551,23 +4256,23 @@ var _AddressList = defineComponent({
4551
4256
  }
4552
4257
  };
4553
4258
  var renderBottom = () => createVNode("div", {
4554
- "class": [bem$11("bottom"), "van-safe-area-bottom"]
4259
+ "class": [bem$12("bottom"), "van-safe-area-bottom"]
4555
4260
  }, [createVNode(Button, {
4556
4261
  "round": true,
4557
4262
  "block": true,
4558
4263
  "type": "danger",
4559
- "text": props2.addButtonText || t$e("add"),
4560
- "class": bem$11("add"),
4264
+ "text": props2.addButtonText || t$f("add"),
4265
+ "class": bem$12("add"),
4561
4266
  "onClick": () => emit("add")
4562
4267
  }, null)]);
4563
4268
  return () => {
4564
4269
  var List2 = renderList(props2.list);
4565
4270
  var DisabledList = renderList(props2.disabledList, true);
4566
4271
  var DisabledText = props2.disabledText && createVNode("div", {
4567
- "class": bem$11("disabled-text")
4272
+ "class": bem$12("disabled-text")
4568
4273
  }, [props2.disabledText]);
4569
4274
  return createVNode("div", {
4570
- "class": bem$11()
4275
+ "class": bem$12()
4571
4276
  }, [slots.top == null ? void 0 : slots.top(), createVNode(RadioGroup, {
4572
4277
  "modelValue": props2.modelValue
4573
4278
  }, {
@@ -4577,8 +4282,8 @@ var _AddressList = defineComponent({
4577
4282
  }
4578
4283
  });
4579
4284
  var AddressList = withInstall(_AddressList);
4580
- var [name$14, bem$10, t$d] = createNamespace("calendar");
4581
- var formatMonthTitle = (date) => t$d("monthTitle", date.getFullYear(), date.getMonth() + 1);
4285
+ var [name$15, bem$11, t$e] = createNamespace("calendar");
4286
+ var formatMonthTitle = (date) => t$e("monthTitle", date.getFullYear(), date.getMonth() + 1);
4582
4287
  function compareMonth(date1, date2) {
4583
4288
  var year1 = date1.getFullYear();
4584
4289
  var year2 = date2.getFullYear();
@@ -4665,9 +4370,9 @@ var useHeight = (element) => {
4665
4370
  }));
4666
4371
  return height;
4667
4372
  };
4668
- var [name$13] = createNamespace("calendar-day");
4373
+ var [name$14] = createNamespace("calendar-day");
4669
4374
  var CalendarDay = defineComponent({
4670
- name: name$13,
4375
+ name: name$14,
4671
4376
  props: {
4672
4377
  item: makeRequiredProp(Object),
4673
4378
  color: String,
@@ -4725,7 +4430,7 @@ var CalendarDay = defineComponent({
4725
4430
  } = props2.item;
4726
4431
  if (topInfo || slots["top-info"]) {
4727
4432
  return createVNode("div", {
4728
- "class": bem$10("top-info")
4433
+ "class": bem$11("top-info")
4729
4434
  }, [slots["top-info"] ? slots["top-info"](props2.item) : topInfo]);
4730
4435
  }
4731
4436
  };
@@ -4735,7 +4440,7 @@ var CalendarDay = defineComponent({
4735
4440
  } = props2.item;
4736
4441
  if (bottomInfo || slots["bottom-info"]) {
4737
4442
  return createVNode("div", {
4738
- "class": bem$10("bottom-info")
4443
+ "class": bem$11("bottom-info")
4739
4444
  }, [slots["bottom-info"] ? slots["bottom-info"](props2.item) : bottomInfo]);
4740
4445
  }
4741
4446
  };
@@ -4752,7 +4457,7 @@ var CalendarDay = defineComponent({
4752
4457
  var Nodes = [renderTopInfo(), text, renderBottomInfo()];
4753
4458
  if (type === "selected") {
4754
4459
  return createVNode("div", {
4755
- "class": bem$10("selected-day"),
4460
+ "class": bem$11("selected-day"),
4756
4461
  "style": {
4757
4462
  width: rowHeight,
4758
4463
  height: rowHeight,
@@ -4769,22 +4474,22 @@ var CalendarDay = defineComponent({
4769
4474
  } = props2.item;
4770
4475
  if (type === "placeholder") {
4771
4476
  return createVNode("div", {
4772
- "class": bem$10("day"),
4477
+ "class": bem$11("day"),
4773
4478
  "style": style.value
4774
4479
  }, null);
4775
4480
  }
4776
4481
  return createVNode("div", {
4777
4482
  "role": "gridcell",
4778
4483
  "style": style.value,
4779
- "class": [bem$10("day", type), className],
4484
+ "class": [bem$11("day", type), className],
4780
4485
  "tabindex": type === "disabled" ? void 0 : -1,
4781
4486
  "onClick": onClick
4782
4487
  }, [renderContent()]);
4783
4488
  };
4784
4489
  }
4785
4490
  });
4786
- var [name$12] = createNamespace("calendar-month");
4787
- var props$m = {
4491
+ var [name$13] = createNamespace("calendar-month");
4492
+ var props$n = {
4788
4493
  date: makeRequiredProp(Date),
4789
4494
  type: String,
4790
4495
  color: String,
@@ -4801,8 +4506,8 @@ var props$m = {
4801
4506
  firstDayOfWeek: Number
4802
4507
  };
4803
4508
  var CalendarMonth = defineComponent({
4804
- name: name$12,
4805
- props: props$m,
4509
+ name: name$13,
4510
+ props: props$n,
4806
4511
  emits: ["click", "update-height"],
4807
4512
  setup(props2, {
4808
4513
  emit,
@@ -4903,24 +4608,24 @@ var CalendarMonth = defineComponent({
4903
4608
  var getBottomInfo = (dayType) => {
4904
4609
  if (props2.type === "range") {
4905
4610
  if (dayType === "start" || dayType === "end") {
4906
- return t$d(dayType);
4611
+ return t$e(dayType);
4907
4612
  }
4908
4613
  if (dayType === "start-end") {
4909
- return t$d("startEnd");
4614
+ return t$e("startEnd");
4910
4615
  }
4911
4616
  }
4912
4617
  };
4913
4618
  var renderTitle = () => {
4914
4619
  if (props2.showMonthTitle) {
4915
4620
  return createVNode("div", {
4916
- "class": bem$10("month-title")
4621
+ "class": bem$11("month-title")
4917
4622
  }, [title.value]);
4918
4623
  }
4919
4624
  };
4920
4625
  var renderMark = () => {
4921
4626
  if (props2.showMark && shouldRender.value) {
4922
4627
  return createVNode("div", {
4923
- "class": bem$10("month-mark")
4628
+ "class": bem$11("month-mark")
4924
4629
  }, [props2.date.getMonth() + 1]);
4925
4630
  }
4926
4631
  };
@@ -4962,7 +4667,7 @@ var CalendarMonth = defineComponent({
4962
4667
  var renderDays = () => createVNode("div", {
4963
4668
  "ref": daysRef,
4964
4669
  "role": "grid",
4965
- "class": bem$10("days")
4670
+ "class": bem$11("days")
4966
4671
  }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
4967
4672
  useExpose({
4968
4673
  getTitle,
@@ -4972,14 +4677,14 @@ var CalendarMonth = defineComponent({
4972
4677
  disabledDays
4973
4678
  });
4974
4679
  return () => createVNode("div", {
4975
- "class": bem$10("month"),
4680
+ "class": bem$11("month"),
4976
4681
  "ref": monthRef
4977
4682
  }, [renderTitle(), renderDays()]);
4978
4683
  }
4979
4684
  });
4980
- var [name$11] = createNamespace("calendar-header");
4685
+ var [name$12] = createNamespace("calendar-header");
4981
4686
  var CalendarHeader = defineComponent({
4982
- name: name$11,
4687
+ name: name$12,
4983
4688
  props: {
4984
4689
  title: String,
4985
4690
  subtitle: String,
@@ -4994,10 +4699,10 @@ var CalendarHeader = defineComponent({
4994
4699
  }) {
4995
4700
  var renderTitle = () => {
4996
4701
  if (props2.showTitle) {
4997
- var text = props2.title || t$d("title");
4702
+ var text = props2.title || t$e("title");
4998
4703
  var title = slots.title ? slots.title() : text;
4999
4704
  return createVNode("div", {
5000
- "class": bem$10("header-title")
4705
+ "class": bem$11("header-title")
5001
4706
  }, [title]);
5002
4707
  }
5003
4708
  };
@@ -5008,7 +4713,7 @@ var CalendarHeader = defineComponent({
5008
4713
  if (props2.showSubtitle) {
5009
4714
  var title = slots.subtitle ? slots.subtitle() : props2.subtitle;
5010
4715
  return createVNode("div", {
5011
- "class": bem$10("header-subtitle"),
4716
+ "class": bem$11("header-subtitle"),
5012
4717
  "onClick": onClickSubtitle
5013
4718
  }, [title]);
5014
4719
  }
@@ -5017,20 +4722,20 @@ var CalendarHeader = defineComponent({
5017
4722
  var {
5018
4723
  firstDayOfWeek
5019
4724
  } = props2;
5020
- var weekdays = t$d("weekdays");
4725
+ var weekdays = t$e("weekdays");
5021
4726
  var renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
5022
4727
  return createVNode("div", {
5023
- "class": bem$10("weekdays")
4728
+ "class": bem$11("weekdays")
5024
4729
  }, [renderWeekDays2.map((text) => createVNode("span", {
5025
- "class": bem$10("weekday")
4730
+ "class": bem$11("weekday")
5026
4731
  }, [text]))]);
5027
4732
  };
5028
4733
  return () => createVNode("div", {
5029
- "class": bem$10("header")
4734
+ "class": bem$11("header")
5030
4735
  }, [renderTitle(), renderSubtitle(), renderWeekDays()]);
5031
4736
  }
5032
4737
  });
5033
- var props$l = {
4738
+ var props$m = {
5034
4739
  show: Boolean,
5035
4740
  type: makeStringProp("single"),
5036
4741
  title: String,
@@ -5077,8 +4782,8 @@ var props$l = {
5077
4782
  }
5078
4783
  };
5079
4784
  var _Calendar = defineComponent({
5080
- name: name$14,
5081
- props: props$l,
4785
+ name: name$15,
4786
+ props: props$m,
5082
4787
  emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
5083
4788
  setup(props2, {
5084
4789
  emit,
@@ -5233,7 +4938,7 @@ var _Calendar = defineComponent({
5233
4938
  } = props2;
5234
4939
  if (maxRange && calcDateNum(date) > maxRange) {
5235
4940
  if (showRangePrompt) {
5236
- Toast(rangePrompt || t$d("rangePrompt", maxRange));
4941
+ Toast(rangePrompt || t$e("rangePrompt", maxRange));
5237
4942
  }
5238
4943
  emit("over-range");
5239
4944
  return false;
@@ -5318,7 +5023,7 @@ var _Calendar = defineComponent({
5318
5023
  var [unselectedDate] = dates.splice(selectedIndex, 1);
5319
5024
  emit("unselect", cloneDate(unselectedDate));
5320
5025
  } else if (props2.maxRange && dates.length >= props2.maxRange) {
5321
- Toast(props2.rangePrompt || t$d("rangePrompt", props2.maxRange));
5026
+ Toast(props2.rangePrompt || t$e("rangePrompt", props2.maxRange));
5322
5027
  } else {
5323
5028
  select([...dates, date]);
5324
5029
  }
@@ -5344,28 +5049,32 @@ var _Calendar = defineComponent({
5344
5049
  return slots.footer();
5345
5050
  }
5346
5051
  if (props2.showConfirm) {
5347
- var text = buttonDisabled.value ? props2.confirmDisabledText : props2.confirmText;
5052
+ var slot = slots["confirm-text"];
5053
+ var disabled = buttonDisabled.value;
5054
+ var text = disabled ? props2.confirmDisabledText : props2.confirmText;
5348
5055
  return createVNode(Button, {
5349
5056
  "round": true,
5350
5057
  "block": true,
5351
5058
  "type": "danger",
5352
5059
  "color": props2.color,
5353
- "class": bem$10("confirm"),
5354
- "disabled": buttonDisabled.value,
5060
+ "class": bem$11("confirm"),
5061
+ "disabled": disabled,
5355
5062
  "nativeType": "button",
5356
5063
  "onClick": onConfirm
5357
5064
  }, {
5358
- default: () => [text || t$d("confirm")]
5065
+ default: () => [slot ? slot({
5066
+ disabled
5067
+ }) : text || t$e("confirm")]
5359
5068
  });
5360
5069
  }
5361
5070
  };
5362
5071
  var renderFooter = () => createVNode("div", {
5363
- "class": [bem$10("footer"), {
5072
+ "class": [bem$11("footer"), {
5364
5073
  "van-safe-area-bottom": props2.safeAreaInsetBottom
5365
5074
  }]
5366
5075
  }, [renderFooterButton()]);
5367
5076
  var renderCalendar = () => createVNode("div", {
5368
- "class": bem$10()
5077
+ "class": bem$11()
5369
5078
  }, [createVNode(CalendarHeader, {
5370
5079
  "title": props2.title,
5371
5080
  "subtitle": subtitle.value,
@@ -5375,7 +5084,7 @@ var _Calendar = defineComponent({
5375
5084
  "onClick-subtitle": (event) => emit("click-subtitle", event)
5376
5085
  }, pick(slots, ["title", "subtitle"])), createVNode("div", {
5377
5086
  "ref": bodyRef,
5378
- "class": bem$10("body"),
5087
+ "class": bem$11("body"),
5379
5088
  "onScroll": onScroll
5380
5089
  }, [months.value.map(renderMonth)]), renderFooter()]);
5381
5090
  watch(() => props2.show, init);
@@ -5391,19 +5100,18 @@ var _Calendar = defineComponent({
5391
5100
  onMountedOrActivated(init);
5392
5101
  return () => {
5393
5102
  if (props2.poppable) {
5394
- return createVNode(Popup, mergeProps({
5103
+ return createVNode(Popup, {
5395
5104
  "show": props2.show,
5396
- "class": bem$10("popup"),
5105
+ "class": bem$11("popup"),
5397
5106
  "round": props2.round,
5398
5107
  "position": props2.position,
5399
5108
  "closeable": props2.showTitle || props2.showSubtitle,
5400
5109
  "teleport": props2.teleport,
5401
5110
  "closeOnPopstate": props2.closeOnPopstate,
5402
- "closeOnClickOverlay": props2.closeOnClickOverlay
5403
- }, {
5111
+ "closeOnClickOverlay": props2.closeOnClickOverlay,
5404
5112
  "onUpdate:show": updateShow
5405
- }), {
5406
- default: () => [renderCalendar()]
5113
+ }, {
5114
+ default: renderCalendar
5407
5115
  });
5408
5116
  }
5409
5117
  return renderCalendar();
@@ -5411,9 +5119,9 @@ var _Calendar = defineComponent({
5411
5119
  }
5412
5120
  });
5413
5121
  var Calendar = withInstall(_Calendar);
5414
- var [name$10, bem$$] = createNamespace("image");
5122
+ var [name$11, bem$10] = createNamespace("image");
5415
5123
  var _Image = defineComponent({
5416
- name: name$10,
5124
+ name: name$11,
5417
5125
  props: {
5418
5126
  src: String,
5419
5127
  alt: String,
@@ -5468,38 +5176,27 @@ var _Image = defineComponent({
5468
5176
  loading.value = false;
5469
5177
  emit("error", event);
5470
5178
  };
5471
- var renderLoadingIcon = () => {
5472
- if (slots.loading) {
5473
- return slots.loading();
5474
- }
5475
- return createVNode(Icon, {
5476
- "size": props2.iconSize,
5477
- "name": props2.loadingIcon,
5478
- "class": bem$$("loading-icon"),
5479
- "classPrefix": props2.iconPrefix
5480
- }, null);
5481
- };
5482
- var renderErrorIcon = () => {
5483
- if (slots.error) {
5484
- return slots.error();
5179
+ var renderIcon = (name2, className, slot) => {
5180
+ if (slot) {
5181
+ return slot();
5485
5182
  }
5486
5183
  return createVNode(Icon, {
5184
+ "name": name2,
5487
5185
  "size": props2.iconSize,
5488
- "name": props2.errorIcon,
5489
- "class": bem$$("error-icon"),
5186
+ "class": className,
5490
5187
  "classPrefix": props2.iconPrefix
5491
5188
  }, null);
5492
5189
  };
5493
5190
  var renderPlaceholder = () => {
5494
5191
  if (loading.value && props2.showLoading) {
5495
5192
  return createVNode("div", {
5496
- "class": bem$$("loading")
5497
- }, [renderLoadingIcon()]);
5193
+ "class": bem$10("loading")
5194
+ }, [renderIcon(props2.loadingIcon, bem$10("loading-icon"), slots.loading)]);
5498
5195
  }
5499
5196
  if (error.value && props2.showError) {
5500
5197
  return createVNode("div", {
5501
- "class": bem$$("error")
5502
- }, [renderErrorIcon()]);
5198
+ "class": bem$10("error")
5199
+ }, [renderIcon(props2.errorIcon, bem$10("error-icon"), slots.error)]);
5503
5200
  }
5504
5201
  };
5505
5202
  var renderImage = () => {
@@ -5508,7 +5205,7 @@ var _Image = defineComponent({
5508
5205
  }
5509
5206
  var attrs = {
5510
5207
  alt: props2.alt,
5511
- class: bem$$("img"),
5208
+ class: bem$10("img"),
5512
5209
  style: {
5513
5210
  objectFit: props2.fit
5514
5211
  }
@@ -5547,7 +5244,7 @@ var _Image = defineComponent({
5547
5244
  });
5548
5245
  }
5549
5246
  return () => createVNode("div", {
5550
- "class": bem$$({
5247
+ "class": bem$10({
5551
5248
  round: props2.round
5552
5249
  }),
5553
5250
  "style": style.value
@@ -5555,9 +5252,9 @@ var _Image = defineComponent({
5555
5252
  }
5556
5253
  });
5557
5254
  var Image$1 = withInstall(_Image);
5558
- var [name$$, bem$_] = createNamespace("card");
5255
+ var [name$10, bem$$] = createNamespace("card");
5559
5256
  var _Card = defineComponent({
5560
- name: name$$,
5257
+ name: name$10,
5561
5258
  props: {
5562
5259
  tag: String,
5563
5260
  num: numericProp,
@@ -5582,14 +5279,14 @@ var _Card = defineComponent({
5582
5279
  }
5583
5280
  if (props2.title) {
5584
5281
  return createVNode("div", {
5585
- "class": [bem$_("title"), "van-multi-ellipsis--l2"]
5282
+ "class": [bem$$("title"), "van-multi-ellipsis--l2"]
5586
5283
  }, [props2.title]);
5587
5284
  }
5588
5285
  };
5589
5286
  var renderThumbTag = () => {
5590
5287
  if (slots.tag || props2.tag) {
5591
5288
  return createVNode("div", {
5592
- "class": bem$_("tag")
5289
+ "class": bem$$("tag")
5593
5290
  }, [slots.tag ? slots.tag() : createVNode(Tag, {
5594
5291
  "mark": true,
5595
5292
  "type": "danger"
@@ -5614,7 +5311,7 @@ var _Card = defineComponent({
5614
5311
  if (slots.thumb || props2.thumb) {
5615
5312
  return createVNode("a", {
5616
5313
  "href": props2.thumbLink,
5617
- "class": bem$_("thumb"),
5314
+ "class": bem$$("thumb"),
5618
5315
  "onClick": (event) => emit("click-thumb", event)
5619
5316
  }, [renderThumbImage(), renderThumbTag()]);
5620
5317
  }
@@ -5625,18 +5322,18 @@ var _Card = defineComponent({
5625
5322
  }
5626
5323
  if (props2.desc) {
5627
5324
  return createVNode("div", {
5628
- "class": [bem$_("desc"), "van-ellipsis"]
5325
+ "class": [bem$$("desc"), "van-ellipsis"]
5629
5326
  }, [props2.desc]);
5630
5327
  }
5631
5328
  };
5632
5329
  var renderPriceText = () => {
5633
5330
  var priceArr = props2.price.toString().split(".");
5634
5331
  return createVNode("div", null, [createVNode("span", {
5635
- "class": bem$_("price-currency")
5332
+ "class": bem$$("price-currency")
5636
5333
  }, [props2.currency]), createVNode("span", {
5637
- "class": bem$_("price-integer")
5334
+ "class": bem$$("price-integer")
5638
5335
  }, [priceArr[0]]), createTextVNode("."), createVNode("span", {
5639
- "class": bem$_("price-decimal")
5336
+ "class": bem$$("price-decimal")
5640
5337
  }, [priceArr[1]])]);
5641
5338
  };
5642
5339
  return () => {
@@ -5646,26 +5343,26 @@ var _Card = defineComponent({
5646
5343
  var showOriginPrice = slots["origin-price"] || isDef(props2.originPrice);
5647
5344
  var showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
5648
5345
  var Price = showPrice && createVNode("div", {
5649
- "class": bem$_("price")
5346
+ "class": bem$$("price")
5650
5347
  }, [slots.price ? slots.price() : renderPriceText()]);
5651
5348
  var OriginPrice = showOriginPrice && createVNode("div", {
5652
- "class": bem$_("origin-price")
5349
+ "class": bem$$("origin-price")
5653
5350
  }, [slots["origin-price"] ? slots["origin-price"]() : props2.currency + " " + props2.originPrice]);
5654
5351
  var Num = showNum && createVNode("div", {
5655
- "class": bem$_("num")
5352
+ "class": bem$$("num")
5656
5353
  }, [slots.num ? slots.num() : "x" + props2.num]);
5657
5354
  var Footer = slots.footer && createVNode("div", {
5658
- "class": bem$_("footer")
5355
+ "class": bem$$("footer")
5659
5356
  }, [slots.footer()]);
5660
5357
  var Bottom = showBottom && createVNode("div", {
5661
- "class": bem$_("bottom")
5358
+ "class": bem$$("bottom")
5662
5359
  }, [(_slots$priceTop = slots["price-top"]) == null ? void 0 : _slots$priceTop.call(slots), Price, OriginPrice, Num, slots.bottom == null ? void 0 : slots.bottom()]);
5663
5360
  return createVNode("div", {
5664
- "class": bem$_()
5361
+ "class": bem$$()
5665
5362
  }, [createVNode("div", {
5666
- "class": bem$_("header")
5363
+ "class": bem$$("header")
5667
5364
  }, [renderThumb(), createVNode("div", {
5668
- "class": bem$_("content", {
5365
+ "class": bem$$("content", {
5669
5366
  centered: props2.centered
5670
5367
  })
5671
5368
  }, [createVNode("div", null, [renderTitle(), renderDesc(), slots.tags == null ? void 0 : slots.tags()]), Bottom])]), Footer]);
@@ -5727,9 +5424,9 @@ function useVisibilityChange(target, onChange) {
5727
5424
  onBeforeUnmount(unobserve);
5728
5425
  onMountedOrActivated(observe);
5729
5426
  }
5730
- var [name$_, bem$Z] = createNamespace("sticky");
5427
+ var [name$$, bem$_] = createNamespace("sticky");
5731
5428
  var _Sticky = defineComponent({
5732
- name: name$_,
5429
+ name: name$$,
5733
5430
  props: {
5734
5431
  zIndex: numericProp,
5735
5432
  position: makeStringProp("top"),
@@ -5827,7 +5524,7 @@ var _Sticky = defineComponent({
5827
5524
  "ref": root,
5828
5525
  "style": rootStyle.value
5829
5526
  }, [createVNode("div", {
5830
- "class": bem$Z({
5527
+ "class": bem$_({
5831
5528
  fixed: state.fixed
5832
5529
  }),
5833
5530
  "style": stickyStyle.value
@@ -5835,9 +5532,9 @@ var _Sticky = defineComponent({
5835
5532
  }
5836
5533
  });
5837
5534
  var Sticky = withInstall(_Sticky);
5838
- var [name$Z, bem$Y] = createNamespace("tab");
5535
+ var [name$_, bem$Z] = createNamespace("tab");
5839
5536
  var TabsTitle = defineComponent({
5840
- name: name$Z,
5537
+ name: name$_,
5841
5538
  props: {
5842
5539
  dot: Boolean,
5843
5540
  type: String,
@@ -5882,7 +5579,7 @@ var TabsTitle = defineComponent({
5882
5579
  });
5883
5580
  var renderText = () => {
5884
5581
  var Text = createVNode("span", {
5885
- "class": bem$Y("text", {
5582
+ "class": bem$Z("text", {
5886
5583
  ellipsis: !props2.scrollable
5887
5584
  })
5888
5585
  }, [props2.renderTitle ? props2.renderTitle() : props2.title]);
@@ -5899,7 +5596,7 @@ var TabsTitle = defineComponent({
5899
5596
  };
5900
5597
  return () => createVNode("div", {
5901
5598
  "role": "tab",
5902
- "class": [bem$Y({
5599
+ "class": [bem$Z({
5903
5600
  active: props2.isActive,
5904
5601
  disabled: props2.disabled
5905
5602
  })],
@@ -5908,8 +5605,8 @@ var TabsTitle = defineComponent({
5908
5605
  }, [renderText()]);
5909
5606
  }
5910
5607
  });
5911
- var [name$Y, bem$X] = createNamespace("swipe");
5912
- var props$k = {
5608
+ var [name$Z, bem$Y] = createNamespace("swipe");
5609
+ var props$l = {
5913
5610
  loop: truthProp,
5914
5611
  width: numericProp,
5915
5612
  height: numericProp,
@@ -5923,10 +5620,10 @@ var props$k = {
5923
5620
  showIndicators: truthProp,
5924
5621
  stopPropagation: truthProp
5925
5622
  };
5926
- var SWIPE_KEY = Symbol(name$Y);
5623
+ var SWIPE_KEY = Symbol(name$Z);
5927
5624
  var _Swipe = defineComponent({
5928
- name: name$Y,
5929
- props: props$k,
5625
+ name: name$Z,
5626
+ props: props$l,
5930
5627
  emits: ["change"],
5931
5628
  setup(props2, {
5932
5629
  emit,
@@ -6177,7 +5874,7 @@ var _Swipe = defineComponent({
6177
5874
  } : void 0;
6178
5875
  return createVNode("i", {
6179
5876
  "style": style,
6180
- "class": bem$X("indicator", {
5877
+ "class": bem$Y("indicator", {
6181
5878
  active
6182
5879
  })
6183
5880
  }, null);
@@ -6190,7 +5887,7 @@ var _Swipe = defineComponent({
6190
5887
  }
6191
5888
  if (props2.showIndicators && count.value > 1) {
6192
5889
  return createVNode("div", {
6193
- "class": bem$X("indicators", {
5890
+ "class": bem$Y("indicators", {
6194
5891
  vertical: props2.vertical
6195
5892
  })
6196
5893
  }, [Array(count.value).fill("").map(renderDot)]);
@@ -6227,10 +5924,10 @@ var _Swipe = defineComponent({
6227
5924
  onBeforeUnmount(stopAutoplay);
6228
5925
  return () => createVNode("div", {
6229
5926
  "ref": root,
6230
- "class": bem$X()
5927
+ "class": bem$Y()
6231
5928
  }, [createVNode("div", {
6232
5929
  "style": trackStyle.value,
6233
- "class": bem$X("track", {
5930
+ "class": bem$Y("track", {
6234
5931
  vertical: props2.vertical
6235
5932
  }),
6236
5933
  "onTouchstart": onTouchStart,
@@ -6241,9 +5938,9 @@ var _Swipe = defineComponent({
6241
5938
  }
6242
5939
  });
6243
5940
  var Swipe = withInstall(_Swipe);
6244
- var [name$X, bem$W] = createNamespace("tabs");
5941
+ var [name$Y, bem$X] = createNamespace("tabs");
6245
5942
  var TabsContent = defineComponent({
6246
- name: name$X,
5943
+ name: name$Y,
6247
5944
  props: {
6248
5945
  count: makeRequiredProp(Number),
6249
5946
  inited: Boolean,
@@ -6266,7 +5963,7 @@ var TabsContent = defineComponent({
6266
5963
  return createVNode(Swipe, {
6267
5964
  "ref": swipeRef,
6268
5965
  "loop": false,
6269
- "class": bem$W("track"),
5966
+ "class": bem$X("track"),
6270
5967
  "duration": +props2.duration * 1e3,
6271
5968
  "touchable": props2.swipeable,
6272
5969
  "lazyRender": props2.lazyRender,
@@ -6291,14 +5988,14 @@ var TabsContent = defineComponent({
6291
5988
  swipeToCurrentTab(props2.currentIndex);
6292
5989
  });
6293
5990
  return () => createVNode("div", {
6294
- "class": bem$W("content", {
5991
+ "class": bem$X("content", {
6295
5992
  animated: props2.animated || props2.swipeable
6296
5993
  })
6297
5994
  }, [renderChildren()]);
6298
5995
  }
6299
5996
  });
6300
- var [name$W, bem$V] = createNamespace("tabs");
6301
- var props$j = {
5997
+ var [name$X, bem$W] = createNamespace("tabs");
5998
+ var props$k = {
6302
5999
  type: makeStringProp("line"),
6303
6000
  color: String,
6304
6001
  border: Boolean,
@@ -6319,10 +6016,10 @@ var props$j = {
6319
6016
  titleActiveColor: String,
6320
6017
  titleInactiveColor: String
6321
6018
  };
6322
- var TABS_KEY = Symbol(name$W);
6019
+ var TABS_KEY = Symbol(name$X);
6323
6020
  var _Tabs = defineComponent({
6324
- name: name$W,
6325
- props: props$j,
6021
+ name: name$X,
6022
+ props: props$k,
6326
6023
  emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active"],
6327
6024
  setup(props2, {
6328
6025
  emit,
@@ -6465,8 +6162,7 @@ var _Tabs = defineComponent({
6465
6162
  if (disabled) {
6466
6163
  emit("disabled", name2, title);
6467
6164
  } else {
6468
- callInterceptor({
6469
- interceptor: props2.beforeChange,
6165
+ callInterceptor(props2.beforeChange, {
6470
6166
  args: [name2],
6471
6167
  done: () => {
6472
6168
  setCurrentIndex(index2);
@@ -6515,9 +6211,7 @@ var _Tabs = defineComponent({
6515
6211
  "renderTitle": item.$slots.title,
6516
6212
  "activeColor": props2.titleActiveColor,
6517
6213
  "inactiveColor": props2.titleInactiveColor,
6518
- "onClick": (event) => {
6519
- onClickTab(item, index2, event);
6520
- }
6214
+ "onClick": (event) => onClickTab(item, index2, event)
6521
6215
  }, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])), null));
6522
6216
  var renderHeader = () => {
6523
6217
  var _slots$navLeft, _slots$navRight;
@@ -6527,7 +6221,7 @@ var _Tabs = defineComponent({
6527
6221
  } = props2;
6528
6222
  return createVNode("div", {
6529
6223
  "ref": wrapRef,
6530
- "class": [bem$V("wrap", {
6224
+ "class": [bem$W("wrap", {
6531
6225
  scrollable: scrollable.value
6532
6226
  }), {
6533
6227
  [BORDER_TOP_BOTTOM]: type === "line" && border
@@ -6535,12 +6229,12 @@ var _Tabs = defineComponent({
6535
6229
  }, [createVNode("div", {
6536
6230
  "ref": navRef,
6537
6231
  "role": "tablist",
6538
- "class": bem$V("nav", [type, {
6232
+ "class": bem$W("nav", [type, {
6539
6233
  complete: scrollable.value
6540
6234
  }]),
6541
6235
  "style": navStyle.value
6542
6236
  }, [(_slots$navLeft = slots["nav-left"]) == null ? void 0 : _slots$navLeft.call(slots), renderNav(), type === "line" && createVNode("div", {
6543
- "class": bem$V("line"),
6237
+ "class": bem$W("line"),
6544
6238
  "style": state.lineStyle
6545
6239
  }, null), (_slots$navRight = slots["nav-right"]) == null ? void 0 : _slots$navRight.call(slots)])]);
6546
6240
  };
@@ -6598,7 +6292,7 @@ var _Tabs = defineComponent({
6598
6292
  var _slots$navBottom, _slots$navBottom2;
6599
6293
  return createVNode("div", {
6600
6294
  "ref": root,
6601
- "class": bem$V([props2.type])
6295
+ "class": bem$W([props2.type])
6602
6296
  }, [props2.sticky ? createVNode(Sticky, {
6603
6297
  "container": root.value,
6604
6298
  "offsetTop": offsetTopPx.value,
@@ -6622,9 +6316,9 @@ var _Tabs = defineComponent({
6622
6316
  });
6623
6317
  var TAB_STATUS_KEY = Symbol();
6624
6318
  var useTabStatus = () => inject(TAB_STATUS_KEY, null);
6625
- var [name$V, bem$U] = createNamespace("swipe-item");
6319
+ var [name$W, bem$V] = createNamespace("swipe-item");
6626
6320
  var _SwipeItem = defineComponent({
6627
- name: name$V,
6321
+ name: name$W,
6628
6322
  setup(props2, {
6629
6323
  slots
6630
6324
  }) {
@@ -6684,15 +6378,15 @@ var _SwipeItem = defineComponent({
6684
6378
  setOffset
6685
6379
  });
6686
6380
  return () => createVNode("div", {
6687
- "class": bem$U(),
6381
+ "class": bem$V(),
6688
6382
  "style": style.value
6689
6383
  }, [shouldRender.value ? slots.default == null ? void 0 : slots.default() : null]);
6690
6384
  }
6691
6385
  });
6692
6386
  var SwipeItem = withInstall(_SwipeItem);
6693
- var [name$U, bem$T] = createNamespace("tab");
6387
+ var [name$V, bem$U] = createNamespace("tab");
6694
6388
  var _Tab = defineComponent({
6695
- name: name$U,
6389
+ name: name$V,
6696
6390
  props: extend({}, routeProps, {
6697
6391
  dot: Boolean,
6698
6392
  name: numericProp,
@@ -6753,12 +6447,12 @@ var _Tab = defineComponent({
6753
6447
  return createVNode(SwipeItem, {
6754
6448
  "role": "tabpanel",
6755
6449
  "aria-hidden": !active.value,
6756
- "class": bem$T("pane-wrapper", {
6450
+ "class": bem$U("pane-wrapper", {
6757
6451
  inactive: !active.value
6758
6452
  })
6759
6453
  }, {
6760
6454
  default: () => [createVNode("div", {
6761
- "class": bem$T("pane")
6455
+ "class": bem$U("pane")
6762
6456
  }, [slots.default == null ? void 0 : slots.default()])]
6763
6457
  });
6764
6458
  }
@@ -6766,36 +6460,35 @@ var _Tab = defineComponent({
6766
6460
  var Content = shouldRender ? slots.default == null ? void 0 : slots.default() : null;
6767
6461
  return withDirectives(createVNode("div", {
6768
6462
  "role": "tabpanel",
6769
- "class": bem$T("pane")
6463
+ "class": bem$U("pane")
6770
6464
  }, [Content]), [[vShow, show]]);
6771
6465
  };
6772
6466
  }
6773
6467
  });
6774
6468
  var Tab = withInstall(_Tab);
6775
6469
  var Tabs = withInstall(_Tabs);
6776
- var [name$T, bem$S, t$c] = createNamespace("cascader");
6470
+ var [name$U, bem$T, t$d] = createNamespace("cascader");
6471
+ var props$j = {
6472
+ title: String,
6473
+ options: makeArrayProp(),
6474
+ closeable: truthProp,
6475
+ swipeable: truthProp,
6476
+ closeIcon: makeStringProp("cross"),
6477
+ modelValue: numericProp,
6478
+ fieldNames: Object,
6479
+ placeholder: String,
6480
+ activeColor: String
6481
+ };
6777
6482
  var _Cascader = defineComponent({
6778
- name: name$T,
6779
- props: {
6780
- title: String,
6781
- options: makeArrayProp(),
6782
- closeable: truthProp,
6783
- swipeable: truthProp,
6784
- closeIcon: makeStringProp("cross"),
6785
- modelValue: numericProp,
6786
- fieldNames: Object,
6787
- placeholder: String,
6788
- activeColor: String
6789
- },
6790
- emits: ["close", "change", "finish", "update:modelValue", "click-tab"],
6483
+ name: name$U,
6484
+ props: props$j,
6485
+ emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
6791
6486
  setup(props2, {
6792
6487
  slots,
6793
6488
  emit
6794
6489
  }) {
6795
- var state = reactive({
6796
- tabs: [],
6797
- activeTab: 0
6798
- });
6490
+ var tabs = ref([]);
6491
+ var activeTab = ref(0);
6799
6492
  var {
6800
6493
  text: textKey,
6801
6494
  value: valueKey,
@@ -6806,8 +6499,7 @@ var _Cascader = defineComponent({
6806
6499
  children: "children"
6807
6500
  }, props2.fieldNames);
6808
6501
  var getSelectedOptionsByValue = (options, value) => {
6809
- for (var i = 0; i < options.length; i++) {
6810
- var option = options[i];
6502
+ for (var option of options) {
6811
6503
  if (option[valueKey] === value) {
6812
6504
  return [option];
6813
6505
  }
@@ -6820,11 +6512,15 @@ var _Cascader = defineComponent({
6820
6512
  }
6821
6513
  };
6822
6514
  var updateTabs = () => {
6823
- if (props2.modelValue || props2.modelValue === 0) {
6824
- var selectedOptions = getSelectedOptionsByValue(props2.options, props2.modelValue);
6515
+ var {
6516
+ options,
6517
+ modelValue
6518
+ } = props2;
6519
+ if (modelValue !== void 0) {
6520
+ var selectedOptions = getSelectedOptionsByValue(options, modelValue);
6825
6521
  if (selectedOptions) {
6826
- var optionsCursor = props2.options;
6827
- state.tabs = selectedOptions.map((option) => {
6522
+ var optionsCursor = options;
6523
+ tabs.value = selectedOptions.map((option) => {
6828
6524
  var tab = {
6829
6525
  options: optionsCursor,
6830
6526
  selected: option
@@ -6836,19 +6532,19 @@ var _Cascader = defineComponent({
6836
6532
  return tab;
6837
6533
  });
6838
6534
  if (optionsCursor) {
6839
- state.tabs.push({
6535
+ tabs.value.push({
6840
6536
  options: optionsCursor,
6841
6537
  selected: null
6842
6538
  });
6843
6539
  }
6844
6540
  nextTick(() => {
6845
- state.activeTab = state.tabs.length - 1;
6541
+ activeTab.value = tabs.value.length - 1;
6846
6542
  });
6847
6543
  return;
6848
6544
  }
6849
6545
  }
6850
- state.tabs = [{
6851
- options: props2.options,
6546
+ tabs.value = [{
6547
+ options,
6852
6548
  selected: null
6853
6549
  }];
6854
6550
  };
@@ -6856,34 +6552,34 @@ var _Cascader = defineComponent({
6856
6552
  if (option.disabled) {
6857
6553
  return;
6858
6554
  }
6859
- state.tabs[tabIndex].selected = option;
6860
- if (state.tabs.length > tabIndex + 1) {
6861
- state.tabs = state.tabs.slice(0, tabIndex + 1);
6555
+ tabs.value[tabIndex].selected = option;
6556
+ if (tabs.value.length > tabIndex + 1) {
6557
+ tabs.value = tabs.value.slice(0, tabIndex + 1);
6862
6558
  }
6863
6559
  if (option[childrenKey]) {
6864
6560
  var nextTab = {
6865
6561
  options: option[childrenKey],
6866
6562
  selected: null
6867
6563
  };
6868
- if (state.tabs[tabIndex + 1]) {
6869
- state.tabs[tabIndex + 1] = nextTab;
6564
+ if (tabs.value[tabIndex + 1]) {
6565
+ tabs.value[tabIndex + 1] = nextTab;
6870
6566
  } else {
6871
- state.tabs.push(nextTab);
6567
+ tabs.value.push(nextTab);
6872
6568
  }
6873
6569
  nextTick(() => {
6874
- state.activeTab++;
6570
+ activeTab.value++;
6875
6571
  });
6876
6572
  }
6877
- var selectedOptions = state.tabs.map((tab) => tab.selected).filter(Boolean);
6878
- var eventParams = {
6573
+ var selectedOptions = tabs.value.map((tab) => tab.selected).filter(Boolean);
6574
+ emit("update:modelValue", option[valueKey]);
6575
+ var params = {
6879
6576
  value: option[valueKey],
6880
6577
  tabIndex,
6881
6578
  selectedOptions
6882
6579
  };
6883
- emit("update:modelValue", option[valueKey]);
6884
- emit("change", eventParams);
6580
+ emit("change", params);
6885
6581
  if (!option[childrenKey]) {
6886
- emit("finish", eventParams);
6582
+ emit("finish", params);
6887
6583
  }
6888
6584
  };
6889
6585
  var onClose = () => emit("close");
@@ -6892,12 +6588,12 @@ var _Cascader = defineComponent({
6892
6588
  title
6893
6589
  }) => emit("click-tab", name2, title);
6894
6590
  var renderHeader = () => createVNode("div", {
6895
- "class": bem$S("header")
6591
+ "class": bem$T("header")
6896
6592
  }, [createVNode("h2", {
6897
- "class": bem$S("title")
6593
+ "class": bem$T("title")
6898
6594
  }, [slots.title ? slots.title() : props2.title]), props2.closeable ? createVNode(Icon, {
6899
6595
  "name": props2.closeIcon,
6900
- "class": bem$S("close-icon"),
6596
+ "class": bem$T("close-icon"),
6901
6597
  "onClick": onClose
6902
6598
  }, null) : null]);
6903
6599
  var renderOption = (option, selectedOption, tabIndex) => {
@@ -6908,7 +6604,7 @@ var _Cascader = defineComponent({
6908
6604
  selected
6909
6605
  }) : createVNode("span", null, [option[textKey]]);
6910
6606
  return createVNode("li", {
6911
- "class": [bem$S("option", {
6607
+ "class": [bem$T("option", {
6912
6608
  selected,
6913
6609
  disabled: option.disabled
6914
6610
  }), option.className],
@@ -6918,21 +6614,22 @@ var _Cascader = defineComponent({
6918
6614
  "onClick": () => onSelect(option, tabIndex)
6919
6615
  }, [Text, selected ? createVNode(Icon, {
6920
6616
  "name": "success",
6921
- "class": bem$S("selected-icon")
6617
+ "class": bem$T("selected-icon")
6922
6618
  }, null) : null]);
6923
6619
  };
6924
6620
  var renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
6925
- "class": bem$S("options")
6621
+ "class": bem$T("options")
6926
6622
  }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
6927
6623
  var renderTab = (tab, tabIndex) => {
6928
6624
  var {
6929
6625
  options,
6930
6626
  selected
6931
6627
  } = tab;
6932
- var title = selected ? selected[textKey] : props2.placeholder || t$c("select");
6628
+ var placeholder = props2.placeholder || t$d("select");
6629
+ var title = selected ? selected[textKey] : placeholder;
6933
6630
  return createVNode(Tab, {
6934
6631
  "title": title,
6935
- "titleClass": bem$S("tab", {
6632
+ "titleClass": bem$T("tab", {
6936
6633
  unselected: !selected
6937
6634
  })
6938
6635
  }, {
@@ -6940,24 +6637,24 @@ var _Cascader = defineComponent({
6940
6637
  });
6941
6638
  };
6942
6639
  var renderTabs = () => createVNode(Tabs, {
6943
- "active": state.activeTab,
6944
- "onUpdate:active": ($event) => state.activeTab = $event,
6640
+ "active": activeTab.value,
6641
+ "onUpdate:active": ($event) => activeTab.value = $event,
6945
6642
  "animated": true,
6946
- "class": bem$S("tabs"),
6643
+ "class": bem$T("tabs"),
6947
6644
  "color": props2.activeColor,
6948
6645
  "swipeThreshold": 0,
6949
6646
  "swipeable": props2.swipeable,
6950
6647
  "onClick-tab": onClickTab
6951
6648
  }, {
6952
- default: () => [state.tabs.map(renderTab)]
6649
+ default: () => [tabs.value.map(renderTab)]
6953
6650
  });
6954
6651
  updateTabs();
6955
6652
  watch(() => props2.options, updateTabs, {
6956
6653
  deep: true
6957
6654
  });
6958
6655
  watch(() => props2.modelValue, (value) => {
6959
- if (value || value === 0) {
6960
- var values = state.tabs.map((tab) => {
6656
+ if (value !== void 0) {
6657
+ var values = tabs.value.map((tab) => {
6961
6658
  var _tab$selected;
6962
6659
  return (_tab$selected = tab.selected) == null ? void 0 : _tab$selected[valueKey];
6963
6660
  });
@@ -6968,14 +6665,14 @@ var _Cascader = defineComponent({
6968
6665
  updateTabs();
6969
6666
  });
6970
6667
  return () => createVNode("div", {
6971
- "class": bem$S()
6668
+ "class": bem$T()
6972
6669
  }, [renderHeader(), renderTabs()]);
6973
6670
  }
6974
6671
  });
6975
6672
  var Cascader = withInstall(_Cascader);
6976
- var [name$S, bem$R] = createNamespace("cell-group");
6673
+ var [name$T, bem$S] = createNamespace("cell-group");
6977
6674
  var _CellGroup = defineComponent({
6978
- name: name$S,
6675
+ name: name$T,
6979
6676
  inheritAttrs: false,
6980
6677
  props: {
6981
6678
  title: String,
@@ -6987,14 +6684,14 @@ var _CellGroup = defineComponent({
6987
6684
  attrs
6988
6685
  }) {
6989
6686
  var renderGroup = () => createVNode("div", mergeProps({
6990
- "class": [bem$R({
6687
+ "class": [bem$S({
6991
6688
  inset: props2.inset
6992
6689
  }), {
6993
6690
  [BORDER_TOP_BOTTOM]: props2.border && !props2.inset
6994
6691
  }]
6995
6692
  }, attrs), [slots.default == null ? void 0 : slots.default()]);
6996
6693
  var renderTitle = () => createVNode("div", {
6997
- "class": bem$R("title", {
6694
+ "class": bem$S("title", {
6998
6695
  inset: props2.inset
6999
6696
  })
7000
6697
  }, [slots.title ? slots.title() : props2.title]);
@@ -7007,7 +6704,7 @@ var _CellGroup = defineComponent({
7007
6704
  }
7008
6705
  });
7009
6706
  var CellGroup = withInstall(_CellGroup);
7010
- var [name$R, bem$Q] = createNamespace("checkbox-group");
6707
+ var [name$S, bem$R] = createNamespace("checkbox-group");
7011
6708
  var props$i = {
7012
6709
  max: numericProp,
7013
6710
  disabled: Boolean,
@@ -7016,9 +6713,9 @@ var props$i = {
7016
6713
  modelValue: makeArrayProp(),
7017
6714
  checkedColor: String
7018
6715
  };
7019
- var CHECKBOX_GROUP_KEY = Symbol(name$R);
6716
+ var CHECKBOX_GROUP_KEY = Symbol(name$S);
7020
6717
  var _CheckboxGroup = defineComponent({
7021
- name: name$R,
6718
+ name: name$S,
7022
6719
  props: props$i,
7023
6720
  emits: ["change", "update:modelValue"],
7024
6721
  setup(props2, {
@@ -7062,16 +6759,16 @@ var _CheckboxGroup = defineComponent({
7062
6759
  updateValue
7063
6760
  });
7064
6761
  return () => createVNode("div", {
7065
- "class": bem$Q([props2.direction])
6762
+ "class": bem$R([props2.direction])
7066
6763
  }, [slots.default == null ? void 0 : slots.default()]);
7067
6764
  }
7068
6765
  });
7069
- var [name$Q, bem$P] = createNamespace("checkbox");
6766
+ var [name$R, bem$Q] = createNamespace("checkbox");
7070
6767
  var props$h = extend({}, checkerProps, {
7071
6768
  bindGroup: truthProp
7072
6769
  });
7073
6770
  var _Checkbox = defineComponent({
7074
- name: name$Q,
6771
+ name: name$R,
7075
6772
  props: props$h,
7076
6773
  emits: ["change", "update:modelValue"],
7077
6774
  setup(props2, {
@@ -7129,7 +6826,7 @@ var _Checkbox = defineComponent({
7129
6826
  });
7130
6827
  useCustomFieldValue(() => props2.modelValue);
7131
6828
  return () => createVNode(Checker, mergeProps({
7132
- "bem": bem$P,
6829
+ "bem": bem$Q,
7133
6830
  "role": "checkbox",
7134
6831
  "parent": parent,
7135
6832
  "checked": checked.value,
@@ -7139,7 +6836,7 @@ var _Checkbox = defineComponent({
7139
6836
  });
7140
6837
  var Checkbox = withInstall(_Checkbox);
7141
6838
  var CheckboxGroup = withInstall(_CheckboxGroup);
7142
- var [name$P, bem$O] = createNamespace("circle");
6839
+ var [name$Q, bem$P] = createNamespace("circle");
7143
6840
  var uid = 0;
7144
6841
  var format = (rate) => Math.min(Math.max(+rate, 0), 100);
7145
6842
  function getPath(clockwise, viewBoxSize) {
@@ -7147,7 +6844,7 @@ function getPath(clockwise, viewBoxSize) {
7147
6844
  return "M " + viewBoxSize / 2 + " " + viewBoxSize / 2 + " m 0, -500 a 500, 500 0 1, " + sweepFlag + " 0, 1000 a 500, 500 0 1, " + sweepFlag + " 0, -1000";
7148
6845
  }
7149
6846
  var _Circle = defineComponent({
7150
- name: name$P,
6847
+ name: name$Q,
7151
6848
  props: {
7152
6849
  text: String,
7153
6850
  size: numericProp,
@@ -7228,7 +6925,7 @@ var _Circle = defineComponent({
7228
6925
  return createVNode("path", {
7229
6926
  "d": path.value,
7230
6927
  "style": style,
7231
- "class": bem$O("hover"),
6928
+ "class": bem$P("hover"),
7232
6929
  "stroke": color
7233
6930
  }, null);
7234
6931
  };
@@ -7239,7 +6936,7 @@ var _Circle = defineComponent({
7239
6936
  strokeWidth: props2.strokeWidth + "px"
7240
6937
  };
7241
6938
  return createVNode("path", {
7242
- "class": bem$O("layer"),
6939
+ "class": bem$P("layer"),
7243
6940
  "style": style,
7244
6941
  "d": path.value
7245
6942
  }, null);
@@ -7270,12 +6967,12 @@ var _Circle = defineComponent({
7270
6967
  }
7271
6968
  if (props2.text) {
7272
6969
  return createVNode("div", {
7273
- "class": bem$O("text")
6970
+ "class": bem$P("text")
7274
6971
  }, [props2.text]);
7275
6972
  }
7276
6973
  };
7277
6974
  return () => createVNode("div", {
7278
- "class": bem$O(),
6975
+ "class": bem$P(),
7279
6976
  "style": getSizeStyle(props2.size)
7280
6977
  }, [createVNode("svg", {
7281
6978
  "viewBox": "0 0 " + viewBoxSize.value + " " + viewBoxSize.value,
@@ -7284,10 +6981,10 @@ var _Circle = defineComponent({
7284
6981
  }
7285
6982
  });
7286
6983
  var Circle = withInstall(_Circle);
7287
- var [name$O, bem$N] = createNamespace("row");
7288
- var ROW_KEY = Symbol(name$O);
6984
+ var [name$P, bem$O] = createNamespace("row");
6985
+ var ROW_KEY = Symbol(name$P);
7289
6986
  var _Row = defineComponent({
7290
- name: name$O,
6987
+ name: name$P,
7291
6988
  props: {
7292
6989
  tag: makeStringProp("div"),
7293
6990
  wrap: truthProp,
@@ -7352,7 +7049,7 @@ var _Row = defineComponent({
7352
7049
  justify
7353
7050
  } = props2;
7354
7051
  return createVNode(tag, {
7355
- "class": bem$N({
7052
+ "class": bem$O({
7356
7053
  ["align-" + align]: align,
7357
7054
  ["justify-" + justify]: justify,
7358
7055
  nowrap: !wrap
@@ -7363,9 +7060,9 @@ var _Row = defineComponent({
7363
7060
  };
7364
7061
  }
7365
7062
  });
7366
- var [name$N, bem$M] = createNamespace("col");
7063
+ var [name$O, bem$N] = createNamespace("col");
7367
7064
  var _Col = defineComponent({
7368
- name: name$N,
7065
+ name: name$O,
7369
7066
  props: {
7370
7067
  tag: makeStringProp("div"),
7371
7068
  span: makeNumericProp(0),
@@ -7404,7 +7101,7 @@ var _Col = defineComponent({
7404
7101
  } = props2;
7405
7102
  return createVNode(tag, {
7406
7103
  "style": style.value,
7407
- "class": bem$M({
7104
+ "class": bem$N({
7408
7105
  [span]: span,
7409
7106
  ["offset-" + offset2]: offset2
7410
7107
  })
@@ -7415,10 +7112,10 @@ var _Col = defineComponent({
7415
7112
  }
7416
7113
  });
7417
7114
  var Col = withInstall(_Col);
7418
- var [name$M, bem$L] = createNamespace("collapse");
7419
- var COLLAPSE_KEY = Symbol(name$M);
7115
+ var [name$N, bem$M] = createNamespace("collapse");
7116
+ var COLLAPSE_KEY = Symbol(name$N);
7420
7117
  var _Collapse = defineComponent({
7421
- name: name$M,
7118
+ name: name$N,
7422
7119
  props: {
7423
7120
  border: truthProp,
7424
7121
  accordion: Boolean,
@@ -7464,14 +7161,14 @@ var _Collapse = defineComponent({
7464
7161
  isExpanded
7465
7162
  });
7466
7163
  return () => createVNode("div", {
7467
- "class": [bem$L(), {
7164
+ "class": [bem$M(), {
7468
7165
  [BORDER_TOP_BOTTOM]: props2.border
7469
7166
  }]
7470
7167
  }, [slots.default == null ? void 0 : slots.default()]);
7471
7168
  }
7472
7169
  });
7473
7170
  var Collapse = withInstall(_Collapse);
7474
- var [name$L, bem$K] = createNamespace("collapse-item");
7171
+ var [name$M, bem$L] = createNamespace("collapse-item");
7475
7172
  var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
7476
7173
  var props$g = extend({}, cellProps, {
7477
7174
  name: numericProp,
@@ -7480,7 +7177,7 @@ var props$g = extend({}, cellProps, {
7480
7177
  readonly: Boolean
7481
7178
  });
7482
7179
  var _CollapseItem = defineComponent({
7483
- name: name$L,
7180
+ name: name$M,
7484
7181
  props: props$g,
7485
7182
  setup(props2, {
7486
7183
  slots
@@ -7559,7 +7256,7 @@ var _CollapseItem = defineComponent({
7559
7256
  }
7560
7257
  return createVNode(Cell, mergeProps({
7561
7258
  "role": "button",
7562
- "class": bem$K("title", {
7259
+ "class": bem$L("title", {
7563
7260
  disabled,
7564
7261
  expanded: expanded.value,
7565
7262
  borderless: !border
@@ -7570,17 +7267,17 @@ var _CollapseItem = defineComponent({
7570
7267
  };
7571
7268
  var renderContent = lazyRender(() => withDirectives(createVNode("div", {
7572
7269
  "ref": wrapperRef,
7573
- "class": bem$K("wrapper"),
7270
+ "class": bem$L("wrapper"),
7574
7271
  "onTransitionend": onTransitionEnd
7575
7272
  }, [createVNode("div", {
7576
7273
  "ref": contentRef,
7577
- "class": bem$K("content")
7274
+ "class": bem$L("content")
7578
7275
  }, [slots.default == null ? void 0 : slots.default()])]), [[vShow, show.value]]));
7579
7276
  useExpose({
7580
7277
  toggle
7581
7278
  });
7582
7279
  return () => createVNode("div", {
7583
- "class": [bem$K({
7280
+ "class": [bem$L({
7584
7281
  border: index2.value && props2.border
7585
7282
  })]
7586
7283
  }, [renderTitle(), renderContent()]);
@@ -7588,9 +7285,9 @@ var _CollapseItem = defineComponent({
7588
7285
  });
7589
7286
  var CollapseItem = withInstall(_CollapseItem);
7590
7287
  var ConfigProvider = withInstall(_ConfigProvider);
7591
- var [name$K, bem$J, t$b] = createNamespace("contact-card");
7288
+ var [name$L, bem$K, t$c] = createNamespace("contact-card");
7592
7289
  var _ContactCard = defineComponent({
7593
- name: name$K,
7290
+ name: name$L,
7594
7291
  props: {
7595
7292
  tel: String,
7596
7293
  name: String,
@@ -7609,17 +7306,17 @@ var _ContactCard = defineComponent({
7609
7306
  };
7610
7307
  var renderContent = () => {
7611
7308
  if (props2.type === "add") {
7612
- return props2.addText || t$b("addText");
7309
+ return props2.addText || t$c("addText");
7613
7310
  }
7614
- return [createVNode("div", null, [t$b("name") + "\uFF1A" + props2.name]), createVNode("div", null, [t$b("tel") + "\uFF1A" + props2.tel])];
7311
+ return [createVNode("div", null, [t$c("name") + "\uFF1A" + props2.name]), createVNode("div", null, [t$c("tel") + "\uFF1A" + props2.tel])];
7615
7312
  };
7616
7313
  return () => createVNode(Cell, {
7617
7314
  "center": true,
7618
7315
  "icon": props2.type === "edit" ? "contact" : "add-square",
7619
- "class": bem$J([props2.type]),
7316
+ "class": bem$K([props2.type]),
7620
7317
  "border": false,
7621
7318
  "isLink": props2.editable,
7622
- "valueClass": bem$J("value"),
7319
+ "valueClass": bem$K("value"),
7623
7320
  "onClick": onClick
7624
7321
  }, {
7625
7322
  value: renderContent
@@ -7627,7 +7324,7 @@ var _ContactCard = defineComponent({
7627
7324
  }
7628
7325
  });
7629
7326
  var ContactCard = withInstall(_ContactCard);
7630
- var [name$J, bem$I] = createNamespace("form");
7327
+ var [name$K, bem$J] = createNamespace("form");
7631
7328
  var props$f = {
7632
7329
  colon: Boolean,
7633
7330
  disabled: Boolean,
@@ -7644,7 +7341,7 @@ var props$f = {
7644
7341
  errorMessageAlign: String
7645
7342
  };
7646
7343
  var _Form = defineComponent({
7647
- name: name$J,
7344
+ name: name$K,
7648
7345
  props: props$f,
7649
7346
  emits: ["submit", "failed"],
7650
7347
  setup(props2, {
@@ -7760,19 +7457,19 @@ var _Form = defineComponent({
7760
7457
  resetValidation
7761
7458
  });
7762
7459
  return () => createVNode("form", {
7763
- "class": bem$I(),
7460
+ "class": bem$J(),
7764
7461
  "onSubmit": onSubmit
7765
7462
  }, [slots.default == null ? void 0 : slots.default()]);
7766
7463
  }
7767
7464
  });
7768
7465
  var Form = withInstall(_Form);
7769
- var [name$I, bem$H, t$a] = createNamespace("contact-edit");
7466
+ var [name$J, bem$I, t$b] = createNamespace("contact-edit");
7770
7467
  var DEFAULT_CONTACT = {
7771
7468
  tel: "",
7772
7469
  name: ""
7773
7470
  };
7774
7471
  var _ContactEdit = defineComponent({
7775
- name: name$I,
7472
+ name: name$J,
7776
7473
  props: {
7777
7474
  isEdit: Boolean,
7778
7475
  isSaving: Boolean,
@@ -7798,24 +7495,22 @@ var _ContactEdit = defineComponent({
7798
7495
  emit("save", contact);
7799
7496
  }
7800
7497
  };
7801
- var onDelete = () => Dialog.confirm({
7802
- title: t$a("confirmDelete")
7803
- }).then(() => emit("delete", contact));
7498
+ var onDelete = () => emit("delete", contact);
7804
7499
  var renderButtons = () => createVNode("div", {
7805
- "class": bem$H("buttons")
7500
+ "class": bem$I("buttons")
7806
7501
  }, [createVNode(Button, {
7807
7502
  "block": true,
7808
7503
  "round": true,
7809
7504
  "type": "danger",
7810
- "text": t$a("save"),
7811
- "class": bem$H("button"),
7505
+ "text": t$b("save"),
7506
+ "class": bem$I("button"),
7812
7507
  "loading": props2.isSaving,
7813
7508
  "nativeType": "submit"
7814
7509
  }, null), props2.isEdit && createVNode(Button, {
7815
7510
  "block": true,
7816
7511
  "round": true,
7817
- "text": t$a("delete"),
7818
- "class": bem$H("button"),
7512
+ "text": t$b("delete"),
7513
+ "class": bem$I("button"),
7819
7514
  "loading": props2.isDeleting,
7820
7515
  "onClick": onDelete
7821
7516
  }, null)]);
@@ -7829,7 +7524,7 @@ var _ContactEdit = defineComponent({
7829
7524
  if (props2.showSetDefault) {
7830
7525
  return createVNode(Cell, {
7831
7526
  "title": props2.setDefaultLabel,
7832
- "class": bem$H("switch-cell"),
7527
+ "class": bem$I("switch-cell"),
7833
7528
  "border": false
7834
7529
  }, {
7835
7530
  "right-icon": renderSwitch
@@ -7838,41 +7533,41 @@ var _ContactEdit = defineComponent({
7838
7533
  };
7839
7534
  watch(() => props2.contactInfo, (value) => extend(contact, DEFAULT_CONTACT, value));
7840
7535
  return () => createVNode(Form, {
7841
- "class": bem$H(),
7536
+ "class": bem$I(),
7842
7537
  "onSubmit": onSave
7843
7538
  }, {
7844
7539
  default: () => [createVNode("div", {
7845
- "class": bem$H("fields")
7540
+ "class": bem$I("fields")
7846
7541
  }, [createVNode(Field, {
7847
7542
  "modelValue": contact.name,
7848
7543
  "onUpdate:modelValue": ($event) => contact.name = $event,
7849
7544
  "clearable": true,
7850
- "label": t$a("name"),
7545
+ "label": t$b("name"),
7851
7546
  "rules": [{
7852
7547
  required: true,
7853
- message: t$a("nameEmpty")
7548
+ message: t$b("nameEmpty")
7854
7549
  }],
7855
7550
  "maxlength": "30",
7856
- "placeholder": t$a("name")
7551
+ "placeholder": t$b("name")
7857
7552
  }, null), createVNode(Field, {
7858
7553
  "modelValue": contact.tel,
7859
7554
  "onUpdate:modelValue": ($event) => contact.tel = $event,
7860
7555
  "clearable": true,
7861
7556
  "type": "tel",
7862
- "label": t$a("tel"),
7557
+ "label": t$b("tel"),
7863
7558
  "rules": [{
7864
7559
  validator: props2.telValidator,
7865
- message: t$a("telInvalid")
7560
+ message: t$b("telInvalid")
7866
7561
  }],
7867
- "placeholder": t$a("tel")
7562
+ "placeholder": t$b("tel")
7868
7563
  }, null)]), renderSetDefault(), renderButtons()]
7869
7564
  });
7870
7565
  }
7871
7566
  });
7872
7567
  var ContactEdit = withInstall(_ContactEdit);
7873
- var [name$H, bem$G, t$9] = createNamespace("contact-list");
7568
+ var [name$I, bem$H, t$a] = createNamespace("contact-list");
7874
7569
  var _ContactList = defineComponent({
7875
- name: name$H,
7570
+ name: name$I,
7876
7571
  props: {
7877
7572
  list: Array,
7878
7573
  addText: String,
@@ -7889,13 +7584,13 @@ var _ContactList = defineComponent({
7889
7584
  emit("select", item, index2);
7890
7585
  };
7891
7586
  var renderRightIcon = () => createVNode(Radio, {
7892
- "class": bem$G("radio"),
7587
+ "class": bem$H("radio"),
7893
7588
  "name": item.id,
7894
7589
  "iconSize": 16
7895
7590
  }, null);
7896
7591
  var renderEditIcon = () => createVNode(Icon, {
7897
7592
  "name": "edit",
7898
- "class": bem$G("edit"),
7593
+ "class": bem$H("edit"),
7899
7594
  "onClick": (event) => {
7900
7595
  event.stopPropagation();
7901
7596
  emit("edit", item, index2);
@@ -7907,7 +7602,7 @@ var _ContactList = defineComponent({
7907
7602
  nodes.push(createVNode(Tag, {
7908
7603
  "type": "danger",
7909
7604
  "round": true,
7910
- "class": bem$G("item-tag")
7605
+ "class": bem$H("item-tag")
7911
7606
  }, {
7912
7607
  default: () => [props2.defaultTagText]
7913
7608
  }));
@@ -7918,8 +7613,8 @@ var _ContactList = defineComponent({
7918
7613
  "key": item.id,
7919
7614
  "isLink": true,
7920
7615
  "center": true,
7921
- "class": bem$G("item"),
7922
- "valueClass": bem$G("item-value"),
7616
+ "class": bem$H("item"),
7617
+ "valueClass": bem$H("item-value"),
7923
7618
  "onClick": onClick
7924
7619
  }, {
7925
7620
  icon: renderEditIcon,
@@ -7928,20 +7623,20 @@ var _ContactList = defineComponent({
7928
7623
  });
7929
7624
  };
7930
7625
  return () => createVNode("div", {
7931
- "class": bem$G()
7626
+ "class": bem$H()
7932
7627
  }, [createVNode(RadioGroup, {
7933
7628
  "modelValue": props2.modelValue,
7934
- "class": bem$G("group")
7629
+ "class": bem$H("group")
7935
7630
  }, {
7936
7631
  default: () => [props2.list && props2.list.map(renderItem)]
7937
7632
  }), createVNode("div", {
7938
- "class": [bem$G("bottom"), "van-safe-area-bottom"]
7633
+ "class": [bem$H("bottom"), "van-safe-area-bottom"]
7939
7634
  }, [createVNode(Button, {
7940
7635
  "round": true,
7941
7636
  "block": true,
7942
7637
  "type": "danger",
7943
- "class": bem$G("add"),
7944
- "text": props2.addText || t$9("addText"),
7638
+ "class": bem$H("add"),
7639
+ "text": props2.addText || t$a("addText"),
7945
7640
  "onClick": () => emit("add")
7946
7641
  }, null)])]);
7947
7642
  }
@@ -7989,7 +7684,7 @@ function parseFormat(format2, currentTime) {
7989
7684
  }
7990
7685
  return format2;
7991
7686
  }
7992
- var [name$G, bem$F] = createNamespace("count-down");
7687
+ var [name$H, bem$G] = createNamespace("count-down");
7993
7688
  var props$e = {
7994
7689
  time: makeNumericProp(0),
7995
7690
  format: makeStringProp("HH:mm:ss"),
@@ -7997,7 +7692,7 @@ var props$e = {
7997
7692
  millisecond: Boolean
7998
7693
  };
7999
7694
  var _CountDown = defineComponent({
8000
- name: name$G,
7695
+ name: name$H,
8001
7696
  props: props$e,
8002
7697
  emits: ["change", "finish"],
8003
7698
  setup(props2, {
@@ -8031,12 +7726,12 @@ var _CountDown = defineComponent({
8031
7726
  reset: resetTime
8032
7727
  });
8033
7728
  return () => createVNode("div", {
8034
- "class": bem$F()
7729
+ "class": bem$G()
8035
7730
  }, [slots.default ? slots.default(current.value) : timeText.value]);
8036
7731
  }
8037
7732
  });
8038
7733
  var CountDown = withInstall(_CountDown);
8039
- var [name$F, bem$E, t$8] = createNamespace("coupon");
7734
+ var [name$G, bem$F, t$9] = createNamespace("coupon");
8040
7735
  function getDate(timeStamp) {
8041
7736
  var date = new Date(timeStamp * 1e3);
8042
7737
  return date.getFullYear() + "." + padZero(date.getMonth() + 1) + "." + padZero(date.getDate());
@@ -8044,7 +7739,7 @@ function getDate(timeStamp) {
8044
7739
  var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
8045
7740
  var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
8046
7741
  var _Coupon = defineComponent({
8047
- name: name$F,
7742
+ name: name$G,
8048
7743
  props: {
8049
7744
  chosen: Boolean,
8050
7745
  coupon: makeRequiredProp(Object),
@@ -8072,13 +7767,13 @@ var _Coupon = defineComponent({
8072
7767
  return [createVNode("span", null, [currency]), " " + denominations];
8073
7768
  }
8074
7769
  if (coupon.discount) {
8075
- return t$8("discount", formatDiscount(coupon.discount));
7770
+ return t$9("discount", formatDiscount(coupon.discount));
8076
7771
  }
8077
7772
  return "";
8078
7773
  });
8079
7774
  var conditionMessage = computed(() => {
8080
7775
  var condition = formatAmount(props2.coupon.originCondition || 0);
8081
- return condition === "0" ? t$8("unlimited") : t$8("condition", condition);
7776
+ return condition === "0" ? t$9("unlimited") : t$9("condition", condition);
8082
7777
  });
8083
7778
  return () => {
8084
7779
  var {
@@ -8088,34 +7783,34 @@ var _Coupon = defineComponent({
8088
7783
  } = props2;
8089
7784
  var description = disabled && coupon.reason || coupon.description;
8090
7785
  return createVNode("div", {
8091
- "class": bem$E({
7786
+ "class": bem$F({
8092
7787
  disabled
8093
7788
  })
8094
7789
  }, [createVNode("div", {
8095
- "class": bem$E("content")
7790
+ "class": bem$F("content")
8096
7791
  }, [createVNode("div", {
8097
- "class": bem$E("head")
7792
+ "class": bem$F("head")
8098
7793
  }, [createVNode("h2", {
8099
- "class": bem$E("amount")
7794
+ "class": bem$F("amount")
8100
7795
  }, [faceAmount.value]), createVNode("p", {
8101
- "class": bem$E("condition")
7796
+ "class": bem$F("condition")
8102
7797
  }, [coupon.condition || conditionMessage.value])]), createVNode("div", {
8103
- "class": bem$E("body")
7798
+ "class": bem$F("body")
8104
7799
  }, [createVNode("p", {
8105
- "class": bem$E("name")
7800
+ "class": bem$F("name")
8106
7801
  }, [coupon.name]), createVNode("p", {
8107
- "class": bem$E("valid")
7802
+ "class": bem$F("valid")
8108
7803
  }, [validPeriod.value]), !disabled && createVNode(Checkbox, {
8109
- "class": bem$E("corner"),
7804
+ "class": bem$F("corner"),
8110
7805
  "modelValue": chosen
8111
7806
  }, null)])]), description && createVNode("p", {
8112
- "class": bem$E("description")
7807
+ "class": bem$F("description")
8113
7808
  }, [description])]);
8114
7809
  };
8115
7810
  }
8116
7811
  });
8117
7812
  var Coupon = withInstall(_Coupon);
8118
- var [name$E, bem$D, t$7] = createNamespace("coupon-cell");
7813
+ var [name$F, bem$E, t$8] = createNamespace("coupon-cell");
8119
7814
  function formatValue(coupons, chosenCoupon, currency) {
8120
7815
  var coupon = coupons[+chosenCoupon];
8121
7816
  if (coupon) {
@@ -8129,10 +7824,10 @@ function formatValue(coupons, chosenCoupon, currency) {
8129
7824
  }
8130
7825
  return "-" + currency + " " + (value / 100).toFixed(2);
8131
7826
  }
8132
- return coupons.length === 0 ? t$7("noCoupon") : t$7("count", coupons.length);
7827
+ return coupons.length === 0 ? t$8("noCoupon") : t$8("count", coupons.length);
8133
7828
  }
8134
7829
  var _CouponCell = defineComponent({
8135
- name: name$E,
7830
+ name: name$F,
8136
7831
  props: {
8137
7832
  title: String,
8138
7833
  border: truthProp,
@@ -8146,12 +7841,12 @@ var _CouponCell = defineComponent({
8146
7841
  var selected = props2.coupons[+props2.chosenCoupon];
8147
7842
  var value = formatValue(props2.coupons, props2.chosenCoupon, props2.currency);
8148
7843
  return createVNode(Cell, {
8149
- "class": bem$D(),
7844
+ "class": bem$E(),
8150
7845
  "value": value,
8151
- "title": props2.title || t$7("title"),
7846
+ "title": props2.title || t$8("title"),
8152
7847
  "border": props2.border,
8153
7848
  "isLink": props2.editable,
8154
- "valueClass": bem$D("value", {
7849
+ "valueClass": bem$E("value", {
8155
7850
  selected
8156
7851
  })
8157
7852
  }, null);
@@ -8159,10 +7854,10 @@ var _CouponCell = defineComponent({
8159
7854
  }
8160
7855
  });
8161
7856
  var CouponCell = withInstall(_CouponCell);
8162
- var [name$D, bem$C, t$6] = createNamespace("coupon-list");
7857
+ var [name$E, bem$D, t$7] = createNamespace("coupon-list");
8163
7858
  var EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
8164
7859
  var _CouponList = defineComponent({
8165
- name: name$D,
7860
+ name: name$E,
8166
7861
  props: {
8167
7862
  code: makeStringProp(""),
8168
7863
  coupons: makeArrayProp(),
@@ -8208,27 +7903,27 @@ var _CouponList = defineComponent({
8208
7903
  });
8209
7904
  };
8210
7905
  var renderEmpty = () => createVNode("div", {
8211
- "class": bem$C("empty")
7906
+ "class": bem$D("empty")
8212
7907
  }, [createVNode("img", {
8213
7908
  "src": props2.emptyImage
8214
- }, null), createVNode("p", null, [t$6("noCoupon")])]);
7909
+ }, null), createVNode("p", null, [t$7("noCoupon")])]);
8215
7910
  var renderExchangeBar = () => {
8216
7911
  if (props2.showExchangeBar) {
8217
7912
  return createVNode("div", {
8218
- "class": bem$C("exchange-bar")
7913
+ "class": bem$D("exchange-bar")
8219
7914
  }, [createVNode(Field, {
8220
7915
  "modelValue": state.code,
8221
7916
  "onUpdate:modelValue": ($event) => state.code = $event,
8222
7917
  "clearable": true,
8223
7918
  "border": false,
8224
- "class": bem$C("field"),
8225
- "placeholder": props2.inputPlaceholder || t$6("placeholder"),
7919
+ "class": bem$D("field"),
7920
+ "placeholder": props2.inputPlaceholder || t$7("placeholder"),
8226
7921
  "maxlength": "20"
8227
7922
  }, null), createVNode(Button, {
8228
7923
  "plain": true,
8229
7924
  "type": "danger",
8230
- "class": bem$C("exchange"),
8231
- "text": props2.exchangeButtonText || t$6("exchange"),
7925
+ "class": bem$D("exchange"),
7926
+ "text": props2.exchangeButtonText || t$7("exchange"),
8232
7927
  "loading": props2.exchangeButtonLoading,
8233
7928
  "disabled": buttonDisabled.value,
8234
7929
  "onClick": onExchange
@@ -8241,12 +7936,12 @@ var _CouponList = defineComponent({
8241
7936
  coupons
8242
7937
  } = props2;
8243
7938
  var count = props2.showCount ? " (" + coupons.length + ")" : "";
8244
- var title = (props2.enabledTitle || t$6("enable")) + count;
7939
+ var title = (props2.enabledTitle || t$7("enable")) + count;
8245
7940
  return createVNode(Tab, {
8246
7941
  "title": title
8247
7942
  }, {
8248
7943
  default: () => [createVNode("div", {
8249
- "class": bem$C("list", {
7944
+ "class": bem$D("list", {
8250
7945
  "with-bar": props2.showExchangeBar,
8251
7946
  "with-bottom": props2.showCloseButton
8252
7947
  })
@@ -8266,12 +7961,12 @@ var _CouponList = defineComponent({
8266
7961
  disabledCoupons
8267
7962
  } = props2;
8268
7963
  var count = props2.showCount ? " (" + disabledCoupons.length + ")" : "";
8269
- var title = (props2.disabledTitle || t$6("disabled")) + count;
7964
+ var title = (props2.disabledTitle || t$7("disabled")) + count;
8270
7965
  return createVNode(Tab, {
8271
7966
  "title": title
8272
7967
  }, {
8273
7968
  default: () => [createVNode("div", {
8274
- "class": bem$C("list", {
7969
+ "class": bem$D("list", {
8275
7970
  "with-bar": props2.showExchangeBar,
8276
7971
  "with-bottom": props2.showCloseButton
8277
7972
  })
@@ -8292,30 +7987,30 @@ var _CouponList = defineComponent({
8292
7987
  scrollToCoupon(props2.displayedCouponIndex);
8293
7988
  });
8294
7989
  return () => createVNode("div", {
8295
- "class": bem$C()
7990
+ "class": bem$D()
8296
7991
  }, [renderExchangeBar(), createVNode(Tabs, {
8297
7992
  "active": state.tab,
8298
7993
  "onUpdate:active": ($event) => state.tab = $event,
8299
- "class": bem$C("tab"),
7994
+ "class": bem$D("tab"),
8300
7995
  "border": false
8301
7996
  }, {
8302
7997
  default: () => [renderCouponTab(), renderDisabledTab()]
8303
7998
  }), createVNode("div", {
8304
- "class": bem$C("bottom")
7999
+ "class": bem$D("bottom")
8305
8000
  }, [withDirectives(createVNode(Button, {
8306
8001
  "round": true,
8307
8002
  "block": true,
8308
8003
  "type": "danger",
8309
- "class": bem$C("close"),
8310
- "text": props2.closeButtonText || t$6("close"),
8004
+ "class": bem$D("close"),
8005
+ "text": props2.closeButtonText || t$7("close"),
8311
8006
  "onClick": () => emit("change", -1)
8312
8007
  }, null), [[vShow, props2.showCloseButton]])])]);
8313
8008
  }
8314
8009
  });
8315
8010
  var CouponList = withInstall(_CouponList);
8316
- var [name$C] = createNamespace("time-picker");
8011
+ var [name$D] = createNamespace("time-picker");
8317
8012
  var TimePicker = defineComponent({
8318
- name: name$C,
8013
+ name: name$D,
8319
8014
  props: extend({}, sharedProps, {
8320
8015
  minHour: makeNumericProp(0),
8321
8016
  maxHour: makeNumericProp(23),
@@ -8422,9 +8117,9 @@ var TimePicker = defineComponent({
8422
8117
  }
8423
8118
  });
8424
8119
  var currentYear = new Date().getFullYear();
8425
- var [name$B] = createNamespace("date-picker");
8120
+ var [name$C] = createNamespace("date-picker");
8426
8121
  var DatePicker = defineComponent({
8427
- name: name$B,
8122
+ name: name$C,
8428
8123
  props: extend({}, sharedProps, {
8429
8124
  type: makeStringProp("datetime"),
8430
8125
  modelValue: Date,
@@ -8619,81 +8314,341 @@ var DatePicker = defineComponent({
8619
8314
  hour = getValue("hour");
8620
8315
  minute = getValue("minute");
8621
8316
  }
8622
- var value = new Date(year, month - 1, day, hour, minute);
8623
- currentDate.value = formatValue2(value);
8624
- };
8625
- var onConfirm = () => {
8626
- emit("update:modelValue", currentDate.value);
8627
- emit("confirm", currentDate.value);
8317
+ var value = new Date(year, month - 1, day, hour, minute);
8318
+ currentDate.value = formatValue2(value);
8319
+ };
8320
+ var onConfirm = () => {
8321
+ emit("update:modelValue", currentDate.value);
8322
+ emit("confirm", currentDate.value);
8323
+ };
8324
+ var onCancel = () => emit("cancel");
8325
+ var onChange = () => {
8326
+ updateInnerValue();
8327
+ nextTick(() => {
8328
+ nextTick(() => emit("change", currentDate.value));
8329
+ });
8330
+ };
8331
+ onMounted(() => {
8332
+ updateColumnValue();
8333
+ nextTick(updateInnerValue);
8334
+ });
8335
+ watch(columns, updateColumnValue);
8336
+ watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8337
+ watch(() => [props2.filter, props2.maxDate], updateInnerValue);
8338
+ watch(() => props2.minDate, () => {
8339
+ nextTick(updateInnerValue);
8340
+ });
8341
+ watch(() => props2.modelValue, (value) => {
8342
+ var _currentDate$value;
8343
+ value = formatValue2(value);
8344
+ if (value && value.valueOf() !== ((_currentDate$value = currentDate.value) == null ? void 0 : _currentDate$value.valueOf())) {
8345
+ currentDate.value = value;
8346
+ }
8347
+ });
8348
+ useExpose({
8349
+ getPicker: () => picker.value
8350
+ });
8351
+ return () => createVNode(Picker, mergeProps({
8352
+ "ref": picker,
8353
+ "columns": columns.value,
8354
+ "onChange": onChange,
8355
+ "onCancel": onCancel,
8356
+ "onConfirm": onConfirm
8357
+ }, pick(props2, pickerKeys)), slots);
8358
+ }
8359
+ });
8360
+ var [name$B, bem$C] = createNamespace("datetime-picker");
8361
+ var timePickerProps = Object.keys(TimePicker.props);
8362
+ var datePickerProps = Object.keys(DatePicker.props);
8363
+ var props$d = extend({}, TimePicker.props, DatePicker.props, {
8364
+ modelValue: [String, Date]
8365
+ });
8366
+ var _DatetimePicker = defineComponent({
8367
+ name: name$B,
8368
+ props: props$d,
8369
+ setup(props2, {
8370
+ attrs,
8371
+ slots
8372
+ }) {
8373
+ var root = ref();
8374
+ useExpose({
8375
+ getPicker: () => {
8376
+ var _root$value;
8377
+ return (_root$value = root.value) == null ? void 0 : _root$value.getPicker();
8378
+ }
8379
+ });
8380
+ return () => {
8381
+ var isTimePicker = props2.type === "time";
8382
+ var Component = isTimePicker ? TimePicker : DatePicker;
8383
+ var inheritProps = pick(props2, isTimePicker ? timePickerProps : datePickerProps);
8384
+ return createVNode(Component, mergeProps({
8385
+ "ref": root,
8386
+ "class": bem$C()
8387
+ }, inheritProps, attrs), slots);
8388
+ };
8389
+ }
8390
+ });
8391
+ var DatetimePicker = withInstall(_DatetimePicker);
8392
+ var [name$A, bem$B, t$6] = createNamespace("dialog");
8393
+ var popupKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
8394
+ var VanDialog = defineComponent({
8395
+ name: name$A,
8396
+ props: extend({}, popupSharedProps, {
8397
+ title: String,
8398
+ theme: String,
8399
+ width: numericProp,
8400
+ message: [String, Function],
8401
+ callback: Function,
8402
+ allowHtml: Boolean,
8403
+ className: unknownProp,
8404
+ transition: makeStringProp("van-dialog-bounce"),
8405
+ messageAlign: String,
8406
+ closeOnPopstate: truthProp,
8407
+ showCancelButton: Boolean,
8408
+ cancelButtonText: String,
8409
+ cancelButtonColor: String,
8410
+ confirmButtonText: String,
8411
+ confirmButtonColor: String,
8412
+ showConfirmButton: truthProp,
8413
+ closeOnClickOverlay: Boolean
8414
+ }),
8415
+ emits: ["confirm", "cancel", "update:show"],
8416
+ setup(props2, {
8417
+ emit,
8418
+ slots
8419
+ }) {
8420
+ var loading = reactive({
8421
+ confirm: false,
8422
+ cancel: false
8423
+ });
8424
+ var updateShow = (value) => emit("update:show", value);
8425
+ var close = (action) => {
8426
+ updateShow(false);
8427
+ props2.callback == null ? void 0 : props2.callback(action);
8428
+ };
8429
+ var getActionHandler = (action) => () => {
8430
+ if (!props2.show) {
8431
+ return;
8432
+ }
8433
+ emit(action);
8434
+ if (props2.beforeClose) {
8435
+ loading[action] = true;
8436
+ callInterceptor(props2.beforeClose, {
8437
+ args: [action],
8438
+ done() {
8439
+ close(action);
8440
+ loading[action] = false;
8441
+ },
8442
+ canceled() {
8443
+ loading[action] = false;
8444
+ }
8445
+ });
8446
+ } else {
8447
+ close(action);
8448
+ }
8449
+ };
8450
+ var onCancel = getActionHandler("cancel");
8451
+ var onConfirm = getActionHandler("confirm");
8452
+ var renderTitle = () => {
8453
+ var title = slots.title ? slots.title() : props2.title;
8454
+ if (title) {
8455
+ return createVNode("div", {
8456
+ "class": bem$B("header", {
8457
+ isolated: !props2.message && !slots.default
8458
+ })
8459
+ }, [title]);
8460
+ }
8628
8461
  };
8629
- var onCancel = () => emit("cancel");
8630
- var onChange = () => {
8631
- updateInnerValue();
8632
- nextTick(() => {
8633
- nextTick(() => emit("change", currentDate.value));
8462
+ var renderMessage = (hasTitle) => {
8463
+ var {
8464
+ message,
8465
+ allowHtml,
8466
+ messageAlign
8467
+ } = props2;
8468
+ var classNames = bem$B("message", {
8469
+ "has-title": hasTitle,
8470
+ [messageAlign]: messageAlign
8634
8471
  });
8472
+ var content = isFunction(message) ? message() : message;
8473
+ if (allowHtml && typeof content === "string") {
8474
+ return createVNode("div", {
8475
+ "class": classNames,
8476
+ "innerHTML": content
8477
+ }, null);
8478
+ }
8479
+ return createVNode("div", {
8480
+ "class": classNames
8481
+ }, [content]);
8635
8482
  };
8636
- onMounted(() => {
8637
- updateColumnValue();
8638
- nextTick(updateInnerValue);
8639
- });
8640
- watch(columns, updateColumnValue);
8641
- watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8642
- watch(() => [props2.filter, props2.maxDate], updateInnerValue);
8643
- watch(() => props2.minDate, () => {
8644
- nextTick(updateInnerValue);
8645
- });
8646
- watch(() => props2.modelValue, (value) => {
8647
- var _currentDate$value;
8648
- value = formatValue2(value);
8649
- if (value && value.valueOf() !== ((_currentDate$value = currentDate.value) == null ? void 0 : _currentDate$value.valueOf())) {
8650
- currentDate.value = value;
8483
+ var renderContent = () => {
8484
+ if (slots.default) {
8485
+ return createVNode("div", {
8486
+ "class": bem$B("content")
8487
+ }, [slots.default()]);
8651
8488
  }
8652
- });
8653
- useExpose({
8654
- getPicker: () => picker.value
8655
- });
8656
- return () => createVNode(Picker, mergeProps({
8657
- "ref": picker,
8658
- "columns": columns.value,
8659
- "onChange": onChange,
8660
- "onCancel": onCancel,
8661
- "onConfirm": onConfirm
8662
- }, pick(props2, pickerKeys)), slots);
8663
- }
8664
- });
8665
- var [name$A, bem$B] = createNamespace("datetime-picker");
8666
- var timePickerProps = Object.keys(TimePicker.props);
8667
- var datePickerProps = Object.keys(DatePicker.props);
8668
- var props$d = extend({}, TimePicker.props, DatePicker.props, {
8669
- modelValue: [String, Date]
8670
- });
8671
- var _DatetimePicker = defineComponent({
8672
- name: name$A,
8673
- props: props$d,
8674
- setup(props2, {
8675
- attrs,
8676
- slots
8677
- }) {
8678
- var root = ref();
8679
- useExpose({
8680
- getPicker: () => {
8681
- var _root$value;
8682
- return (_root$value = root.value) == null ? void 0 : _root$value.getPicker();
8489
+ var {
8490
+ title,
8491
+ message,
8492
+ allowHtml
8493
+ } = props2;
8494
+ if (message) {
8495
+ var hasTitle = !!(title || slots.title);
8496
+ return createVNode("div", {
8497
+ "key": allowHtml ? 1 : 0,
8498
+ "class": bem$B("content", {
8499
+ isolated: !hasTitle
8500
+ })
8501
+ }, [renderMessage(hasTitle)]);
8683
8502
  }
8503
+ };
8504
+ var renderButtons = () => createVNode("div", {
8505
+ "class": [BORDER_TOP, bem$B("footer")]
8506
+ }, [props2.showCancelButton && createVNode(Button, {
8507
+ "size": "large",
8508
+ "text": props2.cancelButtonText || t$6("cancel"),
8509
+ "class": bem$B("cancel"),
8510
+ "style": {
8511
+ color: props2.cancelButtonColor
8512
+ },
8513
+ "loading": loading.cancel,
8514
+ "onClick": onCancel
8515
+ }, null), props2.showConfirmButton && createVNode(Button, {
8516
+ "size": "large",
8517
+ "text": props2.confirmButtonText || t$6("confirm"),
8518
+ "class": [bem$B("confirm"), {
8519
+ [BORDER_LEFT]: props2.showCancelButton
8520
+ }],
8521
+ "style": {
8522
+ color: props2.confirmButtonColor
8523
+ },
8524
+ "loading": loading.confirm,
8525
+ "onClick": onConfirm
8526
+ }, null)]);
8527
+ var renderRoundButtons = () => createVNode(ActionBar, {
8528
+ "class": bem$B("footer")
8529
+ }, {
8530
+ default: () => [props2.showCancelButton && createVNode(ActionBarButton, {
8531
+ "type": "warning",
8532
+ "text": props2.cancelButtonText || t$6("cancel"),
8533
+ "class": bem$B("cancel"),
8534
+ "color": props2.cancelButtonColor,
8535
+ "loading": loading.cancel,
8536
+ "onClick": onCancel
8537
+ }, null), props2.showConfirmButton && createVNode(ActionBarButton, {
8538
+ "type": "danger",
8539
+ "text": props2.confirmButtonText || t$6("confirm"),
8540
+ "class": bem$B("confirm"),
8541
+ "color": props2.confirmButtonColor,
8542
+ "loading": loading.confirm,
8543
+ "onClick": onConfirm
8544
+ }, null)]
8684
8545
  });
8546
+ var renderFooter = () => {
8547
+ if (slots.footer) {
8548
+ return slots.footer();
8549
+ }
8550
+ return props2.theme === "round-button" ? renderRoundButtons() : renderButtons();
8551
+ };
8685
8552
  return () => {
8686
- var isTimePicker = props2.type === "time";
8687
- var Component = isTimePicker ? TimePicker : DatePicker;
8688
- var inheritProps = pick(props2, isTimePicker ? timePickerProps : datePickerProps);
8689
- return createVNode(Component, mergeProps({
8690
- "ref": root,
8691
- "class": bem$B()
8692
- }, inheritProps, attrs), slots);
8553
+ var {
8554
+ width,
8555
+ title,
8556
+ theme,
8557
+ message,
8558
+ className
8559
+ } = props2;
8560
+ return createVNode(Popup, mergeProps({
8561
+ "role": "dialog",
8562
+ "class": [bem$B([theme]), className],
8563
+ "style": {
8564
+ width: addUnit(width)
8565
+ },
8566
+ "aria-labelledby": title || message,
8567
+ "onUpdate:show": updateShow
8568
+ }, pick(props2, popupKeys$1)), {
8569
+ default: () => [renderTitle(), renderContent(), renderFooter()]
8570
+ });
8693
8571
  };
8694
8572
  }
8695
8573
  });
8696
- var DatetimePicker = withInstall(_DatetimePicker);
8574
+ var instance$2;
8575
+ function initInstance$2() {
8576
+ var Wrapper = {
8577
+ setup() {
8578
+ var {
8579
+ state,
8580
+ toggle
8581
+ } = usePopupState();
8582
+ return () => createVNode(VanDialog, mergeProps(state, {
8583
+ "onUpdate:show": toggle
8584
+ }), null);
8585
+ }
8586
+ };
8587
+ ({
8588
+ instance: instance$2
8589
+ } = mountComponent(Wrapper));
8590
+ }
8591
+ function Dialog(options) {
8592
+ if (!inBrowser$1) {
8593
+ return Promise.resolve();
8594
+ }
8595
+ return new Promise((resolve, reject) => {
8596
+ if (!instance$2) {
8597
+ initInstance$2();
8598
+ }
8599
+ instance$2.open(extend({}, Dialog.currentOptions, options, {
8600
+ callback: (action) => {
8601
+ (action === "confirm" ? resolve : reject)(action);
8602
+ }
8603
+ }));
8604
+ });
8605
+ }
8606
+ Dialog.defaultOptions = {
8607
+ title: "",
8608
+ width: "",
8609
+ theme: null,
8610
+ message: "",
8611
+ overlay: true,
8612
+ callback: null,
8613
+ teleport: "body",
8614
+ className: "",
8615
+ allowHtml: false,
8616
+ lockScroll: true,
8617
+ transition: void 0,
8618
+ beforeClose: null,
8619
+ overlayClass: "",
8620
+ overlayStyle: void 0,
8621
+ messageAlign: "",
8622
+ cancelButtonText: "",
8623
+ cancelButtonColor: null,
8624
+ confirmButtonText: "",
8625
+ confirmButtonColor: null,
8626
+ showConfirmButton: true,
8627
+ showCancelButton: false,
8628
+ closeOnPopstate: true,
8629
+ closeOnClickOverlay: false
8630
+ };
8631
+ Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8632
+ Dialog.alert = Dialog;
8633
+ Dialog.confirm = (options) => Dialog(extend({
8634
+ showCancelButton: true
8635
+ }, options));
8636
+ Dialog.close = () => {
8637
+ if (instance$2) {
8638
+ instance$2.toggle(false);
8639
+ }
8640
+ };
8641
+ Dialog.setDefaultOptions = (options) => {
8642
+ extend(Dialog.currentOptions, options);
8643
+ };
8644
+ Dialog.resetDefaultOptions = () => {
8645
+ Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8646
+ };
8647
+ Dialog.Component = withInstall(VanDialog);
8648
+ Dialog.install = (app) => {
8649
+ app.use(Dialog.Component);
8650
+ app.config.globalProperties.$dialog = Dialog;
8651
+ };
8697
8652
  var [name$z, bem$A] = createNamespace("divider");
8698
8653
  var _Divider = defineComponent({
8699
8654
  name: name$z,
@@ -9005,40 +8960,24 @@ var Network = createVNode("svg", {
9005
8960
  "id": prefix + "1",
9006
8961
  "x1": "64.022%",
9007
8962
  "y1": "100%",
9008
- "x2": "64.022%",
9009
- "y2": "0%"
8963
+ "x2": "64.022%"
9010
8964
  }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
9011
8965
  "id": prefix + "2",
9012
8966
  "x1": "50%",
9013
- "y1": "0%",
9014
8967
  "x2": "50%",
9015
8968
  "y2": "84.459%"
9016
8969
  }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
9017
8970
  "id": prefix + "3",
9018
8971
  "x1": "100%",
9019
- "y1": "0%",
9020
8972
  "x2": "100%",
9021
8973
  "y2": "100%"
9022
8974
  }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("linearGradient", {
9023
8975
  "id": prefix + "4",
9024
8976
  "x1": "100%",
9025
8977
  "y1": "100%",
9026
- "x2": "100%",
9027
- "y2": "0%"
9028
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("linearGradient", {
9029
- "id": prefix + "5",
9030
- "x1": "0%",
9031
- "y1": "43.982%",
9032
- "x2": "100%",
9033
- "y2": "54.703%"
9034
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("linearGradient", {
9035
- "id": prefix + "6",
9036
- "x1": "94.535%",
9037
- "y1": "43.837%",
9038
- "x2": "5.465%",
9039
- "y2": "54.948%"
8978
+ "x2": "100%"
9040
8979
  }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
9041
- "id": prefix + "7",
8980
+ "id": prefix + "5",
9042
8981
  "cx": "50%",
9043
8982
  "cy": "0%",
9044
8983
  "fx": "50%",
@@ -9046,8 +8985,7 @@ var Network = createVNode("svg", {
9046
8985
  "r": "100%",
9047
8986
  "gradientTransform": "matrix(0 1 -.54835 0 .5 -.5)"
9048
8987
  }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
9049
- "fill": "none",
9050
- "fill-rule": "evenodd"
8988
+ "fill": "none"
9051
8989
  }, [createVNode("g", {
9052
8990
  "opacity": ".8"
9053
8991
  }, [createVNode("path", {
@@ -9059,12 +8997,11 @@ var Network = createVNode("svg", {
9059
8997
  "fill": "url(#" + prefix + "1)",
9060
8998
  "transform": "translate(2 7)"
9061
8999
  }, null)]), createVNode("path", {
9062
- "fill": "url(#" + prefix + "7)",
9000
+ "fill": "url(#" + prefix + "5)",
9063
9001
  "d": "M0 139h160v21H0z"
9064
9002
  }, null), createVNode("path", {
9065
9003
  "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",
9066
9004
  "fill": "url(#" + prefix + "2)",
9067
- "fill-rule": "nonzero",
9068
9005
  "transform": "translate(43 36)"
9069
9006
  }, null), createVNode("g", {
9070
9007
  "opacity": ".6",
@@ -9087,10 +9024,9 @@ var Network = createVNode("svg", {
9087
9024
  "stroke": "url(#" + prefix + "4)",
9088
9025
  "transform": "rotate(-180 89.791 42.146)"
9089
9026
  }, null)]), createVNode("g", {
9090
- "transform": "translate(31 105)",
9091
- "fill-rule": "nonzero"
9027
+ "transform": "translate(31 105)"
9092
9028
  }, [createVNode("rect", {
9093
- "fill": "url(#" + prefix + "5)",
9029
+ "fill": "#EBEDF0",
9094
9030
  "width": "98",
9095
9031
  "height": "34",
9096
9032
  "rx": "2"
@@ -9102,7 +9038,7 @@ var Network = createVNode("svg", {
9102
9038
  "height": "18",
9103
9039
  "rx": "1.114"
9104
9040
  }, null), createVNode("rect", {
9105
- "fill": "url(#" + prefix + "6)",
9041
+ "fill": "#EBEDF0",
9106
9042
  "x": "15",
9107
9043
  "y": "12",
9108
9044
  "width": "18",
@@ -9261,7 +9197,7 @@ var _GridItem = defineComponent({
9261
9197
  "dot": props2.dot,
9262
9198
  "content": props2.badge
9263
9199
  }, {
9264
- default: () => [slots.icon()]
9200
+ default: slots.icon
9265
9201
  });
9266
9202
  }
9267
9203
  if (props2.icon) {
@@ -9558,6 +9494,7 @@ var ImagePreviewItem = defineComponent({
9558
9494
  }
9559
9495
  });
9560
9496
  var [name$t, bem$t] = createNamespace("image-preview");
9497
+ var popupProps$1 = ["show", "transition", "overlayStyle", "closeOnPopstate"];
9561
9498
  var props$9 = {
9562
9499
  show: Boolean,
9563
9500
  loop: truthProp,
@@ -9604,8 +9541,7 @@ var VanImagePreview = defineComponent({
9604
9541
  var emitScale = (args) => emit("scale", args);
9605
9542
  var updateShow = (show) => emit("update:show", show);
9606
9543
  var emitClose = () => {
9607
- callInterceptor({
9608
- interceptor: props2.beforeClose,
9544
+ callInterceptor(props2.beforeClose, {
9609
9545
  args: [state.active],
9610
9546
  done: () => updateShow(false)
9611
9547
  });
@@ -9699,10 +9635,9 @@ var VanImagePreview = defineComponent({
9699
9635
  return () => createVNode(Popup, mergeProps({
9700
9636
  "class": [bem$t(), props2.className],
9701
9637
  "overlayClass": bem$t("overlay"),
9702
- "onClosed": onClosed
9703
- }, pick(props2, ["show", "transition", "overlayStyle", "closeOnPopstate"]), {
9638
+ "onClosed": onClosed,
9704
9639
  "onUpdate:show": updateShow
9705
- }), {
9640
+ }, pick(props2, popupProps$1)), {
9706
9641
  default: () => [renderClose(), renderImages(), renderIndex(), renderCover()]
9707
9642
  });
9708
9643
  }
@@ -9743,7 +9678,7 @@ function initInstance$1() {
9743
9678
  state.images = [];
9744
9679
  };
9745
9680
  return () => createVNode(VanImagePreview, mergeProps(state, {
9746
- onClosed,
9681
+ "onClosed": onClosed,
9747
9682
  "onUpdate:show": toggle
9748
9683
  }), null);
9749
9684
  }
@@ -9818,15 +9753,6 @@ var _IndexBar = defineComponent({
9818
9753
  };
9819
9754
  }
9820
9755
  });
9821
- var getScrollerRect = () => {
9822
- if ("getBoundingClientRect" in scrollParent.value) {
9823
- return useRect(scrollParent);
9824
- }
9825
- return {
9826
- top: 0,
9827
- left: 0
9828
- };
9829
- };
9830
9756
  var getActiveAnchor = (scrollTop, rects) => {
9831
9757
  for (var i = children.length - 1; i >= 0; i--) {
9832
9758
  var prevHeight = i > 0 ? rects[i - 1].height : 0;
@@ -9846,7 +9772,7 @@ var _IndexBar = defineComponent({
9846
9772
  indexList
9847
9773
  } = props2;
9848
9774
  var scrollTop = getScrollTop(scrollParent.value);
9849
- var scrollParentRect = getScrollerRect();
9775
+ var scrollParentRect = useRect(scrollParent);
9850
9776
  var rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
9851
9777
  var active = getActiveAnchor(scrollTop, rects);
9852
9778
  activeAnchor.value = indexList[active];
@@ -11329,9 +11255,12 @@ var VanNotify = defineComponent({
11329
11255
  background: String,
11330
11256
  lockScroll: Boolean
11331
11257
  }),
11258
+ emits: ["update:show"],
11332
11259
  setup(props2, {
11260
+ emit,
11333
11261
  slots
11334
11262
  }) {
11263
+ var updateShow = (show) => emit("update:show", show);
11335
11264
  return () => createVNode(Popup, {
11336
11265
  "show": props2.show,
11337
11266
  "class": [bem$n([props2.type]), props2.className],
@@ -11342,7 +11271,8 @@ var VanNotify = defineComponent({
11342
11271
  "overlay": false,
11343
11272
  "position": "top",
11344
11273
  "duration": 0.2,
11345
- "lockScroll": props2.lockScroll
11274
+ "lockScroll": props2.lockScroll,
11275
+ "onUpdate:show": updateShow
11346
11276
  }, {
11347
11277
  default: () => [slots.default ? slots.default() : props2.message]
11348
11278
  });
@@ -12763,10 +12693,9 @@ var _Popover = defineComponent({
12763
12693
  "position": "",
12764
12694
  "transition": "van-popover-zoom",
12765
12695
  "lockScroll": false,
12766
- "onTouchstart": onTouchstart
12767
- }, attrs, pick(props2, popupProps), {
12696
+ "onTouchstart": onTouchstart,
12768
12697
  "onUpdate:show": updateShow
12769
- }), {
12698
+ }, attrs, pick(props2, popupProps)), {
12770
12699
  default: () => [props2.showArrow && createVNode("div", {
12771
12700
  "class": bem$i("arrow")
12772
12701
  }, null), createVNode("div", {
@@ -12797,7 +12726,7 @@ var _Progress = defineComponent({
12797
12726
  name: name$h,
12798
12727
  props: props$5,
12799
12728
  setup(props2) {
12800
- var background = computed(() => props2.inactive ? "#cacaca" : props2.color);
12729
+ var background = computed(() => props2.inactive ? void 0 : props2.color);
12801
12730
  var renderPivot = () => {
12802
12731
  var {
12803
12732
  textColor,
@@ -12815,7 +12744,9 @@ var _Progress = defineComponent({
12815
12744
  };
12816
12745
  return createVNode("span", {
12817
12746
  "style": style,
12818
- "class": bem$h("pivot")
12747
+ "class": bem$h("pivot", {
12748
+ inactive: props2.inactive
12749
+ })
12819
12750
  }, [text]);
12820
12751
  }
12821
12752
  };
@@ -12837,7 +12768,9 @@ var _Progress = defineComponent({
12837
12768
  "class": bem$h(),
12838
12769
  "style": rootStyle
12839
12770
  }, [createVNode("span", {
12840
- "class": bem$h("portion"),
12771
+ "class": bem$h("portion", {
12772
+ inactive: props2.inactive
12773
+ }),
12841
12774
  "style": portionStyle
12842
12775
  }, null), renderPivot()]);
12843
12776
  };
@@ -12936,7 +12869,7 @@ var _PullRefresh = defineComponent({
12936
12869
  nodes.push(createVNode(Loading, {
12937
12870
  "class": bem$g("loading")
12938
12871
  }, {
12939
- default: () => [getStatusText()]
12872
+ default: getStatusText
12940
12873
  }));
12941
12874
  }
12942
12875
  return nodes;
@@ -13272,10 +13205,9 @@ var _Search = defineComponent({
13272
13205
  "type": "search",
13273
13206
  "class": bem$e("field"),
13274
13207
  "border": false,
13275
- "onKeypress": onKeypress
13276
- }, fieldAttrs, {
13208
+ "onKeypress": onKeypress,
13277
13209
  "onUpdate:modelValue": onInput
13278
- }), pick(slots, ["left-icon", "right-icon"]));
13210
+ }, fieldAttrs), pick(slots, ["left-icon", "right-icon"]));
13279
13211
  };
13280
13212
  useExpose({
13281
13213
  focus,
@@ -13295,7 +13227,7 @@ var _Search = defineComponent({
13295
13227
  });
13296
13228
  var Search = withInstall(_Search);
13297
13229
  var PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
13298
- var popupKeys = [...popupSharedPropKeys, "closeOnPopstate", "safeAreaInsetBottom"];
13230
+ var popupKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
13299
13231
  function getIconURL(icon) {
13300
13232
  if (PRESET_ICONS.includes(icon)) {
13301
13233
  return "https://img.yzcdn.cn/vant/share-sheet-" + icon + ".png";
@@ -13307,6 +13239,7 @@ var _ShareSheet = defineComponent({
13307
13239
  name: name$d,
13308
13240
  props: extend({}, popupSharedProps, {
13309
13241
  title: String,
13242
+ round: truthProp,
13310
13243
  options: makeArrayProp(),
13311
13244
  cancelText: String,
13312
13245
  description: String,
@@ -13384,12 +13317,10 @@ var _ShareSheet = defineComponent({
13384
13317
  }
13385
13318
  };
13386
13319
  return () => createVNode(Popup, mergeProps({
13387
- "round": true,
13388
13320
  "class": bem$d(),
13389
- "position": "bottom"
13390
- }, pick(props2, popupKeys), {
13321
+ "position": "bottom",
13391
13322
  "onUpdate:show": updateShow
13392
- }), {
13323
+ }, pick(props2, popupKeys)), {
13393
13324
  default: () => [renderHeader(), renderRows(), renderCancelButton()]
13394
13325
  });
13395
13326
  }
@@ -14036,9 +13967,8 @@ var _Stepper = defineComponent({
14036
13967
  };
14037
13968
  var setValue = (value) => {
14038
13969
  if (props2.beforeChange) {
14039
- callInterceptor({
13970
+ callInterceptor(props2.beforeChange, {
14040
13971
  args: [value],
14041
- interceptor: props2.beforeChange,
14042
13972
  done() {
14043
13973
  current.value = value;
14044
13974
  }
@@ -14379,8 +14309,7 @@ var _SwipeCell = defineComponent({
14379
14309
  var onClick = (position = "outside") => {
14380
14310
  emit("click", position);
14381
14311
  if (opened && !lockClick2) {
14382
- callInterceptor({
14383
- interceptor: props2.beforeClose,
14312
+ callInterceptor(props2.beforeClose, {
14384
14313
  args: [{
14385
14314
  name: props2.name,
14386
14315
  position
@@ -14486,8 +14415,7 @@ var _Tabbar = defineComponent({
14486
14415
  };
14487
14416
  var setActive = (active) => {
14488
14417
  if (active !== props2.modelValue) {
14489
- callInterceptor({
14490
- interceptor: props2.beforeChange,
14418
+ callInterceptor(props2.beforeChange, {
14491
14419
  args: [active],
14492
14420
  done() {
14493
14421
  emit("update:modelValue", active);
@@ -14596,7 +14524,7 @@ var _TabbarItem = defineComponent({
14596
14524
  "content": badge,
14597
14525
  "class": bem$2("icon")
14598
14526
  }, {
14599
- default: () => [renderIcon()]
14527
+ default: renderIcon
14600
14528
  }), createVNode("div", {
14601
14529
  "class": bem$2("text")
14602
14530
  }, [slots.default == null ? void 0 : slots.default({
@@ -14804,8 +14732,7 @@ var UploaderPreviewItem = defineComponent({
14804
14732
  beforeDelete
14805
14733
  } = props2;
14806
14734
  event.stopPropagation();
14807
- callInterceptor({
14808
- interceptor: beforeDelete,
14735
+ callInterceptor(beforeDelete, {
14809
14736
  args: [item, {
14810
14737
  name: name2,
14811
14738
  index: index2
@@ -14852,7 +14779,7 @@ var UploaderPreviewItem = defineComponent({
14852
14779
  "lazyLoad": props2.lazyLoad,
14853
14780
  "onClick": onPreview
14854
14781
  }, {
14855
- default: () => [renderCover()]
14782
+ default: renderCover
14856
14783
  });
14857
14784
  }
14858
14785
  return createVNode("div", {
@@ -15099,7 +15026,7 @@ var _Uploader = defineComponent({
15099
15026
  }
15100
15027
  });
15101
15028
  var Uploader = withInstall(_Uploader);
15102
- var version = "3.2.5";
15029
+ var version = "3.2.6";
15103
15030
  function install(app) {
15104
15031
  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];
15105
15032
  components.forEach((item) => {