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
package/lib/vant.js CHANGED
@@ -609,7 +609,6 @@
609
609
  loading: "\u52A0\u8F7D\u4E2D...",
610
610
  noCoupon: "\u6682\u65E0\u4F18\u60E0\u5238",
611
611
  nameEmpty: "\u8BF7\u586B\u5199\u59D3\u540D",
612
- confirmDelete: "\u786E\u5B9A\u8981\u5220\u9664\u5417",
613
612
  telInvalid: "\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",
614
613
  vanCalendar: {
615
614
  end: "\u7ED3\u675F",
@@ -733,15 +732,13 @@
733
732
  var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
734
733
  var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
735
734
  var FORM_KEY = Symbol("van-form");
736
- function callInterceptor(options) {
737
- var {
738
- interceptor,
739
- args,
740
- done,
741
- canceled
742
- } = options;
735
+ function callInterceptor(interceptor, {
736
+ args = [],
737
+ done,
738
+ canceled
739
+ }) {
743
740
  if (interceptor) {
744
- var returnVal = interceptor.apply(null, args || []);
741
+ var returnVal = interceptor.apply(null, args);
745
742
  if (isPromise(returnVal)) {
746
743
  returnVal.then((value) => {
747
744
  if (value) {
@@ -1278,7 +1275,7 @@
1278
1275
  "content": badge,
1279
1276
  "class": bem$1j("icon")
1280
1277
  }, {
1281
- default: () => [slots.icon()]
1278
+ default: slots.icon
1282
1279
  });
1283
1280
  }
1284
1281
  return vue.createVNode(Icon, {
@@ -1479,7 +1476,7 @@
1479
1476
  "name": "van-fade",
1480
1477
  "appear": true
1481
1478
  }, {
1482
- default: () => [renderOverlay()]
1479
+ default: renderOverlay
1483
1480
  });
1484
1481
  }
1485
1482
  });
@@ -1533,8 +1530,7 @@
1533
1530
  };
1534
1531
  var close = () => {
1535
1532
  if (opened) {
1536
- callInterceptor({
1537
- interceptor: props2.beforeClose,
1533
+ callInterceptor(props2.beforeClose, {
1538
1534
  done() {
1539
1535
  opened = false;
1540
1536
  emit("close");
@@ -1613,7 +1609,7 @@
1613
1609
  "onAfterEnter": onOpened,
1614
1610
  "onAfterLeave": onClosed
1615
1611
  }, {
1616
- default: () => [renderPopup()]
1612
+ default: renderPopup
1617
1613
  });
1618
1614
  };
1619
1615
  vue.watch(() => props2.show, (value) => {
@@ -1666,17 +1662,18 @@
1666
1662
  });
1667
1663
  var Popup = withInstall(_Popup);
1668
1664
  var [name$1k, bem$1g] = createNamespace("action-sheet");
1665
+ var popupKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
1669
1666
  var _ActionSheet = vue.defineComponent({
1670
1667
  name: name$1k,
1671
1668
  props: extend({}, popupSharedProps, {
1672
1669
  title: String,
1673
1670
  round: truthProp,
1674
- actions: Array,
1671
+ actions: makeArrayProp(),
1675
1672
  closeIcon: makeStringProp("cross"),
1676
1673
  closeable: truthProp,
1677
1674
  cancelText: String,
1678
1675
  description: String,
1679
- closeOnPopstate: Boolean,
1676
+ closeOnPopstate: truthProp,
1680
1677
  closeOnClickAction: Boolean,
1681
1678
  safeAreaInsetBottom: truthProp
1682
1679
  }),
@@ -1761,22 +1758,14 @@
1761
1758
  }, [content]);
1762
1759
  }
1763
1760
  };
1764
- var renderOptions = () => {
1765
- if (props2.actions) {
1766
- return props2.actions.map(renderOption);
1767
- }
1768
- };
1769
1761
  return () => vue.createVNode(Popup, vue.mergeProps({
1770
1762
  "class": bem$1g(),
1771
- "round": props2.round,
1772
1763
  "position": "bottom",
1773
- "safeAreaInsetBottom": props2.safeAreaInsetBottom
1774
- }, pick(props2, popupSharedPropKeys), {
1775
1764
  "onUpdate:show": updateShow
1776
- }), {
1765
+ }, pick(props2, popupKeys$2)), {
1777
1766
  default: () => [renderHeader(), renderDescription(), vue.createVNode("div", {
1778
1767
  "class": bem$1g("content")
1779
- }, [renderOptions(), slots.default == null ? void 0 : slots.default()]), renderCancel()]
1768
+ }, [props2.actions.map(renderOption), slots.default == null ? void 0 : slots.default()]), renderCancel()]
1780
1769
  });
1781
1770
  }
1782
1771
  });
@@ -2316,7 +2305,7 @@
2316
2305
  var INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
2317
2306
  var INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
2318
2307
  var isOverseaCode = (code) => code[0] === "9";
2319
- var props$q = extend({}, pickerProps, {
2308
+ var props$r = extend({}, pickerProps, {
2320
2309
  value: String,
2321
2310
  columnsNum: makeNumericProp(3),
2322
2311
  columnsPlaceholder: makeArrayProp(),
@@ -2331,7 +2320,7 @@
2331
2320
  });
2332
2321
  var _Area = vue.defineComponent({
2333
2322
  name: name$1h,
2334
- props: props$q,
2323
+ props: props$r,
2335
2324
  emits: ["change", "confirm", "cancel"],
2336
2325
  setup(props2, {
2337
2326
  emit,
@@ -2768,7 +2757,7 @@
2768
2757
  default: null
2769
2758
  }
2770
2759
  };
2771
- var props$p = extend({}, cellProps, fieldSharedProps, {
2760
+ var props$q = extend({}, cellProps, fieldSharedProps, {
2772
2761
  rows: numericProp,
2773
2762
  type: makeStringProp("text"),
2774
2763
  rules: Array,
@@ -2785,7 +2774,7 @@
2785
2774
  });
2786
2775
  var _Field = vue.defineComponent({
2787
2776
  name: name$1f,
2788
- props: props$p,
2777
+ props: props$q,
2789
2778
  emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2790
2779
  setup(props2, {
2791
2780
  emit,
@@ -3207,6 +3196,7 @@
3207
3196
  }
3208
3197
  }
3209
3198
  var [name$1e, bem$1a] = createNamespace("toast");
3199
+ var popupProps$2 = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
3210
3200
  var VanToast = vue.defineComponent({
3211
3201
  name: name$1e,
3212
3202
  props: {
@@ -3299,21 +3289,14 @@
3299
3289
  vue.onMounted(toggleClickable);
3300
3290
  vue.onUnmounted(toggleClickable);
3301
3291
  return () => vue.createVNode(Popup, vue.mergeProps({
3302
- "show": props2.show,
3303
3292
  "class": [bem$1a([props2.position, {
3304
3293
  [props2.type]: !props2.icon
3305
3294
  }]), props2.className],
3306
- "overlay": props2.overlay,
3307
3295
  "lockScroll": false,
3308
- "transition": props2.transition,
3309
- "overlayClass": props2.overlayClass,
3310
- "overlayStyle": props2.overlayStyle,
3311
- "closeOnClickOverlay": props2.closeOnClickOverlay,
3312
3296
  "onClick": onClick,
3313
- "onClosed": clearTimer
3314
- }, {
3297
+ "onClosed": clearTimer,
3315
3298
  "onUpdate:show": updateShow
3316
- }), {
3299
+ }, pick(props2, popupProps$2)), {
3317
3300
  default: () => [renderIcon(), renderMessage()]
3318
3301
  });
3319
3302
  }
@@ -3450,273 +3433,9 @@
3450
3433
  app.use(withInstall(VanToast));
3451
3434
  app.config.globalProperties.$toast = Toast;
3452
3435
  };
3453
- var [name$1d, bem$19, t$h] = createNamespace("dialog");
3454
- var popupKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
3455
- var VanDialog = vue.defineComponent({
3456
- name: name$1d,
3457
- props: extend({}, popupSharedProps, {
3458
- title: String,
3459
- theme: String,
3460
- width: numericProp,
3461
- message: [String, Function],
3462
- callback: Function,
3463
- allowHtml: Boolean,
3464
- className: unknownProp,
3465
- transition: makeStringProp("van-dialog-bounce"),
3466
- messageAlign: String,
3467
- closeOnPopstate: truthProp,
3468
- showCancelButton: Boolean,
3469
- cancelButtonText: String,
3470
- cancelButtonColor: String,
3471
- confirmButtonText: String,
3472
- confirmButtonColor: String,
3473
- showConfirmButton: truthProp,
3474
- closeOnClickOverlay: Boolean
3475
- }),
3476
- emits: ["confirm", "cancel", "update:show"],
3477
- setup(props2, {
3478
- emit,
3479
- slots
3480
- }) {
3481
- var loading = vue.reactive({
3482
- confirm: false,
3483
- cancel: false
3484
- });
3485
- var updateShow = (value) => emit("update:show", value);
3486
- var close = (action) => {
3487
- updateShow(false);
3488
- if (props2.callback) {
3489
- props2.callback(action);
3490
- }
3491
- };
3492
- var getActionHandler = (action) => () => {
3493
- if (!props2.show) {
3494
- return;
3495
- }
3496
- emit(action);
3497
- if (props2.beforeClose) {
3498
- loading[action] = true;
3499
- callInterceptor({
3500
- interceptor: props2.beforeClose,
3501
- args: [action],
3502
- done() {
3503
- close(action);
3504
- loading[action] = false;
3505
- },
3506
- canceled() {
3507
- loading[action] = false;
3508
- }
3509
- });
3510
- } else {
3511
- close(action);
3512
- }
3513
- };
3514
- var onCancel = getActionHandler("cancel");
3515
- var onConfirm = getActionHandler("confirm");
3516
- var renderTitle = () => {
3517
- var title = slots.title ? slots.title() : props2.title;
3518
- if (title) {
3519
- return vue.createVNode("div", {
3520
- "class": bem$19("header", {
3521
- isolated: !props2.message && !slots.default
3522
- })
3523
- }, [title]);
3524
- }
3525
- };
3526
- var renderMessage = (hasTitle) => {
3527
- var {
3528
- message,
3529
- allowHtml,
3530
- messageAlign
3531
- } = props2;
3532
- var classNames = bem$19("message", {
3533
- "has-title": hasTitle,
3534
- [messageAlign]: messageAlign
3535
- });
3536
- var content = isFunction(message) ? message() : message;
3537
- if (allowHtml && typeof content === "string") {
3538
- return vue.createVNode("div", {
3539
- "class": classNames,
3540
- "innerHTML": content
3541
- }, null);
3542
- }
3543
- return vue.createVNode("div", {
3544
- "class": classNames
3545
- }, [content]);
3546
- };
3547
- var renderContent = () => {
3548
- if (slots.default) {
3549
- return vue.createVNode("div", {
3550
- "class": bem$19("content")
3551
- }, [slots.default()]);
3552
- }
3553
- var {
3554
- title,
3555
- message,
3556
- allowHtml
3557
- } = props2;
3558
- if (message) {
3559
- var hasTitle = !!(title || slots.title);
3560
- return vue.createVNode("div", {
3561
- "key": allowHtml ? 1 : 0,
3562
- "class": bem$19("content", {
3563
- isolated: !hasTitle
3564
- })
3565
- }, [renderMessage(hasTitle)]);
3566
- }
3567
- };
3568
- var renderButtons = () => vue.createVNode("div", {
3569
- "class": [BORDER_TOP, bem$19("footer")]
3570
- }, [props2.showCancelButton && vue.createVNode(Button, {
3571
- "size": "large",
3572
- "text": props2.cancelButtonText || t$h("cancel"),
3573
- "class": bem$19("cancel"),
3574
- "style": {
3575
- color: props2.cancelButtonColor
3576
- },
3577
- "loading": loading.cancel,
3578
- "onClick": onCancel
3579
- }, null), props2.showConfirmButton && vue.createVNode(Button, {
3580
- "size": "large",
3581
- "text": props2.confirmButtonText || t$h("confirm"),
3582
- "class": [bem$19("confirm"), {
3583
- [BORDER_LEFT]: props2.showCancelButton
3584
- }],
3585
- "style": {
3586
- color: props2.confirmButtonColor
3587
- },
3588
- "loading": loading.confirm,
3589
- "onClick": onConfirm
3590
- }, null)]);
3591
- var renderRoundButtons = () => vue.createVNode(ActionBar, {
3592
- "class": bem$19("footer")
3593
- }, {
3594
- default: () => [props2.showCancelButton && vue.createVNode(ActionBarButton, {
3595
- "type": "warning",
3596
- "text": props2.cancelButtonText || t$h("cancel"),
3597
- "class": bem$19("cancel"),
3598
- "color": props2.cancelButtonColor,
3599
- "loading": loading.cancel,
3600
- "onClick": onCancel
3601
- }, null), props2.showConfirmButton && vue.createVNode(ActionBarButton, {
3602
- "type": "danger",
3603
- "text": props2.confirmButtonText || t$h("confirm"),
3604
- "class": bem$19("confirm"),
3605
- "color": props2.confirmButtonColor,
3606
- "loading": loading.confirm,
3607
- "onClick": onConfirm
3608
- }, null)]
3609
- });
3610
- var renderFooter = () => {
3611
- if (slots.footer) {
3612
- return slots.footer();
3613
- }
3614
- return props2.theme === "round-button" ? renderRoundButtons() : renderButtons();
3615
- };
3616
- return () => {
3617
- var {
3618
- width,
3619
- title,
3620
- theme,
3621
- message,
3622
- className
3623
- } = props2;
3624
- return vue.createVNode(Popup, vue.mergeProps({
3625
- "role": "dialog",
3626
- "class": [bem$19([theme]), className],
3627
- "style": {
3628
- width: addUnit(width)
3629
- },
3630
- "aria-labelledby": title || message
3631
- }, pick(props2, popupKeys$1), {
3632
- "onUpdate:show": updateShow
3633
- }), {
3634
- default: () => [renderTitle(), renderContent(), renderFooter()]
3635
- });
3636
- };
3637
- }
3638
- });
3639
- var instance$2;
3640
- function initInstance$2() {
3641
- var Wrapper = {
3642
- setup() {
3643
- var {
3644
- state,
3645
- toggle
3646
- } = usePopupState();
3647
- return () => vue.createVNode(VanDialog, vue.mergeProps(state, {
3648
- "onUpdate:show": toggle
3649
- }), null);
3650
- }
3651
- };
3652
- ({
3653
- instance: instance$2
3654
- } = mountComponent(Wrapper));
3655
- }
3656
- function Dialog(options) {
3657
- if (!inBrowser$1) {
3658
- return Promise.resolve();
3659
- }
3660
- return new Promise((resolve, reject) => {
3661
- if (!instance$2) {
3662
- initInstance$2();
3663
- }
3664
- instance$2.open(extend({}, Dialog.currentOptions, options, {
3665
- callback: (action) => {
3666
- (action === "confirm" ? resolve : reject)(action);
3667
- }
3668
- }));
3669
- });
3670
- }
3671
- Dialog.defaultOptions = {
3672
- title: "",
3673
- width: "",
3674
- theme: null,
3675
- message: "",
3676
- overlay: true,
3677
- callback: null,
3678
- teleport: "body",
3679
- className: "",
3680
- allowHtml: false,
3681
- lockScroll: true,
3682
- transition: "van-dialog-bounce",
3683
- beforeClose: null,
3684
- overlayClass: "",
3685
- overlayStyle: void 0,
3686
- messageAlign: "",
3687
- cancelButtonText: "",
3688
- cancelButtonColor: null,
3689
- confirmButtonText: "",
3690
- confirmButtonColor: null,
3691
- showConfirmButton: true,
3692
- showCancelButton: false,
3693
- closeOnPopstate: true,
3694
- closeOnClickOverlay: false
3695
- };
3696
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
3697
- Dialog.alert = Dialog;
3698
- Dialog.confirm = (options) => Dialog(extend({
3699
- showCancelButton: true
3700
- }, options));
3701
- Dialog.close = () => {
3702
- if (instance$2) {
3703
- instance$2.toggle(false);
3704
- }
3705
- };
3706
- Dialog.setDefaultOptions = (options) => {
3707
- extend(Dialog.currentOptions, options);
3708
- };
3709
- Dialog.resetDefaultOptions = () => {
3710
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
3711
- };
3712
- Dialog.Component = withInstall(VanDialog);
3713
- Dialog.install = (app) => {
3714
- app.use(Dialog.Component);
3715
- app.config.globalProperties.$dialog = Dialog;
3716
- };
3717
- var [name$1c, bem$18] = createNamespace("switch");
3436
+ var [name$1d, bem$19] = createNamespace("switch");
3718
3437
  var _Switch = vue.defineComponent({
3719
- name: name$1c,
3438
+ name: name$1d,
3720
3439
  props: {
3721
3440
  size: numericProp,
3722
3441
  loading: Boolean,
@@ -3749,7 +3468,7 @@
3749
3468
  if (props2.loading) {
3750
3469
  var color = isChecked() ? props2.activeColor : props2.inactiveColor;
3751
3470
  return vue.createVNode(Loading, {
3752
- "class": bem$18("loading"),
3471
+ "class": bem$19("loading"),
3753
3472
  "color": color
3754
3473
  }, null);
3755
3474
  }
@@ -3770,7 +3489,7 @@
3770
3489
  };
3771
3490
  return vue.createVNode("div", {
3772
3491
  "role": "switch",
3773
- "class": bem$18({
3492
+ "class": bem$19({
3774
3493
  on: checked,
3775
3494
  loading,
3776
3495
  disabled
@@ -3779,15 +3498,15 @@
3779
3498
  "aria-checked": checked,
3780
3499
  "onClick": onClick
3781
3500
  }, [vue.createVNode("div", {
3782
- "class": bem$18("node")
3501
+ "class": bem$19("node")
3783
3502
  }, [renderLoading()])]);
3784
3503
  };
3785
3504
  }
3786
3505
  });
3787
3506
  var Switch = withInstall(_Switch);
3788
- var [name$1b, bem$17, t$g] = createNamespace("address-edit-detail");
3507
+ var [name$1c, bem$18, t$h] = createNamespace("address-edit-detail");
3789
3508
  var AddressEditDetail = vue.defineComponent({
3790
- name: name$1b,
3509
+ name: name$1c,
3791
3510
  props: {
3792
3511
  show: Boolean,
3793
3512
  value: String,
@@ -3810,7 +3529,7 @@
3810
3529
  };
3811
3530
  var renderSearchTitle = (express) => {
3812
3531
  if (express.name) {
3813
- var text = express.name.replace(props2.value, "<span class=" + bem$17("keyword") + ">" + props2.value + "</span>");
3532
+ var text = express.name.replace(props2.value, "<span class=" + bem$18("keyword") + ">" + props2.value + "</span>");
3814
3533
  return vue.createVNode("div", {
3815
3534
  "innerHTML": text
3816
3535
  }, null);
@@ -3828,7 +3547,7 @@
3828
3547
  "key": express.name + express.address,
3829
3548
  "icon": "location-o",
3830
3549
  "label": express.address,
3831
- "class": bem$17("search-item"),
3550
+ "class": bem$18("search-item"),
3832
3551
  "border": false,
3833
3552
  "onClick": () => onSelect(express)
3834
3553
  }, {
@@ -3840,29 +3559,28 @@
3840
3559
  var onInput = (value) => emit("input", value);
3841
3560
  return () => {
3842
3561
  if (props2.show) {
3843
- return vue.createVNode(vue.Fragment, null, [vue.createVNode(Field, vue.mergeProps({
3562
+ return vue.createVNode(vue.Fragment, null, [vue.createVNode(Field, {
3844
3563
  "autosize": true,
3845
3564
  "clearable": true,
3846
3565
  "ref": field,
3847
- "class": bem$17(),
3566
+ "class": bem$18(),
3848
3567
  "rows": props2.detailRows,
3849
3568
  "type": "textarea",
3850
- "label": t$g("label"),
3569
+ "label": t$h("label"),
3851
3570
  "border": !showSearchResult(),
3852
3571
  "maxlength": props2.detailMaxlength,
3853
3572
  "modelValue": props2.value,
3854
- "placeholder": t$g("placeholder"),
3573
+ "placeholder": t$h("placeholder"),
3855
3574
  "errorMessage": props2.errorMessage,
3856
3575
  "onBlur": onBlur,
3857
- "onFocus": onFocus
3858
- }, {
3576
+ "onFocus": onFocus,
3859
3577
  "onUpdate:modelValue": onInput
3860
- }), null), renderSearchResult()]);
3578
+ }, null), renderSearchResult()]);
3861
3579
  }
3862
3580
  };
3863
3581
  }
3864
3582
  });
3865
- var [name$1a, bem$16, t$f] = createNamespace("address-edit");
3583
+ var [name$1b, bem$17, t$g] = createNamespace("address-edit");
3866
3584
  var DEFAULT_DATA = {
3867
3585
  name: "",
3868
3586
  tel: "",
@@ -3876,7 +3594,7 @@
3876
3594
  addressDetail: ""
3877
3595
  };
3878
3596
  var isPostal = (value) => /^\d{6}$/.test(value);
3879
- var props$o = {
3597
+ var props$p = {
3880
3598
  areaList: Object,
3881
3599
  isSaving: Boolean,
3882
3600
  isDeleting: Boolean,
@@ -3910,9 +3628,9 @@
3910
3628
  }
3911
3629
  };
3912
3630
  var _AddressEdit = vue.defineComponent({
3913
- name: name$1a,
3914
- props: props$o,
3915
- emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "cancel-delete", "select-search", "change-default"],
3631
+ name: name$1b,
3632
+ props: props$p,
3633
+ emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
3916
3634
  setup(props2, {
3917
3635
  emit,
3918
3636
  slots
@@ -3975,15 +3693,15 @@
3975
3693
  }
3976
3694
  switch (key) {
3977
3695
  case "name":
3978
- return value ? "" : t$f("nameEmpty");
3696
+ return value ? "" : t$g("nameEmpty");
3979
3697
  case "tel":
3980
- return props2.telValidator(value) ? "" : t$f("telInvalid");
3698
+ return props2.telValidator(value) ? "" : t$g("telInvalid");
3981
3699
  case "areaCode":
3982
- return value ? "" : t$f("areaEmpty");
3700
+ return value ? "" : t$g("areaEmpty");
3983
3701
  case "addressDetail":
3984
- return value ? "" : t$f("addressEmpty");
3702
+ return value ? "" : t$g("addressEmpty");
3985
3703
  case "postalCode":
3986
- return value && !props2.postalValidator(value) ? t$f("postalEmpty") : "";
3704
+ return value && !props2.postalValidator(value) ? t$g("postalEmpty") : "";
3987
3705
  }
3988
3706
  };
3989
3707
  var onSave = () => {
@@ -4015,18 +3733,14 @@
4015
3733
  var onAreaConfirm = (values) => {
4016
3734
  values = values.filter(Boolean);
4017
3735
  if (values.some((value) => !value.code)) {
4018
- Toast(t$f("areaEmpty"));
3736
+ Toast(t$g("areaEmpty"));
4019
3737
  return;
4020
3738
  }
4021
3739
  state.showAreaPopup = false;
4022
3740
  assignAreaValues();
4023
3741
  emit("change-area", values);
4024
3742
  };
4025
- var onDelete = () => {
4026
- Dialog.confirm({
4027
- title: t$f("confirmDelete")
4028
- }).then(() => emit("delete", state.data)).catch(() => emit("cancel-delete", state.data));
4029
- };
3743
+ var onDelete = () => emit("delete", state.data);
4030
3744
  var getArea = () => areaRef.value ? areaRef.value.getValues() : [];
4031
3745
  var setAreaCode = (code) => {
4032
3746
  state.data.areaCode = code || "";
@@ -4054,8 +3768,8 @@
4054
3768
  };
4055
3769
  return vue.withDirectives(vue.createVNode(Cell, {
4056
3770
  "center": true,
4057
- "title": t$f("defaultAddress"),
4058
- "class": bem$16("default")
3771
+ "title": t$g("defaultAddress"),
3772
+ "class": bem$17("default")
4059
3773
  }, _slots), [[vue.vShow, !hideBottomFields.value]]);
4060
3774
  }
4061
3775
  return null;
@@ -4082,15 +3796,15 @@
4082
3796
  disableArea
4083
3797
  } = props2;
4084
3798
  return vue.createVNode("div", {
4085
- "class": bem$16()
3799
+ "class": bem$17()
4086
3800
  }, [vue.createVNode("div", {
4087
- "class": bem$16("fields")
3801
+ "class": bem$17("fields")
4088
3802
  }, [vue.createVNode(Field, {
4089
3803
  "modelValue": data.name,
4090
3804
  "onUpdate:modelValue": ($event) => data.name = $event,
4091
3805
  "clearable": true,
4092
- "label": t$f("name"),
4093
- "placeholder": t$f("name"),
3806
+ "label": t$g("name"),
3807
+ "placeholder": t$g("name"),
4094
3808
  "errorMessage": errorInfo.name,
4095
3809
  "onFocus": () => onFocus("name")
4096
3810
  }, null), vue.createVNode(Field, {
@@ -4098,17 +3812,17 @@
4098
3812
  "onUpdate:modelValue": ($event) => data.tel = $event,
4099
3813
  "clearable": true,
4100
3814
  "type": "tel",
4101
- "label": t$f("tel"),
3815
+ "label": t$g("tel"),
4102
3816
  "maxlength": props2.telMaxlength,
4103
- "placeholder": t$f("tel"),
3817
+ "placeholder": t$g("tel"),
4104
3818
  "errorMessage": errorInfo.tel,
4105
3819
  "onFocus": () => onFocus("tel")
4106
3820
  }, null), vue.withDirectives(vue.createVNode(Field, {
4107
3821
  "readonly": true,
4108
- "label": t$f("area"),
3822
+ "label": t$g("area"),
4109
3823
  "is-link": !disableArea,
4110
3824
  "modelValue": areaText.value,
4111
- "placeholder": props2.areaPlaceholder || t$f("area"),
3825
+ "placeholder": props2.areaPlaceholder || t$g("area"),
4112
3826
  "errorMessage": errorInfo.areaCode,
4113
3827
  "onFocus": () => onFocus("areaCode"),
4114
3828
  "onClick": () => {
@@ -4132,27 +3846,27 @@
4132
3846
  "modelValue": data.postalCode,
4133
3847
  "onUpdate:modelValue": ($event) => data.postalCode = $event,
4134
3848
  "type": "tel",
4135
- "label": t$f("postal"),
3849
+ "label": t$g("postal"),
4136
3850
  "maxlength": "6",
4137
- "placeholder": t$f("postal"),
3851
+ "placeholder": t$g("postal"),
4138
3852
  "errorMessage": errorInfo.postalCode,
4139
3853
  "onFocus": () => onFocus("postalCode")
4140
3854
  }, null), [[vue.vShow, !hideBottomFields.value]]), slots.default == null ? void 0 : slots.default()]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
4141
- "class": bem$16("buttons")
3855
+ "class": bem$17("buttons")
4142
3856
  }, [vue.createVNode(Button, {
4143
3857
  "block": true,
4144
3858
  "round": true,
4145
3859
  "type": "danger",
4146
- "text": props2.saveButtonText || t$f("save"),
4147
- "class": bem$16("button"),
3860
+ "text": props2.saveButtonText || t$g("save"),
3861
+ "class": bem$17("button"),
4148
3862
  "loading": props2.isSaving,
4149
3863
  "onClick": onSave
4150
3864
  }, null), props2.showDelete && vue.createVNode(Button, {
4151
3865
  "block": true,
4152
3866
  "round": true,
4153
- "class": bem$16("button"),
3867
+ "class": bem$17("button"),
4154
3868
  "loading": props2.isDeleting,
4155
- "text": props2.deleteButtonText || t$f("delete"),
3869
+ "text": props2.deleteButtonText || t$g("delete"),
4156
3870
  "onClick": onDelete
4157
3871
  }, null)]), [[vue.vShow, !hideBottomFields.value]]), vue.createVNode(Popup, {
4158
3872
  "show": state.showAreaPopup,
@@ -4178,18 +3892,18 @@
4178
3892
  }
4179
3893
  });
4180
3894
  var AddressEdit = withInstall(_AddressEdit);
4181
- var [name$19, bem$15] = createNamespace("radio-group");
4182
- var props$n = {
3895
+ var [name$1a, bem$16] = createNamespace("radio-group");
3896
+ var props$o = {
4183
3897
  disabled: Boolean,
4184
3898
  iconSize: numericProp,
4185
3899
  direction: String,
4186
3900
  modelValue: unknownProp,
4187
3901
  checkedColor: String
4188
3902
  };
4189
- var RADIO_KEY = Symbol(name$19);
3903
+ var RADIO_KEY = Symbol(name$1a);
4190
3904
  var _RadioGroup = vue.defineComponent({
4191
- name: name$19,
4192
- props: props$n,
3905
+ name: name$1a,
3906
+ props: props$o,
4193
3907
  emits: ["change", "update:modelValue"],
4194
3908
  setup(props2, {
4195
3909
  emit,
@@ -4206,15 +3920,15 @@
4206
3920
  });
4207
3921
  useCustomFieldValue(() => props2.modelValue);
4208
3922
  return () => vue.createVNode("div", {
4209
- "class": bem$15([props2.direction]),
3923
+ "class": bem$16([props2.direction]),
4210
3924
  "role": "radiogroup"
4211
3925
  }, [slots.default == null ? void 0 : slots.default()]);
4212
3926
  }
4213
3927
  });
4214
3928
  var RadioGroup = withInstall(_RadioGroup);
4215
- var [name$18, bem$14] = createNamespace("tag");
3929
+ var [name$19, bem$15] = createNamespace("tag");
4216
3930
  var _Tag = vue.defineComponent({
4217
- name: name$18,
3931
+ name: name$19,
4218
3932
  props: {
4219
3933
  size: String,
4220
3934
  mark: Boolean,
@@ -4266,12 +3980,12 @@
4266
3980
  }
4267
3981
  var CloseIcon = closeable && vue.createVNode(Icon, {
4268
3982
  "name": "cross",
4269
- "class": bem$14("close"),
3983
+ "class": bem$15("close"),
4270
3984
  "onClick": onClose
4271
3985
  }, null);
4272
3986
  return vue.createVNode("span", {
4273
3987
  "style": getStyle(),
4274
- "class": bem$14([classes, type])
3988
+ "class": bem$15([classes, type])
4275
3989
  }, [slots.default == null ? void 0 : slots.default(), CloseIcon]);
4276
3990
  };
4277
3991
  return () => vue.createVNode(vue.Transition, {
@@ -4367,12 +4081,7 @@
4367
4081
  }
4368
4082
  };
4369
4083
  return () => {
4370
- var nodes = [renderIcon()];
4371
- if (props2.labelPosition === "left") {
4372
- nodes.unshift(renderLabel());
4373
- } else {
4374
- nodes.push(renderLabel());
4375
- }
4084
+ var nodes = props2.labelPosition === "left" ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
4376
4085
  return vue.createVNode("div", {
4377
4086
  "role": props2.role,
4378
4087
  "class": props2.bem([{
@@ -4386,9 +4095,9 @@
4386
4095
  };
4387
4096
  }
4388
4097
  });
4389
- var [name$17, bem$13] = createNamespace("radio");
4098
+ var [name$18, bem$14] = createNamespace("radio");
4390
4099
  var _Radio = vue.defineComponent({
4391
- name: name$17,
4100
+ name: name$18,
4392
4101
  props: checkerProps,
4393
4102
  emits: ["update:modelValue"],
4394
4103
  setup(props2, {
@@ -4410,7 +4119,7 @@
4410
4119
  }
4411
4120
  };
4412
4121
  return () => vue.createVNode(Checker, vue.mergeProps({
4413
- "bem": bem$13,
4122
+ "bem": bem$14,
4414
4123
  "role": "radio",
4415
4124
  "parent": parent,
4416
4125
  "checked": checked(),
@@ -4419,9 +4128,9 @@
4419
4128
  }
4420
4129
  });
4421
4130
  var Radio = withInstall(_Radio);
4422
- var [name$16, bem$12] = createNamespace("address-item");
4131
+ var [name$17, bem$13] = createNamespace("address-item");
4423
4132
  var AddressListItem = vue.defineComponent({
4424
- name: name$16,
4133
+ name: name$17,
4425
4134
  props: {
4426
4135
  address: makeRequiredProp(Object),
4427
4136
  disabled: Boolean,
@@ -4441,7 +4150,7 @@
4441
4150
  };
4442
4151
  var renderRightIcon = () => vue.createVNode(Icon, {
4443
4152
  "name": "edit",
4444
- "class": bem$12("edit"),
4153
+ "class": bem$13("edit"),
4445
4154
  "onClick": (event) => {
4446
4155
  event.stopPropagation();
4447
4156
  emit("edit");
@@ -4456,7 +4165,7 @@
4456
4165
  return vue.createVNode(Tag, {
4457
4166
  "type": "danger",
4458
4167
  "round": true,
4459
- "class": bem$12("tag")
4168
+ "class": bem$13("tag")
4460
4169
  }, {
4461
4170
  default: () => [props2.defaultTagText]
4462
4171
  });
@@ -4469,9 +4178,9 @@
4469
4178
  switchable
4470
4179
  } = props2;
4471
4180
  var Info = [vue.createVNode("div", {
4472
- "class": bem$12("name")
4181
+ "class": bem$13("name")
4473
4182
  }, [address.name + " " + address.tel, renderTag()]), vue.createVNode("div", {
4474
- "class": bem$12("address")
4183
+ "class": bem$13("address")
4475
4184
  }, [address.address])];
4476
4185
  if (switchable && !disabled) {
4477
4186
  return vue.createVNode(Radio, {
@@ -4488,13 +4197,13 @@
4488
4197
  disabled
4489
4198
  } = props2;
4490
4199
  return vue.createVNode("div", {
4491
- "class": bem$12({
4200
+ "class": bem$13({
4492
4201
  disabled
4493
4202
  }),
4494
4203
  "onClick": onClick
4495
4204
  }, [vue.createVNode(Cell, {
4496
4205
  "border": false,
4497
- "valueClass": bem$12("value")
4206
+ "valueClass": bem$13("value")
4498
4207
  }, {
4499
4208
  value: renderContent,
4500
4209
  "right-icon": renderRightIcon
@@ -4504,9 +4213,9 @@
4504
4213
  };
4505
4214
  }
4506
4215
  });
4507
- var [name$15, bem$11, t$e] = createNamespace("address-list");
4216
+ var [name$16, bem$12, t$f] = createNamespace("address-list");
4508
4217
  var _AddressList = vue.defineComponent({
4509
- name: name$15,
4218
+ name: name$16,
4510
4219
  props: {
4511
4220
  list: makeArrayProp(),
4512
4221
  modelValue: numericProp,
@@ -4522,14 +4231,10 @@
4522
4231
  emit
4523
4232
  }) {
4524
4233
  var renderItem = (item, index2, disabled) => {
4525
- var onEdit = () => {
4526
- var name2 = disabled ? "edit-disabled" : "edit";
4527
- emit(name2, item, index2);
4528
- };
4234
+ var onEdit = () => emit(disabled ? "edit-disabled" : "edit", item, index2);
4529
4235
  var onClick = () => emit("click-item", item, index2);
4530
4236
  var onSelect = () => {
4531
- var name2 = disabled ? "select-disabled" : "select";
4532
- emit(name2, item, index2);
4237
+ emit(disabled ? "select-disabled" : "select", item, index2);
4533
4238
  if (!disabled) {
4534
4239
  emit("update:modelValue", item.id);
4535
4240
  }
@@ -4554,23 +4259,23 @@
4554
4259
  }
4555
4260
  };
4556
4261
  var renderBottom = () => vue.createVNode("div", {
4557
- "class": [bem$11("bottom"), "van-safe-area-bottom"]
4262
+ "class": [bem$12("bottom"), "van-safe-area-bottom"]
4558
4263
  }, [vue.createVNode(Button, {
4559
4264
  "round": true,
4560
4265
  "block": true,
4561
4266
  "type": "danger",
4562
- "text": props2.addButtonText || t$e("add"),
4563
- "class": bem$11("add"),
4267
+ "text": props2.addButtonText || t$f("add"),
4268
+ "class": bem$12("add"),
4564
4269
  "onClick": () => emit("add")
4565
4270
  }, null)]);
4566
4271
  return () => {
4567
4272
  var List2 = renderList(props2.list);
4568
4273
  var DisabledList = renderList(props2.disabledList, true);
4569
4274
  var DisabledText = props2.disabledText && vue.createVNode("div", {
4570
- "class": bem$11("disabled-text")
4275
+ "class": bem$12("disabled-text")
4571
4276
  }, [props2.disabledText]);
4572
4277
  return vue.createVNode("div", {
4573
- "class": bem$11()
4278
+ "class": bem$12()
4574
4279
  }, [slots.top == null ? void 0 : slots.top(), vue.createVNode(RadioGroup, {
4575
4280
  "modelValue": props2.modelValue
4576
4281
  }, {
@@ -4580,8 +4285,8 @@
4580
4285
  }
4581
4286
  });
4582
4287
  var AddressList = withInstall(_AddressList);
4583
- var [name$14, bem$10, t$d] = createNamespace("calendar");
4584
- var formatMonthTitle = (date) => t$d("monthTitle", date.getFullYear(), date.getMonth() + 1);
4288
+ var [name$15, bem$11, t$e] = createNamespace("calendar");
4289
+ var formatMonthTitle = (date) => t$e("monthTitle", date.getFullYear(), date.getMonth() + 1);
4585
4290
  function compareMonth(date1, date2) {
4586
4291
  var year1 = date1.getFullYear();
4587
4292
  var year2 = date2.getFullYear();
@@ -4668,9 +4373,9 @@
4668
4373
  }));
4669
4374
  return height;
4670
4375
  };
4671
- var [name$13] = createNamespace("calendar-day");
4376
+ var [name$14] = createNamespace("calendar-day");
4672
4377
  var CalendarDay = vue.defineComponent({
4673
- name: name$13,
4378
+ name: name$14,
4674
4379
  props: {
4675
4380
  item: makeRequiredProp(Object),
4676
4381
  color: String,
@@ -4728,7 +4433,7 @@
4728
4433
  } = props2.item;
4729
4434
  if (topInfo || slots["top-info"]) {
4730
4435
  return vue.createVNode("div", {
4731
- "class": bem$10("top-info")
4436
+ "class": bem$11("top-info")
4732
4437
  }, [slots["top-info"] ? slots["top-info"](props2.item) : topInfo]);
4733
4438
  }
4734
4439
  };
@@ -4738,7 +4443,7 @@
4738
4443
  } = props2.item;
4739
4444
  if (bottomInfo || slots["bottom-info"]) {
4740
4445
  return vue.createVNode("div", {
4741
- "class": bem$10("bottom-info")
4446
+ "class": bem$11("bottom-info")
4742
4447
  }, [slots["bottom-info"] ? slots["bottom-info"](props2.item) : bottomInfo]);
4743
4448
  }
4744
4449
  };
@@ -4755,7 +4460,7 @@
4755
4460
  var Nodes = [renderTopInfo(), text, renderBottomInfo()];
4756
4461
  if (type === "selected") {
4757
4462
  return vue.createVNode("div", {
4758
- "class": bem$10("selected-day"),
4463
+ "class": bem$11("selected-day"),
4759
4464
  "style": {
4760
4465
  width: rowHeight,
4761
4466
  height: rowHeight,
@@ -4772,22 +4477,22 @@
4772
4477
  } = props2.item;
4773
4478
  if (type === "placeholder") {
4774
4479
  return vue.createVNode("div", {
4775
- "class": bem$10("day"),
4480
+ "class": bem$11("day"),
4776
4481
  "style": style.value
4777
4482
  }, null);
4778
4483
  }
4779
4484
  return vue.createVNode("div", {
4780
4485
  "role": "gridcell",
4781
4486
  "style": style.value,
4782
- "class": [bem$10("day", type), className],
4487
+ "class": [bem$11("day", type), className],
4783
4488
  "tabindex": type === "disabled" ? void 0 : -1,
4784
4489
  "onClick": onClick
4785
4490
  }, [renderContent()]);
4786
4491
  };
4787
4492
  }
4788
4493
  });
4789
- var [name$12] = createNamespace("calendar-month");
4790
- var props$m = {
4494
+ var [name$13] = createNamespace("calendar-month");
4495
+ var props$n = {
4791
4496
  date: makeRequiredProp(Date),
4792
4497
  type: String,
4793
4498
  color: String,
@@ -4804,8 +4509,8 @@
4804
4509
  firstDayOfWeek: Number
4805
4510
  };
4806
4511
  var CalendarMonth = vue.defineComponent({
4807
- name: name$12,
4808
- props: props$m,
4512
+ name: name$13,
4513
+ props: props$n,
4809
4514
  emits: ["click", "update-height"],
4810
4515
  setup(props2, {
4811
4516
  emit,
@@ -4906,24 +4611,24 @@
4906
4611
  var getBottomInfo = (dayType) => {
4907
4612
  if (props2.type === "range") {
4908
4613
  if (dayType === "start" || dayType === "end") {
4909
- return t$d(dayType);
4614
+ return t$e(dayType);
4910
4615
  }
4911
4616
  if (dayType === "start-end") {
4912
- return t$d("startEnd");
4617
+ return t$e("startEnd");
4913
4618
  }
4914
4619
  }
4915
4620
  };
4916
4621
  var renderTitle = () => {
4917
4622
  if (props2.showMonthTitle) {
4918
4623
  return vue.createVNode("div", {
4919
- "class": bem$10("month-title")
4624
+ "class": bem$11("month-title")
4920
4625
  }, [title.value]);
4921
4626
  }
4922
4627
  };
4923
4628
  var renderMark = () => {
4924
4629
  if (props2.showMark && shouldRender.value) {
4925
4630
  return vue.createVNode("div", {
4926
- "class": bem$10("month-mark")
4631
+ "class": bem$11("month-mark")
4927
4632
  }, [props2.date.getMonth() + 1]);
4928
4633
  }
4929
4634
  };
@@ -4965,7 +4670,7 @@
4965
4670
  var renderDays = () => vue.createVNode("div", {
4966
4671
  "ref": daysRef,
4967
4672
  "role": "grid",
4968
- "class": bem$10("days")
4673
+ "class": bem$11("days")
4969
4674
  }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
4970
4675
  useExpose({
4971
4676
  getTitle,
@@ -4975,14 +4680,14 @@
4975
4680
  disabledDays
4976
4681
  });
4977
4682
  return () => vue.createVNode("div", {
4978
- "class": bem$10("month"),
4683
+ "class": bem$11("month"),
4979
4684
  "ref": monthRef
4980
4685
  }, [renderTitle(), renderDays()]);
4981
4686
  }
4982
4687
  });
4983
- var [name$11] = createNamespace("calendar-header");
4688
+ var [name$12] = createNamespace("calendar-header");
4984
4689
  var CalendarHeader = vue.defineComponent({
4985
- name: name$11,
4690
+ name: name$12,
4986
4691
  props: {
4987
4692
  title: String,
4988
4693
  subtitle: String,
@@ -4997,10 +4702,10 @@
4997
4702
  }) {
4998
4703
  var renderTitle = () => {
4999
4704
  if (props2.showTitle) {
5000
- var text = props2.title || t$d("title");
4705
+ var text = props2.title || t$e("title");
5001
4706
  var title = slots.title ? slots.title() : text;
5002
4707
  return vue.createVNode("div", {
5003
- "class": bem$10("header-title")
4708
+ "class": bem$11("header-title")
5004
4709
  }, [title]);
5005
4710
  }
5006
4711
  };
@@ -5011,7 +4716,7 @@
5011
4716
  if (props2.showSubtitle) {
5012
4717
  var title = slots.subtitle ? slots.subtitle() : props2.subtitle;
5013
4718
  return vue.createVNode("div", {
5014
- "class": bem$10("header-subtitle"),
4719
+ "class": bem$11("header-subtitle"),
5015
4720
  "onClick": onClickSubtitle
5016
4721
  }, [title]);
5017
4722
  }
@@ -5020,20 +4725,20 @@
5020
4725
  var {
5021
4726
  firstDayOfWeek
5022
4727
  } = props2;
5023
- var weekdays = t$d("weekdays");
4728
+ var weekdays = t$e("weekdays");
5024
4729
  var renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
5025
4730
  return vue.createVNode("div", {
5026
- "class": bem$10("weekdays")
4731
+ "class": bem$11("weekdays")
5027
4732
  }, [renderWeekDays2.map((text) => vue.createVNode("span", {
5028
- "class": bem$10("weekday")
4733
+ "class": bem$11("weekday")
5029
4734
  }, [text]))]);
5030
4735
  };
5031
4736
  return () => vue.createVNode("div", {
5032
- "class": bem$10("header")
4737
+ "class": bem$11("header")
5033
4738
  }, [renderTitle(), renderSubtitle(), renderWeekDays()]);
5034
4739
  }
5035
4740
  });
5036
- var props$l = {
4741
+ var props$m = {
5037
4742
  show: Boolean,
5038
4743
  type: makeStringProp("single"),
5039
4744
  title: String,
@@ -5080,8 +4785,8 @@
5080
4785
  }
5081
4786
  };
5082
4787
  var _Calendar = vue.defineComponent({
5083
- name: name$14,
5084
- props: props$l,
4788
+ name: name$15,
4789
+ props: props$m,
5085
4790
  emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
5086
4791
  setup(props2, {
5087
4792
  emit,
@@ -5236,7 +4941,7 @@
5236
4941
  } = props2;
5237
4942
  if (maxRange && calcDateNum(date) > maxRange) {
5238
4943
  if (showRangePrompt) {
5239
- Toast(rangePrompt || t$d("rangePrompt", maxRange));
4944
+ Toast(rangePrompt || t$e("rangePrompt", maxRange));
5240
4945
  }
5241
4946
  emit("over-range");
5242
4947
  return false;
@@ -5321,7 +5026,7 @@
5321
5026
  var [unselectedDate] = dates.splice(selectedIndex, 1);
5322
5027
  emit("unselect", cloneDate(unselectedDate));
5323
5028
  } else if (props2.maxRange && dates.length >= props2.maxRange) {
5324
- Toast(props2.rangePrompt || t$d("rangePrompt", props2.maxRange));
5029
+ Toast(props2.rangePrompt || t$e("rangePrompt", props2.maxRange));
5325
5030
  } else {
5326
5031
  select([...dates, date]);
5327
5032
  }
@@ -5347,28 +5052,32 @@
5347
5052
  return slots.footer();
5348
5053
  }
5349
5054
  if (props2.showConfirm) {
5350
- var text = buttonDisabled.value ? props2.confirmDisabledText : props2.confirmText;
5055
+ var slot = slots["confirm-text"];
5056
+ var disabled = buttonDisabled.value;
5057
+ var text = disabled ? props2.confirmDisabledText : props2.confirmText;
5351
5058
  return vue.createVNode(Button, {
5352
5059
  "round": true,
5353
5060
  "block": true,
5354
5061
  "type": "danger",
5355
5062
  "color": props2.color,
5356
- "class": bem$10("confirm"),
5357
- "disabled": buttonDisabled.value,
5063
+ "class": bem$11("confirm"),
5064
+ "disabled": disabled,
5358
5065
  "nativeType": "button",
5359
5066
  "onClick": onConfirm
5360
5067
  }, {
5361
- default: () => [text || t$d("confirm")]
5068
+ default: () => [slot ? slot({
5069
+ disabled
5070
+ }) : text || t$e("confirm")]
5362
5071
  });
5363
5072
  }
5364
5073
  };
5365
5074
  var renderFooter = () => vue.createVNode("div", {
5366
- "class": [bem$10("footer"), {
5075
+ "class": [bem$11("footer"), {
5367
5076
  "van-safe-area-bottom": props2.safeAreaInsetBottom
5368
5077
  }]
5369
5078
  }, [renderFooterButton()]);
5370
5079
  var renderCalendar = () => vue.createVNode("div", {
5371
- "class": bem$10()
5080
+ "class": bem$11()
5372
5081
  }, [vue.createVNode(CalendarHeader, {
5373
5082
  "title": props2.title,
5374
5083
  "subtitle": subtitle.value,
@@ -5378,7 +5087,7 @@
5378
5087
  "onClick-subtitle": (event) => emit("click-subtitle", event)
5379
5088
  }, pick(slots, ["title", "subtitle"])), vue.createVNode("div", {
5380
5089
  "ref": bodyRef,
5381
- "class": bem$10("body"),
5090
+ "class": bem$11("body"),
5382
5091
  "onScroll": onScroll
5383
5092
  }, [months.value.map(renderMonth)]), renderFooter()]);
5384
5093
  vue.watch(() => props2.show, init);
@@ -5394,19 +5103,18 @@
5394
5103
  onMountedOrActivated(init);
5395
5104
  return () => {
5396
5105
  if (props2.poppable) {
5397
- return vue.createVNode(Popup, vue.mergeProps({
5106
+ return vue.createVNode(Popup, {
5398
5107
  "show": props2.show,
5399
- "class": bem$10("popup"),
5108
+ "class": bem$11("popup"),
5400
5109
  "round": props2.round,
5401
5110
  "position": props2.position,
5402
5111
  "closeable": props2.showTitle || props2.showSubtitle,
5403
5112
  "teleport": props2.teleport,
5404
5113
  "closeOnPopstate": props2.closeOnPopstate,
5405
- "closeOnClickOverlay": props2.closeOnClickOverlay
5406
- }, {
5114
+ "closeOnClickOverlay": props2.closeOnClickOverlay,
5407
5115
  "onUpdate:show": updateShow
5408
- }), {
5409
- default: () => [renderCalendar()]
5116
+ }, {
5117
+ default: renderCalendar
5410
5118
  });
5411
5119
  }
5412
5120
  return renderCalendar();
@@ -5414,9 +5122,9 @@
5414
5122
  }
5415
5123
  });
5416
5124
  var Calendar = withInstall(_Calendar);
5417
- var [name$10, bem$$] = createNamespace("image");
5125
+ var [name$11, bem$10] = createNamespace("image");
5418
5126
  var _Image = vue.defineComponent({
5419
- name: name$10,
5127
+ name: name$11,
5420
5128
  props: {
5421
5129
  src: String,
5422
5130
  alt: String,
@@ -5471,38 +5179,27 @@
5471
5179
  loading.value = false;
5472
5180
  emit("error", event);
5473
5181
  };
5474
- var renderLoadingIcon = () => {
5475
- if (slots.loading) {
5476
- return slots.loading();
5477
- }
5478
- return vue.createVNode(Icon, {
5479
- "size": props2.iconSize,
5480
- "name": props2.loadingIcon,
5481
- "class": bem$$("loading-icon"),
5482
- "classPrefix": props2.iconPrefix
5483
- }, null);
5484
- };
5485
- var renderErrorIcon = () => {
5486
- if (slots.error) {
5487
- return slots.error();
5182
+ var renderIcon = (name2, className, slot) => {
5183
+ if (slot) {
5184
+ return slot();
5488
5185
  }
5489
5186
  return vue.createVNode(Icon, {
5187
+ "name": name2,
5490
5188
  "size": props2.iconSize,
5491
- "name": props2.errorIcon,
5492
- "class": bem$$("error-icon"),
5189
+ "class": className,
5493
5190
  "classPrefix": props2.iconPrefix
5494
5191
  }, null);
5495
5192
  };
5496
5193
  var renderPlaceholder = () => {
5497
5194
  if (loading.value && props2.showLoading) {
5498
5195
  return vue.createVNode("div", {
5499
- "class": bem$$("loading")
5500
- }, [renderLoadingIcon()]);
5196
+ "class": bem$10("loading")
5197
+ }, [renderIcon(props2.loadingIcon, bem$10("loading-icon"), slots.loading)]);
5501
5198
  }
5502
5199
  if (error.value && props2.showError) {
5503
5200
  return vue.createVNode("div", {
5504
- "class": bem$$("error")
5505
- }, [renderErrorIcon()]);
5201
+ "class": bem$10("error")
5202
+ }, [renderIcon(props2.errorIcon, bem$10("error-icon"), slots.error)]);
5506
5203
  }
5507
5204
  };
5508
5205
  var renderImage = () => {
@@ -5511,7 +5208,7 @@
5511
5208
  }
5512
5209
  var attrs = {
5513
5210
  alt: props2.alt,
5514
- class: bem$$("img"),
5211
+ class: bem$10("img"),
5515
5212
  style: {
5516
5213
  objectFit: props2.fit
5517
5214
  }
@@ -5550,7 +5247,7 @@
5550
5247
  });
5551
5248
  }
5552
5249
  return () => vue.createVNode("div", {
5553
- "class": bem$$({
5250
+ "class": bem$10({
5554
5251
  round: props2.round
5555
5252
  }),
5556
5253
  "style": style.value
@@ -5558,9 +5255,9 @@
5558
5255
  }
5559
5256
  });
5560
5257
  var Image$1 = withInstall(_Image);
5561
- var [name$$, bem$_] = createNamespace("card");
5258
+ var [name$10, bem$$] = createNamespace("card");
5562
5259
  var _Card = vue.defineComponent({
5563
- name: name$$,
5260
+ name: name$10,
5564
5261
  props: {
5565
5262
  tag: String,
5566
5263
  num: numericProp,
@@ -5585,14 +5282,14 @@
5585
5282
  }
5586
5283
  if (props2.title) {
5587
5284
  return vue.createVNode("div", {
5588
- "class": [bem$_("title"), "van-multi-ellipsis--l2"]
5285
+ "class": [bem$$("title"), "van-multi-ellipsis--l2"]
5589
5286
  }, [props2.title]);
5590
5287
  }
5591
5288
  };
5592
5289
  var renderThumbTag = () => {
5593
5290
  if (slots.tag || props2.tag) {
5594
5291
  return vue.createVNode("div", {
5595
- "class": bem$_("tag")
5292
+ "class": bem$$("tag")
5596
5293
  }, [slots.tag ? slots.tag() : vue.createVNode(Tag, {
5597
5294
  "mark": true,
5598
5295
  "type": "danger"
@@ -5617,7 +5314,7 @@
5617
5314
  if (slots.thumb || props2.thumb) {
5618
5315
  return vue.createVNode("a", {
5619
5316
  "href": props2.thumbLink,
5620
- "class": bem$_("thumb"),
5317
+ "class": bem$$("thumb"),
5621
5318
  "onClick": (event) => emit("click-thumb", event)
5622
5319
  }, [renderThumbImage(), renderThumbTag()]);
5623
5320
  }
@@ -5628,18 +5325,18 @@
5628
5325
  }
5629
5326
  if (props2.desc) {
5630
5327
  return vue.createVNode("div", {
5631
- "class": [bem$_("desc"), "van-ellipsis"]
5328
+ "class": [bem$$("desc"), "van-ellipsis"]
5632
5329
  }, [props2.desc]);
5633
5330
  }
5634
5331
  };
5635
5332
  var renderPriceText = () => {
5636
5333
  var priceArr = props2.price.toString().split(".");
5637
5334
  return vue.createVNode("div", null, [vue.createVNode("span", {
5638
- "class": bem$_("price-currency")
5335
+ "class": bem$$("price-currency")
5639
5336
  }, [props2.currency]), vue.createVNode("span", {
5640
- "class": bem$_("price-integer")
5337
+ "class": bem$$("price-integer")
5641
5338
  }, [priceArr[0]]), vue.createTextVNode("."), vue.createVNode("span", {
5642
- "class": bem$_("price-decimal")
5339
+ "class": bem$$("price-decimal")
5643
5340
  }, [priceArr[1]])]);
5644
5341
  };
5645
5342
  return () => {
@@ -5649,26 +5346,26 @@
5649
5346
  var showOriginPrice = slots["origin-price"] || isDef(props2.originPrice);
5650
5347
  var showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
5651
5348
  var Price = showPrice && vue.createVNode("div", {
5652
- "class": bem$_("price")
5349
+ "class": bem$$("price")
5653
5350
  }, [slots.price ? slots.price() : renderPriceText()]);
5654
5351
  var OriginPrice = showOriginPrice && vue.createVNode("div", {
5655
- "class": bem$_("origin-price")
5352
+ "class": bem$$("origin-price")
5656
5353
  }, [slots["origin-price"] ? slots["origin-price"]() : props2.currency + " " + props2.originPrice]);
5657
5354
  var Num = showNum && vue.createVNode("div", {
5658
- "class": bem$_("num")
5355
+ "class": bem$$("num")
5659
5356
  }, [slots.num ? slots.num() : "x" + props2.num]);
5660
5357
  var Footer = slots.footer && vue.createVNode("div", {
5661
- "class": bem$_("footer")
5358
+ "class": bem$$("footer")
5662
5359
  }, [slots.footer()]);
5663
5360
  var Bottom = showBottom && vue.createVNode("div", {
5664
- "class": bem$_("bottom")
5361
+ "class": bem$$("bottom")
5665
5362
  }, [(_slots$priceTop = slots["price-top"]) == null ? void 0 : _slots$priceTop.call(slots), Price, OriginPrice, Num, slots.bottom == null ? void 0 : slots.bottom()]);
5666
5363
  return vue.createVNode("div", {
5667
- "class": bem$_()
5364
+ "class": bem$$()
5668
5365
  }, [vue.createVNode("div", {
5669
- "class": bem$_("header")
5366
+ "class": bem$$("header")
5670
5367
  }, [renderThumb(), vue.createVNode("div", {
5671
- "class": bem$_("content", {
5368
+ "class": bem$$("content", {
5672
5369
  centered: props2.centered
5673
5370
  })
5674
5371
  }, [vue.createVNode("div", null, [renderTitle(), renderDesc(), slots.tags == null ? void 0 : slots.tags()]), Bottom])]), Footer]);
@@ -5730,9 +5427,9 @@
5730
5427
  vue.onBeforeUnmount(unobserve);
5731
5428
  onMountedOrActivated(observe);
5732
5429
  }
5733
- var [name$_, bem$Z] = createNamespace("sticky");
5430
+ var [name$$, bem$_] = createNamespace("sticky");
5734
5431
  var _Sticky = vue.defineComponent({
5735
- name: name$_,
5432
+ name: name$$,
5736
5433
  props: {
5737
5434
  zIndex: numericProp,
5738
5435
  position: makeStringProp("top"),
@@ -5830,7 +5527,7 @@
5830
5527
  "ref": root,
5831
5528
  "style": rootStyle.value
5832
5529
  }, [vue.createVNode("div", {
5833
- "class": bem$Z({
5530
+ "class": bem$_({
5834
5531
  fixed: state.fixed
5835
5532
  }),
5836
5533
  "style": stickyStyle.value
@@ -5838,9 +5535,9 @@
5838
5535
  }
5839
5536
  });
5840
5537
  var Sticky = withInstall(_Sticky);
5841
- var [name$Z, bem$Y] = createNamespace("tab");
5538
+ var [name$_, bem$Z] = createNamespace("tab");
5842
5539
  var TabsTitle = vue.defineComponent({
5843
- name: name$Z,
5540
+ name: name$_,
5844
5541
  props: {
5845
5542
  dot: Boolean,
5846
5543
  type: String,
@@ -5885,7 +5582,7 @@
5885
5582
  });
5886
5583
  var renderText = () => {
5887
5584
  var Text = vue.createVNode("span", {
5888
- "class": bem$Y("text", {
5585
+ "class": bem$Z("text", {
5889
5586
  ellipsis: !props2.scrollable
5890
5587
  })
5891
5588
  }, [props2.renderTitle ? props2.renderTitle() : props2.title]);
@@ -5902,7 +5599,7 @@
5902
5599
  };
5903
5600
  return () => vue.createVNode("div", {
5904
5601
  "role": "tab",
5905
- "class": [bem$Y({
5602
+ "class": [bem$Z({
5906
5603
  active: props2.isActive,
5907
5604
  disabled: props2.disabled
5908
5605
  })],
@@ -5911,8 +5608,8 @@
5911
5608
  }, [renderText()]);
5912
5609
  }
5913
5610
  });
5914
- var [name$Y, bem$X] = createNamespace("swipe");
5915
- var props$k = {
5611
+ var [name$Z, bem$Y] = createNamespace("swipe");
5612
+ var props$l = {
5916
5613
  loop: truthProp,
5917
5614
  width: numericProp,
5918
5615
  height: numericProp,
@@ -5926,10 +5623,10 @@
5926
5623
  showIndicators: truthProp,
5927
5624
  stopPropagation: truthProp
5928
5625
  };
5929
- var SWIPE_KEY = Symbol(name$Y);
5626
+ var SWIPE_KEY = Symbol(name$Z);
5930
5627
  var _Swipe = vue.defineComponent({
5931
- name: name$Y,
5932
- props: props$k,
5628
+ name: name$Z,
5629
+ props: props$l,
5933
5630
  emits: ["change"],
5934
5631
  setup(props2, {
5935
5632
  emit,
@@ -6180,7 +5877,7 @@
6180
5877
  } : void 0;
6181
5878
  return vue.createVNode("i", {
6182
5879
  "style": style,
6183
- "class": bem$X("indicator", {
5880
+ "class": bem$Y("indicator", {
6184
5881
  active
6185
5882
  })
6186
5883
  }, null);
@@ -6193,7 +5890,7 @@
6193
5890
  }
6194
5891
  if (props2.showIndicators && count.value > 1) {
6195
5892
  return vue.createVNode("div", {
6196
- "class": bem$X("indicators", {
5893
+ "class": bem$Y("indicators", {
6197
5894
  vertical: props2.vertical
6198
5895
  })
6199
5896
  }, [Array(count.value).fill("").map(renderDot)]);
@@ -6230,10 +5927,10 @@
6230
5927
  vue.onBeforeUnmount(stopAutoplay);
6231
5928
  return () => vue.createVNode("div", {
6232
5929
  "ref": root,
6233
- "class": bem$X()
5930
+ "class": bem$Y()
6234
5931
  }, [vue.createVNode("div", {
6235
5932
  "style": trackStyle.value,
6236
- "class": bem$X("track", {
5933
+ "class": bem$Y("track", {
6237
5934
  vertical: props2.vertical
6238
5935
  }),
6239
5936
  "onTouchstart": onTouchStart,
@@ -6244,9 +5941,9 @@
6244
5941
  }
6245
5942
  });
6246
5943
  var Swipe = withInstall(_Swipe);
6247
- var [name$X, bem$W] = createNamespace("tabs");
5944
+ var [name$Y, bem$X] = createNamespace("tabs");
6248
5945
  var TabsContent = vue.defineComponent({
6249
- name: name$X,
5946
+ name: name$Y,
6250
5947
  props: {
6251
5948
  count: makeRequiredProp(Number),
6252
5949
  inited: Boolean,
@@ -6269,7 +5966,7 @@
6269
5966
  return vue.createVNode(Swipe, {
6270
5967
  "ref": swipeRef,
6271
5968
  "loop": false,
6272
- "class": bem$W("track"),
5969
+ "class": bem$X("track"),
6273
5970
  "duration": +props2.duration * 1e3,
6274
5971
  "touchable": props2.swipeable,
6275
5972
  "lazyRender": props2.lazyRender,
@@ -6294,14 +5991,14 @@
6294
5991
  swipeToCurrentTab(props2.currentIndex);
6295
5992
  });
6296
5993
  return () => vue.createVNode("div", {
6297
- "class": bem$W("content", {
5994
+ "class": bem$X("content", {
6298
5995
  animated: props2.animated || props2.swipeable
6299
5996
  })
6300
5997
  }, [renderChildren()]);
6301
5998
  }
6302
5999
  });
6303
- var [name$W, bem$V] = createNamespace("tabs");
6304
- var props$j = {
6000
+ var [name$X, bem$W] = createNamespace("tabs");
6001
+ var props$k = {
6305
6002
  type: makeStringProp("line"),
6306
6003
  color: String,
6307
6004
  border: Boolean,
@@ -6322,10 +6019,10 @@
6322
6019
  titleActiveColor: String,
6323
6020
  titleInactiveColor: String
6324
6021
  };
6325
- var TABS_KEY = Symbol(name$W);
6022
+ var TABS_KEY = Symbol(name$X);
6326
6023
  var _Tabs = vue.defineComponent({
6327
- name: name$W,
6328
- props: props$j,
6024
+ name: name$X,
6025
+ props: props$k,
6329
6026
  emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active"],
6330
6027
  setup(props2, {
6331
6028
  emit,
@@ -6468,8 +6165,7 @@
6468
6165
  if (disabled) {
6469
6166
  emit("disabled", name2, title);
6470
6167
  } else {
6471
- callInterceptor({
6472
- interceptor: props2.beforeChange,
6168
+ callInterceptor(props2.beforeChange, {
6473
6169
  args: [name2],
6474
6170
  done: () => {
6475
6171
  setCurrentIndex(index2);
@@ -6518,9 +6214,7 @@
6518
6214
  "renderTitle": item.$slots.title,
6519
6215
  "activeColor": props2.titleActiveColor,
6520
6216
  "inactiveColor": props2.titleInactiveColor,
6521
- "onClick": (event) => {
6522
- onClickTab(item, index2, event);
6523
- }
6217
+ "onClick": (event) => onClickTab(item, index2, event)
6524
6218
  }, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])), null));
6525
6219
  var renderHeader = () => {
6526
6220
  var _slots$navLeft, _slots$navRight;
@@ -6530,7 +6224,7 @@
6530
6224
  } = props2;
6531
6225
  return vue.createVNode("div", {
6532
6226
  "ref": wrapRef,
6533
- "class": [bem$V("wrap", {
6227
+ "class": [bem$W("wrap", {
6534
6228
  scrollable: scrollable.value
6535
6229
  }), {
6536
6230
  [BORDER_TOP_BOTTOM]: type === "line" && border
@@ -6538,12 +6232,12 @@
6538
6232
  }, [vue.createVNode("div", {
6539
6233
  "ref": navRef,
6540
6234
  "role": "tablist",
6541
- "class": bem$V("nav", [type, {
6235
+ "class": bem$W("nav", [type, {
6542
6236
  complete: scrollable.value
6543
6237
  }]),
6544
6238
  "style": navStyle.value
6545
6239
  }, [(_slots$navLeft = slots["nav-left"]) == null ? void 0 : _slots$navLeft.call(slots), renderNav(), type === "line" && vue.createVNode("div", {
6546
- "class": bem$V("line"),
6240
+ "class": bem$W("line"),
6547
6241
  "style": state.lineStyle
6548
6242
  }, null), (_slots$navRight = slots["nav-right"]) == null ? void 0 : _slots$navRight.call(slots)])]);
6549
6243
  };
@@ -6601,7 +6295,7 @@
6601
6295
  var _slots$navBottom, _slots$navBottom2;
6602
6296
  return vue.createVNode("div", {
6603
6297
  "ref": root,
6604
- "class": bem$V([props2.type])
6298
+ "class": bem$W([props2.type])
6605
6299
  }, [props2.sticky ? vue.createVNode(Sticky, {
6606
6300
  "container": root.value,
6607
6301
  "offsetTop": offsetTopPx.value,
@@ -6625,9 +6319,9 @@
6625
6319
  });
6626
6320
  var TAB_STATUS_KEY = Symbol();
6627
6321
  var useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
6628
- var [name$V, bem$U] = createNamespace("swipe-item");
6322
+ var [name$W, bem$V] = createNamespace("swipe-item");
6629
6323
  var _SwipeItem = vue.defineComponent({
6630
- name: name$V,
6324
+ name: name$W,
6631
6325
  setup(props2, {
6632
6326
  slots
6633
6327
  }) {
@@ -6687,15 +6381,15 @@
6687
6381
  setOffset
6688
6382
  });
6689
6383
  return () => vue.createVNode("div", {
6690
- "class": bem$U(),
6384
+ "class": bem$V(),
6691
6385
  "style": style.value
6692
6386
  }, [shouldRender.value ? slots.default == null ? void 0 : slots.default() : null]);
6693
6387
  }
6694
6388
  });
6695
6389
  var SwipeItem = withInstall(_SwipeItem);
6696
- var [name$U, bem$T] = createNamespace("tab");
6390
+ var [name$V, bem$U] = createNamespace("tab");
6697
6391
  var _Tab = vue.defineComponent({
6698
- name: name$U,
6392
+ name: name$V,
6699
6393
  props: extend({}, routeProps, {
6700
6394
  dot: Boolean,
6701
6395
  name: numericProp,
@@ -6756,12 +6450,12 @@
6756
6450
  return vue.createVNode(SwipeItem, {
6757
6451
  "role": "tabpanel",
6758
6452
  "aria-hidden": !active.value,
6759
- "class": bem$T("pane-wrapper", {
6453
+ "class": bem$U("pane-wrapper", {
6760
6454
  inactive: !active.value
6761
6455
  })
6762
6456
  }, {
6763
6457
  default: () => [vue.createVNode("div", {
6764
- "class": bem$T("pane")
6458
+ "class": bem$U("pane")
6765
6459
  }, [slots.default == null ? void 0 : slots.default()])]
6766
6460
  });
6767
6461
  }
@@ -6769,36 +6463,35 @@
6769
6463
  var Content = shouldRender ? slots.default == null ? void 0 : slots.default() : null;
6770
6464
  return vue.withDirectives(vue.createVNode("div", {
6771
6465
  "role": "tabpanel",
6772
- "class": bem$T("pane")
6466
+ "class": bem$U("pane")
6773
6467
  }, [Content]), [[vue.vShow, show]]);
6774
6468
  };
6775
6469
  }
6776
6470
  });
6777
6471
  var Tab = withInstall(_Tab);
6778
6472
  var Tabs = withInstall(_Tabs);
6779
- var [name$T, bem$S, t$c] = createNamespace("cascader");
6473
+ var [name$U, bem$T, t$d] = createNamespace("cascader");
6474
+ var props$j = {
6475
+ title: String,
6476
+ options: makeArrayProp(),
6477
+ closeable: truthProp,
6478
+ swipeable: truthProp,
6479
+ closeIcon: makeStringProp("cross"),
6480
+ modelValue: numericProp,
6481
+ fieldNames: Object,
6482
+ placeholder: String,
6483
+ activeColor: String
6484
+ };
6780
6485
  var _Cascader = vue.defineComponent({
6781
- name: name$T,
6782
- props: {
6783
- title: String,
6784
- options: makeArrayProp(),
6785
- closeable: truthProp,
6786
- swipeable: truthProp,
6787
- closeIcon: makeStringProp("cross"),
6788
- modelValue: numericProp,
6789
- fieldNames: Object,
6790
- placeholder: String,
6791
- activeColor: String
6792
- },
6793
- emits: ["close", "change", "finish", "update:modelValue", "click-tab"],
6486
+ name: name$U,
6487
+ props: props$j,
6488
+ emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
6794
6489
  setup(props2, {
6795
6490
  slots,
6796
6491
  emit
6797
6492
  }) {
6798
- var state = vue.reactive({
6799
- tabs: [],
6800
- activeTab: 0
6801
- });
6493
+ var tabs = vue.ref([]);
6494
+ var activeTab = vue.ref(0);
6802
6495
  var {
6803
6496
  text: textKey,
6804
6497
  value: valueKey,
@@ -6809,8 +6502,7 @@
6809
6502
  children: "children"
6810
6503
  }, props2.fieldNames);
6811
6504
  var getSelectedOptionsByValue = (options, value) => {
6812
- for (var i = 0; i < options.length; i++) {
6813
- var option = options[i];
6505
+ for (var option of options) {
6814
6506
  if (option[valueKey] === value) {
6815
6507
  return [option];
6816
6508
  }
@@ -6823,11 +6515,15 @@
6823
6515
  }
6824
6516
  };
6825
6517
  var updateTabs = () => {
6826
- if (props2.modelValue || props2.modelValue === 0) {
6827
- var selectedOptions = getSelectedOptionsByValue(props2.options, props2.modelValue);
6518
+ var {
6519
+ options,
6520
+ modelValue
6521
+ } = props2;
6522
+ if (modelValue !== void 0) {
6523
+ var selectedOptions = getSelectedOptionsByValue(options, modelValue);
6828
6524
  if (selectedOptions) {
6829
- var optionsCursor = props2.options;
6830
- state.tabs = selectedOptions.map((option) => {
6525
+ var optionsCursor = options;
6526
+ tabs.value = selectedOptions.map((option) => {
6831
6527
  var tab = {
6832
6528
  options: optionsCursor,
6833
6529
  selected: option
@@ -6839,19 +6535,19 @@
6839
6535
  return tab;
6840
6536
  });
6841
6537
  if (optionsCursor) {
6842
- state.tabs.push({
6538
+ tabs.value.push({
6843
6539
  options: optionsCursor,
6844
6540
  selected: null
6845
6541
  });
6846
6542
  }
6847
6543
  vue.nextTick(() => {
6848
- state.activeTab = state.tabs.length - 1;
6544
+ activeTab.value = tabs.value.length - 1;
6849
6545
  });
6850
6546
  return;
6851
6547
  }
6852
6548
  }
6853
- state.tabs = [{
6854
- options: props2.options,
6549
+ tabs.value = [{
6550
+ options,
6855
6551
  selected: null
6856
6552
  }];
6857
6553
  };
@@ -6859,34 +6555,34 @@
6859
6555
  if (option.disabled) {
6860
6556
  return;
6861
6557
  }
6862
- state.tabs[tabIndex].selected = option;
6863
- if (state.tabs.length > tabIndex + 1) {
6864
- state.tabs = state.tabs.slice(0, tabIndex + 1);
6558
+ tabs.value[tabIndex].selected = option;
6559
+ if (tabs.value.length > tabIndex + 1) {
6560
+ tabs.value = tabs.value.slice(0, tabIndex + 1);
6865
6561
  }
6866
6562
  if (option[childrenKey]) {
6867
6563
  var nextTab = {
6868
6564
  options: option[childrenKey],
6869
6565
  selected: null
6870
6566
  };
6871
- if (state.tabs[tabIndex + 1]) {
6872
- state.tabs[tabIndex + 1] = nextTab;
6567
+ if (tabs.value[tabIndex + 1]) {
6568
+ tabs.value[tabIndex + 1] = nextTab;
6873
6569
  } else {
6874
- state.tabs.push(nextTab);
6570
+ tabs.value.push(nextTab);
6875
6571
  }
6876
6572
  vue.nextTick(() => {
6877
- state.activeTab++;
6573
+ activeTab.value++;
6878
6574
  });
6879
6575
  }
6880
- var selectedOptions = state.tabs.map((tab) => tab.selected).filter(Boolean);
6881
- var eventParams = {
6576
+ var selectedOptions = tabs.value.map((tab) => tab.selected).filter(Boolean);
6577
+ emit("update:modelValue", option[valueKey]);
6578
+ var params = {
6882
6579
  value: option[valueKey],
6883
6580
  tabIndex,
6884
6581
  selectedOptions
6885
6582
  };
6886
- emit("update:modelValue", option[valueKey]);
6887
- emit("change", eventParams);
6583
+ emit("change", params);
6888
6584
  if (!option[childrenKey]) {
6889
- emit("finish", eventParams);
6585
+ emit("finish", params);
6890
6586
  }
6891
6587
  };
6892
6588
  var onClose = () => emit("close");
@@ -6895,12 +6591,12 @@
6895
6591
  title
6896
6592
  }) => emit("click-tab", name2, title);
6897
6593
  var renderHeader = () => vue.createVNode("div", {
6898
- "class": bem$S("header")
6594
+ "class": bem$T("header")
6899
6595
  }, [vue.createVNode("h2", {
6900
- "class": bem$S("title")
6596
+ "class": bem$T("title")
6901
6597
  }, [slots.title ? slots.title() : props2.title]), props2.closeable ? vue.createVNode(Icon, {
6902
6598
  "name": props2.closeIcon,
6903
- "class": bem$S("close-icon"),
6599
+ "class": bem$T("close-icon"),
6904
6600
  "onClick": onClose
6905
6601
  }, null) : null]);
6906
6602
  var renderOption = (option, selectedOption, tabIndex) => {
@@ -6911,7 +6607,7 @@
6911
6607
  selected
6912
6608
  }) : vue.createVNode("span", null, [option[textKey]]);
6913
6609
  return vue.createVNode("li", {
6914
- "class": [bem$S("option", {
6610
+ "class": [bem$T("option", {
6915
6611
  selected,
6916
6612
  disabled: option.disabled
6917
6613
  }), option.className],
@@ -6921,21 +6617,22 @@
6921
6617
  "onClick": () => onSelect(option, tabIndex)
6922
6618
  }, [Text, selected ? vue.createVNode(Icon, {
6923
6619
  "name": "success",
6924
- "class": bem$S("selected-icon")
6620
+ "class": bem$T("selected-icon")
6925
6621
  }, null) : null]);
6926
6622
  };
6927
6623
  var renderOptions = (options, selectedOption, tabIndex) => vue.createVNode("ul", {
6928
- "class": bem$S("options")
6624
+ "class": bem$T("options")
6929
6625
  }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
6930
6626
  var renderTab = (tab, tabIndex) => {
6931
6627
  var {
6932
6628
  options,
6933
6629
  selected
6934
6630
  } = tab;
6935
- var title = selected ? selected[textKey] : props2.placeholder || t$c("select");
6631
+ var placeholder = props2.placeholder || t$d("select");
6632
+ var title = selected ? selected[textKey] : placeholder;
6936
6633
  return vue.createVNode(Tab, {
6937
6634
  "title": title,
6938
- "titleClass": bem$S("tab", {
6635
+ "titleClass": bem$T("tab", {
6939
6636
  unselected: !selected
6940
6637
  })
6941
6638
  }, {
@@ -6943,24 +6640,24 @@
6943
6640
  });
6944
6641
  };
6945
6642
  var renderTabs = () => vue.createVNode(Tabs, {
6946
- "active": state.activeTab,
6947
- "onUpdate:active": ($event) => state.activeTab = $event,
6643
+ "active": activeTab.value,
6644
+ "onUpdate:active": ($event) => activeTab.value = $event,
6948
6645
  "animated": true,
6949
- "class": bem$S("tabs"),
6646
+ "class": bem$T("tabs"),
6950
6647
  "color": props2.activeColor,
6951
6648
  "swipeThreshold": 0,
6952
6649
  "swipeable": props2.swipeable,
6953
6650
  "onClick-tab": onClickTab
6954
6651
  }, {
6955
- default: () => [state.tabs.map(renderTab)]
6652
+ default: () => [tabs.value.map(renderTab)]
6956
6653
  });
6957
6654
  updateTabs();
6958
6655
  vue.watch(() => props2.options, updateTabs, {
6959
6656
  deep: true
6960
6657
  });
6961
6658
  vue.watch(() => props2.modelValue, (value) => {
6962
- if (value || value === 0) {
6963
- var values = state.tabs.map((tab) => {
6659
+ if (value !== void 0) {
6660
+ var values = tabs.value.map((tab) => {
6964
6661
  var _tab$selected;
6965
6662
  return (_tab$selected = tab.selected) == null ? void 0 : _tab$selected[valueKey];
6966
6663
  });
@@ -6971,14 +6668,14 @@
6971
6668
  updateTabs();
6972
6669
  });
6973
6670
  return () => vue.createVNode("div", {
6974
- "class": bem$S()
6671
+ "class": bem$T()
6975
6672
  }, [renderHeader(), renderTabs()]);
6976
6673
  }
6977
6674
  });
6978
6675
  var Cascader = withInstall(_Cascader);
6979
- var [name$S, bem$R] = createNamespace("cell-group");
6676
+ var [name$T, bem$S] = createNamespace("cell-group");
6980
6677
  var _CellGroup = vue.defineComponent({
6981
- name: name$S,
6678
+ name: name$T,
6982
6679
  inheritAttrs: false,
6983
6680
  props: {
6984
6681
  title: String,
@@ -6990,14 +6687,14 @@
6990
6687
  attrs
6991
6688
  }) {
6992
6689
  var renderGroup = () => vue.createVNode("div", vue.mergeProps({
6993
- "class": [bem$R({
6690
+ "class": [bem$S({
6994
6691
  inset: props2.inset
6995
6692
  }), {
6996
6693
  [BORDER_TOP_BOTTOM]: props2.border && !props2.inset
6997
6694
  }]
6998
6695
  }, attrs), [slots.default == null ? void 0 : slots.default()]);
6999
6696
  var renderTitle = () => vue.createVNode("div", {
7000
- "class": bem$R("title", {
6697
+ "class": bem$S("title", {
7001
6698
  inset: props2.inset
7002
6699
  })
7003
6700
  }, [slots.title ? slots.title() : props2.title]);
@@ -7010,7 +6707,7 @@
7010
6707
  }
7011
6708
  });
7012
6709
  var CellGroup = withInstall(_CellGroup);
7013
- var [name$R, bem$Q] = createNamespace("checkbox-group");
6710
+ var [name$S, bem$R] = createNamespace("checkbox-group");
7014
6711
  var props$i = {
7015
6712
  max: numericProp,
7016
6713
  disabled: Boolean,
@@ -7019,9 +6716,9 @@
7019
6716
  modelValue: makeArrayProp(),
7020
6717
  checkedColor: String
7021
6718
  };
7022
- var CHECKBOX_GROUP_KEY = Symbol(name$R);
6719
+ var CHECKBOX_GROUP_KEY = Symbol(name$S);
7023
6720
  var _CheckboxGroup = vue.defineComponent({
7024
- name: name$R,
6721
+ name: name$S,
7025
6722
  props: props$i,
7026
6723
  emits: ["change", "update:modelValue"],
7027
6724
  setup(props2, {
@@ -7065,16 +6762,16 @@
7065
6762
  updateValue
7066
6763
  });
7067
6764
  return () => vue.createVNode("div", {
7068
- "class": bem$Q([props2.direction])
6765
+ "class": bem$R([props2.direction])
7069
6766
  }, [slots.default == null ? void 0 : slots.default()]);
7070
6767
  }
7071
6768
  });
7072
- var [name$Q, bem$P] = createNamespace("checkbox");
6769
+ var [name$R, bem$Q] = createNamespace("checkbox");
7073
6770
  var props$h = extend({}, checkerProps, {
7074
6771
  bindGroup: truthProp
7075
6772
  });
7076
6773
  var _Checkbox = vue.defineComponent({
7077
- name: name$Q,
6774
+ name: name$R,
7078
6775
  props: props$h,
7079
6776
  emits: ["change", "update:modelValue"],
7080
6777
  setup(props2, {
@@ -7132,7 +6829,7 @@
7132
6829
  });
7133
6830
  useCustomFieldValue(() => props2.modelValue);
7134
6831
  return () => vue.createVNode(Checker, vue.mergeProps({
7135
- "bem": bem$P,
6832
+ "bem": bem$Q,
7136
6833
  "role": "checkbox",
7137
6834
  "parent": parent,
7138
6835
  "checked": checked.value,
@@ -7142,7 +6839,7 @@
7142
6839
  });
7143
6840
  var Checkbox = withInstall(_Checkbox);
7144
6841
  var CheckboxGroup = withInstall(_CheckboxGroup);
7145
- var [name$P, bem$O] = createNamespace("circle");
6842
+ var [name$Q, bem$P] = createNamespace("circle");
7146
6843
  var uid = 0;
7147
6844
  var format = (rate) => Math.min(Math.max(+rate, 0), 100);
7148
6845
  function getPath(clockwise, viewBoxSize) {
@@ -7150,7 +6847,7 @@
7150
6847
  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";
7151
6848
  }
7152
6849
  var _Circle = vue.defineComponent({
7153
- name: name$P,
6850
+ name: name$Q,
7154
6851
  props: {
7155
6852
  text: String,
7156
6853
  size: numericProp,
@@ -7231,7 +6928,7 @@
7231
6928
  return vue.createVNode("path", {
7232
6929
  "d": path.value,
7233
6930
  "style": style,
7234
- "class": bem$O("hover"),
6931
+ "class": bem$P("hover"),
7235
6932
  "stroke": color
7236
6933
  }, null);
7237
6934
  };
@@ -7242,7 +6939,7 @@
7242
6939
  strokeWidth: props2.strokeWidth + "px"
7243
6940
  };
7244
6941
  return vue.createVNode("path", {
7245
- "class": bem$O("layer"),
6942
+ "class": bem$P("layer"),
7246
6943
  "style": style,
7247
6944
  "d": path.value
7248
6945
  }, null);
@@ -7273,12 +6970,12 @@
7273
6970
  }
7274
6971
  if (props2.text) {
7275
6972
  return vue.createVNode("div", {
7276
- "class": bem$O("text")
6973
+ "class": bem$P("text")
7277
6974
  }, [props2.text]);
7278
6975
  }
7279
6976
  };
7280
6977
  return () => vue.createVNode("div", {
7281
- "class": bem$O(),
6978
+ "class": bem$P(),
7282
6979
  "style": getSizeStyle(props2.size)
7283
6980
  }, [vue.createVNode("svg", {
7284
6981
  "viewBox": "0 0 " + viewBoxSize.value + " " + viewBoxSize.value,
@@ -7287,10 +6984,10 @@
7287
6984
  }
7288
6985
  });
7289
6986
  var Circle = withInstall(_Circle);
7290
- var [name$O, bem$N] = createNamespace("row");
7291
- var ROW_KEY = Symbol(name$O);
6987
+ var [name$P, bem$O] = createNamespace("row");
6988
+ var ROW_KEY = Symbol(name$P);
7292
6989
  var _Row = vue.defineComponent({
7293
- name: name$O,
6990
+ name: name$P,
7294
6991
  props: {
7295
6992
  tag: makeStringProp("div"),
7296
6993
  wrap: truthProp,
@@ -7355,7 +7052,7 @@
7355
7052
  justify
7356
7053
  } = props2;
7357
7054
  return vue.createVNode(tag, {
7358
- "class": bem$N({
7055
+ "class": bem$O({
7359
7056
  ["align-" + align]: align,
7360
7057
  ["justify-" + justify]: justify,
7361
7058
  nowrap: !wrap
@@ -7366,9 +7063,9 @@
7366
7063
  };
7367
7064
  }
7368
7065
  });
7369
- var [name$N, bem$M] = createNamespace("col");
7066
+ var [name$O, bem$N] = createNamespace("col");
7370
7067
  var _Col = vue.defineComponent({
7371
- name: name$N,
7068
+ name: name$O,
7372
7069
  props: {
7373
7070
  tag: makeStringProp("div"),
7374
7071
  span: makeNumericProp(0),
@@ -7407,7 +7104,7 @@
7407
7104
  } = props2;
7408
7105
  return vue.createVNode(tag, {
7409
7106
  "style": style.value,
7410
- "class": bem$M({
7107
+ "class": bem$N({
7411
7108
  [span]: span,
7412
7109
  ["offset-" + offset2]: offset2
7413
7110
  })
@@ -7418,10 +7115,10 @@
7418
7115
  }
7419
7116
  });
7420
7117
  var Col = withInstall(_Col);
7421
- var [name$M, bem$L] = createNamespace("collapse");
7422
- var COLLAPSE_KEY = Symbol(name$M);
7118
+ var [name$N, bem$M] = createNamespace("collapse");
7119
+ var COLLAPSE_KEY = Symbol(name$N);
7423
7120
  var _Collapse = vue.defineComponent({
7424
- name: name$M,
7121
+ name: name$N,
7425
7122
  props: {
7426
7123
  border: truthProp,
7427
7124
  accordion: Boolean,
@@ -7467,14 +7164,14 @@
7467
7164
  isExpanded
7468
7165
  });
7469
7166
  return () => vue.createVNode("div", {
7470
- "class": [bem$L(), {
7167
+ "class": [bem$M(), {
7471
7168
  [BORDER_TOP_BOTTOM]: props2.border
7472
7169
  }]
7473
7170
  }, [slots.default == null ? void 0 : slots.default()]);
7474
7171
  }
7475
7172
  });
7476
7173
  var Collapse = withInstall(_Collapse);
7477
- var [name$L, bem$K] = createNamespace("collapse-item");
7174
+ var [name$M, bem$L] = createNamespace("collapse-item");
7478
7175
  var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
7479
7176
  var props$g = extend({}, cellProps, {
7480
7177
  name: numericProp,
@@ -7483,7 +7180,7 @@
7483
7180
  readonly: Boolean
7484
7181
  });
7485
7182
  var _CollapseItem = vue.defineComponent({
7486
- name: name$L,
7183
+ name: name$M,
7487
7184
  props: props$g,
7488
7185
  setup(props2, {
7489
7186
  slots
@@ -7562,7 +7259,7 @@
7562
7259
  }
7563
7260
  return vue.createVNode(Cell, vue.mergeProps({
7564
7261
  "role": "button",
7565
- "class": bem$K("title", {
7262
+ "class": bem$L("title", {
7566
7263
  disabled,
7567
7264
  expanded: expanded.value,
7568
7265
  borderless: !border
@@ -7573,17 +7270,17 @@
7573
7270
  };
7574
7271
  var renderContent = lazyRender(() => vue.withDirectives(vue.createVNode("div", {
7575
7272
  "ref": wrapperRef,
7576
- "class": bem$K("wrapper"),
7273
+ "class": bem$L("wrapper"),
7577
7274
  "onTransitionend": onTransitionEnd
7578
7275
  }, [vue.createVNode("div", {
7579
7276
  "ref": contentRef,
7580
- "class": bem$K("content")
7277
+ "class": bem$L("content")
7581
7278
  }, [slots.default == null ? void 0 : slots.default()])]), [[vue.vShow, show.value]]));
7582
7279
  useExpose({
7583
7280
  toggle
7584
7281
  });
7585
7282
  return () => vue.createVNode("div", {
7586
- "class": [bem$K({
7283
+ "class": [bem$L({
7587
7284
  border: index2.value && props2.border
7588
7285
  })]
7589
7286
  }, [renderTitle(), renderContent()]);
@@ -7591,9 +7288,9 @@
7591
7288
  });
7592
7289
  var CollapseItem = withInstall(_CollapseItem);
7593
7290
  var ConfigProvider = withInstall(_ConfigProvider);
7594
- var [name$K, bem$J, t$b] = createNamespace("contact-card");
7291
+ var [name$L, bem$K, t$c] = createNamespace("contact-card");
7595
7292
  var _ContactCard = vue.defineComponent({
7596
- name: name$K,
7293
+ name: name$L,
7597
7294
  props: {
7598
7295
  tel: String,
7599
7296
  name: String,
@@ -7612,17 +7309,17 @@
7612
7309
  };
7613
7310
  var renderContent = () => {
7614
7311
  if (props2.type === "add") {
7615
- return props2.addText || t$b("addText");
7312
+ return props2.addText || t$c("addText");
7616
7313
  }
7617
- return [vue.createVNode("div", null, [t$b("name") + "\uFF1A" + props2.name]), vue.createVNode("div", null, [t$b("tel") + "\uFF1A" + props2.tel])];
7314
+ return [vue.createVNode("div", null, [t$c("name") + "\uFF1A" + props2.name]), vue.createVNode("div", null, [t$c("tel") + "\uFF1A" + props2.tel])];
7618
7315
  };
7619
7316
  return () => vue.createVNode(Cell, {
7620
7317
  "center": true,
7621
7318
  "icon": props2.type === "edit" ? "contact" : "add-square",
7622
- "class": bem$J([props2.type]),
7319
+ "class": bem$K([props2.type]),
7623
7320
  "border": false,
7624
7321
  "isLink": props2.editable,
7625
- "valueClass": bem$J("value"),
7322
+ "valueClass": bem$K("value"),
7626
7323
  "onClick": onClick
7627
7324
  }, {
7628
7325
  value: renderContent
@@ -7630,7 +7327,7 @@
7630
7327
  }
7631
7328
  });
7632
7329
  var ContactCard = withInstall(_ContactCard);
7633
- var [name$J, bem$I] = createNamespace("form");
7330
+ var [name$K, bem$J] = createNamespace("form");
7634
7331
  var props$f = {
7635
7332
  colon: Boolean,
7636
7333
  disabled: Boolean,
@@ -7647,7 +7344,7 @@
7647
7344
  errorMessageAlign: String
7648
7345
  };
7649
7346
  var _Form = vue.defineComponent({
7650
- name: name$J,
7347
+ name: name$K,
7651
7348
  props: props$f,
7652
7349
  emits: ["submit", "failed"],
7653
7350
  setup(props2, {
@@ -7763,19 +7460,19 @@
7763
7460
  resetValidation
7764
7461
  });
7765
7462
  return () => vue.createVNode("form", {
7766
- "class": bem$I(),
7463
+ "class": bem$J(),
7767
7464
  "onSubmit": onSubmit
7768
7465
  }, [slots.default == null ? void 0 : slots.default()]);
7769
7466
  }
7770
7467
  });
7771
7468
  var Form = withInstall(_Form);
7772
- var [name$I, bem$H, t$a] = createNamespace("contact-edit");
7469
+ var [name$J, bem$I, t$b] = createNamespace("contact-edit");
7773
7470
  var DEFAULT_CONTACT = {
7774
7471
  tel: "",
7775
7472
  name: ""
7776
7473
  };
7777
7474
  var _ContactEdit = vue.defineComponent({
7778
- name: name$I,
7475
+ name: name$J,
7779
7476
  props: {
7780
7477
  isEdit: Boolean,
7781
7478
  isSaving: Boolean,
@@ -7801,24 +7498,22 @@
7801
7498
  emit("save", contact);
7802
7499
  }
7803
7500
  };
7804
- var onDelete = () => Dialog.confirm({
7805
- title: t$a("confirmDelete")
7806
- }).then(() => emit("delete", contact));
7501
+ var onDelete = () => emit("delete", contact);
7807
7502
  var renderButtons = () => vue.createVNode("div", {
7808
- "class": bem$H("buttons")
7503
+ "class": bem$I("buttons")
7809
7504
  }, [vue.createVNode(Button, {
7810
7505
  "block": true,
7811
7506
  "round": true,
7812
7507
  "type": "danger",
7813
- "text": t$a("save"),
7814
- "class": bem$H("button"),
7508
+ "text": t$b("save"),
7509
+ "class": bem$I("button"),
7815
7510
  "loading": props2.isSaving,
7816
7511
  "nativeType": "submit"
7817
7512
  }, null), props2.isEdit && vue.createVNode(Button, {
7818
7513
  "block": true,
7819
7514
  "round": true,
7820
- "text": t$a("delete"),
7821
- "class": bem$H("button"),
7515
+ "text": t$b("delete"),
7516
+ "class": bem$I("button"),
7822
7517
  "loading": props2.isDeleting,
7823
7518
  "onClick": onDelete
7824
7519
  }, null)]);
@@ -7832,7 +7527,7 @@
7832
7527
  if (props2.showSetDefault) {
7833
7528
  return vue.createVNode(Cell, {
7834
7529
  "title": props2.setDefaultLabel,
7835
- "class": bem$H("switch-cell"),
7530
+ "class": bem$I("switch-cell"),
7836
7531
  "border": false
7837
7532
  }, {
7838
7533
  "right-icon": renderSwitch
@@ -7841,41 +7536,41 @@
7841
7536
  };
7842
7537
  vue.watch(() => props2.contactInfo, (value) => extend(contact, DEFAULT_CONTACT, value));
7843
7538
  return () => vue.createVNode(Form, {
7844
- "class": bem$H(),
7539
+ "class": bem$I(),
7845
7540
  "onSubmit": onSave
7846
7541
  }, {
7847
7542
  default: () => [vue.createVNode("div", {
7848
- "class": bem$H("fields")
7543
+ "class": bem$I("fields")
7849
7544
  }, [vue.createVNode(Field, {
7850
7545
  "modelValue": contact.name,
7851
7546
  "onUpdate:modelValue": ($event) => contact.name = $event,
7852
7547
  "clearable": true,
7853
- "label": t$a("name"),
7548
+ "label": t$b("name"),
7854
7549
  "rules": [{
7855
7550
  required: true,
7856
- message: t$a("nameEmpty")
7551
+ message: t$b("nameEmpty")
7857
7552
  }],
7858
7553
  "maxlength": "30",
7859
- "placeholder": t$a("name")
7554
+ "placeholder": t$b("name")
7860
7555
  }, null), vue.createVNode(Field, {
7861
7556
  "modelValue": contact.tel,
7862
7557
  "onUpdate:modelValue": ($event) => contact.tel = $event,
7863
7558
  "clearable": true,
7864
7559
  "type": "tel",
7865
- "label": t$a("tel"),
7560
+ "label": t$b("tel"),
7866
7561
  "rules": [{
7867
7562
  validator: props2.telValidator,
7868
- message: t$a("telInvalid")
7563
+ message: t$b("telInvalid")
7869
7564
  }],
7870
- "placeholder": t$a("tel")
7565
+ "placeholder": t$b("tel")
7871
7566
  }, null)]), renderSetDefault(), renderButtons()]
7872
7567
  });
7873
7568
  }
7874
7569
  });
7875
7570
  var ContactEdit = withInstall(_ContactEdit);
7876
- var [name$H, bem$G, t$9] = createNamespace("contact-list");
7571
+ var [name$I, bem$H, t$a] = createNamespace("contact-list");
7877
7572
  var _ContactList = vue.defineComponent({
7878
- name: name$H,
7573
+ name: name$I,
7879
7574
  props: {
7880
7575
  list: Array,
7881
7576
  addText: String,
@@ -7892,13 +7587,13 @@
7892
7587
  emit("select", item, index2);
7893
7588
  };
7894
7589
  var renderRightIcon = () => vue.createVNode(Radio, {
7895
- "class": bem$G("radio"),
7590
+ "class": bem$H("radio"),
7896
7591
  "name": item.id,
7897
7592
  "iconSize": 16
7898
7593
  }, null);
7899
7594
  var renderEditIcon = () => vue.createVNode(Icon, {
7900
7595
  "name": "edit",
7901
- "class": bem$G("edit"),
7596
+ "class": bem$H("edit"),
7902
7597
  "onClick": (event) => {
7903
7598
  event.stopPropagation();
7904
7599
  emit("edit", item, index2);
@@ -7910,7 +7605,7 @@
7910
7605
  nodes.push(vue.createVNode(Tag, {
7911
7606
  "type": "danger",
7912
7607
  "round": true,
7913
- "class": bem$G("item-tag")
7608
+ "class": bem$H("item-tag")
7914
7609
  }, {
7915
7610
  default: () => [props2.defaultTagText]
7916
7611
  }));
@@ -7921,8 +7616,8 @@
7921
7616
  "key": item.id,
7922
7617
  "isLink": true,
7923
7618
  "center": true,
7924
- "class": bem$G("item"),
7925
- "valueClass": bem$G("item-value"),
7619
+ "class": bem$H("item"),
7620
+ "valueClass": bem$H("item-value"),
7926
7621
  "onClick": onClick
7927
7622
  }, {
7928
7623
  icon: renderEditIcon,
@@ -7931,20 +7626,20 @@
7931
7626
  });
7932
7627
  };
7933
7628
  return () => vue.createVNode("div", {
7934
- "class": bem$G()
7629
+ "class": bem$H()
7935
7630
  }, [vue.createVNode(RadioGroup, {
7936
7631
  "modelValue": props2.modelValue,
7937
- "class": bem$G("group")
7632
+ "class": bem$H("group")
7938
7633
  }, {
7939
7634
  default: () => [props2.list && props2.list.map(renderItem)]
7940
7635
  }), vue.createVNode("div", {
7941
- "class": [bem$G("bottom"), "van-safe-area-bottom"]
7636
+ "class": [bem$H("bottom"), "van-safe-area-bottom"]
7942
7637
  }, [vue.createVNode(Button, {
7943
7638
  "round": true,
7944
7639
  "block": true,
7945
7640
  "type": "danger",
7946
- "class": bem$G("add"),
7947
- "text": props2.addText || t$9("addText"),
7641
+ "class": bem$H("add"),
7642
+ "text": props2.addText || t$a("addText"),
7948
7643
  "onClick": () => emit("add")
7949
7644
  }, null)])]);
7950
7645
  }
@@ -7992,7 +7687,7 @@
7992
7687
  }
7993
7688
  return format2;
7994
7689
  }
7995
- var [name$G, bem$F] = createNamespace("count-down");
7690
+ var [name$H, bem$G] = createNamespace("count-down");
7996
7691
  var props$e = {
7997
7692
  time: makeNumericProp(0),
7998
7693
  format: makeStringProp("HH:mm:ss"),
@@ -8000,7 +7695,7 @@
8000
7695
  millisecond: Boolean
8001
7696
  };
8002
7697
  var _CountDown = vue.defineComponent({
8003
- name: name$G,
7698
+ name: name$H,
8004
7699
  props: props$e,
8005
7700
  emits: ["change", "finish"],
8006
7701
  setup(props2, {
@@ -8034,12 +7729,12 @@
8034
7729
  reset: resetTime
8035
7730
  });
8036
7731
  return () => vue.createVNode("div", {
8037
- "class": bem$F()
7732
+ "class": bem$G()
8038
7733
  }, [slots.default ? slots.default(current.value) : timeText.value]);
8039
7734
  }
8040
7735
  });
8041
7736
  var CountDown = withInstall(_CountDown);
8042
- var [name$F, bem$E, t$8] = createNamespace("coupon");
7737
+ var [name$G, bem$F, t$9] = createNamespace("coupon");
8043
7738
  function getDate(timeStamp) {
8044
7739
  var date = new Date(timeStamp * 1e3);
8045
7740
  return date.getFullYear() + "." + padZero(date.getMonth() + 1) + "." + padZero(date.getDate());
@@ -8047,7 +7742,7 @@
8047
7742
  var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
8048
7743
  var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
8049
7744
  var _Coupon = vue.defineComponent({
8050
- name: name$F,
7745
+ name: name$G,
8051
7746
  props: {
8052
7747
  chosen: Boolean,
8053
7748
  coupon: makeRequiredProp(Object),
@@ -8075,13 +7770,13 @@
8075
7770
  return [vue.createVNode("span", null, [currency]), " " + denominations];
8076
7771
  }
8077
7772
  if (coupon.discount) {
8078
- return t$8("discount", formatDiscount(coupon.discount));
7773
+ return t$9("discount", formatDiscount(coupon.discount));
8079
7774
  }
8080
7775
  return "";
8081
7776
  });
8082
7777
  var conditionMessage = vue.computed(() => {
8083
7778
  var condition = formatAmount(props2.coupon.originCondition || 0);
8084
- return condition === "0" ? t$8("unlimited") : t$8("condition", condition);
7779
+ return condition === "0" ? t$9("unlimited") : t$9("condition", condition);
8085
7780
  });
8086
7781
  return () => {
8087
7782
  var {
@@ -8091,34 +7786,34 @@
8091
7786
  } = props2;
8092
7787
  var description = disabled && coupon.reason || coupon.description;
8093
7788
  return vue.createVNode("div", {
8094
- "class": bem$E({
7789
+ "class": bem$F({
8095
7790
  disabled
8096
7791
  })
8097
7792
  }, [vue.createVNode("div", {
8098
- "class": bem$E("content")
7793
+ "class": bem$F("content")
8099
7794
  }, [vue.createVNode("div", {
8100
- "class": bem$E("head")
7795
+ "class": bem$F("head")
8101
7796
  }, [vue.createVNode("h2", {
8102
- "class": bem$E("amount")
7797
+ "class": bem$F("amount")
8103
7798
  }, [faceAmount.value]), vue.createVNode("p", {
8104
- "class": bem$E("condition")
7799
+ "class": bem$F("condition")
8105
7800
  }, [coupon.condition || conditionMessage.value])]), vue.createVNode("div", {
8106
- "class": bem$E("body")
7801
+ "class": bem$F("body")
8107
7802
  }, [vue.createVNode("p", {
8108
- "class": bem$E("name")
7803
+ "class": bem$F("name")
8109
7804
  }, [coupon.name]), vue.createVNode("p", {
8110
- "class": bem$E("valid")
7805
+ "class": bem$F("valid")
8111
7806
  }, [validPeriod.value]), !disabled && vue.createVNode(Checkbox, {
8112
- "class": bem$E("corner"),
7807
+ "class": bem$F("corner"),
8113
7808
  "modelValue": chosen
8114
7809
  }, null)])]), description && vue.createVNode("p", {
8115
- "class": bem$E("description")
7810
+ "class": bem$F("description")
8116
7811
  }, [description])]);
8117
7812
  };
8118
7813
  }
8119
7814
  });
8120
7815
  var Coupon = withInstall(_Coupon);
8121
- var [name$E, bem$D, t$7] = createNamespace("coupon-cell");
7816
+ var [name$F, bem$E, t$8] = createNamespace("coupon-cell");
8122
7817
  function formatValue(coupons, chosenCoupon, currency) {
8123
7818
  var coupon = coupons[+chosenCoupon];
8124
7819
  if (coupon) {
@@ -8132,10 +7827,10 @@
8132
7827
  }
8133
7828
  return "-" + currency + " " + (value / 100).toFixed(2);
8134
7829
  }
8135
- return coupons.length === 0 ? t$7("noCoupon") : t$7("count", coupons.length);
7830
+ return coupons.length === 0 ? t$8("noCoupon") : t$8("count", coupons.length);
8136
7831
  }
8137
7832
  var _CouponCell = vue.defineComponent({
8138
- name: name$E,
7833
+ name: name$F,
8139
7834
  props: {
8140
7835
  title: String,
8141
7836
  border: truthProp,
@@ -8149,12 +7844,12 @@
8149
7844
  var selected = props2.coupons[+props2.chosenCoupon];
8150
7845
  var value = formatValue(props2.coupons, props2.chosenCoupon, props2.currency);
8151
7846
  return vue.createVNode(Cell, {
8152
- "class": bem$D(),
7847
+ "class": bem$E(),
8153
7848
  "value": value,
8154
- "title": props2.title || t$7("title"),
7849
+ "title": props2.title || t$8("title"),
8155
7850
  "border": props2.border,
8156
7851
  "isLink": props2.editable,
8157
- "valueClass": bem$D("value", {
7852
+ "valueClass": bem$E("value", {
8158
7853
  selected
8159
7854
  })
8160
7855
  }, null);
@@ -8162,10 +7857,10 @@
8162
7857
  }
8163
7858
  });
8164
7859
  var CouponCell = withInstall(_CouponCell);
8165
- var [name$D, bem$C, t$6] = createNamespace("coupon-list");
7860
+ var [name$E, bem$D, t$7] = createNamespace("coupon-list");
8166
7861
  var EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
8167
7862
  var _CouponList = vue.defineComponent({
8168
- name: name$D,
7863
+ name: name$E,
8169
7864
  props: {
8170
7865
  code: makeStringProp(""),
8171
7866
  coupons: makeArrayProp(),
@@ -8211,27 +7906,27 @@
8211
7906
  });
8212
7907
  };
8213
7908
  var renderEmpty = () => vue.createVNode("div", {
8214
- "class": bem$C("empty")
7909
+ "class": bem$D("empty")
8215
7910
  }, [vue.createVNode("img", {
8216
7911
  "src": props2.emptyImage
8217
- }, null), vue.createVNode("p", null, [t$6("noCoupon")])]);
7912
+ }, null), vue.createVNode("p", null, [t$7("noCoupon")])]);
8218
7913
  var renderExchangeBar = () => {
8219
7914
  if (props2.showExchangeBar) {
8220
7915
  return vue.createVNode("div", {
8221
- "class": bem$C("exchange-bar")
7916
+ "class": bem$D("exchange-bar")
8222
7917
  }, [vue.createVNode(Field, {
8223
7918
  "modelValue": state.code,
8224
7919
  "onUpdate:modelValue": ($event) => state.code = $event,
8225
7920
  "clearable": true,
8226
7921
  "border": false,
8227
- "class": bem$C("field"),
8228
- "placeholder": props2.inputPlaceholder || t$6("placeholder"),
7922
+ "class": bem$D("field"),
7923
+ "placeholder": props2.inputPlaceholder || t$7("placeholder"),
8229
7924
  "maxlength": "20"
8230
7925
  }, null), vue.createVNode(Button, {
8231
7926
  "plain": true,
8232
7927
  "type": "danger",
8233
- "class": bem$C("exchange"),
8234
- "text": props2.exchangeButtonText || t$6("exchange"),
7928
+ "class": bem$D("exchange"),
7929
+ "text": props2.exchangeButtonText || t$7("exchange"),
8235
7930
  "loading": props2.exchangeButtonLoading,
8236
7931
  "disabled": buttonDisabled.value,
8237
7932
  "onClick": onExchange
@@ -8244,12 +7939,12 @@
8244
7939
  coupons
8245
7940
  } = props2;
8246
7941
  var count = props2.showCount ? " (" + coupons.length + ")" : "";
8247
- var title = (props2.enabledTitle || t$6("enable")) + count;
7942
+ var title = (props2.enabledTitle || t$7("enable")) + count;
8248
7943
  return vue.createVNode(Tab, {
8249
7944
  "title": title
8250
7945
  }, {
8251
7946
  default: () => [vue.createVNode("div", {
8252
- "class": bem$C("list", {
7947
+ "class": bem$D("list", {
8253
7948
  "with-bar": props2.showExchangeBar,
8254
7949
  "with-bottom": props2.showCloseButton
8255
7950
  })
@@ -8269,12 +7964,12 @@
8269
7964
  disabledCoupons
8270
7965
  } = props2;
8271
7966
  var count = props2.showCount ? " (" + disabledCoupons.length + ")" : "";
8272
- var title = (props2.disabledTitle || t$6("disabled")) + count;
7967
+ var title = (props2.disabledTitle || t$7("disabled")) + count;
8273
7968
  return vue.createVNode(Tab, {
8274
7969
  "title": title
8275
7970
  }, {
8276
7971
  default: () => [vue.createVNode("div", {
8277
- "class": bem$C("list", {
7972
+ "class": bem$D("list", {
8278
7973
  "with-bar": props2.showExchangeBar,
8279
7974
  "with-bottom": props2.showCloseButton
8280
7975
  })
@@ -8295,30 +7990,30 @@
8295
7990
  scrollToCoupon(props2.displayedCouponIndex);
8296
7991
  });
8297
7992
  return () => vue.createVNode("div", {
8298
- "class": bem$C()
7993
+ "class": bem$D()
8299
7994
  }, [renderExchangeBar(), vue.createVNode(Tabs, {
8300
7995
  "active": state.tab,
8301
7996
  "onUpdate:active": ($event) => state.tab = $event,
8302
- "class": bem$C("tab"),
7997
+ "class": bem$D("tab"),
8303
7998
  "border": false
8304
7999
  }, {
8305
8000
  default: () => [renderCouponTab(), renderDisabledTab()]
8306
8001
  }), vue.createVNode("div", {
8307
- "class": bem$C("bottom")
8002
+ "class": bem$D("bottom")
8308
8003
  }, [vue.withDirectives(vue.createVNode(Button, {
8309
8004
  "round": true,
8310
8005
  "block": true,
8311
8006
  "type": "danger",
8312
- "class": bem$C("close"),
8313
- "text": props2.closeButtonText || t$6("close"),
8007
+ "class": bem$D("close"),
8008
+ "text": props2.closeButtonText || t$7("close"),
8314
8009
  "onClick": () => emit("change", -1)
8315
8010
  }, null), [[vue.vShow, props2.showCloseButton]])])]);
8316
8011
  }
8317
8012
  });
8318
8013
  var CouponList = withInstall(_CouponList);
8319
- var [name$C] = createNamespace("time-picker");
8014
+ var [name$D] = createNamespace("time-picker");
8320
8015
  var TimePicker = vue.defineComponent({
8321
- name: name$C,
8016
+ name: name$D,
8322
8017
  props: extend({}, sharedProps, {
8323
8018
  minHour: makeNumericProp(0),
8324
8019
  maxHour: makeNumericProp(23),
@@ -8425,9 +8120,9 @@
8425
8120
  }
8426
8121
  });
8427
8122
  var currentYear = new Date().getFullYear();
8428
- var [name$B] = createNamespace("date-picker");
8123
+ var [name$C] = createNamespace("date-picker");
8429
8124
  var DatePicker = vue.defineComponent({
8430
- name: name$B,
8125
+ name: name$C,
8431
8126
  props: extend({}, sharedProps, {
8432
8127
  type: makeStringProp("datetime"),
8433
8128
  modelValue: Date,
@@ -8622,81 +8317,341 @@
8622
8317
  hour = getValue("hour");
8623
8318
  minute = getValue("minute");
8624
8319
  }
8625
- var value = new Date(year, month - 1, day, hour, minute);
8626
- currentDate.value = formatValue2(value);
8627
- };
8628
- var onConfirm = () => {
8629
- emit("update:modelValue", currentDate.value);
8630
- emit("confirm", currentDate.value);
8320
+ var value = new Date(year, month - 1, day, hour, minute);
8321
+ currentDate.value = formatValue2(value);
8322
+ };
8323
+ var onConfirm = () => {
8324
+ emit("update:modelValue", currentDate.value);
8325
+ emit("confirm", currentDate.value);
8326
+ };
8327
+ var onCancel = () => emit("cancel");
8328
+ var onChange = () => {
8329
+ updateInnerValue();
8330
+ vue.nextTick(() => {
8331
+ vue.nextTick(() => emit("change", currentDate.value));
8332
+ });
8333
+ };
8334
+ vue.onMounted(() => {
8335
+ updateColumnValue();
8336
+ vue.nextTick(updateInnerValue);
8337
+ });
8338
+ vue.watch(columns, updateColumnValue);
8339
+ vue.watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8340
+ vue.watch(() => [props2.filter, props2.maxDate], updateInnerValue);
8341
+ vue.watch(() => props2.minDate, () => {
8342
+ vue.nextTick(updateInnerValue);
8343
+ });
8344
+ vue.watch(() => props2.modelValue, (value) => {
8345
+ var _currentDate$value;
8346
+ value = formatValue2(value);
8347
+ if (value && value.valueOf() !== ((_currentDate$value = currentDate.value) == null ? void 0 : _currentDate$value.valueOf())) {
8348
+ currentDate.value = value;
8349
+ }
8350
+ });
8351
+ useExpose({
8352
+ getPicker: () => picker.value
8353
+ });
8354
+ return () => vue.createVNode(Picker, vue.mergeProps({
8355
+ "ref": picker,
8356
+ "columns": columns.value,
8357
+ "onChange": onChange,
8358
+ "onCancel": onCancel,
8359
+ "onConfirm": onConfirm
8360
+ }, pick(props2, pickerKeys)), slots);
8361
+ }
8362
+ });
8363
+ var [name$B, bem$C] = createNamespace("datetime-picker");
8364
+ var timePickerProps = Object.keys(TimePicker.props);
8365
+ var datePickerProps = Object.keys(DatePicker.props);
8366
+ var props$d = extend({}, TimePicker.props, DatePicker.props, {
8367
+ modelValue: [String, Date]
8368
+ });
8369
+ var _DatetimePicker = vue.defineComponent({
8370
+ name: name$B,
8371
+ props: props$d,
8372
+ setup(props2, {
8373
+ attrs,
8374
+ slots
8375
+ }) {
8376
+ var root = vue.ref();
8377
+ useExpose({
8378
+ getPicker: () => {
8379
+ var _root$value;
8380
+ return (_root$value = root.value) == null ? void 0 : _root$value.getPicker();
8381
+ }
8382
+ });
8383
+ return () => {
8384
+ var isTimePicker = props2.type === "time";
8385
+ var Component = isTimePicker ? TimePicker : DatePicker;
8386
+ var inheritProps = pick(props2, isTimePicker ? timePickerProps : datePickerProps);
8387
+ return vue.createVNode(Component, vue.mergeProps({
8388
+ "ref": root,
8389
+ "class": bem$C()
8390
+ }, inheritProps, attrs), slots);
8391
+ };
8392
+ }
8393
+ });
8394
+ var DatetimePicker = withInstall(_DatetimePicker);
8395
+ var [name$A, bem$B, t$6] = createNamespace("dialog");
8396
+ var popupKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
8397
+ var VanDialog = vue.defineComponent({
8398
+ name: name$A,
8399
+ props: extend({}, popupSharedProps, {
8400
+ title: String,
8401
+ theme: String,
8402
+ width: numericProp,
8403
+ message: [String, Function],
8404
+ callback: Function,
8405
+ allowHtml: Boolean,
8406
+ className: unknownProp,
8407
+ transition: makeStringProp("van-dialog-bounce"),
8408
+ messageAlign: String,
8409
+ closeOnPopstate: truthProp,
8410
+ showCancelButton: Boolean,
8411
+ cancelButtonText: String,
8412
+ cancelButtonColor: String,
8413
+ confirmButtonText: String,
8414
+ confirmButtonColor: String,
8415
+ showConfirmButton: truthProp,
8416
+ closeOnClickOverlay: Boolean
8417
+ }),
8418
+ emits: ["confirm", "cancel", "update:show"],
8419
+ setup(props2, {
8420
+ emit,
8421
+ slots
8422
+ }) {
8423
+ var loading = vue.reactive({
8424
+ confirm: false,
8425
+ cancel: false
8426
+ });
8427
+ var updateShow = (value) => emit("update:show", value);
8428
+ var close = (action) => {
8429
+ updateShow(false);
8430
+ props2.callback == null ? void 0 : props2.callback(action);
8431
+ };
8432
+ var getActionHandler = (action) => () => {
8433
+ if (!props2.show) {
8434
+ return;
8435
+ }
8436
+ emit(action);
8437
+ if (props2.beforeClose) {
8438
+ loading[action] = true;
8439
+ callInterceptor(props2.beforeClose, {
8440
+ args: [action],
8441
+ done() {
8442
+ close(action);
8443
+ loading[action] = false;
8444
+ },
8445
+ canceled() {
8446
+ loading[action] = false;
8447
+ }
8448
+ });
8449
+ } else {
8450
+ close(action);
8451
+ }
8452
+ };
8453
+ var onCancel = getActionHandler("cancel");
8454
+ var onConfirm = getActionHandler("confirm");
8455
+ var renderTitle = () => {
8456
+ var title = slots.title ? slots.title() : props2.title;
8457
+ if (title) {
8458
+ return vue.createVNode("div", {
8459
+ "class": bem$B("header", {
8460
+ isolated: !props2.message && !slots.default
8461
+ })
8462
+ }, [title]);
8463
+ }
8631
8464
  };
8632
- var onCancel = () => emit("cancel");
8633
- var onChange = () => {
8634
- updateInnerValue();
8635
- vue.nextTick(() => {
8636
- vue.nextTick(() => emit("change", currentDate.value));
8465
+ var renderMessage = (hasTitle) => {
8466
+ var {
8467
+ message,
8468
+ allowHtml,
8469
+ messageAlign
8470
+ } = props2;
8471
+ var classNames = bem$B("message", {
8472
+ "has-title": hasTitle,
8473
+ [messageAlign]: messageAlign
8637
8474
  });
8475
+ var content = isFunction(message) ? message() : message;
8476
+ if (allowHtml && typeof content === "string") {
8477
+ return vue.createVNode("div", {
8478
+ "class": classNames,
8479
+ "innerHTML": content
8480
+ }, null);
8481
+ }
8482
+ return vue.createVNode("div", {
8483
+ "class": classNames
8484
+ }, [content]);
8638
8485
  };
8639
- vue.onMounted(() => {
8640
- updateColumnValue();
8641
- vue.nextTick(updateInnerValue);
8642
- });
8643
- vue.watch(columns, updateColumnValue);
8644
- vue.watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8645
- vue.watch(() => [props2.filter, props2.maxDate], updateInnerValue);
8646
- vue.watch(() => props2.minDate, () => {
8647
- vue.nextTick(updateInnerValue);
8648
- });
8649
- vue.watch(() => props2.modelValue, (value) => {
8650
- var _currentDate$value;
8651
- value = formatValue2(value);
8652
- if (value && value.valueOf() !== ((_currentDate$value = currentDate.value) == null ? void 0 : _currentDate$value.valueOf())) {
8653
- currentDate.value = value;
8486
+ var renderContent = () => {
8487
+ if (slots.default) {
8488
+ return vue.createVNode("div", {
8489
+ "class": bem$B("content")
8490
+ }, [slots.default()]);
8654
8491
  }
8655
- });
8656
- useExpose({
8657
- getPicker: () => picker.value
8658
- });
8659
- return () => vue.createVNode(Picker, vue.mergeProps({
8660
- "ref": picker,
8661
- "columns": columns.value,
8662
- "onChange": onChange,
8663
- "onCancel": onCancel,
8664
- "onConfirm": onConfirm
8665
- }, pick(props2, pickerKeys)), slots);
8666
- }
8667
- });
8668
- var [name$A, bem$B] = createNamespace("datetime-picker");
8669
- var timePickerProps = Object.keys(TimePicker.props);
8670
- var datePickerProps = Object.keys(DatePicker.props);
8671
- var props$d = extend({}, TimePicker.props, DatePicker.props, {
8672
- modelValue: [String, Date]
8673
- });
8674
- var _DatetimePicker = vue.defineComponent({
8675
- name: name$A,
8676
- props: props$d,
8677
- setup(props2, {
8678
- attrs,
8679
- slots
8680
- }) {
8681
- var root = vue.ref();
8682
- useExpose({
8683
- getPicker: () => {
8684
- var _root$value;
8685
- return (_root$value = root.value) == null ? void 0 : _root$value.getPicker();
8492
+ var {
8493
+ title,
8494
+ message,
8495
+ allowHtml
8496
+ } = props2;
8497
+ if (message) {
8498
+ var hasTitle = !!(title || slots.title);
8499
+ return vue.createVNode("div", {
8500
+ "key": allowHtml ? 1 : 0,
8501
+ "class": bem$B("content", {
8502
+ isolated: !hasTitle
8503
+ })
8504
+ }, [renderMessage(hasTitle)]);
8686
8505
  }
8506
+ };
8507
+ var renderButtons = () => vue.createVNode("div", {
8508
+ "class": [BORDER_TOP, bem$B("footer")]
8509
+ }, [props2.showCancelButton && vue.createVNode(Button, {
8510
+ "size": "large",
8511
+ "text": props2.cancelButtonText || t$6("cancel"),
8512
+ "class": bem$B("cancel"),
8513
+ "style": {
8514
+ color: props2.cancelButtonColor
8515
+ },
8516
+ "loading": loading.cancel,
8517
+ "onClick": onCancel
8518
+ }, null), props2.showConfirmButton && vue.createVNode(Button, {
8519
+ "size": "large",
8520
+ "text": props2.confirmButtonText || t$6("confirm"),
8521
+ "class": [bem$B("confirm"), {
8522
+ [BORDER_LEFT]: props2.showCancelButton
8523
+ }],
8524
+ "style": {
8525
+ color: props2.confirmButtonColor
8526
+ },
8527
+ "loading": loading.confirm,
8528
+ "onClick": onConfirm
8529
+ }, null)]);
8530
+ var renderRoundButtons = () => vue.createVNode(ActionBar, {
8531
+ "class": bem$B("footer")
8532
+ }, {
8533
+ default: () => [props2.showCancelButton && vue.createVNode(ActionBarButton, {
8534
+ "type": "warning",
8535
+ "text": props2.cancelButtonText || t$6("cancel"),
8536
+ "class": bem$B("cancel"),
8537
+ "color": props2.cancelButtonColor,
8538
+ "loading": loading.cancel,
8539
+ "onClick": onCancel
8540
+ }, null), props2.showConfirmButton && vue.createVNode(ActionBarButton, {
8541
+ "type": "danger",
8542
+ "text": props2.confirmButtonText || t$6("confirm"),
8543
+ "class": bem$B("confirm"),
8544
+ "color": props2.confirmButtonColor,
8545
+ "loading": loading.confirm,
8546
+ "onClick": onConfirm
8547
+ }, null)]
8687
8548
  });
8549
+ var renderFooter = () => {
8550
+ if (slots.footer) {
8551
+ return slots.footer();
8552
+ }
8553
+ return props2.theme === "round-button" ? renderRoundButtons() : renderButtons();
8554
+ };
8688
8555
  return () => {
8689
- var isTimePicker = props2.type === "time";
8690
- var Component = isTimePicker ? TimePicker : DatePicker;
8691
- var inheritProps = pick(props2, isTimePicker ? timePickerProps : datePickerProps);
8692
- return vue.createVNode(Component, vue.mergeProps({
8693
- "ref": root,
8694
- "class": bem$B()
8695
- }, inheritProps, attrs), slots);
8556
+ var {
8557
+ width,
8558
+ title,
8559
+ theme,
8560
+ message,
8561
+ className
8562
+ } = props2;
8563
+ return vue.createVNode(Popup, vue.mergeProps({
8564
+ "role": "dialog",
8565
+ "class": [bem$B([theme]), className],
8566
+ "style": {
8567
+ width: addUnit(width)
8568
+ },
8569
+ "aria-labelledby": title || message,
8570
+ "onUpdate:show": updateShow
8571
+ }, pick(props2, popupKeys$1)), {
8572
+ default: () => [renderTitle(), renderContent(), renderFooter()]
8573
+ });
8696
8574
  };
8697
8575
  }
8698
8576
  });
8699
- var DatetimePicker = withInstall(_DatetimePicker);
8577
+ var instance$2;
8578
+ function initInstance$2() {
8579
+ var Wrapper = {
8580
+ setup() {
8581
+ var {
8582
+ state,
8583
+ toggle
8584
+ } = usePopupState();
8585
+ return () => vue.createVNode(VanDialog, vue.mergeProps(state, {
8586
+ "onUpdate:show": toggle
8587
+ }), null);
8588
+ }
8589
+ };
8590
+ ({
8591
+ instance: instance$2
8592
+ } = mountComponent(Wrapper));
8593
+ }
8594
+ function Dialog(options) {
8595
+ if (!inBrowser$1) {
8596
+ return Promise.resolve();
8597
+ }
8598
+ return new Promise((resolve, reject) => {
8599
+ if (!instance$2) {
8600
+ initInstance$2();
8601
+ }
8602
+ instance$2.open(extend({}, Dialog.currentOptions, options, {
8603
+ callback: (action) => {
8604
+ (action === "confirm" ? resolve : reject)(action);
8605
+ }
8606
+ }));
8607
+ });
8608
+ }
8609
+ Dialog.defaultOptions = {
8610
+ title: "",
8611
+ width: "",
8612
+ theme: null,
8613
+ message: "",
8614
+ overlay: true,
8615
+ callback: null,
8616
+ teleport: "body",
8617
+ className: "",
8618
+ allowHtml: false,
8619
+ lockScroll: true,
8620
+ transition: void 0,
8621
+ beforeClose: null,
8622
+ overlayClass: "",
8623
+ overlayStyle: void 0,
8624
+ messageAlign: "",
8625
+ cancelButtonText: "",
8626
+ cancelButtonColor: null,
8627
+ confirmButtonText: "",
8628
+ confirmButtonColor: null,
8629
+ showConfirmButton: true,
8630
+ showCancelButton: false,
8631
+ closeOnPopstate: true,
8632
+ closeOnClickOverlay: false
8633
+ };
8634
+ Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8635
+ Dialog.alert = Dialog;
8636
+ Dialog.confirm = (options) => Dialog(extend({
8637
+ showCancelButton: true
8638
+ }, options));
8639
+ Dialog.close = () => {
8640
+ if (instance$2) {
8641
+ instance$2.toggle(false);
8642
+ }
8643
+ };
8644
+ Dialog.setDefaultOptions = (options) => {
8645
+ extend(Dialog.currentOptions, options);
8646
+ };
8647
+ Dialog.resetDefaultOptions = () => {
8648
+ Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8649
+ };
8650
+ Dialog.Component = withInstall(VanDialog);
8651
+ Dialog.install = (app) => {
8652
+ app.use(Dialog.Component);
8653
+ app.config.globalProperties.$dialog = Dialog;
8654
+ };
8700
8655
  var [name$z, bem$A] = createNamespace("divider");
8701
8656
  var _Divider = vue.defineComponent({
8702
8657
  name: name$z,
@@ -9008,40 +8963,24 @@
9008
8963
  "id": prefix + "1",
9009
8964
  "x1": "64.022%",
9010
8965
  "y1": "100%",
9011
- "x2": "64.022%",
9012
- "y2": "0%"
8966
+ "x2": "64.022%"
9013
8967
  }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
9014
8968
  "id": prefix + "2",
9015
8969
  "x1": "50%",
9016
- "y1": "0%",
9017
8970
  "x2": "50%",
9018
8971
  "y2": "84.459%"
9019
8972
  }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
9020
8973
  "id": prefix + "3",
9021
8974
  "x1": "100%",
9022
- "y1": "0%",
9023
8975
  "x2": "100%",
9024
8976
  "y2": "100%"
9025
8977
  }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("linearGradient", {
9026
8978
  "id": prefix + "4",
9027
8979
  "x1": "100%",
9028
8980
  "y1": "100%",
9029
- "x2": "100%",
9030
- "y2": "0%"
9031
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("linearGradient", {
9032
- "id": prefix + "5",
9033
- "x1": "0%",
9034
- "y1": "43.982%",
9035
- "x2": "100%",
9036
- "y2": "54.703%"
9037
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("linearGradient", {
9038
- "id": prefix + "6",
9039
- "x1": "94.535%",
9040
- "y1": "43.837%",
9041
- "x2": "5.465%",
9042
- "y2": "54.948%"
8981
+ "x2": "100%"
9043
8982
  }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
9044
- "id": prefix + "7",
8983
+ "id": prefix + "5",
9045
8984
  "cx": "50%",
9046
8985
  "cy": "0%",
9047
8986
  "fx": "50%",
@@ -9049,8 +8988,7 @@
9049
8988
  "r": "100%",
9050
8989
  "gradientTransform": "matrix(0 1 -.54835 0 .5 -.5)"
9051
8990
  }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
9052
- "fill": "none",
9053
- "fill-rule": "evenodd"
8991
+ "fill": "none"
9054
8992
  }, [vue.createVNode("g", {
9055
8993
  "opacity": ".8"
9056
8994
  }, [vue.createVNode("path", {
@@ -9062,12 +9000,11 @@
9062
9000
  "fill": "url(#" + prefix + "1)",
9063
9001
  "transform": "translate(2 7)"
9064
9002
  }, null)]), vue.createVNode("path", {
9065
- "fill": "url(#" + prefix + "7)",
9003
+ "fill": "url(#" + prefix + "5)",
9066
9004
  "d": "M0 139h160v21H0z"
9067
9005
  }, null), vue.createVNode("path", {
9068
9006
  "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",
9069
9007
  "fill": "url(#" + prefix + "2)",
9070
- "fill-rule": "nonzero",
9071
9008
  "transform": "translate(43 36)"
9072
9009
  }, null), vue.createVNode("g", {
9073
9010
  "opacity": ".6",
@@ -9090,10 +9027,9 @@
9090
9027
  "stroke": "url(#" + prefix + "4)",
9091
9028
  "transform": "rotate(-180 89.791 42.146)"
9092
9029
  }, null)]), vue.createVNode("g", {
9093
- "transform": "translate(31 105)",
9094
- "fill-rule": "nonzero"
9030
+ "transform": "translate(31 105)"
9095
9031
  }, [vue.createVNode("rect", {
9096
- "fill": "url(#" + prefix + "5)",
9032
+ "fill": "#EBEDF0",
9097
9033
  "width": "98",
9098
9034
  "height": "34",
9099
9035
  "rx": "2"
@@ -9105,7 +9041,7 @@
9105
9041
  "height": "18",
9106
9042
  "rx": "1.114"
9107
9043
  }, null), vue.createVNode("rect", {
9108
- "fill": "url(#" + prefix + "6)",
9044
+ "fill": "#EBEDF0",
9109
9045
  "x": "15",
9110
9046
  "y": "12",
9111
9047
  "width": "18",
@@ -9264,7 +9200,7 @@
9264
9200
  "dot": props2.dot,
9265
9201
  "content": props2.badge
9266
9202
  }, {
9267
- default: () => [slots.icon()]
9203
+ default: slots.icon
9268
9204
  });
9269
9205
  }
9270
9206
  if (props2.icon) {
@@ -9561,6 +9497,7 @@
9561
9497
  }
9562
9498
  });
9563
9499
  var [name$t, bem$t] = createNamespace("image-preview");
9500
+ var popupProps$1 = ["show", "transition", "overlayStyle", "closeOnPopstate"];
9564
9501
  var props$9 = {
9565
9502
  show: Boolean,
9566
9503
  loop: truthProp,
@@ -9607,8 +9544,7 @@
9607
9544
  var emitScale = (args) => emit("scale", args);
9608
9545
  var updateShow = (show) => emit("update:show", show);
9609
9546
  var emitClose = () => {
9610
- callInterceptor({
9611
- interceptor: props2.beforeClose,
9547
+ callInterceptor(props2.beforeClose, {
9612
9548
  args: [state.active],
9613
9549
  done: () => updateShow(false)
9614
9550
  });
@@ -9702,10 +9638,9 @@
9702
9638
  return () => vue.createVNode(Popup, vue.mergeProps({
9703
9639
  "class": [bem$t(), props2.className],
9704
9640
  "overlayClass": bem$t("overlay"),
9705
- "onClosed": onClosed
9706
- }, pick(props2, ["show", "transition", "overlayStyle", "closeOnPopstate"]), {
9641
+ "onClosed": onClosed,
9707
9642
  "onUpdate:show": updateShow
9708
- }), {
9643
+ }, pick(props2, popupProps$1)), {
9709
9644
  default: () => [renderClose(), renderImages(), renderIndex(), renderCover()]
9710
9645
  });
9711
9646
  }
@@ -9746,7 +9681,7 @@
9746
9681
  state.images = [];
9747
9682
  };
9748
9683
  return () => vue.createVNode(VanImagePreview, vue.mergeProps(state, {
9749
- onClosed,
9684
+ "onClosed": onClosed,
9750
9685
  "onUpdate:show": toggle
9751
9686
  }), null);
9752
9687
  }
@@ -9821,15 +9756,6 @@
9821
9756
  };
9822
9757
  }
9823
9758
  });
9824
- var getScrollerRect = () => {
9825
- if ("getBoundingClientRect" in scrollParent.value) {
9826
- return useRect(scrollParent);
9827
- }
9828
- return {
9829
- top: 0,
9830
- left: 0
9831
- };
9832
- };
9833
9759
  var getActiveAnchor = (scrollTop, rects) => {
9834
9760
  for (var i = children.length - 1; i >= 0; i--) {
9835
9761
  var prevHeight = i > 0 ? rects[i - 1].height : 0;
@@ -9849,7 +9775,7 @@
9849
9775
  indexList
9850
9776
  } = props2;
9851
9777
  var scrollTop = getScrollTop(scrollParent.value);
9852
- var scrollParentRect = getScrollerRect();
9778
+ var scrollParentRect = useRect(scrollParent);
9853
9779
  var rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
9854
9780
  var active = getActiveAnchor(scrollTop, rects);
9855
9781
  activeAnchor.value = indexList[active];
@@ -11332,9 +11258,12 @@
11332
11258
  background: String,
11333
11259
  lockScroll: Boolean
11334
11260
  }),
11261
+ emits: ["update:show"],
11335
11262
  setup(props2, {
11263
+ emit,
11336
11264
  slots
11337
11265
  }) {
11266
+ var updateShow = (show) => emit("update:show", show);
11338
11267
  return () => vue.createVNode(Popup, {
11339
11268
  "show": props2.show,
11340
11269
  "class": [bem$n([props2.type]), props2.className],
@@ -11345,7 +11274,8 @@
11345
11274
  "overlay": false,
11346
11275
  "position": "top",
11347
11276
  "duration": 0.2,
11348
- "lockScroll": props2.lockScroll
11277
+ "lockScroll": props2.lockScroll,
11278
+ "onUpdate:show": updateShow
11349
11279
  }, {
11350
11280
  default: () => [slots.default ? slots.default() : props2.message]
11351
11281
  });
@@ -12766,10 +12696,9 @@
12766
12696
  "position": "",
12767
12697
  "transition": "van-popover-zoom",
12768
12698
  "lockScroll": false,
12769
- "onTouchstart": onTouchstart
12770
- }, attrs, pick(props2, popupProps), {
12699
+ "onTouchstart": onTouchstart,
12771
12700
  "onUpdate:show": updateShow
12772
- }), {
12701
+ }, attrs, pick(props2, popupProps)), {
12773
12702
  default: () => [props2.showArrow && vue.createVNode("div", {
12774
12703
  "class": bem$i("arrow")
12775
12704
  }, null), vue.createVNode("div", {
@@ -12800,7 +12729,7 @@
12800
12729
  name: name$h,
12801
12730
  props: props$5,
12802
12731
  setup(props2) {
12803
- var background = vue.computed(() => props2.inactive ? "#cacaca" : props2.color);
12732
+ var background = vue.computed(() => props2.inactive ? void 0 : props2.color);
12804
12733
  var renderPivot = () => {
12805
12734
  var {
12806
12735
  textColor,
@@ -12818,7 +12747,9 @@
12818
12747
  };
12819
12748
  return vue.createVNode("span", {
12820
12749
  "style": style,
12821
- "class": bem$h("pivot")
12750
+ "class": bem$h("pivot", {
12751
+ inactive: props2.inactive
12752
+ })
12822
12753
  }, [text]);
12823
12754
  }
12824
12755
  };
@@ -12840,7 +12771,9 @@
12840
12771
  "class": bem$h(),
12841
12772
  "style": rootStyle
12842
12773
  }, [vue.createVNode("span", {
12843
- "class": bem$h("portion"),
12774
+ "class": bem$h("portion", {
12775
+ inactive: props2.inactive
12776
+ }),
12844
12777
  "style": portionStyle
12845
12778
  }, null), renderPivot()]);
12846
12779
  };
@@ -12939,7 +12872,7 @@
12939
12872
  nodes.push(vue.createVNode(Loading, {
12940
12873
  "class": bem$g("loading")
12941
12874
  }, {
12942
- default: () => [getStatusText()]
12875
+ default: getStatusText
12943
12876
  }));
12944
12877
  }
12945
12878
  return nodes;
@@ -13275,10 +13208,9 @@
13275
13208
  "type": "search",
13276
13209
  "class": bem$e("field"),
13277
13210
  "border": false,
13278
- "onKeypress": onKeypress
13279
- }, fieldAttrs, {
13211
+ "onKeypress": onKeypress,
13280
13212
  "onUpdate:modelValue": onInput
13281
- }), pick(slots, ["left-icon", "right-icon"]));
13213
+ }, fieldAttrs), pick(slots, ["left-icon", "right-icon"]));
13282
13214
  };
13283
13215
  useExpose({
13284
13216
  focus,
@@ -13298,7 +13230,7 @@
13298
13230
  });
13299
13231
  var Search = withInstall(_Search);
13300
13232
  var PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
13301
- var popupKeys = [...popupSharedPropKeys, "closeOnPopstate", "safeAreaInsetBottom"];
13233
+ var popupKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
13302
13234
  function getIconURL(icon) {
13303
13235
  if (PRESET_ICONS.includes(icon)) {
13304
13236
  return "https://img.yzcdn.cn/vant/share-sheet-" + icon + ".png";
@@ -13310,6 +13242,7 @@
13310
13242
  name: name$d,
13311
13243
  props: extend({}, popupSharedProps, {
13312
13244
  title: String,
13245
+ round: truthProp,
13313
13246
  options: makeArrayProp(),
13314
13247
  cancelText: String,
13315
13248
  description: String,
@@ -13387,12 +13320,10 @@
13387
13320
  }
13388
13321
  };
13389
13322
  return () => vue.createVNode(Popup, vue.mergeProps({
13390
- "round": true,
13391
13323
  "class": bem$d(),
13392
- "position": "bottom"
13393
- }, pick(props2, popupKeys), {
13324
+ "position": "bottom",
13394
13325
  "onUpdate:show": updateShow
13395
- }), {
13326
+ }, pick(props2, popupKeys)), {
13396
13327
  default: () => [renderHeader(), renderRows(), renderCancelButton()]
13397
13328
  });
13398
13329
  }
@@ -14039,9 +13970,8 @@
14039
13970
  };
14040
13971
  var setValue = (value) => {
14041
13972
  if (props2.beforeChange) {
14042
- callInterceptor({
13973
+ callInterceptor(props2.beforeChange, {
14043
13974
  args: [value],
14044
- interceptor: props2.beforeChange,
14045
13975
  done() {
14046
13976
  current.value = value;
14047
13977
  }
@@ -14382,8 +14312,7 @@
14382
14312
  var onClick = (position = "outside") => {
14383
14313
  emit("click", position);
14384
14314
  if (opened && !lockClick2) {
14385
- callInterceptor({
14386
- interceptor: props2.beforeClose,
14315
+ callInterceptor(props2.beforeClose, {
14387
14316
  args: [{
14388
14317
  name: props2.name,
14389
14318
  position
@@ -14489,8 +14418,7 @@
14489
14418
  };
14490
14419
  var setActive = (active) => {
14491
14420
  if (active !== props2.modelValue) {
14492
- callInterceptor({
14493
- interceptor: props2.beforeChange,
14421
+ callInterceptor(props2.beforeChange, {
14494
14422
  args: [active],
14495
14423
  done() {
14496
14424
  emit("update:modelValue", active);
@@ -14599,7 +14527,7 @@
14599
14527
  "content": badge,
14600
14528
  "class": bem$2("icon")
14601
14529
  }, {
14602
- default: () => [renderIcon()]
14530
+ default: renderIcon
14603
14531
  }), vue.createVNode("div", {
14604
14532
  "class": bem$2("text")
14605
14533
  }, [slots.default == null ? void 0 : slots.default({
@@ -14807,8 +14735,7 @@
14807
14735
  beforeDelete
14808
14736
  } = props2;
14809
14737
  event.stopPropagation();
14810
- callInterceptor({
14811
- interceptor: beforeDelete,
14738
+ callInterceptor(beforeDelete, {
14812
14739
  args: [item, {
14813
14740
  name: name2,
14814
14741
  index: index2
@@ -14855,7 +14782,7 @@
14855
14782
  "lazyLoad": props2.lazyLoad,
14856
14783
  "onClick": onPreview
14857
14784
  }, {
14858
- default: () => [renderCover()]
14785
+ default: renderCover
14859
14786
  });
14860
14787
  }
14861
14788
  return vue.createVNode("div", {
@@ -15102,7 +15029,7 @@
15102
15029
  }
15103
15030
  });
15104
15031
  var Uploader = withInstall(_Uploader);
15105
- var version = "3.2.5";
15032
+ var version = "3.2.6";
15106
15033
  function install(app) {
15107
15034
  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];
15108
15035
  components.forEach((item) => {