vant 3.2.4 → 3.2.5

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 (537) hide show
  1. package/changelog.generated.md +59 -63
  2. package/es/action-bar-icon/ActionBarIcon.js +2 -2
  3. package/es/action-sheet/ActionSheet.d.ts +7 -7
  4. package/es/action-sheet/ActionSheet.js +3 -6
  5. package/es/action-sheet/index.d.ts +7 -7
  6. package/es/address-edit/AddressEdit.d.ts +13 -14
  7. package/es/address-edit/AddressEdit.js +6 -17
  8. package/es/address-edit/AddressEditDetail.js +3 -3
  9. package/es/address-edit/index.d.ts +7 -7
  10. package/es/address-list/AddressList.d.ts +9 -10
  11. package/es/address-list/AddressList.js +5 -11
  12. package/es/address-list/AddressListItem.d.ts +4 -4
  13. package/es/address-list/AddressListItem.js +3 -6
  14. package/es/address-list/index.d.ts +8 -8
  15. package/es/area/Area.d.ts +43 -44
  16. package/es/area/Area.js +4 -12
  17. package/es/area/index.d.ts +27 -27
  18. package/es/badge/Badge.d.ts +7 -7
  19. package/es/badge/Badge.js +5 -8
  20. package/es/badge/index.d.ts +7 -7
  21. package/es/button/Button.d.ts +29 -27
  22. package/es/button/Button.js +7 -22
  23. package/es/button/index.d.ts +27 -27
  24. package/es/calendar/Calendar.d.ts +46 -47
  25. package/es/calendar/Calendar.js +10 -27
  26. package/es/calendar/CalendarDay.d.ts +7 -7
  27. package/es/calendar/CalendarDay.js +4 -10
  28. package/es/calendar/CalendarMonth.d.ts +19 -19
  29. package/es/calendar/CalendarMonth.js +8 -17
  30. package/es/calendar/index.d.ts +28 -28
  31. package/es/calendar/utils.d.ts +2 -2
  32. package/es/calendar/utils.js +1 -3
  33. package/es/card/Card.d.ts +4 -4
  34. package/es/card/Card.js +5 -8
  35. package/es/card/index.d.ts +4 -4
  36. package/es/cascader/Cascader.d.ts +14 -14
  37. package/es/cascader/Cascader.js +17 -23
  38. package/es/cascader/index.d.ts +13 -13
  39. package/es/cell/Cell.js +4 -4
  40. package/es/checkbox/Checkbox.d.ts +9 -9
  41. package/es/checkbox/Checker.d.ts +14 -14
  42. package/es/checkbox/Checker.js +6 -12
  43. package/es/checkbox/index.d.ts +5 -5
  44. package/es/checkbox-group/CheckboxGroup.d.ts +6 -6
  45. package/es/checkbox-group/CheckboxGroup.js +5 -8
  46. package/es/checkbox-group/index.d.ts +4 -4
  47. package/es/circle/Circle.d.ts +22 -22
  48. package/es/circle/Circle.js +9 -29
  49. package/es/circle/index.d.ts +22 -22
  50. package/es/col/Col.d.ts +4 -5
  51. package/es/col/Col.js +4 -10
  52. package/es/col/index.d.ts +3 -3
  53. package/es/collapse-item/CollapseItem.js +2 -2
  54. package/es/composables/use-lock-scroll.js +3 -3
  55. package/es/composables/use-placeholder.d.ts +1 -1
  56. package/es/config-provider/ConfigProvider.d.ts +4 -4
  57. package/es/config-provider/ConfigProvider.js +3 -6
  58. package/es/config-provider/index.d.ts +4 -4
  59. package/es/contact-card/ContactCard.d.ts +5 -6
  60. package/es/contact-card/ContactCard.js +3 -6
  61. package/es/contact-card/index.d.ts +5 -5
  62. package/es/count-down/CountDown.d.ts +14 -14
  63. package/es/count-down/CountDown.js +4 -10
  64. package/es/count-down/index.d.ts +10 -10
  65. package/es/coupon/Coupon.d.ts +3 -3
  66. package/es/coupon/Coupon.js +5 -15
  67. package/es/coupon/index.d.ts +3 -3
  68. package/es/coupon-cell/CouponCell.d.ts +2 -3
  69. package/es/coupon-cell/CouponCell.js +4 -13
  70. package/es/coupon-cell/index.d.ts +1 -1
  71. package/es/coupon-list/CouponList.d.ts +43 -44
  72. package/es/coupon-list/CouponList.js +10 -34
  73. package/es/coupon-list/index.d.ts +43 -43
  74. package/es/datetime-picker/DatePicker.d.ts +23 -25
  75. package/es/datetime-picker/DatePicker.js +2 -5
  76. package/es/datetime-picker/DatetimePicker.d.ts +1 -10
  77. package/es/datetime-picker/TimePicker.d.ts +16 -16
  78. package/es/datetime-picker/TimePicker.js +6 -18
  79. package/es/datetime-picker/index.d.ts +1 -10
  80. package/es/datetime-picker/utils.d.ts +9 -9
  81. package/es/datetime-picker/utils.js +1 -3
  82. package/es/dialog/Dialog.d.ts +6 -6
  83. package/es/dialog/Dialog.js +4 -7
  84. package/es/dialog/function-call.d.ts +6 -6
  85. package/es/divider/Divider.d.ts +2 -3
  86. package/es/divider/Divider.js +2 -5
  87. package/es/divider/index.d.ts +1 -1
  88. package/es/dropdown-item/DropdownItem.d.ts +9 -9
  89. package/es/dropdown-item/DropdownItem.js +3 -6
  90. package/es/dropdown-item/index.d.ts +5 -5
  91. package/es/dropdown-menu/DropdownMenu.d.ts +19 -19
  92. package/es/dropdown-menu/DropdownMenu.js +5 -11
  93. package/es/dropdown-menu/index.d.ts +10 -10
  94. package/es/empty/Empty.d.ts +4 -4
  95. package/es/empty/Empty.js +4 -7
  96. package/es/empty/index.d.ts +4 -4
  97. package/es/field/Field.d.ts +70 -70
  98. package/es/field/Field.js +14 -26
  99. package/es/field/index.d.ts +32 -32
  100. package/es/form/Form.d.ts +11 -11
  101. package/es/form/Form.js +4 -7
  102. package/es/form/index.d.ts +7 -7
  103. package/es/grid/Grid.js +4 -7
  104. package/es/grid-item/GridItem.d.ts +2 -2
  105. package/es/grid-item/GridItem.js +4 -4
  106. package/es/grid-item/index.d.ts +2 -2
  107. package/es/icon/Icon.d.ts +5 -6
  108. package/es/icon/Icon.js +6 -11
  109. package/es/icon/index.d.ts +5 -5
  110. package/es/image/Image.d.ts +10 -10
  111. package/es/image/Image.js +7 -13
  112. package/es/image/index.d.ts +10 -10
  113. package/es/image-preview/ImagePreview.d.ts +52 -52
  114. package/es/image-preview/ImagePreview.js +10 -31
  115. package/es/image-preview/ImagePreviewItem.js +6 -20
  116. package/es/image-preview/function-call.d.ts +31 -31
  117. package/es/index-anchor/IndexAnchor.js +3 -3
  118. package/es/index-bar/IndexBar.js +3 -6
  119. package/es/index.d.ts +1 -1
  120. package/es/index.js +1 -1
  121. package/es/list/List.d.ts +19 -19
  122. package/es/list/List.js +4 -10
  123. package/es/list/index.d.ts +10 -10
  124. package/es/loading/Loading.d.ts +5 -6
  125. package/es/loading/Loading.js +5 -8
  126. package/es/loading/index.d.ts +5 -5
  127. package/es/nav-bar/NavBar.js +2 -2
  128. package/es/notice-bar/NoticeBar.d.ts +17 -17
  129. package/es/notice-bar/NoticeBar.js +3 -9
  130. package/es/notice-bar/index.d.ts +11 -11
  131. package/es/notify/Notify.d.ts +10 -11
  132. package/es/notify/Notify.js +4 -7
  133. package/es/notify/function-call.d.ts +5 -5
  134. package/es/notify/function-call.js +17 -21
  135. package/es/number-keyboard/NumberKeyboard.d.ts +15 -15
  136. package/es/number-keyboard/NumberKeyboard.js +5 -14
  137. package/es/number-keyboard/NumberKeyboardKey.js +2 -2
  138. package/es/number-keyboard/index.d.ts +15 -15
  139. package/es/overlay/Overlay.js +5 -4
  140. package/es/pagination/Pagination.d.ts +18 -19
  141. package/es/pagination/Pagination.js +13 -33
  142. package/es/pagination/index.d.ts +18 -18
  143. package/es/password-input/PasswordInput.d.ts +6 -6
  144. package/es/password-input/PasswordInput.js +5 -11
  145. package/es/password-input/index.d.ts +6 -6
  146. package/es/picker/Picker.d.ts +29 -29
  147. package/es/picker/Picker.js +9 -27
  148. package/es/picker/PickerColumn.d.ts +15 -16
  149. package/es/picker/PickerColumn.js +25 -49
  150. package/es/picker/index.d.ts +22 -22
  151. package/es/picker/types.d.ts +2 -2
  152. package/es/popover/Popover.d.ts +27 -27
  153. package/es/popover/Popover.js +7 -22
  154. package/es/popover/index.d.ts +27 -27
  155. package/es/popup/Popup.d.ts +22 -22
  156. package/es/popup/Popup.js +5 -14
  157. package/es/popup/index.d.ts +15 -15
  158. package/es/popup/shared.js +3 -3
  159. package/es/progress/Progress.js +3 -3
  160. package/es/pull-refresh/PullRefresh.d.ts +9 -12
  161. package/es/pull-refresh/PullRefresh.js +6 -18
  162. package/es/pull-refresh/index.d.ts +9 -12
  163. package/es/radio/Radio.d.ts +5 -5
  164. package/es/radio/index.d.ts +5 -5
  165. package/es/radio-group/RadioGroup.js +2 -2
  166. package/es/rate/Rate.d.ts +21 -21
  167. package/es/rate/Rate.js +10 -22
  168. package/es/rate/index.d.ts +21 -21
  169. package/es/row/Row.d.ts +7 -7
  170. package/es/row/Row.js +4 -10
  171. package/es/row/index.d.ts +7 -7
  172. package/es/search/Search.d.ts +62 -62
  173. package/es/search/Search.js +4 -10
  174. package/es/search/index.d.ts +35 -35
  175. package/es/share-sheet/ShareSheet.d.ts +11 -12
  176. package/es/share-sheet/ShareSheet.js +3 -6
  177. package/es/share-sheet/index.d.ts +7 -7
  178. package/es/sidebar/Sidebar.js +2 -5
  179. package/es/sidebar-item/SidebarItem.js +2 -2
  180. package/es/skeleton/Skeleton.d.ts +10 -9
  181. package/es/skeleton/Skeleton.js +5 -11
  182. package/es/skeleton/index.d.ts +11 -9
  183. package/es/slider/Slider.d.ts +14 -14
  184. package/es/slider/Slider.js +18 -27
  185. package/es/slider/index.d.ts +14 -14
  186. package/es/stepper/Stepper.d.ts +23 -23
  187. package/es/stepper/Stepper.js +15 -32
  188. package/es/stepper/index.d.ts +23 -23
  189. package/es/steps/Steps.d.ts +20 -20
  190. package/es/steps/Steps.js +5 -14
  191. package/es/steps/index.d.ts +10 -10
  192. package/es/sticky/Sticky.d.ts +5 -5
  193. package/es/sticky/Sticky.js +5 -14
  194. package/es/sticky/index.d.ts +5 -5
  195. package/es/submit-bar/SubmitBar.d.ts +14 -14
  196. package/es/submit-bar/SubmitBar.js +5 -14
  197. package/es/submit-bar/index.d.ts +14 -14
  198. package/es/swipe/Swipe.d.ts +30 -30
  199. package/es/swipe/Swipe.js +7 -16
  200. package/es/swipe/index.d.ts +18 -18
  201. package/es/swipe-cell/SwipeCell.d.ts +8 -8
  202. package/es/swipe-cell/SwipeCell.js +5 -8
  203. package/es/swipe-cell/index.d.ts +5 -5
  204. package/es/switch/Switch.js +2 -2
  205. package/es/tab/Tab.js +3 -3
  206. package/es/tabbar/Tabbar.d.ts +2 -2
  207. package/es/tabbar/Tabbar.js +3 -6
  208. package/es/tabbar/index.d.ts +2 -2
  209. package/es/tabbar-item/TabbarItem.js +3 -3
  210. package/es/tabs/Tabs.d.ts +39 -39
  211. package/es/tabs/Tabs.js +18 -27
  212. package/es/tabs/TabsContent.d.ts +7 -7
  213. package/es/tabs/TabsContent.js +4 -13
  214. package/es/tabs/TabsTitle.js +2 -2
  215. package/es/tabs/index.d.ts +23 -23
  216. package/es/tag/Tag.d.ts +5 -6
  217. package/es/tag/Tag.js +3 -6
  218. package/es/tag/index.d.ts +5 -5
  219. package/es/toast/Toast.d.ts +20 -20
  220. package/es/toast/Toast.js +8 -20
  221. package/es/tree-select/TreeSelect.d.ts +10 -10
  222. package/es/tree-select/TreeSelect.js +6 -21
  223. package/es/tree-select/index.d.ts +10 -10
  224. package/es/uploader/Uploader.d.ts +65 -65
  225. package/es/uploader/Uploader.js +10 -31
  226. package/es/uploader/UploaderPreviewItem.d.ts +6 -6
  227. package/es/uploader/UploaderPreviewItem.js +5 -8
  228. package/es/uploader/index.d.ts +45 -45
  229. package/es/uploader/utils.d.ts +3 -3
  230. package/es/uploader/utils.js +2 -10
  231. package/es/utils/{base.d.ts → basic.d.ts} +1 -6
  232. package/es/utils/{base.js → basic.js} +1 -7
  233. package/{lib/utils/create/bem.d.ts → es/utils/create.d.ts} +7 -4
  234. package/es/utils/create.js +53 -0
  235. package/{lib/utils/dom/scroll.d.ts → es/utils/dom.d.ts} +5 -2
  236. package/es/utils/dom.js +70 -0
  237. package/es/utils/format.d.ts +12 -0
  238. package/es/utils/format.js +127 -0
  239. package/es/utils/index.d.ts +4 -7
  240. package/es/utils/index.js +5 -8
  241. package/es/utils/interceptor.js +2 -1
  242. package/es/utils/mount-component.js +5 -3
  243. package/es/utils/props.d.ts +31 -0
  244. package/es/utils/props.js +30 -0
  245. package/es/utils/validate.d.ts +7 -7
  246. package/es/utils/validate.js +8 -22
  247. package/es/utils/with-install.js +1 -1
  248. package/lib/action-bar-icon/ActionBarIcon.js +1 -1
  249. package/lib/action-sheet/ActionSheet.d.ts +7 -7
  250. package/lib/action-sheet/ActionSheet.js +2 -5
  251. package/lib/action-sheet/index.d.ts +7 -7
  252. package/lib/address-edit/AddressEdit.d.ts +13 -14
  253. package/lib/address-edit/AddressEdit.js +5 -16
  254. package/lib/address-edit/AddressEditDetail.js +2 -2
  255. package/lib/address-edit/index.d.ts +7 -7
  256. package/lib/address-list/AddressList.d.ts +9 -10
  257. package/lib/address-list/AddressList.js +4 -10
  258. package/lib/address-list/AddressListItem.d.ts +4 -4
  259. package/lib/address-list/AddressListItem.js +2 -5
  260. package/lib/address-list/index.d.ts +8 -8
  261. package/lib/area/Area.d.ts +43 -44
  262. package/lib/area/Area.js +3 -11
  263. package/lib/area/index.d.ts +27 -27
  264. package/lib/badge/Badge.d.ts +7 -7
  265. package/lib/badge/Badge.js +4 -7
  266. package/lib/badge/index.d.ts +7 -7
  267. package/lib/button/Button.d.ts +29 -27
  268. package/lib/button/Button.js +6 -21
  269. package/lib/button/index.d.ts +27 -27
  270. package/lib/calendar/Calendar.d.ts +46 -47
  271. package/lib/calendar/Calendar.js +9 -26
  272. package/lib/calendar/CalendarDay.d.ts +7 -7
  273. package/lib/calendar/CalendarDay.js +3 -9
  274. package/lib/calendar/CalendarMonth.d.ts +19 -19
  275. package/lib/calendar/CalendarMonth.js +6 -15
  276. package/lib/calendar/index.d.ts +28 -28
  277. package/lib/calendar/utils.d.ts +2 -2
  278. package/lib/calendar/utils.js +9 -7
  279. package/lib/card/Card.d.ts +4 -4
  280. package/lib/card/Card.js +4 -7
  281. package/lib/card/index.d.ts +4 -4
  282. package/lib/cascader/Cascader.d.ts +14 -14
  283. package/lib/cascader/Cascader.js +16 -22
  284. package/lib/cascader/index.d.ts +13 -13
  285. package/lib/cell/Cell.js +3 -3
  286. package/lib/checkbox/Checkbox.d.ts +9 -9
  287. package/lib/checkbox/Checker.d.ts +14 -14
  288. package/lib/checkbox/Checker.js +5 -11
  289. package/lib/checkbox/index.d.ts +5 -5
  290. package/lib/checkbox-group/CheckboxGroup.d.ts +6 -6
  291. package/lib/checkbox-group/CheckboxGroup.js +4 -7
  292. package/lib/checkbox-group/index.d.ts +4 -4
  293. package/lib/circle/Circle.d.ts +22 -22
  294. package/lib/circle/Circle.js +8 -28
  295. package/lib/circle/index.d.ts +22 -22
  296. package/lib/col/Col.d.ts +4 -5
  297. package/lib/col/Col.js +3 -9
  298. package/lib/col/index.d.ts +3 -3
  299. package/lib/collapse-item/CollapseItem.js +1 -1
  300. package/lib/composables/on-popup-reopen.js +1 -1
  301. package/lib/composables/use-lock-scroll.js +2 -2
  302. package/lib/composables/use-placeholder.d.ts +1 -1
  303. package/lib/composables/use-route.js +1 -1
  304. package/lib/config-provider/ConfigProvider.d.ts +4 -4
  305. package/lib/config-provider/ConfigProvider.js +2 -5
  306. package/lib/config-provider/index.d.ts +4 -4
  307. package/lib/contact-card/ContactCard.d.ts +5 -6
  308. package/lib/contact-card/ContactCard.js +2 -5
  309. package/lib/contact-card/index.d.ts +5 -5
  310. package/lib/count-down/CountDown.d.ts +14 -14
  311. package/lib/count-down/CountDown.js +3 -9
  312. package/lib/count-down/index.d.ts +10 -10
  313. package/lib/coupon/Coupon.d.ts +3 -3
  314. package/lib/coupon/Coupon.js +4 -14
  315. package/lib/coupon/index.d.ts +3 -3
  316. package/lib/coupon-cell/CouponCell.d.ts +2 -3
  317. package/lib/coupon-cell/CouponCell.js +3 -12
  318. package/lib/coupon-cell/index.d.ts +1 -1
  319. package/lib/coupon-list/CouponList.d.ts +43 -44
  320. package/lib/coupon-list/CouponList.js +9 -33
  321. package/lib/coupon-list/index.d.ts +43 -43
  322. package/lib/datetime-picker/DatePicker.d.ts +23 -25
  323. package/lib/datetime-picker/DatePicker.js +1 -4
  324. package/lib/datetime-picker/DatetimePicker.d.ts +1 -10
  325. package/lib/datetime-picker/TimePicker.d.ts +16 -16
  326. package/lib/datetime-picker/TimePicker.js +5 -17
  327. package/lib/datetime-picker/index.d.ts +1 -10
  328. package/lib/datetime-picker/utils.d.ts +9 -9
  329. package/lib/datetime-picker/utils.js +6 -6
  330. package/lib/dialog/Dialog.d.ts +6 -6
  331. package/lib/dialog/Dialog.js +3 -6
  332. package/lib/dialog/function-call.d.ts +6 -6
  333. package/lib/divider/Divider.d.ts +2 -3
  334. package/lib/divider/Divider.js +1 -4
  335. package/lib/divider/index.d.ts +1 -1
  336. package/lib/dropdown-item/DropdownItem.d.ts +9 -9
  337. package/lib/dropdown-item/DropdownItem.js +2 -5
  338. package/lib/dropdown-item/index.d.ts +5 -5
  339. package/lib/dropdown-menu/DropdownMenu.d.ts +19 -19
  340. package/lib/dropdown-menu/DropdownMenu.js +4 -10
  341. package/lib/dropdown-menu/index.d.ts +10 -10
  342. package/lib/empty/Empty.d.ts +4 -4
  343. package/lib/empty/Empty.js +3 -6
  344. package/lib/empty/index.d.ts +4 -4
  345. package/lib/field/Field.d.ts +70 -70
  346. package/lib/field/Field.js +14 -26
  347. package/lib/field/index.d.ts +32 -32
  348. package/lib/field/utils.js +5 -5
  349. package/lib/form/Form.d.ts +11 -11
  350. package/lib/form/Form.js +3 -6
  351. package/lib/form/index.d.ts +7 -7
  352. package/lib/grid/Grid.js +3 -6
  353. package/lib/grid-item/GridItem.d.ts +2 -2
  354. package/lib/grid-item/GridItem.js +3 -3
  355. package/lib/grid-item/index.d.ts +2 -2
  356. package/lib/icon/Icon.d.ts +5 -6
  357. package/lib/icon/Icon.js +5 -10
  358. package/lib/icon/index.d.ts +5 -5
  359. package/lib/image/Image.d.ts +10 -10
  360. package/lib/image/Image.js +6 -12
  361. package/lib/image/index.d.ts +10 -10
  362. package/lib/image-preview/ImagePreview.d.ts +52 -52
  363. package/lib/image-preview/ImagePreview.js +8 -29
  364. package/lib/image-preview/ImagePreviewItem.js +5 -19
  365. package/lib/image-preview/function-call.d.ts +31 -31
  366. package/lib/index-anchor/IndexAnchor.js +4 -4
  367. package/lib/index-bar/IndexBar.js +2 -5
  368. package/lib/index.d.ts +1 -1
  369. package/lib/index.js +3 -2
  370. package/lib/list/List.d.ts +19 -19
  371. package/lib/list/List.js +3 -9
  372. package/lib/list/index.d.ts +10 -10
  373. package/lib/loading/Loading.d.ts +5 -6
  374. package/lib/loading/Loading.js +4 -7
  375. package/lib/loading/index.d.ts +5 -5
  376. package/lib/nav-bar/NavBar.js +1 -1
  377. package/lib/notice-bar/NoticeBar.d.ts +17 -17
  378. package/lib/notice-bar/NoticeBar.js +2 -8
  379. package/lib/notice-bar/index.d.ts +11 -11
  380. package/lib/notify/Notify.d.ts +10 -11
  381. package/lib/notify/Notify.js +3 -6
  382. package/lib/notify/function-call.d.ts +5 -5
  383. package/lib/notify/function-call.js +17 -21
  384. package/lib/number-keyboard/NumberKeyboard.d.ts +15 -15
  385. package/lib/number-keyboard/NumberKeyboard.js +4 -13
  386. package/lib/number-keyboard/NumberKeyboardKey.js +1 -1
  387. package/lib/number-keyboard/index.d.ts +15 -15
  388. package/lib/overlay/Overlay.js +4 -3
  389. package/lib/pagination/Pagination.d.ts +18 -19
  390. package/lib/pagination/Pagination.js +12 -32
  391. package/lib/pagination/index.d.ts +18 -18
  392. package/lib/password-input/PasswordInput.d.ts +6 -6
  393. package/lib/password-input/PasswordInput.js +4 -10
  394. package/lib/password-input/index.d.ts +6 -6
  395. package/lib/picker/Picker.d.ts +29 -29
  396. package/lib/picker/Picker.js +9 -27
  397. package/lib/picker/PickerColumn.d.ts +15 -16
  398. package/lib/picker/PickerColumn.js +24 -48
  399. package/lib/picker/index.d.ts +22 -22
  400. package/lib/picker/types.d.ts +2 -2
  401. package/lib/popover/Popover.d.ts +27 -27
  402. package/lib/popover/Popover.js +6 -21
  403. package/lib/popover/index.d.ts +27 -27
  404. package/lib/popup/Popup.d.ts +22 -22
  405. package/lib/popup/Popup.js +4 -13
  406. package/lib/popup/index.d.ts +15 -15
  407. package/lib/popup/shared.js +3 -3
  408. package/lib/progress/Progress.js +2 -2
  409. package/lib/pull-refresh/PullRefresh.d.ts +9 -12
  410. package/lib/pull-refresh/PullRefresh.js +5 -17
  411. package/lib/pull-refresh/index.d.ts +9 -12
  412. package/lib/radio/Radio.d.ts +5 -5
  413. package/lib/radio/index.d.ts +5 -5
  414. package/lib/radio-group/RadioGroup.js +1 -1
  415. package/lib/rate/Rate.d.ts +21 -21
  416. package/lib/rate/Rate.js +8 -20
  417. package/lib/rate/index.d.ts +21 -21
  418. package/lib/row/Row.d.ts +7 -7
  419. package/lib/row/Row.js +3 -9
  420. package/lib/row/index.d.ts +7 -7
  421. package/lib/search/Search.d.ts +62 -62
  422. package/lib/search/Search.js +3 -9
  423. package/lib/search/index.d.ts +35 -35
  424. package/lib/share-sheet/ShareSheet.d.ts +11 -12
  425. package/lib/share-sheet/ShareSheet.js +2 -5
  426. package/lib/share-sheet/index.d.ts +7 -7
  427. package/lib/sidebar/Sidebar.js +1 -4
  428. package/lib/sidebar-item/SidebarItem.js +1 -1
  429. package/lib/skeleton/Skeleton.d.ts +10 -9
  430. package/lib/skeleton/Skeleton.js +4 -10
  431. package/lib/skeleton/index.d.ts +11 -9
  432. package/lib/slider/Slider.d.ts +14 -14
  433. package/lib/slider/Slider.js +17 -26
  434. package/lib/slider/index.d.ts +14 -14
  435. package/lib/stepper/Stepper.d.ts +23 -23
  436. package/lib/stepper/Stepper.js +14 -31
  437. package/lib/stepper/index.d.ts +23 -23
  438. package/lib/steps/Steps.d.ts +20 -20
  439. package/lib/steps/Steps.js +4 -13
  440. package/lib/steps/index.d.ts +10 -10
  441. package/lib/sticky/Sticky.d.ts +5 -5
  442. package/lib/sticky/Sticky.js +4 -13
  443. package/lib/sticky/index.d.ts +5 -5
  444. package/lib/submit-bar/SubmitBar.d.ts +14 -14
  445. package/lib/submit-bar/SubmitBar.js +4 -13
  446. package/lib/submit-bar/index.d.ts +14 -14
  447. package/lib/swipe/Swipe.d.ts +30 -30
  448. package/lib/swipe/Swipe.js +6 -15
  449. package/lib/swipe/index.d.ts +18 -18
  450. package/lib/swipe-cell/SwipeCell.d.ts +8 -8
  451. package/lib/swipe-cell/SwipeCell.js +4 -7
  452. package/lib/swipe-cell/index.d.ts +5 -5
  453. package/lib/switch/Switch.js +1 -1
  454. package/lib/tab/Tab.js +2 -2
  455. package/lib/tabbar/Tabbar.d.ts +2 -2
  456. package/lib/tabbar/Tabbar.js +2 -5
  457. package/lib/tabbar/index.d.ts +2 -2
  458. package/lib/tabbar-item/TabbarItem.js +2 -2
  459. package/lib/tabs/Tabs.d.ts +39 -39
  460. package/lib/tabs/Tabs.js +16 -25
  461. package/lib/tabs/TabsContent.d.ts +7 -7
  462. package/lib/tabs/TabsContent.js +3 -12
  463. package/lib/tabs/TabsTitle.js +1 -1
  464. package/lib/tabs/index.d.ts +23 -23
  465. package/lib/tag/Tag.d.ts +5 -6
  466. package/lib/tag/Tag.js +2 -5
  467. package/lib/tag/index.d.ts +5 -5
  468. package/lib/toast/Toast.d.ts +20 -20
  469. package/lib/toast/Toast.js +7 -19
  470. package/lib/tree-select/TreeSelect.d.ts +10 -10
  471. package/lib/tree-select/TreeSelect.js +5 -20
  472. package/lib/tree-select/index.d.ts +10 -10
  473. package/lib/uploader/Uploader.d.ts +65 -65
  474. package/lib/uploader/Uploader.js +9 -30
  475. package/lib/uploader/UploaderPreviewItem.d.ts +6 -6
  476. package/lib/uploader/UploaderPreviewItem.js +4 -7
  477. package/lib/uploader/index.d.ts +45 -45
  478. package/lib/uploader/utils.d.ts +3 -3
  479. package/lib/uploader/utils.js +11 -14
  480. package/lib/utils/{base.d.ts → basic.d.ts} +1 -6
  481. package/lib/utils/{base.js → basic.js} +4 -11
  482. package/lib/utils/constant.js +1 -1
  483. package/{es/utils/create/bem.d.ts → lib/utils/create.d.ts} +7 -4
  484. package/lib/utils/create.js +68 -0
  485. package/{es/utils/dom/scroll.d.ts → lib/utils/dom.d.ts} +5 -2
  486. package/lib/utils/dom.js +98 -0
  487. package/lib/utils/format.d.ts +12 -0
  488. package/lib/utils/format.js +157 -0
  489. package/lib/utils/index.d.ts +4 -7
  490. package/lib/utils/index.js +28 -52
  491. package/lib/utils/interceptor.js +5 -3
  492. package/lib/utils/mount-component.js +5 -3
  493. package/lib/utils/props.d.ts +31 -0
  494. package/lib/utils/props.js +53 -0
  495. package/lib/utils/validate.d.ts +7 -7
  496. package/lib/utils/validate.js +24 -29
  497. package/lib/utils/with-install.js +2 -2
  498. package/lib/vant.es.js +1079 -1788
  499. package/lib/vant.es.min.js +15117 -1
  500. package/lib/vant.js +1078 -1787
  501. package/lib/vant.min.js +1 -1
  502. package/package.json +7 -7
  503. package/vetur/attributes.json +836 -836
  504. package/vetur/tags.json +275 -275
  505. package/vetur/web-types.json +2255 -2251
  506. package/es/utils/create/bem.js +0 -35
  507. package/es/utils/create/index.d.ts +0 -1
  508. package/es/utils/create/index.js +0 -6
  509. package/es/utils/create/translate.d.ts +0 -2
  510. package/es/utils/create/translate.js +0 -12
  511. package/es/utils/dom/event.d.ts +0 -3
  512. package/es/utils/dom/event.js +0 -18
  513. package/es/utils/dom/scroll.js +0 -56
  514. package/es/utils/dom/style.d.ts +0 -2
  515. package/es/utils/dom/style.js +0 -16
  516. package/es/utils/format/number.d.ts +0 -4
  517. package/es/utils/format/number.js +0 -40
  518. package/es/utils/format/string.d.ts +0 -3
  519. package/es/utils/format/string.js +0 -16
  520. package/es/utils/format/unit.d.ts +0 -5
  521. package/es/utils/format/unit.js +0 -76
  522. package/lib/utils/create/bem.js +0 -40
  523. package/lib/utils/create/index.d.ts +0 -1
  524. package/lib/utils/create/index.js +0 -13
  525. package/lib/utils/create/translate.d.ts +0 -2
  526. package/lib/utils/create/translate.js +0 -24
  527. package/lib/utils/dom/event.d.ts +0 -3
  528. package/lib/utils/dom/event.js +0 -27
  529. package/lib/utils/dom/scroll.js +0 -75
  530. package/lib/utils/dom/style.d.ts +0 -2
  531. package/lib/utils/dom/style.js +0 -22
  532. package/lib/utils/format/number.d.ts +0 -4
  533. package/lib/utils/format/number.js +0 -48
  534. package/lib/utils/format/string.d.ts +0 -3
  535. package/lib/utils/format/string.js +0 -25
  536. package/lib/utils/format/unit.d.ts +0 -5
  537. package/lib/utils/format/unit.js +0 -89
package/lib/vant.js CHANGED
@@ -5,12 +5,7 @@
5
5
  function noop$1() {
6
6
  }
7
7
  var extend = Object.assign;
8
- var inBrowser$2 = typeof window !== "undefined";
9
- var unknownProp = null;
10
- var truthProp = {
11
- type: Boolean,
12
- default: true
13
- };
8
+ var inBrowser$1 = typeof window !== "undefined";
14
9
  function get(object, path) {
15
10
  var keys = path.split(".");
16
11
  var result = object;
@@ -28,484 +23,118 @@
28
23
  return ret;
29
24
  }, {});
30
25
  }
31
- function gen(name2, mods) {
32
- if (!mods) {
33
- return "";
34
- }
35
- if (typeof mods === "string") {
36
- return " " + name2 + "--" + mods;
37
- }
38
- if (Array.isArray(mods)) {
39
- return mods.reduce((ret, item) => ret + gen(name2, item), "");
40
- }
41
- return Object.keys(mods).reduce((ret, key) => ret + (mods[key] ? gen(name2, key) : ""), "");
42
- }
43
- function createBEM(name2) {
44
- return function(el, mods) {
45
- if (el && typeof el !== "string") {
46
- mods = el;
47
- el = "";
48
- }
49
- el = el ? name2 + "__" + el : name2;
50
- return "" + el + gen(el, mods);
51
- };
52
- }
53
- var camelizeRE = /-(\w)/g;
54
- function camelize(str) {
55
- return str.replace(camelizeRE, (_2, c) => c.toUpperCase());
56
- }
57
- function kebabCase(str) {
58
- return str.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
26
+ var unknownProp = null;
27
+ var numericProp = [Number, String];
28
+ var truthProp = {
29
+ type: Boolean,
30
+ default: true
31
+ };
32
+ var makeRequiredProp = (type) => ({
33
+ type,
34
+ required: true
35
+ });
36
+ var makeArrayProp = () => ({
37
+ type: Array,
38
+ default: () => []
39
+ });
40
+ var makeNumberProp = (defaultVal) => ({
41
+ type: Number,
42
+ default: defaultVal
43
+ });
44
+ var makeNumericProp = (defaultVal) => ({
45
+ type: numericProp,
46
+ default: defaultVal
47
+ });
48
+ var makeStringProp = (defaultVal) => ({
49
+ type: String,
50
+ default: defaultVal
51
+ });
52
+ var inBrowser = typeof window !== "undefined";
53
+ function raf(fn) {
54
+ return inBrowser ? requestAnimationFrame(fn) : -1;
59
55
  }
60
- function padZero(num, targetLength = 2) {
61
- var str = num + "";
62
- while (str.length < targetLength) {
63
- str = "0" + str;
56
+ function cancelRaf(id) {
57
+ if (inBrowser) {
58
+ cancelAnimationFrame(id);
64
59
  }
65
- return str;
66
- }
67
- function isDef(val) {
68
- return val !== void 0 && val !== null;
69
- }
70
- function isFunction(val) {
71
- return typeof val === "function";
72
- }
73
- function isObject$1(val) {
74
- return val !== null && typeof val === "object";
75
60
  }
76
- function isPromise(val) {
77
- return isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
78
- }
79
- function isDate(val) {
80
- return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
81
- }
82
- function isMobile(value) {
83
- value = value.replace(/[^-|\d]/g, "");
84
- return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
85
- }
86
- function isNumeric(val) {
87
- return typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
88
- }
89
- function isIOS$1() {
90
- return inBrowser$2 ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
61
+ function doubleRaf(fn) {
62
+ raf(() => raf(fn));
91
63
  }
92
- var {
93
- hasOwnProperty
94
- } = Object.prototype;
95
- function assignKey(to, from, key) {
96
- var val = from[key];
97
- if (!isDef(val)) {
98
- return;
99
- }
100
- if (!hasOwnProperty.call(to, key) || !isObject$1(val)) {
101
- to[key] = val;
102
- } else {
103
- to[key] = deepAssign(Object(to[key]), from[key]);
104
- }
64
+ function isWindow(val) {
65
+ return val === window;
105
66
  }
106
- function deepAssign(to, from) {
107
- Object.keys(from).forEach((key) => {
108
- assignKey(to, from, key);
109
- });
110
- return to;
67
+ function makeDOMRect(width, height) {
68
+ return {
69
+ top: 0,
70
+ left: 0,
71
+ right: width,
72
+ bottom: height,
73
+ width,
74
+ height
75
+ };
111
76
  }
112
- var defaultMessages = {
113
- name: "\u59D3\u540D",
114
- tel: "\u7535\u8BDD",
115
- save: "\u4FDD\u5B58",
116
- confirm: "\u786E\u8BA4",
117
- cancel: "\u53D6\u6D88",
118
- delete: "\u5220\u9664",
119
- loading: "\u52A0\u8F7D\u4E2D...",
120
- noCoupon: "\u6682\u65E0\u4F18\u60E0\u5238",
121
- nameEmpty: "\u8BF7\u586B\u5199\u59D3\u540D",
122
- confirmDelete: "\u786E\u5B9A\u8981\u5220\u9664\u5417",
123
- telInvalid: "\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",
124
- vanCalendar: {
125
- end: "\u7ED3\u675F",
126
- start: "\u5F00\u59CB",
127
- title: "\u65E5\u671F\u9009\u62E9",
128
- confirm: "\u786E\u5B9A",
129
- startEnd: "\u5F00\u59CB/\u7ED3\u675F",
130
- weekdays: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
131
- monthTitle: (year, month) => year + "\u5E74" + month + "\u6708",
132
- rangePrompt: (maxRange) => "\u6700\u591A\u9009\u62E9 " + maxRange + " \u5929"
133
- },
134
- vanCascader: {
135
- select: "\u8BF7\u9009\u62E9"
136
- },
137
- vanContactCard: {
138
- addText: "\u6DFB\u52A0\u8054\u7CFB\u4EBA"
139
- },
140
- vanContactList: {
141
- addText: "\u65B0\u5EFA\u8054\u7CFB\u4EBA"
142
- },
143
- vanPagination: {
144
- prev: "\u4E0A\u4E00\u9875",
145
- next: "\u4E0B\u4E00\u9875"
146
- },
147
- vanPullRefresh: {
148
- pulling: "\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",
149
- loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
150
- },
151
- vanSubmitBar: {
152
- label: "\u5408\u8BA1\uFF1A"
153
- },
154
- vanCoupon: {
155
- unlimited: "\u65E0\u4F7F\u7528\u95E8\u69DB",
156
- discount: (discount) => discount + "\u6298",
157
- condition: (condition) => "\u6EE1" + condition + "\u5143\u53EF\u7528"
158
- },
159
- vanCouponCell: {
160
- title: "\u4F18\u60E0\u5238",
161
- count: (count) => count + "\u5F20\u53EF\u7528"
162
- },
163
- vanCouponList: {
164
- exchange: "\u5151\u6362",
165
- close: "\u4E0D\u4F7F\u7528\u4F18\u60E0\u5238",
166
- enable: "\u53EF\u7528",
167
- disabled: "\u4E0D\u53EF\u7528",
168
- placeholder: "\u8BF7\u8F93\u5165\u4F18\u60E0\u7801"
169
- },
170
- vanAddressEdit: {
171
- area: "\u5730\u533A",
172
- postal: "\u90AE\u653F\u7F16\u7801",
173
- areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
174
- addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
175
- postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
176
- defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
177
- },
178
- vanAddressEditDetail: {
179
- label: "\u8BE6\u7EC6\u5730\u5740",
180
- placeholder: "\u8857\u9053\u95E8\u724C\u4FE1\u606F"
181
- },
182
- vanAddressList: {
183
- add: "\u65B0\u589E\u5730\u5740"
77
+ var useRect = (elementOrRef) => {
78
+ var element = vue.unref(elementOrRef);
79
+ if (isWindow(element)) {
80
+ var width = element.innerWidth;
81
+ var height = element.innerHeight;
82
+ return makeDOMRect(width, height);
184
83
  }
185
- };
186
- var lang = vue.ref("zh-CN");
187
- var messages = vue.reactive({
188
- "zh-CN": defaultMessages
189
- });
190
- var Locale = {
191
- messages() {
192
- return messages[lang.value];
193
- },
194
- use(newLang, newMessages) {
195
- lang.value = newLang;
196
- this.add({
197
- [newLang]: newMessages
198
- });
199
- },
200
- add(newMessages = {}) {
201
- deepAssign(messages, newMessages);
84
+ if (element && element.getBoundingClientRect) {
85
+ return element.getBoundingClientRect();
202
86
  }
87
+ return makeDOMRect(0, 0);
203
88
  };
204
- function createTranslate(name2) {
205
- var prefix2 = camelize(name2) + ".";
206
- return function(path, ...args) {
207
- var messages2 = Locale.messages();
208
- var message = get(messages2, prefix2 + path) || get(messages2, path);
209
- return isFunction(message) ? message(...args) : message;
89
+ function useToggle(defaultValue = false) {
90
+ var state = vue.ref(defaultValue);
91
+ var toggle = (value = !state.value) => {
92
+ state.value = value;
210
93
  };
94
+ return [state, toggle];
211
95
  }
212
- function createNamespace(name2) {
213
- var prefixedName = "van-" + name2;
214
- return [prefixedName, createBEM(prefixedName), createTranslate(prefixedName)];
215
- }
216
- var BORDER = "van-hairline";
217
- var BORDER_TOP = BORDER + "--top";
218
- var BORDER_LEFT = BORDER + "--left";
219
- var BORDER_BOTTOM = BORDER + "--bottom";
220
- var BORDER_SURROUND = BORDER + "--surround";
221
- var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
222
- var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
223
- var FORM_KEY = Symbol("van-form");
224
- function isHidden(elementRef) {
225
- var el = vue.unref(elementRef);
226
- if (!el) {
227
- return false;
96
+ function useParent(key) {
97
+ var parent = vue.inject(key, null);
98
+ if (parent) {
99
+ var instance2 = vue.getCurrentInstance();
100
+ var {
101
+ link: _link,
102
+ unlink: _unlink,
103
+ internalChildren
104
+ } = parent;
105
+ _link(instance2);
106
+ vue.onUnmounted(() => _unlink(instance2));
107
+ var index2 = vue.computed(() => internalChildren.indexOf(instance2));
108
+ return {
109
+ parent,
110
+ index: index2
111
+ };
228
112
  }
229
- var style2 = window.getComputedStyle(el);
230
- var hidden = style2.display === "none";
231
- var parentHidden = el.offsetParent === null && style2.position !== "fixed";
232
- return hidden || parentHidden;
113
+ return {
114
+ parent: null,
115
+ index: vue.ref(-1)
116
+ };
233
117
  }
234
- function stopPropagation(event) {
235
- event.stopPropagation();
236
- }
237
- function preventDefault(event, isStopPropagation) {
238
- if (typeof event.cancelable !== "boolean" || event.cancelable) {
239
- event.preventDefault();
240
- }
241
- if (isStopPropagation) {
242
- stopPropagation(event);
243
- }
244
- }
245
- function trigger(target, type) {
246
- var inputEvent = document.createEvent("HTMLEvents");
247
- inputEvent.initEvent(type, true, true);
248
- target.dispatchEvent(inputEvent);
249
- }
250
- function isWindow$1(val) {
251
- return val === window;
252
- }
253
- function getScrollTop(el) {
254
- var top2 = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
255
- return Math.max(top2, 0);
256
- }
257
- function setScrollTop(el, value) {
258
- if ("scrollTop" in el) {
259
- el.scrollTop = value;
260
- } else {
261
- el.scrollTo(el.scrollX, value);
262
- }
263
- }
264
- function getRootScrollTop() {
265
- return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
266
- }
267
- function setRootScrollTop(value) {
268
- setScrollTop(window, value);
269
- setScrollTop(document.body, value);
270
- }
271
- function getElementTop(el, scroller) {
272
- if (isWindow$1(el)) {
273
- return 0;
274
- }
275
- var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
276
- return el.getBoundingClientRect().top + scrollTop;
277
- }
278
- function getVisibleHeight(el) {
279
- if (isWindow$1(el)) {
280
- return el.innerHeight;
281
- }
282
- return el.getBoundingClientRect().height;
283
- }
284
- function getVisibleTop(el) {
285
- if (isWindow$1(el)) {
286
- return 0;
287
- }
288
- return el.getBoundingClientRect().top;
289
- }
290
- var isIOS = isIOS$1();
291
- function resetScroll() {
292
- if (isIOS) {
293
- setRootScrollTop(getRootScrollTop());
294
- }
295
- }
296
- function callInterceptor(options) {
297
- var {
298
- interceptor,
299
- args,
300
- done,
301
- canceled
302
- } = options;
303
- if (interceptor) {
304
- var returnVal = interceptor.apply(null, args || []);
305
- if (isPromise(returnVal)) {
306
- returnVal.then((value) => {
307
- if (value) {
308
- done();
309
- } else if (canceled) {
310
- canceled();
311
- }
312
- }).catch(noop$1);
313
- } else if (returnVal) {
314
- done();
315
- } else if (canceled) {
316
- canceled();
317
- }
318
- } else {
319
- done();
320
- }
321
- }
322
- function withInstall(options) {
323
- options.install = (app) => {
324
- var {
325
- name: name2
326
- } = options;
327
- app.component(name2, options);
328
- app.component(camelize("-" + name2), options);
329
- };
330
- return options;
331
- }
332
- function addUnit(value) {
333
- if (!isDef(value)) {
334
- return void 0;
335
- }
336
- return isNumeric(value) ? value + "px" : String(value);
337
- }
338
- function getSizeStyle(originSize) {
339
- if (isDef(originSize)) {
340
- var size = addUnit(originSize);
341
- return {
342
- width: size,
343
- height: size
344
- };
345
- }
346
- }
347
- function getZIndexStyle(zIndex) {
348
- var style2 = {};
349
- if (zIndex !== void 0) {
350
- style2.zIndex = +zIndex;
351
- }
352
- return style2;
353
- }
354
- var rootFontSize;
355
- function getRootFontSize() {
356
- if (!rootFontSize) {
357
- var doc = document.documentElement;
358
- var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
359
- rootFontSize = parseFloat(fontSize);
360
- }
361
- return rootFontSize;
362
- }
363
- function convertRem(value) {
364
- value = value.replace(/rem/g, "");
365
- return +value * getRootFontSize();
366
- }
367
- function convertVw(value) {
368
- value = value.replace(/vw/g, "");
369
- return +value * window.innerWidth / 100;
370
- }
371
- function convertVh(value) {
372
- value = value.replace(/vh/g, "");
373
- return +value * window.innerHeight / 100;
374
- }
375
- function unitToPx(value) {
376
- if (typeof value === "number") {
377
- return value;
378
- }
379
- if (inBrowser$2) {
380
- if (value.includes("rem")) {
381
- return convertRem(value);
382
- }
383
- if (value.includes("vw")) {
384
- return convertVw(value);
385
- }
386
- if (value.includes("vh")) {
387
- return convertVh(value);
388
- }
389
- }
390
- return parseFloat(value);
391
- }
392
- function clamp(num, min, max) {
393
- return Math.min(Math.max(num, min), max);
394
- }
395
- function trimExtraChar(value, char, regExp) {
396
- var index2 = value.indexOf(char);
397
- if (index2 === -1) {
398
- return value;
399
- }
400
- if (char === "-" && index2 !== 0) {
401
- return value.slice(0, index2);
402
- }
403
- return value.slice(0, index2 + 1) + value.slice(index2).replace(regExp, "");
404
- }
405
- function formatNumber(value, allowDot = true, allowMinus = true) {
406
- if (allowDot) {
407
- value = trimExtraChar(value, ".", /\./g);
408
- } else {
409
- value = value.split(".")[0];
410
- }
411
- if (allowMinus) {
412
- value = trimExtraChar(value, "-", /-/g);
413
- } else {
414
- value = value.replace(/-/, "");
415
- }
416
- var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
417
- return value.replace(regExp, "");
418
- }
419
- function addNumber(num1, num2) {
420
- var cardinal = Math.pow(10, 10);
421
- return Math.round((num1 + num2) * cardinal) / cardinal;
422
- }
423
- var inBrowser$1 = typeof window !== "undefined";
424
- function raf(fn) {
425
- return inBrowser$1 ? requestAnimationFrame(fn) : -1;
426
- }
427
- function cancelRaf(id) {
428
- if (inBrowser$1) {
429
- cancelAnimationFrame(id);
430
- }
431
- }
432
- function doubleRaf(fn) {
433
- raf(() => raf(fn));
434
- }
435
- function isWindow(val) {
436
- return val === window;
437
- }
438
- function makeDOMRect(width, height) {
439
- return {
440
- top: 0,
441
- left: 0,
442
- right: width,
443
- bottom: height,
444
- width,
445
- height
446
- };
447
- }
448
- var useRect = (elementOrRef) => {
449
- var element = vue.unref(elementOrRef);
450
- if (isWindow(element)) {
451
- var width = element.innerWidth;
452
- var height = element.innerHeight;
453
- return makeDOMRect(width, height);
454
- }
455
- if (element && element.getBoundingClientRect) {
456
- return element.getBoundingClientRect();
457
- }
458
- return makeDOMRect(0, 0);
459
- };
460
- function useToggle(defaultValue = false) {
461
- var state = vue.ref(defaultValue);
462
- var toggle = (value = !state.value) => {
463
- state.value = value;
464
- };
465
- return [state, toggle];
466
- }
467
- function useParent(key) {
468
- var parent = vue.inject(key, null);
469
- if (parent) {
470
- var instance2 = vue.getCurrentInstance();
471
- var {
472
- link: _link,
473
- unlink: _unlink,
474
- internalChildren
475
- } = parent;
476
- _link(instance2);
477
- vue.onUnmounted(() => _unlink(instance2));
478
- var index2 = vue.computed(() => internalChildren.indexOf(instance2));
479
- return {
480
- parent,
481
- index: index2
482
- };
483
- }
484
- return {
485
- parent: null,
486
- index: vue.ref(-1)
487
- };
488
- }
489
- function flattenVNodes(children) {
490
- var result = [];
491
- var traverse = (children2) => {
492
- if (Array.isArray(children2)) {
493
- children2.forEach((child) => {
494
- if (vue.isVNode(child)) {
495
- var _child$component;
496
- result.push(child);
497
- if ((_child$component = child.component) != null && _child$component.subTree) {
498
- traverse(child.component.subTree.children);
499
- }
500
- if (child.children) {
501
- traverse(child.children);
502
- }
503
- }
504
- });
505
- }
506
- };
507
- traverse(children);
508
- return result;
118
+ function flattenVNodes(children) {
119
+ var result = [];
120
+ var traverse = (children2) => {
121
+ if (Array.isArray(children2)) {
122
+ children2.forEach((child) => {
123
+ if (vue.isVNode(child)) {
124
+ var _child$component;
125
+ result.push(child);
126
+ if ((_child$component = child.component) != null && _child$component.subTree) {
127
+ traverse(child.component.subTree.children);
128
+ }
129
+ if (child.children) {
130
+ traverse(child.children);
131
+ }
132
+ }
133
+ });
134
+ }
135
+ };
136
+ traverse(children);
137
+ return result;
509
138
  }
510
139
  function sortChildren(parent, publicChildren, internalChildren) {
511
140
  var vnodes = flattenVNodes(parent.subTree.children);
@@ -612,7 +241,7 @@
612
241
  });
613
242
  };
614
243
  var tick = () => {
615
- if (!inBrowser$1) {
244
+ if (!inBrowser) {
616
245
  return;
617
246
  }
618
247
  if (options.millisecond) {
@@ -667,21 +296,8 @@
667
296
  }
668
297
  });
669
298
  }
670
- var supportsPassive$1 = false;
671
- if (inBrowser$1) {
672
- try {
673
- var opts = {};
674
- Object.defineProperty(opts, "passive", {
675
- get() {
676
- supportsPassive$1 = true;
677
- }
678
- });
679
- window.addEventListener("test-passive", null, opts);
680
- } catch (e) {
681
- }
682
- }
683
299
  function useEventListener(type, listener, options = {}) {
684
- if (!inBrowser$1) {
300
+ if (!inBrowser) {
685
301
  return;
686
302
  }
687
303
  var {
@@ -693,10 +309,10 @@
693
309
  var add = (target2) => {
694
310
  var element = vue.unref(target2);
695
311
  if (element && !attached) {
696
- element.addEventListener(type, listener, supportsPassive$1 ? {
312
+ element.addEventListener(type, listener, {
697
313
  capture,
698
314
  passive: passive2
699
- } : capture);
315
+ });
700
316
  attached = true;
701
317
  }
702
318
  };
@@ -718,7 +334,7 @@
718
334
  }
719
335
  }
720
336
  function useClickAway(target, listener, options = {}) {
721
- if (!inBrowser$1) {
337
+ if (!inBrowser) {
722
338
  return;
723
339
  }
724
340
  var {
@@ -735,8 +351,8 @@
735
351
  });
736
352
  }
737
353
  function useWindowSize() {
738
- var width = vue.ref(inBrowser$1 ? window.innerWidth : 0);
739
- var height = vue.ref(inBrowser$1 ? window.innerHeight : 0);
354
+ var width = vue.ref(inBrowser ? window.innerWidth : 0);
355
+ var height = vue.ref(inBrowser ? window.innerHeight : 0);
740
356
  var onResize = () => {
741
357
  width.value = window.innerWidth;
742
358
  height.value = window.innerHeight;
@@ -749,7 +365,7 @@
749
365
  };
750
366
  }
751
367
  var overflowScrollReg = /scroll|auto/i;
752
- var defaultRoot = inBrowser$1 ? window : void 0;
368
+ var defaultRoot = inBrowser ? window : void 0;
753
369
  function isElement$1(node) {
754
370
  var ELEMENT_NODE_TYPE = 1;
755
371
  return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
@@ -768,18 +384,18 @@
768
384
  return root;
769
385
  }
770
386
  function useScrollParent(el, root = defaultRoot) {
771
- var scrollParent2 = vue.ref();
387
+ var scrollParent = vue.ref();
772
388
  vue.onMounted(() => {
773
389
  if (el.value) {
774
- scrollParent2.value = getScrollParent$1(el.value, root);
390
+ scrollParent.value = getScrollParent$1(el.value, root);
775
391
  }
776
392
  });
777
- return scrollParent2;
393
+ return scrollParent;
778
394
  }
779
395
  function usePageVisibility() {
780
396
  var visibility = vue.ref("visible");
781
397
  var setVisibility = () => {
782
- if (inBrowser$1) {
398
+ if (inBrowser) {
783
399
  visibility.value = document.hidden ? "hidden" : "visible";
784
400
  }
785
401
  };
@@ -798,6 +414,361 @@
798
414
  });
799
415
  }
800
416
  }
417
+ var isDef = (val) => val !== void 0 && val !== null;
418
+ var isFunction = (val) => typeof val === "function";
419
+ var isObject$1 = (val) => val !== null && typeof val === "object";
420
+ var isPromise = (val) => isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
421
+ var isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
422
+ function isMobile(value) {
423
+ value = value.replace(/[^-|\d]/g, "");
424
+ return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
425
+ }
426
+ var isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
427
+ var isIOS$1 = () => inBrowser$1 ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
428
+ function getScrollTop(el) {
429
+ var top2 = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
430
+ return Math.max(top2, 0);
431
+ }
432
+ function setScrollTop(el, value) {
433
+ if ("scrollTop" in el) {
434
+ el.scrollTop = value;
435
+ } else {
436
+ el.scrollTo(el.scrollX, value);
437
+ }
438
+ }
439
+ function getRootScrollTop() {
440
+ return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
441
+ }
442
+ function setRootScrollTop(value) {
443
+ setScrollTop(window, value);
444
+ setScrollTop(document.body, value);
445
+ }
446
+ function getElementTop(el, scroller) {
447
+ if (el === window) {
448
+ return 0;
449
+ }
450
+ var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
451
+ return useRect(el).top + scrollTop;
452
+ }
453
+ var isIOS = isIOS$1();
454
+ function resetScroll() {
455
+ if (isIOS) {
456
+ setRootScrollTop(getRootScrollTop());
457
+ }
458
+ }
459
+ var stopPropagation = (event) => event.stopPropagation();
460
+ function preventDefault(event, isStopPropagation) {
461
+ if (typeof event.cancelable !== "boolean" || event.cancelable) {
462
+ event.preventDefault();
463
+ }
464
+ if (isStopPropagation) {
465
+ stopPropagation(event);
466
+ }
467
+ }
468
+ function trigger(target, type) {
469
+ var inputEvent = document.createEvent("HTMLEvents");
470
+ inputEvent.initEvent(type, true, true);
471
+ target.dispatchEvent(inputEvent);
472
+ }
473
+ function isHidden(elementRef) {
474
+ var el = vue.unref(elementRef);
475
+ if (!el) {
476
+ return false;
477
+ }
478
+ var style = window.getComputedStyle(el);
479
+ var hidden = style.display === "none";
480
+ var parentHidden = el.offsetParent === null && style.position !== "fixed";
481
+ return hidden || parentHidden;
482
+ }
483
+ function addUnit(value) {
484
+ if (!isDef(value)) {
485
+ return void 0;
486
+ }
487
+ return isNumeric(value) ? value + "px" : String(value);
488
+ }
489
+ function getSizeStyle(originSize) {
490
+ if (isDef(originSize)) {
491
+ var size = addUnit(originSize);
492
+ return {
493
+ width: size,
494
+ height: size
495
+ };
496
+ }
497
+ }
498
+ function getZIndexStyle(zIndex) {
499
+ var style = {};
500
+ if (zIndex !== void 0) {
501
+ style.zIndex = +zIndex;
502
+ }
503
+ return style;
504
+ }
505
+ var rootFontSize;
506
+ function getRootFontSize() {
507
+ if (!rootFontSize) {
508
+ var doc = document.documentElement;
509
+ var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
510
+ rootFontSize = parseFloat(fontSize);
511
+ }
512
+ return rootFontSize;
513
+ }
514
+ function convertRem(value) {
515
+ value = value.replace(/rem/g, "");
516
+ return +value * getRootFontSize();
517
+ }
518
+ function convertVw(value) {
519
+ value = value.replace(/vw/g, "");
520
+ return +value * window.innerWidth / 100;
521
+ }
522
+ function convertVh(value) {
523
+ value = value.replace(/vh/g, "");
524
+ return +value * window.innerHeight / 100;
525
+ }
526
+ function unitToPx(value) {
527
+ if (typeof value === "number") {
528
+ return value;
529
+ }
530
+ if (inBrowser$1) {
531
+ if (value.includes("rem")) {
532
+ return convertRem(value);
533
+ }
534
+ if (value.includes("vw")) {
535
+ return convertVw(value);
536
+ }
537
+ if (value.includes("vh")) {
538
+ return convertVh(value);
539
+ }
540
+ }
541
+ return parseFloat(value);
542
+ }
543
+ var camelizeRE = /-(\w)/g;
544
+ var camelize = (str) => str.replace(camelizeRE, (_, c) => c.toUpperCase());
545
+ var kebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
546
+ function padZero(num, targetLength = 2) {
547
+ var str = num + "";
548
+ while (str.length < targetLength) {
549
+ str = "0" + str;
550
+ }
551
+ return str;
552
+ }
553
+ var clamp = (num, min, max) => Math.min(Math.max(num, min), max);
554
+ function trimExtraChar(value, char, regExp) {
555
+ var index2 = value.indexOf(char);
556
+ if (index2 === -1) {
557
+ return value;
558
+ }
559
+ if (char === "-" && index2 !== 0) {
560
+ return value.slice(0, index2);
561
+ }
562
+ return value.slice(0, index2 + 1) + value.slice(index2).replace(regExp, "");
563
+ }
564
+ function formatNumber(value, allowDot = true, allowMinus = true) {
565
+ if (allowDot) {
566
+ value = trimExtraChar(value, ".", /\./g);
567
+ } else {
568
+ value = value.split(".")[0];
569
+ }
570
+ if (allowMinus) {
571
+ value = trimExtraChar(value, "-", /-/g);
572
+ } else {
573
+ value = value.replace(/-/, "");
574
+ }
575
+ var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
576
+ return value.replace(regExp, "");
577
+ }
578
+ function addNumber(num1, num2) {
579
+ var cardinal = Math.pow(10, 10);
580
+ return Math.round((num1 + num2) * cardinal) / cardinal;
581
+ }
582
+ var {
583
+ hasOwnProperty
584
+ } = Object.prototype;
585
+ function assignKey(to, from, key) {
586
+ var val = from[key];
587
+ if (!isDef(val)) {
588
+ return;
589
+ }
590
+ if (!hasOwnProperty.call(to, key) || !isObject$1(val)) {
591
+ to[key] = val;
592
+ } else {
593
+ to[key] = deepAssign(Object(to[key]), from[key]);
594
+ }
595
+ }
596
+ function deepAssign(to, from) {
597
+ Object.keys(from).forEach((key) => {
598
+ assignKey(to, from, key);
599
+ });
600
+ return to;
601
+ }
602
+ var defaultMessages = {
603
+ name: "\u59D3\u540D",
604
+ tel: "\u7535\u8BDD",
605
+ save: "\u4FDD\u5B58",
606
+ confirm: "\u786E\u8BA4",
607
+ cancel: "\u53D6\u6D88",
608
+ delete: "\u5220\u9664",
609
+ loading: "\u52A0\u8F7D\u4E2D...",
610
+ noCoupon: "\u6682\u65E0\u4F18\u60E0\u5238",
611
+ nameEmpty: "\u8BF7\u586B\u5199\u59D3\u540D",
612
+ confirmDelete: "\u786E\u5B9A\u8981\u5220\u9664\u5417",
613
+ telInvalid: "\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",
614
+ vanCalendar: {
615
+ end: "\u7ED3\u675F",
616
+ start: "\u5F00\u59CB",
617
+ title: "\u65E5\u671F\u9009\u62E9",
618
+ confirm: "\u786E\u5B9A",
619
+ startEnd: "\u5F00\u59CB/\u7ED3\u675F",
620
+ weekdays: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
621
+ monthTitle: (year, month) => year + "\u5E74" + month + "\u6708",
622
+ rangePrompt: (maxRange) => "\u6700\u591A\u9009\u62E9 " + maxRange + " \u5929"
623
+ },
624
+ vanCascader: {
625
+ select: "\u8BF7\u9009\u62E9"
626
+ },
627
+ vanContactCard: {
628
+ addText: "\u6DFB\u52A0\u8054\u7CFB\u4EBA"
629
+ },
630
+ vanContactList: {
631
+ addText: "\u65B0\u5EFA\u8054\u7CFB\u4EBA"
632
+ },
633
+ vanPagination: {
634
+ prev: "\u4E0A\u4E00\u9875",
635
+ next: "\u4E0B\u4E00\u9875"
636
+ },
637
+ vanPullRefresh: {
638
+ pulling: "\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",
639
+ loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
640
+ },
641
+ vanSubmitBar: {
642
+ label: "\u5408\u8BA1\uFF1A"
643
+ },
644
+ vanCoupon: {
645
+ unlimited: "\u65E0\u4F7F\u7528\u95E8\u69DB",
646
+ discount: (discount) => discount + "\u6298",
647
+ condition: (condition) => "\u6EE1" + condition + "\u5143\u53EF\u7528"
648
+ },
649
+ vanCouponCell: {
650
+ title: "\u4F18\u60E0\u5238",
651
+ count: (count) => count + "\u5F20\u53EF\u7528"
652
+ },
653
+ vanCouponList: {
654
+ exchange: "\u5151\u6362",
655
+ close: "\u4E0D\u4F7F\u7528\u4F18\u60E0\u5238",
656
+ enable: "\u53EF\u7528",
657
+ disabled: "\u4E0D\u53EF\u7528",
658
+ placeholder: "\u8BF7\u8F93\u5165\u4F18\u60E0\u7801"
659
+ },
660
+ vanAddressEdit: {
661
+ area: "\u5730\u533A",
662
+ postal: "\u90AE\u653F\u7F16\u7801",
663
+ areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
664
+ addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
665
+ postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
666
+ defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
667
+ },
668
+ vanAddressEditDetail: {
669
+ label: "\u8BE6\u7EC6\u5730\u5740",
670
+ placeholder: "\u8857\u9053\u95E8\u724C\u4FE1\u606F"
671
+ },
672
+ vanAddressList: {
673
+ add: "\u65B0\u589E\u5730\u5740"
674
+ }
675
+ };
676
+ var lang = vue.ref("zh-CN");
677
+ var messages = vue.reactive({
678
+ "zh-CN": defaultMessages
679
+ });
680
+ var Locale = {
681
+ messages() {
682
+ return messages[lang.value];
683
+ },
684
+ use(newLang, newMessages) {
685
+ lang.value = newLang;
686
+ this.add({
687
+ [newLang]: newMessages
688
+ });
689
+ },
690
+ add(newMessages = {}) {
691
+ deepAssign(messages, newMessages);
692
+ }
693
+ };
694
+ function createTranslate(name2) {
695
+ var prefix2 = camelize(name2) + ".";
696
+ return (path, ...args) => {
697
+ var messages2 = Locale.messages();
698
+ var message = get(messages2, prefix2 + path) || get(messages2, path);
699
+ return isFunction(message) ? message(...args) : message;
700
+ };
701
+ }
702
+ function genBem(name2, mods) {
703
+ if (!mods) {
704
+ return "";
705
+ }
706
+ if (typeof mods === "string") {
707
+ return " " + name2 + "--" + mods;
708
+ }
709
+ if (Array.isArray(mods)) {
710
+ return mods.reduce((ret, item) => ret + genBem(name2, item), "");
711
+ }
712
+ return Object.keys(mods).reduce((ret, key) => ret + (mods[key] ? genBem(name2, key) : ""), "");
713
+ }
714
+ function createBEM(name2) {
715
+ return (el, mods) => {
716
+ if (el && typeof el !== "string") {
717
+ mods = el;
718
+ el = "";
719
+ }
720
+ el = el ? name2 + "__" + el : name2;
721
+ return "" + el + genBem(el, mods);
722
+ };
723
+ }
724
+ function createNamespace(name2) {
725
+ var prefixedName = "van-" + name2;
726
+ return [prefixedName, createBEM(prefixedName), createTranslate(prefixedName)];
727
+ }
728
+ var BORDER = "van-hairline";
729
+ var BORDER_TOP = BORDER + "--top";
730
+ var BORDER_LEFT = BORDER + "--left";
731
+ var BORDER_BOTTOM = BORDER + "--bottom";
732
+ var BORDER_SURROUND = BORDER + "--surround";
733
+ var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
734
+ var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
735
+ var FORM_KEY = Symbol("van-form");
736
+ function callInterceptor(options) {
737
+ var {
738
+ interceptor,
739
+ args,
740
+ done,
741
+ canceled
742
+ } = options;
743
+ if (interceptor) {
744
+ var returnVal = interceptor.apply(null, args || []);
745
+ if (isPromise(returnVal)) {
746
+ returnVal.then((value) => {
747
+ if (value) {
748
+ done();
749
+ } else if (canceled) {
750
+ canceled();
751
+ }
752
+ }).catch(noop$1);
753
+ } else if (returnVal) {
754
+ done();
755
+ } else if (canceled) {
756
+ canceled();
757
+ }
758
+ } else {
759
+ done();
760
+ }
761
+ }
762
+ function withInstall(options) {
763
+ options.install = (app) => {
764
+ var {
765
+ name: name2
766
+ } = options;
767
+ app.component(name2, options);
768
+ app.component(camelize("-" + name2), options);
769
+ };
770
+ return options;
771
+ }
801
772
  var [name$1u, bem$1q] = createNamespace("action-bar");
802
773
  var ACTION_BAR_KEY = Symbol(name$1u);
803
774
  var _ActionBar = vue.defineComponent({
@@ -853,15 +824,12 @@
853
824
  name: name$1t,
854
825
  props: {
855
826
  dot: Boolean,
856
- max: [Number, String],
827
+ max: numericProp,
828
+ tag: makeStringProp("div"),
857
829
  color: String,
858
830
  offset: Array,
859
- content: [Number, String],
860
- showZero: truthProp,
861
- tag: {
862
- type: String,
863
- default: "div"
864
- }
831
+ content: numericProp,
832
+ showZero: truthProp
865
833
  },
866
834
  setup(props2, {
867
835
  slots
@@ -892,25 +860,25 @@
892
860
  return content;
893
861
  }
894
862
  };
895
- var style2 = vue.computed(() => {
896
- var style3 = {
863
+ var style = vue.computed(() => {
864
+ var style2 = {
897
865
  background: props2.color
898
866
  };
899
867
  if (props2.offset) {
900
868
  var [x, y] = props2.offset;
901
869
  if (slots.default) {
902
- style3.top = addUnit(y);
870
+ style2.top = addUnit(y);
903
871
  if (typeof x === "number") {
904
- style3.right = addUnit(-x);
872
+ style2.right = addUnit(-x);
905
873
  } else {
906
- style3.right = x.startsWith("-") ? x.replace("-", "") : "-" + x;
874
+ style2.right = x.startsWith("-") ? x.replace("-", "") : "-" + x;
907
875
  }
908
876
  } else {
909
- style3.marginTop = addUnit(y);
910
- style3.marginLeft = addUnit(x);
877
+ style2.marginTop = addUnit(y);
878
+ style2.marginLeft = addUnit(x);
911
879
  }
912
880
  }
913
- return style3;
881
+ return style2;
914
882
  });
915
883
  var renderBadge = () => {
916
884
  if (hasContent() || props2.dot) {
@@ -919,7 +887,7 @@
919
887
  dot: props2.dot,
920
888
  fixed: !!slots.default
921
889
  }),
922
- "style": style2.value
890
+ "style": style.value
923
891
  }, [renderContent()]);
924
892
  }
925
893
  };
@@ -951,17 +919,14 @@
951
919
  var _ConfigProvider = vue.defineComponent({
952
920
  name: name$1s,
953
921
  props: {
922
+ tag: makeStringProp("div"),
954
923
  themeVars: Object,
955
- iconPrefix: String,
956
- tag: {
957
- type: String,
958
- default: "div"
959
- }
924
+ iconPrefix: String
960
925
  },
961
926
  setup(props2, {
962
927
  slots
963
928
  }) {
964
- var style2 = vue.computed(() => {
929
+ var style = vue.computed(() => {
965
930
  if (props2.themeVars) {
966
931
  return mapThemeVarsToCSSVars(props2.themeVars);
967
932
  }
@@ -969,29 +934,24 @@
969
934
  vue.provide(CONFIG_PROVIDER_KEY, props2);
970
935
  return () => vue.createVNode(props2.tag, {
971
936
  "class": bem$1o(),
972
- "style": style2.value
937
+ "style": style.value
973
938
  }, {
974
939
  default: () => [slots.default == null ? void 0 : slots.default()]
975
940
  });
976
941
  }
977
942
  });
978
943
  var [name$1r, bem$1n] = createNamespace("icon");
979
- function isImage(name2) {
980
- return name2 == null ? void 0 : name2.includes("/");
981
- }
944
+ var isImage = (name2) => name2 == null ? void 0 : name2.includes("/");
982
945
  var _Icon = vue.defineComponent({
983
946
  name: name$1r,
984
947
  props: {
985
948
  dot: Boolean,
949
+ tag: makeStringProp("i"),
986
950
  name: String,
987
- size: [Number, String],
988
- badge: [Number, String],
951
+ size: numericProp,
952
+ badge: numericProp,
989
953
  color: String,
990
- classPrefix: String,
991
- tag: {
992
- type: String,
993
- default: "i"
994
- }
954
+ classPrefix: String
995
955
  },
996
956
  setup(props2, {
997
957
  slots
@@ -1028,7 +988,7 @@
1028
988
  });
1029
989
  var Icon = withInstall(_Icon);
1030
990
  var [name$1q, bem$1m] = createNamespace("loading");
1031
- var SpinIcon = Array(12).fill(null).map((_2, index2) => vue.createVNode("i", {
991
+ var SpinIcon = Array(12).fill(null).map((_, index2) => vue.createVNode("i", {
1032
992
  "class": bem$1m("line", String(index2 + 1))
1033
993
  }, null));
1034
994
  var CircularIcon = vue.createVNode("svg", {
@@ -1043,15 +1003,12 @@
1043
1003
  var _Loading = vue.defineComponent({
1044
1004
  name: name$1q,
1045
1005
  props: {
1046
- size: [Number, String],
1006
+ size: numericProp,
1007
+ type: makeStringProp("circular"),
1047
1008
  color: String,
1048
1009
  vertical: Boolean,
1049
- textSize: [Number, String],
1050
- textColor: String,
1051
- type: {
1052
- type: String,
1053
- default: "circular"
1054
- }
1010
+ textSize: numericProp,
1011
+ textColor: String
1055
1012
  },
1056
1013
  setup(props2, {
1057
1014
  slots
@@ -1092,8 +1049,11 @@
1092
1049
  var _Button = vue.defineComponent({
1093
1050
  name: name$1p,
1094
1051
  props: extend({}, routeProps, {
1052
+ tag: makeStringProp("button"),
1095
1053
  text: String,
1096
1054
  icon: String,
1055
+ type: makeStringProp("default"),
1056
+ size: makeStringProp("normal"),
1097
1057
  color: String,
1098
1058
  block: Boolean,
1099
1059
  plain: Boolean,
@@ -1103,29 +1063,11 @@
1103
1063
  hairline: Boolean,
1104
1064
  disabled: Boolean,
1105
1065
  iconPrefix: String,
1106
- loadingSize: [Number, String],
1066
+ nativeType: makeStringProp("button"),
1067
+ loadingSize: numericProp,
1107
1068
  loadingText: String,
1108
1069
  loadingType: String,
1109
- tag: {
1110
- type: String,
1111
- default: "button"
1112
- },
1113
- type: {
1114
- type: String,
1115
- default: "default"
1116
- },
1117
- size: {
1118
- type: String,
1119
- default: "normal"
1120
- },
1121
- nativeType: {
1122
- type: String,
1123
- default: "button"
1124
- },
1125
- iconPosition: {
1126
- type: String,
1127
- default: "left"
1128
- }
1070
+ iconPosition: makeStringProp("left")
1129
1071
  }),
1130
1072
  emits: ["click"],
1131
1073
  setup(props2, {
@@ -1179,18 +1121,18 @@
1179
1121
  plain
1180
1122
  } = props2;
1181
1123
  if (color) {
1182
- var style2 = {
1124
+ var style = {
1183
1125
  color: plain ? color : "white"
1184
1126
  };
1185
1127
  if (!plain) {
1186
- style2.background = color;
1128
+ style.background = color;
1187
1129
  }
1188
1130
  if (color.includes("gradient")) {
1189
- style2.border = 0;
1131
+ style.border = 0;
1190
1132
  } else {
1191
- style2.borderColor = color;
1133
+ style.borderColor = color;
1192
1134
  }
1193
- return style2;
1135
+ return style;
1194
1136
  }
1195
1137
  };
1196
1138
  var onClick = (event) => {
@@ -1312,7 +1254,7 @@
1312
1254
  text: String,
1313
1255
  icon: String,
1314
1256
  color: String,
1315
- badge: [Number, String],
1257
+ badge: numericProp,
1316
1258
  iconClass: unknownProp,
1317
1259
  iconPrefix: String
1318
1260
  }),
@@ -1360,9 +1302,9 @@
1360
1302
  var ActionBarIcon = withInstall(_ActionBarIcon);
1361
1303
  var popupSharedProps = {
1362
1304
  show: Boolean,
1363
- zIndex: [Number, String],
1305
+ zIndex: numericProp,
1364
1306
  overlay: truthProp,
1365
- duration: [Number, String],
1307
+ duration: numericProp,
1366
1308
  teleport: [String, Object],
1367
1309
  lockScroll: truthProp,
1368
1310
  lazyRender: truthProp,
@@ -1455,9 +1397,9 @@
1455
1397
  };
1456
1398
  var lock = () => {
1457
1399
  document.addEventListener("touchstart", touch.start);
1458
- document.addEventListener("touchmove", onTouchMove, supportsPassive$1 ? {
1400
+ document.addEventListener("touchmove", onTouchMove, {
1459
1401
  passive: false
1460
- } : false);
1402
+ });
1461
1403
  if (!totalLockCount) {
1462
1404
  document.body.classList.add(BODY_LOCK_CLASS);
1463
1405
  }
@@ -1509,8 +1451,8 @@
1509
1451
  name: name$1m,
1510
1452
  props: {
1511
1453
  show: Boolean,
1512
- zIndex: [Number, String],
1513
- duration: [Number, String],
1454
+ zIndex: numericProp,
1455
+ duration: numericProp,
1514
1456
  className: unknownProp,
1515
1457
  lockScroll: truthProp,
1516
1458
  customStyle: Object
@@ -1523,18 +1465,19 @@
1523
1465
  preventDefault(event, true);
1524
1466
  };
1525
1467
  var renderOverlay = lazyRender(() => {
1526
- var style2 = extend(getZIndexStyle(props2.zIndex), props2.customStyle);
1468
+ var style = extend(getZIndexStyle(props2.zIndex), props2.customStyle);
1527
1469
  if (isDef(props2.duration)) {
1528
- style2.animationDuration = props2.duration + "s";
1470
+ style.animationDuration = props2.duration + "s";
1529
1471
  }
1530
1472
  return vue.withDirectives(vue.createVNode("div", {
1531
- "style": style2,
1473
+ "style": style,
1532
1474
  "class": [bem$1i(), props2.className],
1533
1475
  "onTouchmove": props2.lockScroll ? preventTouchMove : noop$1
1534
1476
  }, [slots.default == null ? void 0 : slots.default()]), [[vue.vShow, props2.show]]);
1535
1477
  });
1536
1478
  return () => vue.createVNode(vue.Transition, {
1537
- "name": "van-fade"
1479
+ "name": "van-fade",
1480
+ "appear": true
1538
1481
  }, {
1539
1482
  default: () => [renderOverlay()]
1540
1483
  });
@@ -1548,23 +1491,14 @@
1548
1491
  inheritAttrs: false,
1549
1492
  props: extend({}, popupSharedProps, {
1550
1493
  round: Boolean,
1494
+ position: makeStringProp("center"),
1495
+ closeIcon: makeStringProp("cross"),
1551
1496
  closeable: Boolean,
1552
1497
  transition: String,
1553
1498
  iconPrefix: String,
1554
1499
  closeOnPopstate: Boolean,
1555
- safeAreaInsetBottom: Boolean,
1556
- position: {
1557
- type: String,
1558
- default: "center"
1559
- },
1560
- closeIcon: {
1561
- type: String,
1562
- default: "cross"
1563
- },
1564
- closeIconPosition: {
1565
- type: String,
1566
- default: "top-right"
1567
- }
1500
+ closeIconPosition: makeStringProp("top-right"),
1501
+ safeAreaInsetBottom: Boolean
1568
1502
  }),
1569
1503
  emits: ["open", "close", "click", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
1570
1504
  setup(props2, {
@@ -1577,15 +1511,15 @@
1577
1511
  var zIndex = vue.ref();
1578
1512
  var popupRef = vue.ref();
1579
1513
  var lazyRender = useLazyRender(() => props2.show || !props2.lazyRender);
1580
- var style2 = vue.computed(() => {
1581
- var style3 = {
1514
+ var style = vue.computed(() => {
1515
+ var style2 = {
1582
1516
  zIndex: zIndex.value
1583
1517
  };
1584
1518
  if (isDef(props2.duration)) {
1585
1519
  var key = props2.position === "center" ? "animationDuration" : "transitionDuration";
1586
- style3[key] = props2.duration + "s";
1520
+ style2[key] = props2.duration + "s";
1587
1521
  }
1588
- return style3;
1522
+ return style2;
1589
1523
  });
1590
1524
  var open = () => {
1591
1525
  if (!opened) {
@@ -1656,7 +1590,7 @@
1656
1590
  } = props2;
1657
1591
  return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
1658
1592
  "ref": popupRef,
1659
- "style": style2.value,
1593
+ "style": style.value,
1660
1594
  "class": [bem$1h({
1661
1595
  round: round2,
1662
1596
  [position]: position
@@ -1738,16 +1672,13 @@
1738
1672
  title: String,
1739
1673
  round: truthProp,
1740
1674
  actions: Array,
1675
+ closeIcon: makeStringProp("cross"),
1741
1676
  closeable: truthProp,
1742
1677
  cancelText: String,
1743
1678
  description: String,
1744
1679
  closeOnPopstate: Boolean,
1745
1680
  closeOnClickAction: Boolean,
1746
- safeAreaInsetBottom: truthProp,
1747
- closeIcon: {
1748
- type: String,
1749
- default: "cross"
1750
- }
1681
+ safeAreaInsetBottom: truthProp
1751
1682
  }),
1752
1683
  emits: ["select", "cancel", "update:show"],
1753
1684
  setup(props2, {
@@ -1871,45 +1802,26 @@
1871
1802
  var MOMENTUM_LIMIT_DISTANCE = 15;
1872
1803
  var [name$1j, bem$1f] = createNamespace("picker-column");
1873
1804
  function getElementTranslateY(element) {
1874
- var style2 = window.getComputedStyle(element);
1875
- var transform = style2.transform || style2.webkitTransform;
1805
+ var {
1806
+ transform
1807
+ } = window.getComputedStyle(element);
1876
1808
  var translateY = transform.slice(7, transform.length - 1).split(", ")[5];
1877
1809
  return Number(translateY);
1878
1810
  }
1879
1811
  var PICKER_KEY = Symbol(name$1j);
1880
- function isOptionDisabled(option) {
1881
- return isObject$1(option) && option.disabled;
1882
- }
1812
+ var isOptionDisabled = (option) => isObject$1(option) && option.disabled;
1883
1813
  var Column = vue.defineComponent({
1884
1814
  name: name$1j,
1885
1815
  props: {
1816
+ textKey: makeRequiredProp(String),
1886
1817
  readonly: Boolean,
1887
1818
  allowHtml: Boolean,
1888
1819
  className: unknownProp,
1889
- textKey: {
1890
- type: String,
1891
- required: true
1892
- },
1893
- itemHeight: {
1894
- type: Number,
1895
- required: true
1896
- },
1897
- swipeDuration: {
1898
- type: [Number, String],
1899
- required: true
1900
- },
1901
- visibleItemCount: {
1902
- type: [Number, String],
1903
- required: true
1904
- },
1905
- defaultIndex: {
1906
- type: Number,
1907
- default: 0
1908
- },
1909
- initialOptions: {
1910
- type: Array,
1911
- default: () => []
1912
- }
1820
+ itemHeight: makeRequiredProp(Number),
1821
+ defaultIndex: makeNumberProp(0),
1822
+ swipeDuration: makeRequiredProp(numericProp),
1823
+ initialOptions: makeArrayProp(),
1824
+ visibleItemCount: makeRequiredProp(numericProp)
1913
1825
  },
1914
1826
  emits: ["change"],
1915
1827
  setup(props2, {
@@ -2093,28 +2005,23 @@
2093
2005
  stopMomentum
2094
2006
  });
2095
2007
  vue.watch(() => props2.initialOptions, setOptions);
2096
- vue.watch(() => props2.defaultIndex, (value) => {
2097
- setIndex(value);
2098
- });
2099
- return () => {
2100
- var wrapperStyle = {
2008
+ vue.watch(() => props2.defaultIndex, (value) => setIndex(value));
2009
+ return () => vue.createVNode("div", {
2010
+ "class": [bem$1f(), props2.className],
2011
+ "onTouchstart": onTouchStart,
2012
+ "onTouchmove": onTouchMove,
2013
+ "onTouchend": onTouchEnd,
2014
+ "onTouchcancel": onTouchEnd
2015
+ }, [vue.createVNode("ul", {
2016
+ "ref": wrapper,
2017
+ "style": {
2101
2018
  transform: "translate3d(0, " + (state.offset + baseOffset()) + "px, 0)",
2102
2019
  transitionDuration: state.duration + "ms",
2103
2020
  transitionProperty: state.duration ? "all" : "none"
2104
- };
2105
- return vue.createVNode("div", {
2106
- "class": [bem$1f(), props2.className],
2107
- "onTouchstart": onTouchStart,
2108
- "onTouchmove": onTouchMove,
2109
- "onTouchend": onTouchEnd,
2110
- "onTouchcancel": onTouchEnd
2111
- }, [vue.createVNode("ul", {
2112
- "ref": wrapper,
2113
- "style": wrapperStyle,
2114
- "class": bem$1f("wrapper"),
2115
- "onTransitionend": stopMomentum
2116
- }, [renderOptions()])]);
2117
- };
2021
+ },
2022
+ "class": bem$1f("wrapper"),
2023
+ "onTransitionend": stopMomentum
2024
+ }, [renderOptions()])]);
2118
2025
  }
2119
2026
  });
2120
2027
  var [name$1i, bem$1e, t$i] = createNamespace("picker");
@@ -2123,39 +2030,21 @@
2123
2030
  loading: Boolean,
2124
2031
  readonly: Boolean,
2125
2032
  allowHtml: Boolean,
2033
+ itemHeight: makeNumericProp(44),
2126
2034
  showToolbar: truthProp,
2035
+ swipeDuration: makeNumericProp(1e3),
2036
+ visibleItemCount: makeNumericProp(6),
2127
2037
  cancelButtonText: String,
2128
- confirmButtonText: String,
2129
- itemHeight: {
2130
- type: [Number, String],
2131
- default: 44
2132
- },
2133
- visibleItemCount: {
2134
- type: [Number, String],
2135
- default: 6
2136
- },
2137
- swipeDuration: {
2138
- type: [Number, String],
2139
- default: 1e3
2140
- }
2038
+ confirmButtonText: String
2141
2039
  };
2142
2040
  var _Picker = vue.defineComponent({
2143
2041
  name: name$1i,
2144
2042
  props: extend({}, pickerProps, {
2043
+ columns: makeArrayProp(),
2145
2044
  valueKey: String,
2146
- columnsFieldNames: Object,
2147
- columns: {
2148
- type: Array,
2149
- default: () => []
2150
- },
2151
- defaultIndex: {
2152
- type: [Number, String],
2153
- default: 0
2154
- },
2155
- toolbarPosition: {
2156
- type: String,
2157
- default: "top"
2158
- }
2045
+ defaultIndex: makeNumericProp(0),
2046
+ toolbarPosition: makeStringProp("top"),
2047
+ columnsFieldNames: Object
2159
2048
  }),
2160
2049
  emits: ["confirm", "cancel", "change"],
2161
2050
  setup(props2, {
@@ -2426,26 +2315,18 @@
2426
2315
  var EMPTY_CODE = "000000";
2427
2316
  var INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
2428
2317
  var INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
2429
- function isOverseaCode(code) {
2430
- return code[0] === "9";
2431
- }
2318
+ var isOverseaCode = (code) => code[0] === "9";
2432
2319
  var props$q = extend({}, pickerProps, {
2433
2320
  value: String,
2321
+ columnsNum: makeNumericProp(3),
2322
+ columnsPlaceholder: makeArrayProp(),
2434
2323
  areaList: {
2435
2324
  type: Object,
2436
2325
  default: () => ({})
2437
2326
  },
2438
- columnsNum: {
2439
- type: [Number, String],
2440
- default: 3
2441
- },
2442
2327
  isOverseaCode: {
2443
2328
  type: Function,
2444
2329
  default: isOverseaCode
2445
- },
2446
- columnsPlaceholder: {
2447
- type: Array,
2448
- default: () => []
2449
2330
  }
2450
2331
  });
2451
2332
  var _Area = vue.defineComponent({
@@ -2664,9 +2545,9 @@
2664
2545
  var cellProps = {
2665
2546
  icon: String,
2666
2547
  size: String,
2667
- title: [Number, String],
2668
- value: [Number, String],
2669
- label: [Number, String],
2548
+ title: numericProp,
2549
+ value: numericProp,
2550
+ label: numericProp,
2670
2551
  center: Boolean,
2671
2552
  isLink: Boolean,
2672
2553
  border: truthProp,
@@ -2860,16 +2741,20 @@
2860
2741
  var fieldSharedProps = {
2861
2742
  id: String,
2862
2743
  name: String,
2863
- formatter: Function,
2864
2744
  leftIcon: String,
2865
2745
  rightIcon: String,
2866
2746
  autofocus: Boolean,
2867
2747
  clearable: Boolean,
2868
- maxlength: [Number, String],
2748
+ maxlength: numericProp,
2749
+ formatter: Function,
2750
+ clearIcon: makeStringProp("clear"),
2751
+ modelValue: makeNumericProp(""),
2869
2752
  inputAlign: String,
2870
2753
  placeholder: String,
2871
2754
  autocomplete: String,
2872
2755
  errorMessage: String,
2756
+ clearTrigger: makeStringProp("focus"),
2757
+ formatTrigger: makeStringProp("onChange"),
2873
2758
  error: {
2874
2759
  type: Boolean,
2875
2760
  default: null
@@ -2881,37 +2766,18 @@
2881
2766
  readonly: {
2882
2767
  type: Boolean,
2883
2768
  default: null
2884
- },
2885
- clearIcon: {
2886
- type: String,
2887
- default: "clear"
2888
- },
2889
- modelValue: {
2890
- type: [Number, String],
2891
- default: ""
2892
- },
2893
- clearTrigger: {
2894
- type: String,
2895
- default: "focus"
2896
- },
2897
- formatTrigger: {
2898
- type: String,
2899
- default: "onChange"
2900
2769
  }
2901
2770
  };
2902
2771
  var props$p = extend({}, cellProps, fieldSharedProps, {
2903
- rows: [Number, String],
2772
+ rows: numericProp,
2773
+ type: makeStringProp("text"),
2904
2774
  rules: Array,
2905
2775
  autosize: [Boolean, Object],
2906
- labelWidth: [Number, String],
2776
+ labelWidth: numericProp,
2907
2777
  labelClass: unknownProp,
2908
2778
  labelAlign: String,
2909
2779
  showWordLimit: Boolean,
2910
2780
  errorMessageAlign: String,
2911
- type: {
2912
- type: String,
2913
- default: "text"
2914
- },
2915
2781
  colon: {
2916
2782
  type: Boolean,
2917
2783
  default: null
@@ -3204,10 +3070,13 @@
3204
3070
  }
3205
3071
  var message = props2.errorMessage || state.validateMessage;
3206
3072
  if (message) {
3073
+ var slot = slots["error-message"];
3207
3074
  var errorMessageAlign = getProp("errorMessageAlign");
3208
3075
  return vue.createVNode("div", {
3209
3076
  "class": bem$1b("error-message", errorMessageAlign)
3210
- }, [message]);
3077
+ }, [slot ? slot({
3078
+ message
3079
+ }) : message]);
3211
3080
  }
3212
3081
  };
3213
3082
  var renderLabel = () => {
@@ -3293,8 +3162,10 @@
3293
3162
  state.show = show;
3294
3163
  };
3295
3164
  var open = (props2) => {
3296
- extend(state, props2);
3297
- vue.nextTick(() => toggle(true));
3165
+ extend(state, props2, {
3166
+ transitionAppear: true
3167
+ });
3168
+ toggle(true);
3298
3169
  };
3299
3170
  var close = () => toggle(false);
3300
3171
  useExpose({
@@ -3341,33 +3212,21 @@
3341
3212
  props: {
3342
3213
  icon: String,
3343
3214
  show: Boolean,
3215
+ type: makeStringProp("text"),
3344
3216
  overlay: Boolean,
3345
- message: [Number, String],
3346
- iconSize: [Number, String],
3217
+ message: numericProp,
3218
+ iconSize: numericProp,
3219
+ duration: makeNumberProp(2e3),
3220
+ position: makeStringProp("middle"),
3347
3221
  className: unknownProp,
3348
3222
  iconPrefix: String,
3223
+ transition: makeStringProp("van-fade"),
3349
3224
  loadingType: String,
3350
3225
  forbidClick: Boolean,
3351
3226
  overlayClass: unknownProp,
3352
3227
  overlayStyle: Object,
3353
3228
  closeOnClick: Boolean,
3354
- closeOnClickOverlay: Boolean,
3355
- type: {
3356
- type: String,
3357
- default: "text"
3358
- },
3359
- duration: {
3360
- type: Number,
3361
- default: 2e3
3362
- },
3363
- position: {
3364
- type: String,
3365
- default: "middle"
3366
- },
3367
- transition: {
3368
- type: String,
3369
- default: "van-fade"
3370
- }
3229
+ closeOnClickOverlay: Boolean
3371
3230
  },
3372
3231
  emits: ["update:show"],
3373
3232
  setup(props2, {
@@ -3459,7 +3318,7 @@
3459
3318
  });
3460
3319
  }
3461
3320
  });
3462
- var defaultOptions$2 = {
3321
+ var defaultOptions$1 = {
3463
3322
  icon: "",
3464
3323
  type: "text",
3465
3324
  message: "",
@@ -3482,7 +3341,7 @@
3482
3341
  };
3483
3342
  var queue = [];
3484
3343
  var allowMultiple = false;
3485
- var currentOptions = extend({}, defaultOptions$2);
3344
+ var currentOptions = extend({}, defaultOptions$1);
3486
3345
  var defaultOptionsMap = new Map();
3487
3346
  function parseOptions$1(message) {
3488
3347
  if (isObject$1(message)) {
@@ -3539,7 +3398,7 @@
3539
3398
  return queue[queue.length - 1];
3540
3399
  }
3541
3400
  function Toast(options = {}) {
3542
- if (!inBrowser$2) {
3401
+ if (!inBrowser$1) {
3543
3402
  return {};
3544
3403
  }
3545
3404
  var toast = getInstance();
@@ -3580,7 +3439,7 @@
3580
3439
  if (typeof type === "string") {
3581
3440
  defaultOptionsMap.delete(type);
3582
3441
  } else {
3583
- currentOptions = extend({}, defaultOptions$2);
3442
+ currentOptions = extend({}, defaultOptions$1);
3584
3443
  defaultOptionsMap.clear();
3585
3444
  }
3586
3445
  };
@@ -3598,11 +3457,12 @@
3598
3457
  props: extend({}, popupSharedProps, {
3599
3458
  title: String,
3600
3459
  theme: String,
3601
- width: [Number, String],
3460
+ width: numericProp,
3602
3461
  message: [String, Function],
3603
3462
  callback: Function,
3604
3463
  allowHtml: Boolean,
3605
3464
  className: unknownProp,
3465
+ transition: makeStringProp("van-dialog-bounce"),
3606
3466
  messageAlign: String,
3607
3467
  closeOnPopstate: truthProp,
3608
3468
  showCancelButton: Boolean,
@@ -3611,11 +3471,7 @@
3611
3471
  confirmButtonText: String,
3612
3472
  confirmButtonColor: String,
3613
3473
  showConfirmButton: truthProp,
3614
- closeOnClickOverlay: Boolean,
3615
- transition: {
3616
- type: String,
3617
- default: "van-dialog-bounce"
3618
- }
3474
+ closeOnClickOverlay: Boolean
3619
3475
  }),
3620
3476
  emits: ["confirm", "cancel", "update:show"],
3621
3477
  setup(props2, {
@@ -3798,7 +3654,7 @@
3798
3654
  } = mountComponent(Wrapper));
3799
3655
  }
3800
3656
  function Dialog(options) {
3801
- if (!inBrowser$2) {
3657
+ if (!inBrowser$1) {
3802
3658
  return Promise.resolve();
3803
3659
  }
3804
3660
  return new Promise((resolve, reject) => {
@@ -3862,7 +3718,7 @@
3862
3718
  var _Switch = vue.defineComponent({
3863
3719
  name: name$1c,
3864
3720
  props: {
3865
- size: [Number, String],
3721
+ size: numericProp,
3866
3722
  loading: Boolean,
3867
3723
  disabled: Boolean,
3868
3724
  modelValue: unknownProp,
@@ -3908,7 +3764,7 @@
3908
3764
  inactiveColor
3909
3765
  } = props2;
3910
3766
  var checked = isChecked();
3911
- var style2 = {
3767
+ var style = {
3912
3768
  fontSize: addUnit(size),
3913
3769
  backgroundColor: checked ? activeColor : inactiveColor
3914
3770
  };
@@ -3919,7 +3775,7 @@
3919
3775
  loading,
3920
3776
  disabled
3921
3777
  }),
3922
- "style": style2,
3778
+ "style": style,
3923
3779
  "aria-checked": checked,
3924
3780
  "onClick": onClick
3925
3781
  }, [vue.createVNode("div", {
@@ -3936,10 +3792,10 @@
3936
3792
  show: Boolean,
3937
3793
  value: String,
3938
3794
  focused: Boolean,
3939
- detailRows: [Number, String],
3795
+ detailRows: numericProp,
3940
3796
  searchResult: Array,
3941
3797
  errorMessage: String,
3942
- detailMaxlength: [Number, String],
3798
+ detailMaxlength: numericProp,
3943
3799
  showSearchResult: Boolean
3944
3800
  },
3945
3801
  emits: ["blur", "focus", "input", "select-search"],
@@ -4019,9 +3875,7 @@
4019
3875
  postalCode: "",
4020
3876
  addressDetail: ""
4021
3877
  };
4022
- function isPostal(value) {
4023
- return /^\d{6}$/.test(value);
4024
- }
3878
+ var isPostal = (value) => /^\d{6}$/.test(value);
4025
3879
  var props$o = {
4026
3880
  areaList: Object,
4027
3881
  isSaving: Boolean,
@@ -4033,20 +3887,15 @@
4033
3887
  showPostal: Boolean,
4034
3888
  disableArea: Boolean,
4035
3889
  searchResult: Array,
4036
- telMaxlength: [Number, String],
3890
+ telMaxlength: numericProp,
4037
3891
  showSetDefault: Boolean,
4038
3892
  saveButtonText: String,
4039
3893
  areaPlaceholder: String,
4040
3894
  deleteButtonText: String,
4041
3895
  showSearchResult: Boolean,
4042
- detailRows: {
4043
- type: [Number, String],
4044
- default: 1
4045
- },
4046
- detailMaxlength: {
4047
- type: [Number, String],
4048
- default: 200
4049
- },
3896
+ detailRows: makeNumericProp(1),
3897
+ detailMaxlength: makeNumericProp(200),
3898
+ areaColumnsPlaceholder: makeArrayProp(),
4050
3899
  addressInfo: {
4051
3900
  type: Object,
4052
3901
  default: () => extend({}, DEFAULT_DATA)
@@ -4058,10 +3907,6 @@
4058
3907
  postalValidator: {
4059
3908
  type: Function,
4060
3909
  default: isPostal
4061
- },
4062
- areaColumnsPlaceholder: {
4063
- type: Array,
4064
- default: () => []
4065
3910
  }
4066
3911
  };
4067
3912
  var _AddressEdit = vue.defineComponent({
@@ -4336,7 +4181,7 @@
4336
4181
  var [name$19, bem$15] = createNamespace("radio-group");
4337
4182
  var props$n = {
4338
4183
  disabled: Boolean,
4339
- iconSize: [Number, String],
4184
+ iconSize: numericProp,
4340
4185
  direction: String,
4341
4186
  modelValue: unknownProp,
4342
4187
  checkedColor: String
@@ -4374,15 +4219,12 @@
4374
4219
  size: String,
4375
4220
  mark: Boolean,
4376
4221
  show: truthProp,
4222
+ type: makeStringProp("default"),
4377
4223
  color: String,
4378
4224
  plain: Boolean,
4379
4225
  round: Boolean,
4380
4226
  textColor: String,
4381
- closeable: Boolean,
4382
- type: {
4383
- type: String,
4384
- default: "default"
4385
- }
4227
+ closeable: Boolean
4386
4228
  },
4387
4229
  emits: ["close"],
4388
4230
  setup(props2, {
@@ -4442,27 +4284,21 @@
4442
4284
  var Tag = withInstall(_Tag);
4443
4285
  var checkerProps = {
4444
4286
  name: unknownProp,
4287
+ shape: makeStringProp("round"),
4445
4288
  disabled: Boolean,
4446
- iconSize: [Number, String],
4289
+ iconSize: numericProp,
4447
4290
  modelValue: unknownProp,
4448
4291
  checkedColor: String,
4449
4292
  labelPosition: String,
4450
- labelDisabled: Boolean,
4451
- shape: {
4452
- type: String,
4453
- default: "round"
4454
- }
4293
+ labelDisabled: Boolean
4455
4294
  };
4456
4295
  var Checker = vue.defineComponent({
4457
4296
  props: extend({}, checkerProps, {
4297
+ bem: makeRequiredProp(Function),
4458
4298
  role: String,
4459
4299
  parent: Object,
4460
4300
  checked: Boolean,
4461
- bindGroup: truthProp,
4462
- bem: {
4463
- type: Function,
4464
- required: true
4465
- }
4301
+ bindGroup: truthProp
4466
4302
  }),
4467
4303
  emits: ["click", "toggle"],
4468
4304
  setup(props2, {
@@ -4587,13 +4423,10 @@
4587
4423
  var AddressListItem = vue.defineComponent({
4588
4424
  name: name$16,
4589
4425
  props: {
4426
+ address: makeRequiredProp(Object),
4590
4427
  disabled: Boolean,
4591
4428
  switchable: Boolean,
4592
- defaultTagText: String,
4593
- address: {
4594
- type: Object,
4595
- required: true
4596
- }
4429
+ defaultTagText: String
4597
4430
  },
4598
4431
  emits: ["edit", "click", "select"],
4599
4432
  setup(props2, {
@@ -4675,19 +4508,13 @@
4675
4508
  var _AddressList = vue.defineComponent({
4676
4509
  name: name$15,
4677
4510
  props: {
4678
- modelValue: [Number, String],
4511
+ list: makeArrayProp(),
4512
+ modelValue: numericProp,
4679
4513
  switchable: truthProp,
4680
4514
  disabledText: String,
4515
+ disabledList: makeArrayProp(),
4681
4516
  addButtonText: String,
4682
- defaultTagText: String,
4683
- list: {
4684
- type: Array,
4685
- default: () => []
4686
- },
4687
- disabledList: {
4688
- type: Array,
4689
- default: () => []
4690
- }
4517
+ defaultTagText: String
4691
4518
  },
4692
4519
  emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
4693
4520
  setup(props2, {
@@ -4754,9 +4581,7 @@
4754
4581
  });
4755
4582
  var AddressList = withInstall(_AddressList);
4756
4583
  var [name$14, bem$10, t$d] = createNamespace("calendar");
4757
- function formatMonthTitle(date) {
4758
- return t$d("monthTitle", date.getFullYear(), date.getMonth() + 1);
4759
- }
4584
+ var formatMonthTitle = (date) => t$d("monthTitle", date.getFullYear(), date.getMonth() + 1);
4760
4585
  function compareMonth(date1, date2) {
4761
4586
  var year1 = date1.getFullYear();
4762
4587
  var year2 = date2.getFullYear();
@@ -4835,9 +4660,7 @@
4835
4660
  }
4836
4661
  return parseInt(value, 10);
4837
4662
  }
4838
- function getMonthEndDay(year, month) {
4839
- return 32 - new Date(year, month - 1, 32).getDate();
4840
- }
4663
+ var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
4841
4664
  var useHeight = (element) => {
4842
4665
  var height = vue.ref();
4843
4666
  vue.onMounted(() => vue.nextTick(() => {
@@ -4849,24 +4672,18 @@
4849
4672
  var CalendarDay = vue.defineComponent({
4850
4673
  name: name$13,
4851
4674
  props: {
4675
+ item: makeRequiredProp(Object),
4852
4676
  color: String,
4853
4677
  index: Number,
4854
- rowHeight: String,
4855
- offset: {
4856
- type: Number,
4857
- default: 0
4858
- },
4859
- item: {
4860
- type: Object,
4861
- required: true
4862
- }
4678
+ offset: makeNumberProp(0),
4679
+ rowHeight: String
4863
4680
  },
4864
4681
  emits: ["click"],
4865
4682
  setup(props2, {
4866
4683
  emit,
4867
4684
  slots
4868
4685
  }) {
4869
- var style2 = vue.computed(() => {
4686
+ var style = vue.computed(() => {
4870
4687
  var {
4871
4688
  item,
4872
4689
  index: index2,
@@ -4874,15 +4691,15 @@
4874
4691
  offset: offset2,
4875
4692
  rowHeight
4876
4693
  } = props2;
4877
- var style3 = {
4694
+ var style2 = {
4878
4695
  height: rowHeight
4879
4696
  };
4880
4697
  if (item.type === "placeholder") {
4881
- style3.width = "100%";
4882
- return style3;
4698
+ style2.width = "100%";
4699
+ return style2;
4883
4700
  }
4884
4701
  if (index2 === 0) {
4885
- style3.marginLeft = 100 * offset2 / 7 + "%";
4702
+ style2.marginLeft = 100 * offset2 / 7 + "%";
4886
4703
  }
4887
4704
  if (color) {
4888
4705
  switch (item.type) {
@@ -4891,14 +4708,14 @@
4891
4708
  case "start-end":
4892
4709
  case "multiple-middle":
4893
4710
  case "multiple-selected":
4894
- style3.background = color;
4711
+ style2.background = color;
4895
4712
  break;
4896
4713
  case "middle":
4897
- style3.color = color;
4714
+ style2.color = color;
4898
4715
  break;
4899
4716
  }
4900
4717
  }
4901
- return style3;
4718
+ return style2;
4902
4719
  });
4903
4720
  var onClick = () => {
4904
4721
  if (props2.item.type !== "disabled") {
@@ -4956,12 +4773,12 @@
4956
4773
  if (type === "placeholder") {
4957
4774
  return vue.createVNode("div", {
4958
4775
  "class": bem$10("day"),
4959
- "style": style2.value
4776
+ "style": style.value
4960
4777
  }, null);
4961
4778
  }
4962
4779
  return vue.createVNode("div", {
4963
4780
  "role": "gridcell",
4964
- "style": style2.value,
4781
+ "style": style.value,
4965
4782
  "class": [bem$10("day", type), className],
4966
4783
  "tabindex": type === "disabled" ? void 0 : -1,
4967
4784
  "onClick": onClick
@@ -4971,29 +4788,20 @@
4971
4788
  });
4972
4789
  var [name$12] = createNamespace("calendar-month");
4973
4790
  var props$m = {
4791
+ date: makeRequiredProp(Date),
4974
4792
  type: String,
4975
4793
  color: String,
4794
+ minDate: makeRequiredProp(Date),
4795
+ maxDate: makeRequiredProp(Date),
4976
4796
  showMark: Boolean,
4977
- rowHeight: [Number, String],
4797
+ rowHeight: numericProp,
4978
4798
  formatter: Function,
4979
4799
  lazyRender: Boolean,
4980
4800
  currentDate: [Date, Array],
4981
4801
  allowSameDay: Boolean,
4982
4802
  showSubtitle: Boolean,
4983
4803
  showMonthTitle: Boolean,
4984
- firstDayOfWeek: Number,
4985
- date: {
4986
- type: Date,
4987
- required: true
4988
- },
4989
- minDate: {
4990
- type: Date,
4991
- required: true
4992
- },
4993
- maxDate: {
4994
- type: Date,
4995
- required: true
4996
- }
4804
+ firstDayOfWeek: Number
4997
4805
  };
4998
4806
  var CalendarMonth = vue.defineComponent({
4999
4807
  name: name$12,
@@ -5022,7 +4830,7 @@
5022
4830
  var scrollIntoView = (body) => {
5023
4831
  var el = props2.showSubtitle ? daysRef.value : monthRef.value;
5024
4832
  if (el) {
5025
- var scrollTop = el.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop;
4833
+ var scrollTop = useRect(el).top - useRect(body).top + body.scrollTop;
5026
4834
  setScrollTop(body, scrollTop);
5027
4835
  }
5028
4836
  };
@@ -5227,16 +5035,19 @@
5227
5035
  });
5228
5036
  var props$l = {
5229
5037
  show: Boolean,
5038
+ type: makeStringProp("single"),
5230
5039
  title: String,
5231
5040
  color: String,
5232
5041
  round: truthProp,
5233
5042
  readonly: Boolean,
5234
5043
  poppable: truthProp,
5044
+ maxRange: makeNumericProp(null),
5045
+ position: makeStringProp("bottom"),
5235
5046
  teleport: [String, Object],
5236
5047
  showMark: truthProp,
5237
5048
  showTitle: truthProp,
5238
5049
  formatter: Function,
5239
- rowHeight: [Number, String],
5050
+ rowHeight: numericProp,
5240
5051
  confirmText: String,
5241
5052
  rangePrompt: String,
5242
5053
  lazyRender: truthProp,
@@ -5245,21 +5056,10 @@
5245
5056
  allowSameDay: Boolean,
5246
5057
  showSubtitle: truthProp,
5247
5058
  closeOnPopstate: truthProp,
5059
+ showRangePrompt: truthProp,
5248
5060
  confirmDisabledText: String,
5249
5061
  closeOnClickOverlay: truthProp,
5250
5062
  safeAreaInsetBottom: truthProp,
5251
- type: {
5252
- type: String,
5253
- default: "single"
5254
- },
5255
- position: {
5256
- type: String,
5257
- default: "bottom"
5258
- },
5259
- maxRange: {
5260
- type: [Number, String],
5261
- default: null
5262
- },
5263
5063
  minDate: {
5264
5064
  type: Date,
5265
5065
  validator: isDate,
@@ -5274,13 +5074,9 @@
5274
5074
  }
5275
5075
  },
5276
5076
  firstDayOfWeek: {
5277
- type: [Number, String],
5077
+ type: numericProp,
5278
5078
  default: 0,
5279
5079
  validator: (val) => val >= 0 && val <= 6
5280
- },
5281
- showRangePrompt: {
5282
- type: Boolean,
5283
- default: true
5284
5080
  }
5285
5081
  };
5286
5082
  var _Calendar = vue.defineComponent({
@@ -5502,8 +5298,7 @@
5502
5298
  if (compareToStart === 1) {
5503
5299
  var disabledDay = getDisabledDate(disabledDays.value, startDay, date);
5504
5300
  if (disabledDay) {
5505
- var lastAbledEndDay = getPrevDay(disabledDay);
5506
- select([startDay, lastAbledEndDay]);
5301
+ select([startDay, getPrevDay(disabledDay)]);
5507
5302
  } else {
5508
5303
  select([startDay, date], true);
5509
5304
  }
@@ -5580,18 +5375,14 @@
5580
5375
  "showTitle": props2.showTitle,
5581
5376
  "showSubtitle": props2.showSubtitle,
5582
5377
  "firstDayOfWeek": dayOffset.value,
5583
- "onClick-subtitle": (event) => {
5584
- emit("click-subtitle", event);
5585
- }
5378
+ "onClick-subtitle": (event) => emit("click-subtitle", event)
5586
5379
  }, pick(slots, ["title", "subtitle"])), vue.createVNode("div", {
5587
5380
  "ref": bodyRef,
5588
5381
  "class": bem$10("body"),
5589
5382
  "onScroll": onScroll
5590
5383
  }, [months.value.map(renderMonth)]), renderFooter()]);
5591
5384
  vue.watch(() => props2.show, init);
5592
- vue.watch(() => [props2.type, props2.minDate, props2.maxDate], () => {
5593
- reset(getInitialDate(currentDate.value));
5594
- });
5385
+ vue.watch(() => [props2.type, props2.minDate, props2.maxDate], () => reset(getInitialDate(currentDate.value)));
5595
5386
  vue.watch(() => props2.defaultDate, (value = null) => {
5596
5387
  currentDate.value = value;
5597
5388
  scrollIntoView();
@@ -5631,22 +5422,16 @@
5631
5422
  alt: String,
5632
5423
  fit: String,
5633
5424
  round: Boolean,
5634
- width: [Number, String],
5635
- height: [Number, String],
5636
- radius: [Number, String],
5425
+ width: numericProp,
5426
+ height: numericProp,
5427
+ radius: numericProp,
5637
5428
  lazyLoad: Boolean,
5638
- iconSize: [Number, String],
5429
+ iconSize: numericProp,
5639
5430
  showError: truthProp,
5431
+ errorIcon: makeStringProp("photo-fail"),
5640
5432
  iconPrefix: String,
5641
5433
  showLoading: truthProp,
5642
- errorIcon: {
5643
- type: String,
5644
- default: "photo-fail"
5645
- },
5646
- loadingIcon: {
5647
- type: String,
5648
- default: "photo"
5649
- }
5434
+ loadingIcon: makeStringProp("photo")
5650
5435
  },
5651
5436
  emits: ["load", "error"],
5652
5437
  setup(props2, {
@@ -5659,19 +5444,19 @@
5659
5444
  var {
5660
5445
  $Lazyload
5661
5446
  } = vue.getCurrentInstance().proxy;
5662
- var style2 = vue.computed(() => {
5663
- var style3 = {};
5447
+ var style = vue.computed(() => {
5448
+ var style2 = {};
5664
5449
  if (isDef(props2.width)) {
5665
- style3.width = addUnit(props2.width);
5450
+ style2.width = addUnit(props2.width);
5666
5451
  }
5667
5452
  if (isDef(props2.height)) {
5668
- style3.height = addUnit(props2.height);
5453
+ style2.height = addUnit(props2.height);
5669
5454
  }
5670
5455
  if (isDef(props2.radius)) {
5671
- style3.overflow = "hidden";
5672
- style3.borderRadius = addUnit(props2.radius);
5456
+ style2.overflow = "hidden";
5457
+ style2.borderRadius = addUnit(props2.radius);
5673
5458
  }
5674
- return style3;
5459
+ return style2;
5675
5460
  });
5676
5461
  vue.watch(() => props2.src, () => {
5677
5462
  error.value = false;
@@ -5756,7 +5541,7 @@
5756
5541
  onError();
5757
5542
  }
5758
5543
  };
5759
- if ($Lazyload && inBrowser$2) {
5544
+ if ($Lazyload && inBrowser$1) {
5760
5545
  $Lazyload.$on("loaded", onLazyLoaded);
5761
5546
  $Lazyload.$on("error", onLazyLoadError);
5762
5547
  vue.onBeforeUnmount(() => {
@@ -5768,7 +5553,7 @@
5768
5553
  "class": bem$$({
5769
5554
  round: props2.round
5770
5555
  }),
5771
- "style": style2.value
5556
+ "style": style.value
5772
5557
  }, [renderImage(), renderPlaceholder(), slots.default == null ? void 0 : slots.default()]);
5773
5558
  }
5774
5559
  });
@@ -5778,19 +5563,16 @@
5778
5563
  name: name$$,
5779
5564
  props: {
5780
5565
  tag: String,
5781
- num: [Number, String],
5566
+ num: numericProp,
5782
5567
  desc: String,
5783
5568
  thumb: String,
5784
5569
  title: String,
5785
- price: [Number, String],
5570
+ price: numericProp,
5786
5571
  centered: Boolean,
5787
5572
  lazyLoad: Boolean,
5573
+ currency: makeStringProp("\xA5"),
5788
5574
  thumbLink: String,
5789
- originPrice: [Number, String],
5790
- currency: {
5791
- type: String,
5792
- default: "\xA5"
5793
- }
5575
+ originPrice: numericProp
5794
5576
  },
5795
5577
  emits: ["click-thumb"],
5796
5578
  setup(props2, {
@@ -5926,7 +5708,7 @@
5926
5708
  animate();
5927
5709
  }
5928
5710
  function useVisibilityChange(target, onChange) {
5929
- if (!inBrowser$2 || !window.IntersectionObserver) {
5711
+ if (!inBrowser$1 || !window.IntersectionObserver) {
5930
5712
  return;
5931
5713
  }
5932
5714
  var observer = new IntersectionObserver((entries) => {
@@ -5952,20 +5734,11 @@
5952
5734
  var _Sticky = vue.defineComponent({
5953
5735
  name: name$_,
5954
5736
  props: {
5955
- zIndex: [Number, String],
5737
+ zIndex: numericProp,
5738
+ position: makeStringProp("top"),
5956
5739
  container: Object,
5957
- offsetTop: {
5958
- type: [Number, String],
5959
- default: 0
5960
- },
5961
- offsetBottom: {
5962
- type: [Number, String],
5963
- default: 0
5964
- },
5965
- position: {
5966
- type: String,
5967
- default: "top"
5968
- }
5740
+ offsetTop: makeNumericProp(0),
5741
+ offsetBottom: makeNumericProp(0)
5969
5742
  },
5970
5743
  emits: ["scroll", "change"],
5971
5744
  setup(props2, {
@@ -5973,7 +5746,7 @@
5973
5746
  slots
5974
5747
  }) {
5975
5748
  var root = vue.ref();
5976
- var scrollParent2 = useScrollParent(root);
5749
+ var scrollParent = useScrollParent(root);
5977
5750
  var state = vue.reactive({
5978
5751
  fixed: false,
5979
5752
  width: 0,
@@ -5998,15 +5771,15 @@
5998
5771
  if (!state.fixed) {
5999
5772
  return;
6000
5773
  }
6001
- var style2 = extend(getZIndexStyle(props2.zIndex), {
5774
+ var style = extend(getZIndexStyle(props2.zIndex), {
6002
5775
  width: state.width + "px",
6003
5776
  height: state.height + "px",
6004
5777
  [props2.position]: offset2.value + "px"
6005
5778
  });
6006
5779
  if (state.transform) {
6007
- style2.transform = "translate3d(0, " + state.transform + "px, 0)";
5780
+ style.transform = "translate3d(0, " + state.transform + "px, 0)";
6008
5781
  }
6009
- return style2;
5782
+ return style;
6010
5783
  });
6011
5784
  var emitScroll = (scrollTop) => emit("scroll", {
6012
5785
  scrollTop,
@@ -6050,7 +5823,7 @@
6050
5823
  };
6051
5824
  vue.watch(() => state.fixed, (value) => emit("change", value));
6052
5825
  useEventListener("scroll", onScroll, {
6053
- target: scrollParent2
5826
+ target: scrollParent
6054
5827
  });
6055
5828
  useVisibilityChange(root, onScroll);
6056
5829
  return () => vue.createVNode("div", {
@@ -6073,7 +5846,7 @@
6073
5846
  type: String,
6074
5847
  color: String,
6075
5848
  title: String,
6076
- badge: [Number, String],
5849
+ badge: numericProp,
6077
5850
  isActive: Boolean,
6078
5851
  disabled: Boolean,
6079
5852
  scrollable: Boolean,
@@ -6083,8 +5856,8 @@
6083
5856
  showZeroBadge: truthProp
6084
5857
  },
6085
5858
  setup(props2) {
6086
- var style2 = vue.computed(() => {
6087
- var style3 = {};
5859
+ var style = vue.computed(() => {
5860
+ var style2 = {};
6088
5861
  var {
6089
5862
  type,
6090
5863
  color,
@@ -6095,20 +5868,20 @@
6095
5868
  } = props2;
6096
5869
  var isCard = type === "card";
6097
5870
  if (color && isCard) {
6098
- style3.borderColor = color;
5871
+ style2.borderColor = color;
6099
5872
  if (!disabled) {
6100
5873
  if (isActive) {
6101
- style3.backgroundColor = color;
5874
+ style2.backgroundColor = color;
6102
5875
  } else {
6103
- style3.color = color;
5876
+ style2.color = color;
6104
5877
  }
6105
5878
  }
6106
5879
  }
6107
5880
  var titleColor = isActive ? activeColor : inactiveColor;
6108
5881
  if (titleColor) {
6109
- style3.color = titleColor;
5882
+ style2.color = titleColor;
6110
5883
  }
6111
- return style3;
5884
+ return style2;
6112
5885
  });
6113
5886
  var renderText = () => {
6114
5887
  var Text = vue.createVNode("span", {
@@ -6133,7 +5906,7 @@
6133
5906
  active: props2.isActive,
6134
5907
  disabled: props2.disabled
6135
5908
  })],
6136
- "style": style2.value,
5909
+ "style": style.value,
6137
5910
  "aria-selected": props2.isActive
6138
5911
  }, [renderText()]);
6139
5912
  }
@@ -6141,26 +5914,17 @@
6141
5914
  var [name$Y, bem$X] = createNamespace("swipe");
6142
5915
  var props$k = {
6143
5916
  loop: truthProp,
6144
- width: [Number, String],
6145
- height: [Number, String],
5917
+ width: numericProp,
5918
+ height: numericProp,
6146
5919
  vertical: Boolean,
5920
+ autoplay: makeNumericProp(0),
5921
+ duration: makeNumericProp(500),
6147
5922
  touchable: truthProp,
6148
5923
  lazyRender: Boolean,
5924
+ initialSwipe: makeNumericProp(0),
6149
5925
  indicatorColor: String,
6150
5926
  showIndicators: truthProp,
6151
- stopPropagation: truthProp,
6152
- autoplay: {
6153
- type: [Number, String],
6154
- default: 0
6155
- },
6156
- duration: {
6157
- type: [Number, String],
6158
- default: 500
6159
- },
6160
- initialSwipe: {
6161
- type: [Number, String],
6162
- default: 0
6163
- }
5927
+ stopPropagation: truthProp
6164
5928
  };
6165
5929
  var SWIPE_KEY = Symbol(name$Y);
6166
5930
  var _Swipe = vue.defineComponent({
@@ -6204,17 +5968,17 @@
6204
5968
  return touch.direction.value === expect;
6205
5969
  });
6206
5970
  var trackStyle = vue.computed(() => {
6207
- var style2 = {
5971
+ var style = {
6208
5972
  transitionDuration: (state.swiping ? 0 : props2.duration) + "ms",
6209
5973
  transform: "translate" + (props2.vertical ? "Y" : "X") + "(" + state.offset + "px)"
6210
5974
  };
6211
5975
  if (size.value) {
6212
5976
  var mainAxis = props2.vertical ? "height" : "width";
6213
5977
  var crossAxis = props2.vertical ? "width" : "height";
6214
- style2[mainAxis] = trackSize.value + "px";
6215
- style2[crossAxis] = props2[crossAxis] ? props2[crossAxis] + "px" : "";
5978
+ style[mainAxis] = trackSize.value + "px";
5979
+ style[crossAxis] = props2[crossAxis] ? props2[crossAxis] + "px" : "";
6216
5980
  }
6217
- return style2;
5981
+ return style;
6218
5982
  });
6219
5983
  var getTargetActive = (pace) => {
6220
5984
  var {
@@ -6409,13 +6173,13 @@
6409
6173
  });
6410
6174
  });
6411
6175
  };
6412
- var renderDot = (_2, index2) => {
6176
+ var renderDot = (_, index2) => {
6413
6177
  var active = index2 === activeIndicator.value;
6414
- var style2 = active ? {
6178
+ var style = active ? {
6415
6179
  backgroundColor: props2.indicatorColor
6416
6180
  } : void 0;
6417
6181
  return vue.createVNode("i", {
6418
- "style": style2,
6182
+ "style": style,
6419
6183
  "class": bem$X("indicator", {
6420
6184
  active
6421
6185
  })
@@ -6484,22 +6248,13 @@
6484
6248
  var TabsContent = vue.defineComponent({
6485
6249
  name: name$X,
6486
6250
  props: {
6251
+ count: makeRequiredProp(Number),
6487
6252
  inited: Boolean,
6488
6253
  animated: Boolean,
6254
+ duration: makeRequiredProp(numericProp),
6489
6255
  swipeable: Boolean,
6490
6256
  lazyRender: Boolean,
6491
- count: {
6492
- type: Number,
6493
- required: true
6494
- },
6495
- duration: {
6496
- type: [Number, String],
6497
- required: true
6498
- },
6499
- currentIndex: {
6500
- type: Number,
6501
- required: true
6502
- }
6257
+ currentIndex: makeRequiredProp(Number)
6503
6258
  },
6504
6259
  emits: ["change"],
6505
6260
  setup(props2, {
@@ -6547,40 +6302,25 @@
6547
6302
  });
6548
6303
  var [name$W, bem$V] = createNamespace("tabs");
6549
6304
  var props$j = {
6305
+ type: makeStringProp("line"),
6550
6306
  color: String,
6551
6307
  border: Boolean,
6552
6308
  sticky: Boolean,
6309
+ active: makeNumericProp(0),
6310
+ duration: makeNumericProp(0.3),
6553
6311
  animated: Boolean,
6554
6312
  ellipsis: truthProp,
6555
6313
  swipeable: Boolean,
6556
6314
  scrollspy: Boolean,
6315
+ offsetTop: makeNumericProp(0),
6557
6316
  background: String,
6558
6317
  lazyRender: truthProp,
6559
- lineWidth: [Number, String],
6560
- lineHeight: [Number, String],
6318
+ lineWidth: numericProp,
6319
+ lineHeight: numericProp,
6561
6320
  beforeChange: Function,
6321
+ swipeThreshold: makeNumericProp(5),
6562
6322
  titleActiveColor: String,
6563
- titleInactiveColor: String,
6564
- type: {
6565
- type: String,
6566
- default: "line"
6567
- },
6568
- active: {
6569
- type: [Number, String],
6570
- default: 0
6571
- },
6572
- duration: {
6573
- type: [Number, String],
6574
- default: 0.3
6575
- },
6576
- offsetTop: {
6577
- type: [Number, String],
6578
- default: 0
6579
- },
6580
- swipeThreshold: {
6581
- type: [Number, String],
6582
- default: 5
6583
- }
6323
+ titleInactiveColor: String
6584
6324
  };
6585
6325
  var TABS_KEY = Symbol(name$W);
6586
6326
  var _Tabs = vue.defineComponent({
@@ -6752,7 +6492,9 @@
6752
6492
  };
6753
6493
  var getCurrentIndexOnScroll = () => {
6754
6494
  for (var index2 = 0; index2 < children.length; index2++) {
6755
- var top2 = getVisibleTop(children[index2].$el);
6495
+ var {
6496
+ top: top2
6497
+ } = useRect(children[index2].$el);
6756
6498
  if (top2 > scrollOffset.value) {
6757
6499
  return index2 === 0 ? 0 : index2 - 1;
6758
6500
  }
@@ -6831,7 +6573,9 @@
6831
6573
  setCurrentIndexByName(props2.active);
6832
6574
  vue.nextTick(() => {
6833
6575
  state.inited = true;
6834
- tabHeight = getVisibleHeight(wrapRef.value);
6576
+ if (wrapRef.value) {
6577
+ tabHeight = useRect(wrapRef.value).height;
6578
+ }
6835
6579
  scrollIntoView(true);
6836
6580
  });
6837
6581
  };
@@ -6900,18 +6644,18 @@
6900
6644
  if (!parent) {
6901
6645
  return;
6902
6646
  }
6903
- var style2 = vue.computed(() => {
6904
- var style3 = {};
6647
+ var style = vue.computed(() => {
6648
+ var style2 = {};
6905
6649
  var {
6906
6650
  vertical
6907
6651
  } = parent.props;
6908
6652
  if (parent.size.value) {
6909
- style3[vertical ? "height" : "width"] = parent.size.value + "px";
6653
+ style2[vertical ? "height" : "width"] = parent.size.value + "px";
6910
6654
  }
6911
6655
  if (state.offset) {
6912
- style3.transform = "translate" + (vertical ? "Y" : "X") + "(" + state.offset + "px)";
6656
+ style2.transform = "translate" + (vertical ? "Y" : "X") + "(" + state.offset + "px)";
6913
6657
  }
6914
- return style3;
6658
+ return style2;
6915
6659
  });
6916
6660
  var shouldRender = vue.computed(() => {
6917
6661
  var {
@@ -6944,7 +6688,7 @@
6944
6688
  });
6945
6689
  return () => vue.createVNode("div", {
6946
6690
  "class": bem$U(),
6947
- "style": style2.value
6691
+ "style": style.value
6948
6692
  }, [shouldRender.value ? slots.default == null ? void 0 : slots.default() : null]);
6949
6693
  }
6950
6694
  });
@@ -6954,8 +6698,8 @@
6954
6698
  name: name$U,
6955
6699
  props: extend({}, routeProps, {
6956
6700
  dot: Boolean,
6957
- name: [Number, String],
6958
- badge: [Number, String],
6701
+ name: numericProp,
6702
+ badge: numericProp,
6959
6703
  title: String,
6960
6704
  disabled: Boolean,
6961
6705
  titleClass: unknownProp,
@@ -7037,20 +6781,14 @@
7037
6781
  name: name$T,
7038
6782
  props: {
7039
6783
  title: String,
6784
+ options: makeArrayProp(),
7040
6785
  closeable: truthProp,
7041
6786
  swipeable: truthProp,
7042
- modelValue: [Number, String],
6787
+ closeIcon: makeStringProp("cross"),
6788
+ modelValue: numericProp,
7043
6789
  fieldNames: Object,
7044
6790
  placeholder: String,
7045
- activeColor: String,
7046
- options: {
7047
- type: Array,
7048
- default: () => []
7049
- },
7050
- closeIcon: {
7051
- type: String,
7052
- default: "cross"
7053
- }
6791
+ activeColor: String
7054
6792
  },
7055
6793
  emits: ["close", "change", "finish", "update:modelValue", "click-tab"],
7056
6794
  setup(props2, {
@@ -7092,7 +6830,7 @@
7092
6830
  state.tabs = selectedOptions.map((option) => {
7093
6831
  var tab = {
7094
6832
  options: optionsCursor,
7095
- selectedOption: option
6833
+ selected: option
7096
6834
  };
7097
6835
  var next = optionsCursor.find((item) => item[valueKey] === option[valueKey]);
7098
6836
  if (next) {
@@ -7103,7 +6841,7 @@
7103
6841
  if (optionsCursor) {
7104
6842
  state.tabs.push({
7105
6843
  options: optionsCursor,
7106
- selectedOption: null
6844
+ selected: null
7107
6845
  });
7108
6846
  }
7109
6847
  vue.nextTick(() => {
@@ -7114,21 +6852,21 @@
7114
6852
  }
7115
6853
  state.tabs = [{
7116
6854
  options: props2.options,
7117
- selectedOption: null
6855
+ selected: null
7118
6856
  }];
7119
6857
  };
7120
6858
  var onSelect = (option, tabIndex) => {
7121
6859
  if (option.disabled) {
7122
6860
  return;
7123
6861
  }
7124
- state.tabs[tabIndex].selectedOption = option;
6862
+ state.tabs[tabIndex].selected = option;
7125
6863
  if (state.tabs.length > tabIndex + 1) {
7126
6864
  state.tabs = state.tabs.slice(0, tabIndex + 1);
7127
6865
  }
7128
6866
  if (option[childrenKey]) {
7129
6867
  var nextTab = {
7130
6868
  options: option[childrenKey],
7131
- selectedOption: null
6869
+ selected: null
7132
6870
  };
7133
6871
  if (state.tabs[tabIndex + 1]) {
7134
6872
  state.tabs[tabIndex + 1] = nextTab;
@@ -7139,7 +6877,7 @@
7139
6877
  state.activeTab++;
7140
6878
  });
7141
6879
  }
7142
- var selectedOptions = state.tabs.map((tab) => tab.selectedOption).filter(Boolean);
6880
+ var selectedOptions = state.tabs.map((tab) => tab.selected).filter(Boolean);
7143
6881
  var eventParams = {
7144
6882
  value: option[valueKey],
7145
6883
  tabIndex,
@@ -7192,16 +6930,16 @@
7192
6930
  var renderTab = (tab, tabIndex) => {
7193
6931
  var {
7194
6932
  options,
7195
- selectedOption
6933
+ selected
7196
6934
  } = tab;
7197
- var title = selectedOption ? selectedOption[textKey] : props2.placeholder || t$c("select");
6935
+ var title = selected ? selected[textKey] : props2.placeholder || t$c("select");
7198
6936
  return vue.createVNode(Tab, {
7199
6937
  "title": title,
7200
6938
  "titleClass": bem$S("tab", {
7201
- unselected: !selectedOption
6939
+ unselected: !selected
7202
6940
  })
7203
6941
  }, {
7204
- default: () => [renderOptions(options, selectedOption, tabIndex)]
6942
+ default: () => [renderOptions(options, selected, tabIndex)]
7205
6943
  });
7206
6944
  };
7207
6945
  var renderTabs = () => vue.createVNode(Tabs, {
@@ -7223,8 +6961,8 @@
7223
6961
  vue.watch(() => props2.modelValue, (value) => {
7224
6962
  if (value || value === 0) {
7225
6963
  var values = state.tabs.map((tab) => {
7226
- var _tab$selectedOption;
7227
- return (_tab$selectedOption = tab.selectedOption) == null ? void 0 : _tab$selectedOption[valueKey];
6964
+ var _tab$selected;
6965
+ return (_tab$selected = tab.selected) == null ? void 0 : _tab$selected[valueKey];
7228
6966
  });
7229
6967
  if (values.includes(value)) {
7230
6968
  return;
@@ -7274,15 +7012,12 @@
7274
7012
  var CellGroup = withInstall(_CellGroup);
7275
7013
  var [name$R, bem$Q] = createNamespace("checkbox-group");
7276
7014
  var props$i = {
7277
- max: [Number, String],
7015
+ max: numericProp,
7278
7016
  disabled: Boolean,
7017
+ iconSize: numericProp,
7279
7018
  direction: String,
7280
- iconSize: [Number, String],
7281
- checkedColor: String,
7282
- modelValue: {
7283
- type: Array,
7284
- default: () => []
7285
- }
7019
+ modelValue: makeArrayProp(),
7020
+ checkedColor: String
7286
7021
  };
7287
7022
  var CHECKBOX_GROUP_KEY = Symbol(name$R);
7288
7023
  var _CheckboxGroup = vue.defineComponent({
@@ -7409,9 +7144,7 @@
7409
7144
  var CheckboxGroup = withInstall(_CheckboxGroup);
7410
7145
  var [name$P, bem$O] = createNamespace("circle");
7411
7146
  var uid = 0;
7412
- function format(rate) {
7413
- return Math.min(Math.max(+rate, 0), 100);
7414
- }
7147
+ var format = (rate) => Math.min(Math.max(+rate, 0), 100);
7415
7148
  function getPath(clockwise, viewBoxSize) {
7416
7149
  var sweepFlag = clockwise ? 1 : 0;
7417
7150
  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";
@@ -7420,35 +7153,17 @@
7420
7153
  name: name$P,
7421
7154
  props: {
7422
7155
  text: String,
7423
- size: [Number, String],
7156
+ size: numericProp,
7157
+ fill: makeStringProp("none"),
7158
+ rate: makeNumericProp(100),
7159
+ speed: makeNumericProp(0),
7424
7160
  color: [String, Object],
7425
7161
  clockwise: truthProp,
7426
7162
  layerColor: String,
7163
+ currentRate: makeNumberProp(0),
7164
+ strokeWidth: makeNumericProp(40),
7427
7165
  strokeLinecap: String,
7428
- currentRate: {
7429
- type: Number,
7430
- default: 0
7431
- },
7432
- speed: {
7433
- type: [Number, String],
7434
- default: 0
7435
- },
7436
- fill: {
7437
- type: String,
7438
- default: "none"
7439
- },
7440
- rate: {
7441
- type: [Number, String],
7442
- default: 100
7443
- },
7444
- strokeWidth: {
7445
- type: [Number, String],
7446
- default: 40
7447
- },
7448
- startPosition: {
7449
- type: String,
7450
- default: "top"
7451
- }
7166
+ startPosition: makeStringProp("top")
7452
7167
  },
7453
7168
  emits: ["update:currentRate"],
7454
7169
  setup(props2, {
@@ -7507,7 +7222,7 @@
7507
7222
  } = props2;
7508
7223
  var offset2 = PERIMETER * currentRate / 100;
7509
7224
  var color = isObject$1(props2.color) ? "url(#" + id + ")" : props2.color;
7510
- var style2 = {
7225
+ var style = {
7511
7226
  stroke: color,
7512
7227
  strokeWidth: +strokeWidth + 1 + "px",
7513
7228
  strokeLinecap,
@@ -7515,20 +7230,20 @@
7515
7230
  };
7516
7231
  return vue.createVNode("path", {
7517
7232
  "d": path.value,
7518
- "style": style2,
7233
+ "style": style,
7519
7234
  "class": bem$O("hover"),
7520
7235
  "stroke": color
7521
7236
  }, null);
7522
7237
  };
7523
7238
  var renderLayer = () => {
7524
- var style2 = {
7239
+ var style = {
7525
7240
  fill: props2.fill,
7526
7241
  stroke: props2.layerColor,
7527
7242
  strokeWidth: props2.strokeWidth + "px"
7528
7243
  };
7529
7244
  return vue.createVNode("path", {
7530
7245
  "class": bem$O("layer"),
7531
- "style": style2,
7246
+ "style": style,
7532
7247
  "d": path.value
7533
7248
  }, null);
7534
7249
  };
@@ -7577,17 +7292,11 @@
7577
7292
  var _Row = vue.defineComponent({
7578
7293
  name: name$O,
7579
7294
  props: {
7295
+ tag: makeStringProp("div"),
7580
7296
  wrap: truthProp,
7581
7297
  align: String,
7582
- justify: String,
7583
- tag: {
7584
- type: String,
7585
- default: "div"
7586
- },
7587
- gutter: {
7588
- type: [Number, String],
7589
- default: 0
7590
- }
7298
+ gutter: makeNumericProp(0),
7299
+ justify: String
7591
7300
  },
7592
7301
  setup(props2, {
7593
7302
  slots
@@ -7661,15 +7370,9 @@
7661
7370
  var _Col = vue.defineComponent({
7662
7371
  name: name$N,
7663
7372
  props: {
7664
- offset: [Number, String],
7665
- tag: {
7666
- type: String,
7667
- default: "div"
7668
- },
7669
- span: {
7670
- type: [Number, String],
7671
- default: 0
7672
- }
7373
+ tag: makeStringProp("div"),
7374
+ span: makeNumericProp(0),
7375
+ offset: numericProp
7673
7376
  },
7674
7377
  setup(props2, {
7675
7378
  slots
@@ -7678,7 +7381,7 @@
7678
7381
  parent,
7679
7382
  index: index2
7680
7383
  } = useParent(ROW_KEY);
7681
- var style2 = vue.computed(() => {
7384
+ var style = vue.computed(() => {
7682
7385
  if (!parent) {
7683
7386
  return;
7684
7387
  }
@@ -7703,7 +7406,7 @@
7703
7406
  offset: offset2
7704
7407
  } = props2;
7705
7408
  return vue.createVNode(tag, {
7706
- "style": style2.value,
7409
+ "style": style.value,
7707
7410
  "class": bem$M({
7708
7411
  [span]: span,
7709
7412
  ["offset-" + offset2]: offset2
@@ -7774,7 +7477,7 @@
7774
7477
  var [name$L, bem$K] = createNamespace("collapse-item");
7775
7478
  var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
7776
7479
  var props$g = extend({}, cellProps, {
7777
- name: [Number, String],
7480
+ name: numericProp,
7778
7481
  isLink: truthProp,
7779
7482
  disabled: Boolean,
7780
7483
  readonly: Boolean
@@ -7894,12 +7597,9 @@
7894
7597
  props: {
7895
7598
  tel: String,
7896
7599
  name: String,
7897
- addText: String,
7898
- editable: truthProp,
7899
- type: {
7900
- type: String,
7901
- default: "add"
7902
- }
7600
+ type: makeStringProp("add"),
7601
+ addText: String,
7602
+ editable: truthProp
7903
7603
  },
7904
7604
  emits: ["click"],
7905
7605
  setup(props2, {
@@ -7936,18 +7636,15 @@
7936
7636
  disabled: Boolean,
7937
7637
  readonly: Boolean,
7938
7638
  showError: Boolean,
7939
- labelWidth: [Number, String],
7639
+ labelWidth: numericProp,
7940
7640
  labelAlign: String,
7941
7641
  inputAlign: String,
7942
7642
  scrollToError: Boolean,
7943
7643
  validateFirst: Boolean,
7944
7644
  submitOnEnter: truthProp,
7645
+ validateTrigger: makeStringProp("onBlur"),
7945
7646
  showErrorMessage: truthProp,
7946
- errorMessageAlign: String,
7947
- validateTrigger: {
7948
- type: String,
7949
- default: "onBlur"
7950
- }
7647
+ errorMessageAlign: String
7951
7648
  };
7952
7649
  var _Form = vue.defineComponent({
7953
7650
  name: name$J,
@@ -8297,16 +7994,10 @@
8297
7994
  }
8298
7995
  var [name$G, bem$F] = createNamespace("count-down");
8299
7996
  var props$e = {
7997
+ time: makeNumericProp(0),
7998
+ format: makeStringProp("HH:mm:ss"),
8300
7999
  autoStart: truthProp,
8301
- millisecond: Boolean,
8302
- time: {
8303
- type: [Number, String],
8304
- default: 0
8305
- },
8306
- format: {
8307
- type: String,
8308
- default: "HH:mm:ss"
8309
- }
8000
+ millisecond: Boolean
8310
8001
  };
8311
8002
  var _CountDown = vue.defineComponent({
8312
8003
  name: name$G,
@@ -8353,25 +8044,15 @@
8353
8044
  var date = new Date(timeStamp * 1e3);
8354
8045
  return date.getFullYear() + "." + padZero(date.getMonth() + 1) + "." + padZero(date.getDate());
8355
8046
  }
8356
- function formatDiscount(discount) {
8357
- return (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
8358
- }
8359
- function formatAmount(amount) {
8360
- return (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
8361
- }
8047
+ var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
8048
+ var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
8362
8049
  var _Coupon = vue.defineComponent({
8363
8050
  name: name$F,
8364
8051
  props: {
8365
8052
  chosen: Boolean,
8053
+ coupon: makeRequiredProp(Object),
8366
8054
  disabled: Boolean,
8367
- coupon: {
8368
- type: Object,
8369
- required: true
8370
- },
8371
- currency: {
8372
- type: String,
8373
- default: "\xA5"
8374
- }
8055
+ currency: makeStringProp("\xA5")
8375
8056
  },
8376
8057
  setup(props2) {
8377
8058
  var validPeriod = vue.computed(() => {
@@ -8459,18 +8140,9 @@
8459
8140
  title: String,
8460
8141
  border: truthProp,
8461
8142
  editable: truthProp,
8462
- coupons: {
8463
- type: Array,
8464
- default: () => []
8465
- },
8466
- currency: {
8467
- type: String,
8468
- default: "\xA5"
8469
- },
8470
- chosenCoupon: {
8471
- type: [Number, String],
8472
- default: -1
8473
- }
8143
+ coupons: makeArrayProp(),
8144
+ currency: makeStringProp("\xA5"),
8145
+ chosenCoupon: makeNumericProp(-1)
8474
8146
  },
8475
8147
  setup(props2) {
8476
8148
  return () => {
@@ -8495,48 +8167,24 @@
8495
8167
  var _CouponList = vue.defineComponent({
8496
8168
  name: name$D,
8497
8169
  props: {
8170
+ code: makeStringProp(""),
8171
+ coupons: makeArrayProp(),
8172
+ currency: makeStringProp("\xA5"),
8498
8173
  showCount: truthProp,
8174
+ emptyImage: makeStringProp(EMPTY_IMAGE),
8175
+ chosenCoupon: makeNumberProp(-1),
8499
8176
  enabledTitle: String,
8500
8177
  disabledTitle: String,
8178
+ disabledCoupons: makeArrayProp(),
8501
8179
  showExchangeBar: truthProp,
8502
8180
  showCloseButton: truthProp,
8503
8181
  closeButtonText: String,
8504
8182
  inputPlaceholder: String,
8183
+ exchangeMinLength: makeNumberProp(1),
8505
8184
  exchangeButtonText: String,
8185
+ displayedCouponIndex: makeNumberProp(-1),
8506
8186
  exchangeButtonLoading: Boolean,
8507
- exchangeButtonDisabled: Boolean,
8508
- code: {
8509
- type: String,
8510
- default: ""
8511
- },
8512
- exchangeMinLength: {
8513
- type: Number,
8514
- default: 1
8515
- },
8516
- chosenCoupon: {
8517
- type: Number,
8518
- default: -1
8519
- },
8520
- coupons: {
8521
- type: Array,
8522
- default: () => []
8523
- },
8524
- disabledCoupons: {
8525
- type: Array,
8526
- default: () => []
8527
- },
8528
- displayedCouponIndex: {
8529
- type: Number,
8530
- default: -1
8531
- },
8532
- currency: {
8533
- type: String,
8534
- default: "\xA5"
8535
- },
8536
- emptyImage: {
8537
- type: String,
8538
- default: EMPTY_IMAGE
8539
- }
8187
+ exchangeButtonDisabled: Boolean
8540
8188
  },
8541
8189
  emits: ["change", "exchange", "update:code"],
8542
8190
  setup(props2, {
@@ -8672,23 +8320,11 @@
8672
8320
  var TimePicker = vue.defineComponent({
8673
8321
  name: name$C,
8674
8322
  props: extend({}, sharedProps, {
8675
- modelValue: String,
8676
- minHour: {
8677
- type: [Number, String],
8678
- default: 0
8679
- },
8680
- maxHour: {
8681
- type: [Number, String],
8682
- default: 23
8683
- },
8684
- minMinute: {
8685
- type: [Number, String],
8686
- default: 0
8687
- },
8688
- maxMinute: {
8689
- type: [Number, String],
8690
- default: 59
8691
- }
8323
+ minHour: makeNumericProp(0),
8324
+ maxHour: makeNumericProp(23),
8325
+ minMinute: makeNumericProp(0),
8326
+ maxMinute: makeNumericProp(59),
8327
+ modelValue: String
8692
8328
  }),
8693
8329
  emits: ["confirm", "cancel", "change", "update:modelValue"],
8694
8330
  setup(props2, {
@@ -8793,11 +8429,8 @@
8793
8429
  var DatePicker = vue.defineComponent({
8794
8430
  name: name$B,
8795
8431
  props: extend({}, sharedProps, {
8432
+ type: makeStringProp("datetime"),
8796
8433
  modelValue: Date,
8797
- type: {
8798
- type: String,
8799
- default: "datetime"
8800
- },
8801
8434
  minDate: {
8802
8435
  type: Date,
8803
8436
  default: () => new Date(currentYear - 10, 0, 1),
@@ -9070,10 +8703,7 @@
9070
8703
  props: {
9071
8704
  dashed: Boolean,
9072
8705
  hairline: truthProp,
9073
- contentPosition: {
9074
- type: String,
9075
- default: "center"
9076
- }
8706
+ contentPosition: makeStringProp("center")
9077
8707
  },
9078
8708
  setup(props2, {
9079
8709
  slots
@@ -9092,18 +8722,12 @@
9092
8722
  var [name$y, bem$z] = createNamespace("dropdown-menu");
9093
8723
  var props$c = {
9094
8724
  overlay: truthProp,
9095
- zIndex: [Number, String],
8725
+ zIndex: numericProp,
8726
+ duration: makeNumericProp(0.2),
8727
+ direction: makeStringProp("down"),
9096
8728
  activeColor: String,
9097
8729
  closeOnClickOutside: truthProp,
9098
- closeOnClickOverlay: truthProp,
9099
- duration: {
9100
- type: [Number, String],
9101
- default: 0.2
9102
- },
9103
- direction: {
9104
- type: String,
9105
- default: "down"
9106
- }
8730
+ closeOnClickOverlay: truthProp
9107
8731
  };
9108
8732
  var DROPDOWN_KEY = Symbol(name$y);
9109
8733
  var _DropdownMenu = vue.defineComponent({
@@ -9119,7 +8743,7 @@
9119
8743
  children,
9120
8744
  linkChildren
9121
8745
  } = useChildren(DROPDOWN_KEY);
9122
- var scrollParent2 = useScrollParent(root);
8746
+ var scrollParent = useScrollParent(root);
9123
8747
  var opened = vue.computed(() => children.some((item) => item.state.showWrapper));
9124
8748
  var barStyle = vue.computed(() => {
9125
8749
  if (opened.value && isDef(props2.zIndex)) {
@@ -9199,7 +8823,7 @@
9199
8823
  });
9200
8824
  useClickAway(root, onClickAway);
9201
8825
  useEventListener("scroll", onScroll, {
9202
- target: scrollParent2
8826
+ target: scrollParent
9203
8827
  });
9204
8828
  return () => vue.createVNode("div", {
9205
8829
  "ref": root,
@@ -9216,15 +8840,12 @@
9216
8840
  var [name$x, bem$y] = createNamespace("dropdown-item");
9217
8841
  var props$b = {
9218
8842
  title: String,
8843
+ options: makeArrayProp(),
9219
8844
  disabled: Boolean,
9220
8845
  teleport: [String, Object],
9221
8846
  lazyRender: truthProp,
9222
8847
  modelValue: unknownProp,
9223
- titleClass: unknownProp,
9224
- options: {
9225
- type: Array,
9226
- default: () => []
9227
- }
8848
+ titleClass: unknownProp
9228
8849
  };
9229
8850
  var _DropdownItem = vue.defineComponent({
9230
8851
  name: name$x,
@@ -9326,14 +8947,14 @@
9326
8947
  direction,
9327
8948
  closeOnClickOverlay
9328
8949
  } = parent.props;
9329
- var style2 = getZIndexStyle(zIndex);
8950
+ var style = getZIndexStyle(zIndex);
9330
8951
  if (direction === "down") {
9331
- style2.top = offset2.value + "px";
8952
+ style.top = offset2.value + "px";
9332
8953
  } else {
9333
- style2.bottom = offset2.value + "px";
8954
+ style.bottom = offset2.value + "px";
9334
8955
  }
9335
8956
  return vue.withDirectives(vue.createVNode("div", {
9336
- "style": style2,
8957
+ "style": style,
9337
8958
  "class": bem$y([direction]),
9338
8959
  "onClick": onClickWrapper
9339
8960
  }, [vue.createVNode(Popup, {
@@ -9496,12 +9117,9 @@
9496
9117
  var _Empty = vue.defineComponent({
9497
9118
  name: name$w,
9498
9119
  props: {
9499
- imageSize: [Number, String],
9500
- description: String,
9501
- image: {
9502
- type: String,
9503
- default: "default"
9504
- }
9120
+ image: makeStringProp("default"),
9121
+ imageSize: numericProp,
9122
+ description: String
9505
9123
  },
9506
9124
  setup(props2, {
9507
9125
  slots
@@ -9552,15 +9170,12 @@
9552
9170
  square: Boolean,
9553
9171
  center: truthProp,
9554
9172
  border: truthProp,
9555
- gutter: [Number, String],
9173
+ gutter: numericProp,
9556
9174
  reverse: Boolean,
9557
- iconSize: [Number, String],
9175
+ iconSize: numericProp,
9558
9176
  direction: String,
9559
9177
  clickable: Boolean,
9560
- columnNum: {
9561
- type: [Number, String],
9562
- default: 4
9563
- }
9178
+ columnNum: makeNumericProp(4)
9564
9179
  };
9565
9180
  var GRID_KEY = Symbol(name$v);
9566
9181
  var _Grid = vue.defineComponent({
@@ -9593,9 +9208,9 @@
9593
9208
  dot: Boolean,
9594
9209
  text: String,
9595
9210
  icon: String,
9596
- badge: [Number, String],
9597
- iconPrefix: String,
9598
- iconColor: String
9211
+ badge: numericProp,
9212
+ iconColor: String,
9213
+ iconPrefix: String
9599
9214
  }),
9600
9215
  setup(props2, {
9601
9216
  slots
@@ -9615,19 +9230,19 @@
9615
9230
  columnNum
9616
9231
  } = parent.props;
9617
9232
  var percent = 100 / +columnNum + "%";
9618
- var style2 = {
9233
+ var style = {
9619
9234
  flexBasis: percent
9620
9235
  };
9621
9236
  if (square) {
9622
- style2.paddingTop = percent;
9237
+ style.paddingTop = percent;
9623
9238
  } else if (gutter) {
9624
9239
  var gutterValue = addUnit(gutter);
9625
- style2.paddingRight = gutterValue;
9240
+ style.paddingRight = gutterValue;
9626
9241
  if (index2.value >= columnNum) {
9627
- style2.marginTop = gutterValue;
9242
+ style.marginTop = gutterValue;
9628
9243
  }
9629
9244
  }
9630
- return style2;
9245
+ return style;
9631
9246
  });
9632
9247
  var contentStyle = vue.computed(() => {
9633
9248
  var {
@@ -9715,31 +9330,17 @@
9715
9330
  }
9716
9331
  });
9717
9332
  var GridItem = withInstall(_GridItem);
9718
- function getDistance(touches) {
9719
- return Math.sqrt(Math.pow(touches[0].clientX - touches[1].clientX, 2) + Math.pow(touches[0].clientY - touches[1].clientY, 2));
9720
- }
9333
+ var getDistance = (touches) => Math.sqrt(Math.pow(touches[0].clientX - touches[1].clientX, 2) + Math.pow(touches[0].clientY - touches[1].clientY, 2));
9721
9334
  var bem$u = createNamespace("image-preview")[1];
9722
9335
  var ImagePreviewItem = vue.defineComponent({
9723
9336
  props: {
9724
9337
  src: String,
9725
9338
  show: Boolean,
9726
9339
  active: Number,
9727
- minZoom: {
9728
- type: [Number, String],
9729
- required: true
9730
- },
9731
- maxZoom: {
9732
- type: [Number, String],
9733
- required: true
9734
- },
9735
- rootWidth: {
9736
- type: Number,
9737
- required: true
9738
- },
9739
- rootHeight: {
9740
- type: Number,
9741
- required: true
9742
- }
9340
+ minZoom: makeRequiredProp(numericProp),
9341
+ maxZoom: makeRequiredProp(numericProp),
9342
+ rootWidth: makeRequiredProp(Number),
9343
+ rootHeight: makeRequiredProp(Number)
9743
9344
  },
9744
9345
  emits: ["scale", "close"],
9745
9346
  setup(props2, {
@@ -9772,15 +9373,15 @@
9772
9373
  moving,
9773
9374
  zooming
9774
9375
  } = state;
9775
- var style2 = {
9376
+ var style = {
9776
9377
  transitionDuration: zooming || moving ? "0s" : ".3s"
9777
9378
  };
9778
9379
  if (scale !== 1) {
9779
9380
  var offsetX = moveX / scale;
9780
9381
  var offsetY = moveY / scale;
9781
- style2.transform = "scale(" + scale + ", " + scale + ") translate(" + offsetX + "px, " + offsetY + "px)";
9382
+ style.transform = "scale(" + scale + ", " + scale + ") translate(" + offsetX + "px, " + offsetY + "px)";
9782
9383
  }
9783
- return style2;
9384
+ return style;
9784
9385
  });
9785
9386
  var maxMoveX = vue.computed(() => {
9786
9387
  if (state.imageRatio) {
@@ -9963,43 +9564,22 @@
9963
9564
  var props$9 = {
9964
9565
  show: Boolean,
9965
9566
  loop: truthProp,
9567
+ images: makeArrayProp(),
9568
+ minZoom: makeNumericProp(1 / 3),
9569
+ maxZoom: makeNumericProp(3),
9966
9570
  overlay: truthProp,
9967
9571
  closeable: Boolean,
9968
9572
  showIndex: truthProp,
9969
9573
  className: unknownProp,
9574
+ closeIcon: makeStringProp("clear"),
9970
9575
  transition: String,
9971
9576
  beforeClose: Function,
9972
9577
  overlayStyle: Object,
9578
+ swipeDuration: makeNumericProp(300),
9579
+ startPosition: makeNumericProp(0),
9973
9580
  showIndicators: Boolean,
9974
9581
  closeOnPopstate: truthProp,
9975
- images: {
9976
- type: Array,
9977
- default: () => []
9978
- },
9979
- minZoom: {
9980
- type: [Number, String],
9981
- default: 1 / 3
9982
- },
9983
- maxZoom: {
9984
- type: [Number, String],
9985
- default: 3
9986
- },
9987
- swipeDuration: {
9988
- type: [Number, String],
9989
- default: 300
9990
- },
9991
- startPosition: {
9992
- type: [Number, String],
9993
- default: 0
9994
- },
9995
- closeIcon: {
9996
- type: String,
9997
- default: "clear"
9998
- },
9999
- closeIconPosition: {
10000
- type: String,
10001
- default: "top-right"
10002
- }
9582
+ closeIconPosition: makeStringProp("top-right")
10003
9583
  };
10004
9584
  var VanImagePreview = vue.defineComponent({
10005
9585
  name: name$t,
@@ -10018,7 +9598,7 @@
10018
9598
  });
10019
9599
  var resize = () => {
10020
9600
  if (swipeRef.value) {
10021
- var rect = swipeRef.value.$el.getBoundingClientRect();
9601
+ var rect = useRect(swipeRef.value.$el);
10022
9602
  state.rootWidth = rect.width;
10023
9603
  state.rootHeight = rect.height;
10024
9604
  swipeRef.value.resize();
@@ -10173,7 +9753,7 @@
10173
9753
  }));
10174
9754
  }
10175
9755
  var ImagePreview = (options, startPosition = 0) => {
10176
- if (!inBrowser$2) {
9756
+ if (!inBrowser$1) {
10177
9757
  return;
10178
9758
  }
10179
9759
  if (!instance$1) {
@@ -10192,19 +9772,16 @@
10192
9772
  };
10193
9773
  function genAlphabet() {
10194
9774
  var charCodeOfA = "A".charCodeAt(0);
10195
- var indexList = Array(26).fill("").map((_2, i) => String.fromCharCode(charCodeOfA + i));
9775
+ var indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
10196
9776
  return indexList;
10197
9777
  }
10198
9778
  var [name$s, bem$s] = createNamespace("index-bar");
10199
9779
  var props$8 = {
10200
9780
  sticky: truthProp,
10201
- zIndex: [Number, String],
9781
+ zIndex: numericProp,
10202
9782
  teleport: [String, Object],
10203
9783
  highlightColor: String,
10204
- stickyOffsetTop: {
10205
- type: Number,
10206
- default: 0
10207
- },
9784
+ stickyOffsetTop: makeNumberProp(0),
10208
9785
  indexList: {
10209
9786
  type: Array,
10210
9787
  default: genAlphabet
@@ -10222,7 +9799,7 @@
10222
9799
  var root = vue.ref();
10223
9800
  var activeAnchor = vue.ref("");
10224
9801
  var touch = useTouch();
10225
- var scrollParent2 = useScrollParent(root);
9802
+ var scrollParent = useScrollParent(root);
10226
9803
  var {
10227
9804
  children,
10228
9805
  linkChildren
@@ -10245,8 +9822,8 @@
10245
9822
  }
10246
9823
  });
10247
9824
  var getScrollerRect = () => {
10248
- if ("getBoundingClientRect" in scrollParent2.value) {
10249
- return useRect(scrollParent2);
9825
+ if ("getBoundingClientRect" in scrollParent.value) {
9826
+ return useRect(scrollParent);
10250
9827
  }
10251
9828
  return {
10252
9829
  top: 0,
@@ -10271,9 +9848,9 @@
10271
9848
  sticky,
10272
9849
  indexList
10273
9850
  } = props2;
10274
- var scrollTop = getScrollTop(scrollParent2.value);
9851
+ var scrollTop = getScrollTop(scrollParent.value);
10275
9852
  var scrollParentRect = getScrollerRect();
10276
- var rects = children.map((item) => item.getRect(scrollParent2.value, scrollParentRect));
9853
+ var rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
10277
9854
  var active = getActiveAnchor(scrollTop, rects);
10278
9855
  activeAnchor.value = indexList[active];
10279
9856
  if (sticky) {
@@ -10305,7 +9882,7 @@
10305
9882
  };
10306
9883
  var init = () => vue.nextTick(onScroll);
10307
9884
  useEventListener("scroll", onScroll, {
10308
- target: scrollParent2
9885
+ target: scrollParent
10309
9886
  });
10310
9887
  vue.onMounted(init);
10311
9888
  vue.watch(() => props2.indexList, init);
@@ -10391,7 +9968,7 @@
10391
9968
  var _IndexAnchor = vue.defineComponent({
10392
9969
  name: name$r,
10393
9970
  props: {
10394
- index: [Number, String]
9971
+ index: numericProp
10395
9972
  },
10396
9973
  setup(props2, {
10397
9974
  slots
@@ -10428,13 +10005,13 @@
10428
10005
  });
10429
10006
  }
10430
10007
  });
10431
- var getRect = (scrollParent2, scrollParentRect) => {
10008
+ var getRect = (scrollParent, scrollParentRect) => {
10432
10009
  var rootRect = useRect(root);
10433
10010
  state.rect.height = rootRect.height;
10434
- if (scrollParent2 === window || scrollParent2 === document.body) {
10011
+ if (scrollParent === window || scrollParent === document.body) {
10435
10012
  state.rect.top = rootRect.top + getRootScrollTop();
10436
10013
  } else {
10437
- state.rect.top = rootRect.top + getScrollTop(scrollParent2) - scrollParentRect.top;
10014
+ state.rect.top = rootRect.top + getScrollTop(scrollParent) - scrollParentRect.top;
10438
10015
  }
10439
10016
  return state.rect;
10440
10017
  };
@@ -10462,30 +10039,11 @@
10462
10039
  });
10463
10040
  var IndexAnchor = withInstall(_IndexAnchor);
10464
10041
  var IndexBar = withInstall(_IndexBar);
10465
- var inBrowser = typeof window !== "undefined";
10466
10042
  var hasIntersectionObserver = inBrowser && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
10467
10043
  var modeType = {
10468
10044
  event: "event",
10469
10045
  observer: "observer"
10470
10046
  };
10471
- var CustomEvent = function() {
10472
- if (!inBrowser)
10473
- return;
10474
- if (typeof window.CustomEvent === "function")
10475
- return window.CustomEvent;
10476
- function CustomEvent2(event, params) {
10477
- params = params || {
10478
- bubbles: false,
10479
- cancelable: false,
10480
- detail: void 0
10481
- };
10482
- var evt = document.createEvent("CustomEvent");
10483
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
10484
- return evt;
10485
- }
10486
- CustomEvent2.prototype = window.Event.prototype;
10487
- return CustomEvent2;
10488
- }();
10489
10047
  function remove(arr, item) {
10490
10048
  if (!arr.length)
10491
10049
  return;
@@ -10548,16 +10106,6 @@
10548
10106
  }
10549
10107
  return bestSelectedSrc;
10550
10108
  }
10551
- function find(arr, fn) {
10552
- var item;
10553
- for (var i = 0, len = arr.length; i < len; i++) {
10554
- if (fn(arr[i])) {
10555
- item = arr[i];
10556
- break;
10557
- }
10558
- }
10559
- return item;
10560
- }
10561
10109
  var getDPR = (scale = 1) => inBrowser ? window.devicePixelRatio || scale : scale;
10562
10110
  function supportWebp() {
10563
10111
  if (!inBrowser)
@@ -10593,37 +10141,15 @@
10593
10141
  }
10594
10142
  };
10595
10143
  }
10596
- function testSupportsPassive() {
10597
- if (!inBrowser)
10598
- return;
10599
- var support = false;
10600
- try {
10601
- var opts2 = Object.defineProperty({}, "passive", {
10602
- get() {
10603
- support = true;
10604
- }
10605
- });
10606
- window.addEventListener("test", null, opts2);
10607
- } catch (e) {
10608
- }
10609
- return support;
10144
+ function on(el, type, func) {
10145
+ el.addEventListener(type, func, {
10146
+ capture: false,
10147
+ passive: true
10148
+ });
10149
+ }
10150
+ function off(el, type, func) {
10151
+ el.removeEventListener(type, func, false);
10610
10152
  }
10611
- var supportsPassive = testSupportsPassive();
10612
- var _ = {
10613
- on(el, type, func, capture = false) {
10614
- if (supportsPassive) {
10615
- el.addEventListener(type, func, {
10616
- capture,
10617
- passive: true
10618
- });
10619
- } else {
10620
- el.addEventListener(type, func, capture);
10621
- }
10622
- },
10623
- off(el, type, func, capture = false) {
10624
- el.removeEventListener(type, func, capture);
10625
- }
10626
- };
10627
10153
  var loadImageAsync = (item, resolve, reject) => {
10628
10154
  var image = new Image();
10629
10155
  if (!item || !item.src) {
@@ -10634,39 +10160,12 @@
10634
10160
  if (item.cors) {
10635
10161
  image.crossOrigin = item.cors;
10636
10162
  }
10637
- image.onload = function() {
10638
- resolve({
10639
- naturalHeight: image.naturalHeight,
10640
- naturalWidth: image.naturalWidth,
10641
- src: image.src
10642
- });
10643
- };
10644
- image.onerror = function(e) {
10645
- reject(e);
10646
- };
10647
- };
10648
- var style = (el, prop) => typeof getComputedStyle !== "undefined" ? getComputedStyle(el, null).getPropertyValue(prop) : el.style[prop];
10649
- var overflow = (el) => style(el, "overflow") + style(el, "overflow-y") + style(el, "overflow-x");
10650
- var scrollParent = (el) => {
10651
- if (!inBrowser)
10652
- return;
10653
- if (!(el instanceof HTMLElement)) {
10654
- return window;
10655
- }
10656
- var parent = el;
10657
- while (parent) {
10658
- if (parent === document.body || parent === document.documentElement) {
10659
- break;
10660
- }
10661
- if (!parent.parentNode) {
10662
- break;
10663
- }
10664
- if (/(scroll|auto)/.test(overflow(parent))) {
10665
- return parent;
10666
- }
10667
- parent = parent.parentNode;
10668
- }
10669
- return window;
10163
+ image.onload = () => resolve({
10164
+ naturalHeight: image.naturalHeight,
10165
+ naturalWidth: image.naturalWidth,
10166
+ src: image.src
10167
+ });
10168
+ image.onerror = (e) => reject(e);
10670
10169
  };
10671
10170
  function isObject(obj) {
10672
10171
  return obj !== null && typeof obj === "object";
@@ -10725,7 +10224,6 @@
10725
10224
  this.elRenderer = elRenderer;
10726
10225
  this._imageCache = imageCache;
10727
10226
  this.performanceData = {
10728
- init: Date.now(),
10729
10227
  loadStart: 0,
10730
10228
  loadEnd: 0
10731
10229
  };
@@ -10944,7 +10442,7 @@
10944
10442
  $parent = $parent ? $parent.$el || $parent : document.getElementById(container);
10945
10443
  }
10946
10444
  if (!$parent) {
10947
- $parent = scrollParent(el);
10445
+ $parent = getScrollParent$1(el);
10948
10446
  }
10949
10447
  var newListener = new ReactiveListener({
10950
10448
  bindType: binding.arg,
@@ -10973,7 +10471,7 @@
10973
10471
  src
10974
10472
  } = value;
10975
10473
  src = getBestSelectionFromSrcset(el, this.options.scale) || src;
10976
- var exist = find(this.ListenerQueue, (item) => item.el === el);
10474
+ var exist = this.ListenerQueue.find((item) => item.el === el);
10977
10475
  if (!exist) {
10978
10476
  this.add(el, binding, vnode);
10979
10477
  } else {
@@ -10994,7 +10492,7 @@
10994
10492
  if (!el)
10995
10493
  return;
10996
10494
  this._observer && this._observer.unobserve(el);
10997
- var existItem = find(this.ListenerQueue, (item) => item.el === el);
10495
+ var existItem = this.ListenerQueue.find((item) => item.el === el);
10998
10496
  if (existItem) {
10999
10497
  this._removeListenerTarget(existItem.$parent);
11000
10498
  this._removeListenerTarget(window);
@@ -11037,7 +10535,7 @@
11037
10535
  _addListenerTarget(el) {
11038
10536
  if (!el)
11039
10537
  return;
11040
- var target = find(this.TargetQueue, (target2) => target2.el === el);
10538
+ var target = this.TargetQueue.find((target2) => target2.el === el);
11041
10539
  if (!target) {
11042
10540
  target = {
11043
10541
  el,
@@ -11065,7 +10563,7 @@
11065
10563
  });
11066
10564
  }
11067
10565
  _initListen(el, start2) {
11068
- this.options.ListenEvents.forEach((evt) => _[start2 ? "on" : "off"](el, evt, this.lazyLoadHandler));
10566
+ this.options.ListenEvents.forEach((evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler));
11069
10567
  }
11070
10568
  _initEvent() {
11071
10569
  this.Event = {
@@ -11081,11 +10579,11 @@
11081
10579
  this.Event.listeners[event].push(func);
11082
10580
  };
11083
10581
  this.$once = (event, func) => {
11084
- var on = (...args) => {
11085
- this.$off(event, on);
10582
+ var on2 = (...args) => {
10583
+ this.$off(event, on2);
11086
10584
  func.apply(this, args);
11087
10585
  };
11088
- this.$on(event, on);
10586
+ this.$on(event, on2);
11089
10587
  };
11090
10588
  this.$off = (event, func) => {
11091
10589
  if (!func) {
@@ -11246,7 +10744,7 @@
11246
10744
  }
11247
10745
  }
11248
10746
  });
11249
- var defaultOptions$1 = {
10747
+ var defaultOptions = {
11250
10748
  selector: "img"
11251
10749
  };
11252
10750
  class LazyContainer {
@@ -11272,7 +10770,7 @@
11272
10770
  binding
11273
10771
  }) {
11274
10772
  this.el = el;
11275
- this.options = Object.assign({}, defaultOptions$1, binding.value);
10773
+ this.options = Object.assign({}, defaultOptions, binding.value);
11276
10774
  var imgs = this.getImgs();
11277
10775
  imgs.forEach((el2) => {
11278
10776
  this.lazy.add(el2, Object.assign({}, this.binding, {
@@ -11312,7 +10810,7 @@
11312
10810
  this._queue.push(container);
11313
10811
  }
11314
10812
  update(el, binding, vnode) {
11315
- var container = find(this._queue, (item) => item.el === el);
10813
+ var container = this._queue.find((item) => item.el === el);
11316
10814
  if (!container)
11317
10815
  return;
11318
10816
  container.update({
@@ -11322,7 +10820,7 @@
11322
10820
  });
11323
10821
  }
11324
10822
  unbind(el) {
11325
- var container = find(this._queue, (item) => item.el === el);
10823
+ var container = this._queue.find((item) => item.el === el);
11326
10824
  if (!container)
11327
10825
  return;
11328
10826
  container.clear();
@@ -11453,20 +10951,14 @@
11453
10951
  var [name$q, bem$q, t$5] = createNamespace("list");
11454
10952
  var props$7 = {
11455
10953
  error: Boolean,
10954
+ offset: makeNumericProp(300),
11456
10955
  loading: Boolean,
11457
10956
  finished: Boolean,
11458
10957
  errorText: String,
10958
+ direction: makeStringProp("down"),
11459
10959
  loadingText: String,
11460
10960
  finishedText: String,
11461
- immediateCheck: truthProp,
11462
- offset: {
11463
- type: [Number, String],
11464
- default: 300
11465
- },
11466
- direction: {
11467
- type: String,
11468
- default: "down"
11469
- }
10961
+ immediateCheck: truthProp
11470
10962
  };
11471
10963
  var _List = vue.defineComponent({
11472
10964
  name: name$q,
@@ -11480,7 +10972,7 @@
11480
10972
  var root = vue.ref();
11481
10973
  var placeholder = vue.ref();
11482
10974
  var tabStatus = useTabStatus();
11483
- var scrollParent2 = useScrollParent(root);
10975
+ var scrollParent = useScrollParent(root);
11484
10976
  var check = () => {
11485
10977
  vue.nextTick(() => {
11486
10978
  if (loading.value || props2.finished || props2.error || (tabStatus == null ? void 0 : tabStatus.value) === false) {
@@ -11490,7 +10982,7 @@
11490
10982
  offset: offset2,
11491
10983
  direction
11492
10984
  } = props2;
11493
- var scrollParentRect = useRect(scrollParent2);
10985
+ var scrollParentRect = useRect(scrollParent);
11494
10986
  if (!scrollParentRect.height || isHidden(root)) {
11495
10987
  return;
11496
10988
  }
@@ -11564,7 +11056,7 @@
11564
11056
  check
11565
11057
  });
11566
11058
  useEventListener("scroll", check, {
11567
- target: scrollParent2
11059
+ target: scrollParent
11568
11060
  });
11569
11061
  return () => {
11570
11062
  var Content = slots.default == null ? void 0 : slots.default();
@@ -11597,7 +11089,7 @@
11597
11089
  props: {
11598
11090
  title: String,
11599
11091
  fixed: Boolean,
11600
- zIndex: [Number, String],
11092
+ zIndex: numericProp,
11601
11093
  border: truthProp,
11602
11094
  leftText: String,
11603
11095
  rightText: String,
@@ -11640,12 +11132,12 @@
11640
11132
  border,
11641
11133
  zIndex
11642
11134
  } = props2;
11643
- var style2 = getZIndexStyle(zIndex);
11135
+ var style = getZIndexStyle(zIndex);
11644
11136
  var hasLeft = props2.leftArrow || props2.leftText || slots.left;
11645
11137
  var hasRight = props2.rightText || slots.right;
11646
11138
  return vue.createVNode("div", {
11647
11139
  "ref": navBarRef,
11648
- "style": style2,
11140
+ "style": style,
11649
11141
  "class": [bem$p({
11650
11142
  fixed,
11651
11143
  "safe-area-inset-top": props2.safeAreaInsetTop
@@ -11678,20 +11170,14 @@
11678
11170
  text: String,
11679
11171
  mode: String,
11680
11172
  color: String,
11173
+ delay: makeNumericProp(1),
11174
+ speed: makeNumericProp(60),
11681
11175
  leftIcon: String,
11682
11176
  wrapable: Boolean,
11683
11177
  background: String,
11684
11178
  scrollable: {
11685
11179
  type: Boolean,
11686
11180
  default: null
11687
- },
11688
- delay: {
11689
- type: [Number, String],
11690
- default: 1
11691
- },
11692
- speed: {
11693
- type: [Number, String],
11694
- default: 60
11695
11181
  }
11696
11182
  };
11697
11183
  var _NoticeBar = vue.defineComponent({
@@ -11763,7 +11249,7 @@
11763
11249
  };
11764
11250
  var renderMarquee = () => {
11765
11251
  var ellipsis = props2.scrollable === false && !props2.wrapable;
11766
- var style2 = {
11252
+ var style = {
11767
11253
  transform: state.offset ? "translateX(" + state.offset + "px)" : "",
11768
11254
  transitionDuration: state.duration + "s"
11769
11255
  };
@@ -11773,7 +11259,7 @@
11773
11259
  "class": bem$o("wrap")
11774
11260
  }, [vue.createVNode("div", {
11775
11261
  "ref": contentRef,
11776
- "style": style2,
11262
+ "style": style,
11777
11263
  "class": [bem$o("content"), {
11778
11264
  "van-ellipsis": ellipsis
11779
11265
  }],
@@ -11839,15 +11325,12 @@
11839
11325
  var VanNotify = vue.defineComponent({
11840
11326
  name: name$n,
11841
11327
  props: extend({}, popupSharedProps, {
11328
+ type: makeStringProp("danger"),
11842
11329
  color: String,
11843
- message: [Number, String],
11330
+ message: numericProp,
11844
11331
  className: unknownProp,
11845
11332
  background: String,
11846
- lockScroll: Boolean,
11847
- type: {
11848
- type: String,
11849
- default: "danger"
11850
- }
11333
+ lockScroll: Boolean
11851
11334
  }),
11852
11335
  setup(props2, {
11853
11336
  slots
@@ -11870,11 +11353,9 @@
11870
11353
  });
11871
11354
  var timer;
11872
11355
  var instance;
11873
- function parseOptions(message) {
11874
- return isObject$1(message) ? message : {
11875
- message
11876
- };
11877
- }
11356
+ var parseOptions = (message) => isObject$1(message) ? message : {
11357
+ message
11358
+ };
11878
11359
  function initInstance() {
11879
11360
  ({
11880
11361
  instance
@@ -11891,7 +11372,7 @@
11891
11372
  }));
11892
11373
  }
11893
11374
  function Notify(options) {
11894
- if (!inBrowser$2) {
11375
+ if (!inBrowser$1) {
11895
11376
  return;
11896
11377
  }
11897
11378
  if (!instance) {
@@ -11905,31 +11386,29 @@
11905
11386
  }
11906
11387
  return instance;
11907
11388
  }
11908
- function defaultOptions() {
11909
- return {
11910
- type: "danger",
11911
- color: void 0,
11912
- message: "",
11913
- onClose: void 0,
11914
- onClick: void 0,
11915
- onOpened: void 0,
11916
- duration: 3e3,
11917
- className: "",
11918
- lockScroll: false,
11919
- background: void 0
11920
- };
11921
- }
11389
+ var getDefaultOptions = () => ({
11390
+ type: "danger",
11391
+ color: void 0,
11392
+ message: "",
11393
+ onClose: void 0,
11394
+ onClick: void 0,
11395
+ onOpened: void 0,
11396
+ duration: 3e3,
11397
+ className: "",
11398
+ lockScroll: false,
11399
+ background: void 0
11400
+ });
11922
11401
  Notify.clear = () => {
11923
11402
  if (instance) {
11924
11403
  instance.toggle(false);
11925
11404
  }
11926
11405
  };
11927
- Notify.currentOptions = defaultOptions();
11406
+ Notify.currentOptions = getDefaultOptions();
11928
11407
  Notify.setDefaultOptions = (options) => {
11929
11408
  extend(Notify.currentOptions, options);
11930
11409
  };
11931
11410
  Notify.resetDefaultOptions = () => {
11932
- Notify.currentOptions = defaultOptions();
11411
+ Notify.currentOptions = getDefaultOptions();
11933
11412
  };
11934
11413
  Notify.Component = withInstall(VanNotify);
11935
11414
  Notify.install = (app) => {
@@ -11955,7 +11434,7 @@
11955
11434
  name: name$m,
11956
11435
  props: {
11957
11436
  type: String,
11958
- text: [Number, String],
11437
+ text: numericProp,
11959
11438
  color: String,
11960
11439
  wider: Boolean,
11961
11440
  large: Boolean,
@@ -12028,8 +11507,11 @@
12028
11507
  props: {
12029
11508
  show: Boolean,
12030
11509
  title: String,
12031
- zIndex: [Number, String],
11510
+ theme: makeStringProp("default"),
11511
+ zIndex: numericProp,
12032
11512
  teleport: [String, Object],
11513
+ maxlength: makeNumericProp(Infinity),
11514
+ modelValue: makeStringProp(""),
12033
11515
  transition: truthProp,
12034
11516
  blurOnClose: truthProp,
12035
11517
  showDeleteKey: truthProp,
@@ -12039,21 +11521,9 @@
12039
11521
  closeButtonLoading: Boolean,
12040
11522
  hideOnClickOutside: truthProp,
12041
11523
  safeAreaInsetBottom: truthProp,
12042
- theme: {
12043
- type: String,
12044
- default: "default"
12045
- },
12046
- modelValue: {
12047
- type: String,
12048
- default: ""
12049
- },
12050
11524
  extraKey: {
12051
11525
  type: [String, Array],
12052
11526
  default: ""
12053
- },
12054
- maxlength: {
12055
- type: [Number, String],
12056
- default: Number.MAX_VALUE
12057
11527
  }
12058
11528
  },
12059
11529
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
@@ -12063,7 +11533,7 @@
12063
11533
  }) {
12064
11534
  var root = vue.ref();
12065
11535
  var genBasicKeys = () => {
12066
- var keys2 = Array(9).fill("").map((_2, i) => ({
11536
+ var keys2 = Array(9).fill("").map((_, i) => ({
12067
11537
  text: i + 1
12068
11538
  }));
12069
11539
  if (props2.randomKeyOrder) {
@@ -12244,43 +11714,23 @@
12244
11714
  });
12245
11715
  var NumberKeyboard = withInstall(_NumberKeyboard);
12246
11716
  var [name$k, bem$k, t$4] = createNamespace("pagination");
12247
- function makePage(number, text, active) {
12248
- return {
12249
- number,
12250
- text,
12251
- active
12252
- };
12253
- }
11717
+ var makePage = (number, text, active) => ({
11718
+ number,
11719
+ text,
11720
+ active
11721
+ });
12254
11722
  var _Pagination = vue.defineComponent({
12255
11723
  name: name$k,
12256
11724
  props: {
11725
+ mode: makeStringProp("multi"),
12257
11726
  prevText: String,
12258
11727
  nextText: String,
12259
- forceEllipses: Boolean,
12260
- mode: {
12261
- type: String,
12262
- default: "multi"
12263
- },
12264
- modelValue: {
12265
- type: Number,
12266
- default: 0
12267
- },
12268
- pageCount: {
12269
- type: [Number, String],
12270
- default: 0
12271
- },
12272
- totalItems: {
12273
- type: [Number, String],
12274
- default: 0
12275
- },
12276
- itemsPerPage: {
12277
- type: [Number, String],
12278
- default: 10
12279
- },
12280
- showPageSize: {
12281
- type: [Number, String],
12282
- default: 5
12283
- }
11728
+ pageCount: makeNumericProp(0),
11729
+ modelValue: makeNumberProp(0),
11730
+ totalItems: makeNumericProp(0),
11731
+ showPageSize: makeNumericProp(5),
11732
+ itemsPerPage: makeNumericProp(10),
11733
+ forceEllipses: Boolean
12284
11734
  },
12285
11735
  emits: ["change", "update:modelValue"],
12286
11736
  setup(props2, {
@@ -12389,17 +11839,11 @@
12389
11839
  props: {
12390
11840
  info: String,
12391
11841
  mask: truthProp,
12392
- gutter: [Number, String],
11842
+ value: makeStringProp(""),
11843
+ gutter: numericProp,
11844
+ length: makeNumericProp(6),
12393
11845
  focused: Boolean,
12394
- errorInfo: String,
12395
- value: {
12396
- type: String,
12397
- default: ""
12398
- },
12399
- length: {
12400
- type: [Number, String],
12401
- default: 6
12402
- }
11846
+ errorInfo: String
12403
11847
  },
12404
11848
  emits: ["focus"],
12405
11849
  setup(props2, {
@@ -12422,9 +11866,9 @@
12422
11866
  var char = value[i];
12423
11867
  var showBorder = i !== 0 && !gutter;
12424
11868
  var showCursor = focused && i === value.length;
12425
- var style2 = void 0;
11869
+ var style = void 0;
12426
11870
  if (i !== 0 && gutter) {
12427
- style2 = {
11871
+ style = {
12428
11872
  marginLeft: addUnit(gutter)
12429
11873
  };
12430
11874
  }
@@ -12434,7 +11878,7 @@
12434
11878
  }, bem$j("item", {
12435
11879
  focus: showCursor
12436
11880
  })],
12437
- "style": style2
11881
+ "style": style
12438
11882
  }, [mask ? vue.createVNode("i", {
12439
11883
  "style": {
12440
11884
  visibility: char ? "visible" : "hidden"
@@ -12530,12 +11974,12 @@
12530
11974
  function getWindowScrollBarX(element) {
12531
11975
  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
12532
11976
  }
12533
- function getComputedStyle$1(element) {
11977
+ function getComputedStyle(element) {
12534
11978
  return getWindow(element).getComputedStyle(element);
12535
11979
  }
12536
11980
  function isScrollParent(element) {
12537
- var _getComputedStyle = getComputedStyle$1(element), overflow2 = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
12538
- return /auto|scroll|overlay|hidden/.test(overflow2 + overflowY + overflowX);
11981
+ var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
11982
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
12539
11983
  }
12540
11984
  function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
12541
11985
  if (isFixed === void 0) {
@@ -12608,10 +12052,10 @@
12608
12052
  if (list === void 0) {
12609
12053
  list = [];
12610
12054
  }
12611
- var scrollParent2 = getScrollParent(element);
12612
- var isBody = scrollParent2 === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
12613
- var win = getWindow(scrollParent2);
12614
- var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent2) ? scrollParent2 : []) : scrollParent2;
12055
+ var scrollParent = getScrollParent(element);
12056
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
12057
+ var win = getWindow(scrollParent);
12058
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
12615
12059
  var updatedList = list.concat(target);
12616
12060
  return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
12617
12061
  }
@@ -12619,7 +12063,7 @@
12619
12063
  return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
12620
12064
  }
12621
12065
  function getTrueOffsetParent(element) {
12622
- if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
12066
+ if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
12623
12067
  return null;
12624
12068
  }
12625
12069
  return element.offsetParent;
@@ -12628,14 +12072,14 @@
12628
12072
  var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
12629
12073
  var isIE = navigator.userAgent.indexOf("Trident") !== -1;
12630
12074
  if (isIE && isHTMLElement(element)) {
12631
- var elementCss = getComputedStyle$1(element);
12075
+ var elementCss = getComputedStyle(element);
12632
12076
  if (elementCss.position === "fixed") {
12633
12077
  return null;
12634
12078
  }
12635
12079
  }
12636
12080
  var currentNode = getParentNode(element);
12637
12081
  while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
12638
- var css = getComputedStyle$1(currentNode);
12082
+ var css = getComputedStyle(currentNode);
12639
12083
  if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
12640
12084
  return currentNode;
12641
12085
  } else {
@@ -12647,10 +12091,10 @@
12647
12091
  function getOffsetParent(element) {
12648
12092
  var window2 = getWindow(element);
12649
12093
  var offsetParent = getTrueOffsetParent(element);
12650
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
12094
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
12651
12095
  offsetParent = getTrueOffsetParent(offsetParent);
12652
12096
  }
12653
- if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static")) {
12097
+ if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
12654
12098
  return window2;
12655
12099
  }
12656
12100
  return offsetParent || getContainingBlock(element) || window2;
@@ -12939,8 +12383,8 @@
12939
12383
  var window2 = getWindow(state.elements.popper);
12940
12384
  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
12941
12385
  if (scroll) {
12942
- scrollParents.forEach(function(scrollParent2) {
12943
- scrollParent2.addEventListener("scroll", instance2.update, passive);
12386
+ scrollParents.forEach(function(scrollParent) {
12387
+ scrollParent.addEventListener("scroll", instance2.update, passive);
12944
12388
  });
12945
12389
  }
12946
12390
  if (resize) {
@@ -12948,8 +12392,8 @@
12948
12392
  }
12949
12393
  return function() {
12950
12394
  if (scroll) {
12951
- scrollParents.forEach(function(scrollParent2) {
12952
- scrollParent2.removeEventListener("scroll", instance2.update, passive);
12395
+ scrollParents.forEach(function(scrollParent) {
12396
+ scrollParent.removeEventListener("scroll", instance2.update, passive);
12953
12397
  });
12954
12398
  }
12955
12399
  if (resize) {
@@ -13012,7 +12456,7 @@
13012
12456
  var widthProp = "clientWidth";
13013
12457
  if (offsetParent === getWindow(popper)) {
13014
12458
  offsetParent = getDocumentElement(popper);
13015
- if (getComputedStyle$1(offsetParent).position !== "static") {
12459
+ if (getComputedStyle(offsetParent).position !== "static") {
13016
12460
  heightProp = "scrollHeight";
13017
12461
  widthProp = "scrollWidth";
13018
12462
  }
@@ -13077,13 +12521,13 @@
13077
12521
  function applyStyles(_ref) {
13078
12522
  var state = _ref.state;
13079
12523
  Object.keys(state.elements).forEach(function(name2) {
13080
- var style2 = state.styles[name2] || {};
12524
+ var style = state.styles[name2] || {};
13081
12525
  var attributes = state.attributes[name2] || {};
13082
12526
  var element = state.elements[name2];
13083
12527
  if (!isHTMLElement(element) || !getNodeName(element)) {
13084
12528
  return;
13085
12529
  }
13086
- Object.assign(element.style, style2);
12530
+ Object.assign(element.style, style);
13087
12531
  Object.keys(attributes).forEach(function(name3) {
13088
12532
  var value = attributes[name3];
13089
12533
  if (value === false) {
@@ -13118,14 +12562,14 @@
13118
12562
  var element = state.elements[name2];
13119
12563
  var attributes = state.attributes[name2] || {};
13120
12564
  var styleProperties = Object.keys(state.styles.hasOwnProperty(name2) ? state.styles[name2] : initialStyles[name2]);
13121
- var style2 = styleProperties.reduce(function(style3, property) {
13122
- style3[property] = "";
13123
- return style3;
12565
+ var style = styleProperties.reduce(function(style2, property) {
12566
+ style2[property] = "";
12567
+ return style2;
13124
12568
  }, {});
13125
12569
  if (!isHTMLElement(element) || !getNodeName(element)) {
13126
12570
  return;
13127
12571
  }
13128
- Object.assign(element.style, style2);
12572
+ Object.assign(element.style, style);
13129
12573
  Object.keys(attributes).forEach(function(attribute) {
13130
12574
  element.removeAttribute(attribute);
13131
12575
  });
@@ -13187,8 +12631,13 @@
13187
12631
  name: name$i,
13188
12632
  props: {
13189
12633
  show: Boolean,
12634
+ theme: makeStringProp("light"),
13190
12635
  overlay: Boolean,
13191
- duration: [Number, String],
12636
+ actions: makeArrayProp(),
12637
+ trigger: makeStringProp("click"),
12638
+ duration: numericProp,
12639
+ showArrow: truthProp,
12640
+ placement: makeStringProp("bottom"),
13192
12641
  iconPrefix: String,
13193
12642
  overlayClass: unknownProp,
13194
12643
  overlayStyle: Object,
@@ -13199,29 +12648,9 @@
13199
12648
  type: Array,
13200
12649
  default: () => [0, 8]
13201
12650
  },
13202
- theme: {
13203
- type: String,
13204
- default: "light"
13205
- },
13206
- trigger: {
13207
- type: String,
13208
- default: "click"
13209
- },
13210
- actions: {
13211
- type: Array,
13212
- default: () => []
13213
- },
13214
- placement: {
13215
- type: String,
13216
- default: "bottom"
13217
- },
13218
12651
  teleport: {
13219
12652
  type: [String, Object],
13220
12653
  default: "body"
13221
- },
13222
- showArrow: {
13223
- type: Boolean,
13224
- default: true
13225
12654
  }
13226
12655
  },
13227
12656
  emits: ["select", "touchstart", "update:show"],
@@ -13360,9 +12789,9 @@
13360
12789
  showPivot: truthProp,
13361
12790
  pivotColor: String,
13362
12791
  trackColor: String,
13363
- strokeWidth: [Number, String],
12792
+ strokeWidth: numericProp,
13364
12793
  percentage: {
13365
- type: [Number, String],
12794
+ type: numericProp,
13366
12795
  default: 0,
13367
12796
  validator: (value) => value >= 0 && value <= 100
13368
12797
  }
@@ -13381,14 +12810,14 @@
13381
12810
  } = props2;
13382
12811
  var text = pivotText != null ? pivotText : percentage + "%";
13383
12812
  if (props2.showPivot && text) {
13384
- var style2 = {
12813
+ var style = {
13385
12814
  color: textColor,
13386
12815
  left: +percentage + "%",
13387
12816
  transform: "translate(-" + +percentage + "%,-50%)",
13388
12817
  background: pivotColor || background.value
13389
12818
  };
13390
12819
  return vue.createVNode("span", {
13391
- "style": style2,
12820
+ "style": style,
13392
12821
  "class": bem$h("pivot")
13393
12822
  }, [text]);
13394
12823
  }
@@ -13425,27 +12854,15 @@
13425
12854
  name: name$g,
13426
12855
  props: {
13427
12856
  disabled: Boolean,
12857
+ modelValue: Boolean,
12858
+ headHeight: makeNumericProp(DEFAULT_HEAD_HEIGHT),
13428
12859
  successText: String,
13429
12860
  pullingText: String,
13430
12861
  loosingText: String,
13431
12862
  loadingText: String,
13432
- pullDistance: [Number, String],
13433
- modelValue: {
13434
- type: Boolean,
13435
- default: false
13436
- },
13437
- successDuration: {
13438
- type: [Number, String],
13439
- default: 500
13440
- },
13441
- animationDuration: {
13442
- type: [Number, String],
13443
- default: 300
13444
- },
13445
- headHeight: {
13446
- type: [Number, String],
13447
- default: DEFAULT_HEAD_HEIGHT
13448
- }
12863
+ pullDistance: numericProp,
12864
+ successDuration: makeNumericProp(500),
12865
+ animationDuration: makeNumericProp(300)
13449
12866
  },
13450
12867
  emits: ["refresh", "update:modelValue"],
13451
12868
  setup(props2, {
@@ -13454,7 +12871,7 @@
13454
12871
  }) {
13455
12872
  var reachTop;
13456
12873
  var root = vue.ref();
13457
- var scrollParent2 = useScrollParent(root);
12874
+ var scrollParent = useScrollParent(root);
13458
12875
  var state = vue.reactive({
13459
12876
  status: "normal",
13460
12877
  distance: 0,
@@ -13534,7 +12951,7 @@
13534
12951
  }, +props2.successDuration);
13535
12952
  };
13536
12953
  var checkPosition = (event) => {
13537
- reachTop = getScrollTop(scrollParent2.value) === 0;
12954
+ reachTop = getScrollTop(scrollParent.value) === 0;
13538
12955
  if (reachTop) {
13539
12956
  state.duration = 0;
13540
12957
  touch.start(event);
@@ -13634,32 +13051,20 @@
13634
13051
  var _Rate = vue.defineComponent({
13635
13052
  name: name$f,
13636
13053
  props: {
13637
- size: [Number, String],
13054
+ size: numericProp,
13055
+ icon: makeStringProp("star"),
13638
13056
  color: String,
13639
- gutter: [Number, String],
13057
+ count: makeNumericProp(5),
13058
+ gutter: numericProp,
13640
13059
  readonly: Boolean,
13641
13060
  disabled: Boolean,
13061
+ voidIcon: makeStringProp("star-o"),
13642
13062
  allowHalf: Boolean,
13643
13063
  voidColor: String,
13644
13064
  touchable: truthProp,
13645
13065
  iconPrefix: String,
13646
- disabledColor: String,
13647
- modelValue: {
13648
- type: Number,
13649
- default: 0
13650
- },
13651
- icon: {
13652
- type: String,
13653
- default: "star"
13654
- },
13655
- voidIcon: {
13656
- type: String,
13657
- default: "star-o"
13658
- },
13659
- count: {
13660
- type: [Number, String],
13661
- default: 5
13662
- }
13066
+ modelValue: makeNumberProp(0),
13067
+ disabledColor: String
13663
13068
  },
13664
13069
  emits: ["change", "update:modelValue"],
13665
13070
  setup(props2, {
@@ -13668,10 +13073,10 @@
13668
13073
  var touch = useTouch();
13669
13074
  var [itemRefs, setItemRefs] = useRefs();
13670
13075
  var untouchable = () => props2.readonly || props2.disabled || !props2.touchable;
13671
- var list = vue.computed(() => Array(+props2.count).fill("").map((_2, i) => getRateStatus(props2.modelValue, i + 1, props2.allowHalf, props2.readonly)));
13076
+ var list = vue.computed(() => Array(+props2.count).fill("").map((_, i) => getRateStatus(props2.modelValue, i + 1, props2.allowHalf, props2.readonly)));
13672
13077
  var ranges;
13673
13078
  var updateRanges = () => {
13674
- var rects = itemRefs.value.map((item) => item.getBoundingClientRect());
13079
+ var rects = itemRefs.value.map(useRect);
13675
13080
  ranges = [];
13676
13081
  rects.forEach((rect, index2) => {
13677
13082
  if (props2.allowHalf) {
@@ -13742,9 +13147,9 @@
13742
13147
  var isFull = item.status === "full";
13743
13148
  var isVoid = item.status === "void";
13744
13149
  var renderHalf = allowHalf && item.value > 0 && item.value < 1;
13745
- var style2;
13150
+ var style;
13746
13151
  if (gutter && score !== +count) {
13747
- style2 = {
13152
+ style = {
13748
13153
  paddingRight: addUnit(gutter)
13749
13154
  };
13750
13155
  }
@@ -13756,7 +13161,7 @@
13756
13161
  "key": index2,
13757
13162
  "ref": setItemRefs(index2),
13758
13163
  "role": "radio",
13759
- "style": style2,
13164
+ "style": style,
13760
13165
  "class": bem$f("item"),
13761
13166
  "tabindex": 0,
13762
13167
  "aria-setsize": +count,
@@ -13804,18 +13209,12 @@
13804
13209
  var [name$e, bem$e, t$2] = createNamespace("search");
13805
13210
  var props$4 = extend({}, fieldSharedProps, {
13806
13211
  label: String,
13212
+ shape: makeStringProp("square"),
13213
+ leftIcon: makeStringProp("search"),
13807
13214
  clearable: truthProp,
13808
13215
  actionText: String,
13809
13216
  background: String,
13810
- showAction: Boolean,
13811
- shape: {
13812
- type: String,
13813
- default: "square"
13814
- },
13815
- leftIcon: {
13816
- type: String,
13817
- default: "search"
13818
- }
13217
+ showAction: Boolean
13819
13218
  });
13820
13219
  var _Search = vue.defineComponent({
13821
13220
  name: name$e,
@@ -13911,14 +13310,11 @@
13911
13310
  name: name$d,
13912
13311
  props: extend({}, popupSharedProps, {
13913
13312
  title: String,
13313
+ options: makeArrayProp(),
13914
13314
  cancelText: String,
13915
13315
  description: String,
13916
13316
  closeOnPopstate: truthProp,
13917
- safeAreaInsetBottom: truthProp,
13918
- options: {
13919
- type: Array,
13920
- default: () => []
13921
- }
13317
+ safeAreaInsetBottom: truthProp
13922
13318
  }),
13923
13319
  emits: ["cancel", "select", "update:show"],
13924
13320
  setup(props2, {
@@ -14007,10 +13403,7 @@
14007
13403
  var _Sidebar = vue.defineComponent({
14008
13404
  name: name$c,
14009
13405
  props: {
14010
- modelValue: {
14011
- type: [Number, String],
14012
- default: 0
14013
- }
13406
+ modelValue: makeNumericProp(0)
14014
13407
  },
14015
13408
  emits: ["change", "update:modelValue"],
14016
13409
  setup(props2, {
@@ -14043,7 +13436,7 @@
14043
13436
  props: extend({}, routeProps, {
14044
13437
  dot: Boolean,
14045
13438
  title: String,
14046
- badge: [Number, String],
13439
+ badge: numericProp,
14047
13440
  disabled: Boolean
14048
13441
  }),
14049
13442
  emits: ["click"],
@@ -14098,21 +13491,15 @@
14098
13491
  var _Skeleton = vue.defineComponent({
14099
13492
  name: name$a,
14100
13493
  props: {
13494
+ row: makeNumericProp(0),
14101
13495
  title: Boolean,
14102
13496
  round: Boolean,
14103
13497
  avatar: Boolean,
14104
13498
  loading: truthProp,
14105
13499
  animate: truthProp,
14106
- avatarSize: [Number, String],
14107
- titleWidth: [Number, String],
14108
- row: {
14109
- type: [Number, String],
14110
- default: 0
14111
- },
14112
- avatarShape: {
14113
- type: String,
14114
- default: "round"
14115
- },
13500
+ avatarSize: numericProp,
13501
+ titleWidth: numericProp,
13502
+ avatarShape: makeStringProp("round"),
14116
13503
  rowWidth: {
14117
13504
  type: [Number, String, Array],
14118
13505
  default: DEFAULT_ROW_WIDTH
@@ -14151,7 +13538,7 @@
14151
13538
  }
14152
13539
  return rowWidth;
14153
13540
  };
14154
- var renderRows = () => Array(props2.row).fill("").map((_2, i) => vue.createVNode("div", {
13541
+ var renderRows = () => Array(props2.row).fill("").map((_, i) => vue.createVNode("div", {
14155
13542
  "class": bem$a("row"),
14156
13543
  "style": {
14157
13544
  width: addUnit(getRowWidth(i))
@@ -14177,27 +13564,18 @@
14177
13564
  var _Slider = vue.defineComponent({
14178
13565
  name: name$9,
14179
13566
  props: {
13567
+ min: makeNumericProp(0),
13568
+ max: makeNumericProp(100),
13569
+ step: makeNumericProp(1),
14180
13570
  range: Boolean,
14181
13571
  reverse: Boolean,
14182
13572
  disabled: Boolean,
14183
13573
  readonly: Boolean,
14184
13574
  vertical: Boolean,
14185
- barHeight: [Number, String],
14186
- buttonSize: [Number, String],
13575
+ barHeight: numericProp,
13576
+ buttonSize: numericProp,
14187
13577
  activeColor: String,
14188
13578
  inactiveColor: String,
14189
- min: {
14190
- type: [Number, String],
14191
- default: 0
14192
- },
14193
- max: {
14194
- type: [Number, String],
14195
- default: 100
14196
- },
14197
- step: {
14198
- type: [Number, String],
14199
- default: 1
14200
- },
14201
13579
  modelValue: {
14202
13580
  type: [Number, Array],
14203
13581
  default: 0
@@ -14209,8 +13587,8 @@
14209
13587
  slots
14210
13588
  }) {
14211
13589
  var buttonIndex;
13590
+ var current;
14212
13591
  var startValue;
14213
- var currentValue;
14214
13592
  var root = vue.ref();
14215
13593
  var dragStatus = vue.ref();
14216
13594
  var touch = useTouch();
@@ -14245,12 +13623,12 @@
14245
13623
  };
14246
13624
  var barStyle = vue.computed(() => {
14247
13625
  var mainAxis = props2.vertical ? "height" : "width";
14248
- var style2 = {
13626
+ var style = {
14249
13627
  [mainAxis]: calcMainAxis(),
14250
13628
  background: props2.activeColor
14251
13629
  };
14252
13630
  if (dragStatus.value) {
14253
- style2.transition = "none";
13631
+ style.transition = "none";
14254
13632
  }
14255
13633
  var getPositionKey = () => {
14256
13634
  if (props2.vertical) {
@@ -14258,8 +13636,8 @@
14258
13636
  }
14259
13637
  return props2.reverse ? "right" : "left";
14260
13638
  };
14261
- style2[getPositionKey()] = calcOffset();
14262
- return style2;
13639
+ style[getPositionKey()] = calcOffset();
13640
+ return style;
14263
13641
  });
14264
13642
  var format2 = (value) => {
14265
13643
  var min = +props2.min;
@@ -14332,11 +13710,11 @@
14332
13710
  return;
14333
13711
  }
14334
13712
  touch.start(event);
14335
- currentValue = props2.modelValue;
14336
- if (isRange(currentValue)) {
14337
- startValue = currentValue.map(format2);
13713
+ current = props2.modelValue;
13714
+ if (isRange(current)) {
13715
+ startValue = current.map(format2);
14338
13716
  } else {
14339
- startValue = format2(currentValue);
13717
+ startValue = format2(current);
14340
13718
  }
14341
13719
  dragStatus.value = "start";
14342
13720
  };
@@ -14359,18 +13737,18 @@
14359
13737
  }
14360
13738
  if (isRange(startValue)) {
14361
13739
  var index2 = props2.reverse ? 1 - buttonIndex : buttonIndex;
14362
- currentValue[index2] = startValue[index2] + diff;
13740
+ current[index2] = startValue[index2] + diff;
14363
13741
  } else {
14364
- currentValue = startValue + diff;
13742
+ current = startValue + diff;
14365
13743
  }
14366
- updateValue(currentValue);
13744
+ updateValue(current);
14367
13745
  };
14368
13746
  var onTouchEnd = (event) => {
14369
13747
  if (props2.disabled || props2.readonly) {
14370
13748
  return;
14371
13749
  }
14372
13750
  if (dragStatus.value === "dragging") {
14373
- updateValue(currentValue, true);
13751
+ updateValue(current, true);
14374
13752
  emit("drag-end", event);
14375
13753
  }
14376
13754
  dragStatus.value = "";
@@ -14402,13 +13780,13 @@
14402
13780
  }, null);
14403
13781
  };
14404
13782
  var renderButton = (index2) => {
14405
- var currentValue2 = typeof index2 === "number" ? props2.modelValue[index2] : props2.modelValue;
13783
+ var current2 = typeof index2 === "number" ? props2.modelValue[index2] : props2.modelValue;
14406
13784
  return vue.createVNode("div", {
14407
13785
  "role": "slider",
14408
13786
  "class": getButtonClassName(index2),
14409
13787
  "tabindex": props2.disabled || props2.readonly ? -1 : 0,
14410
13788
  "aria-valuemin": +props2.min,
14411
- "aria-valuenow": currentValue2,
13789
+ "aria-valuenow": current2,
14412
13790
  "aria-valuemax": +props2.max,
14413
13791
  "aria-orientation": props2.vertical ? "vertical" : "horizontal",
14414
13792
  "onTouchstart": (event) => {
@@ -14421,7 +13799,7 @@
14421
13799
  "onTouchend": onTouchEnd,
14422
13800
  "onTouchcancel": onTouchEnd,
14423
13801
  "onClick": stopPropagation
14424
- }, [renderButtonContent(currentValue2, index2)]);
13802
+ }, [renderButtonContent(current2, index2)]);
14425
13803
  };
14426
13804
  updateValue(props2.modelValue);
14427
13805
  useCustomFieldValue(() => props2.modelValue);
@@ -14442,23 +13820,14 @@
14442
13820
  var Slider = withInstall(_Slider);
14443
13821
  var [name$8, bem$8] = createNamespace("steps");
14444
13822
  var props$3 = {
13823
+ active: makeNumericProp(0),
13824
+ direction: makeStringProp("horizontal"),
13825
+ activeIcon: makeStringProp("checked"),
14445
13826
  iconPrefix: String,
14446
13827
  finishIcon: String,
14447
13828
  activeColor: String,
14448
13829
  inactiveIcon: String,
14449
- inactiveColor: String,
14450
- active: {
14451
- type: [Number, String],
14452
- default: 0
14453
- },
14454
- direction: {
14455
- type: String,
14456
- default: "horizontal"
14457
- },
14458
- activeIcon: {
14459
- type: String,
14460
- default: "checked"
14461
- }
13830
+ inactiveColor: String
14462
13831
  };
14463
13832
  var STEPS_KEY = Symbol(name$8);
14464
13833
  var _Steps = vue.defineComponent({
@@ -14593,12 +13962,14 @@
14593
13962
  var [name$6, bem$6] = createNamespace("stepper");
14594
13963
  var LONG_PRESS_INTERVAL = 200;
14595
13964
  var LONG_PRESS_START_TIME = 600;
14596
- function equal(value1, value2) {
14597
- return String(value1) === String(value2);
14598
- }
13965
+ var isEqual = (value1, value2) => String(value1) === String(value2);
14599
13966
  var _Stepper = vue.defineComponent({
14600
13967
  name: name$6,
14601
13968
  props: {
13969
+ min: makeNumericProp(1),
13970
+ max: makeNumericProp(Infinity),
13971
+ name: makeNumericProp(""),
13972
+ step: makeNumericProp(1),
14602
13973
  theme: String,
14603
13974
  integer: Boolean,
14604
13975
  disabled: Boolean,
@@ -14607,35 +13978,16 @@
14607
13978
  showInput: truthProp,
14608
13979
  longPress: truthProp,
14609
13980
  allowEmpty: Boolean,
14610
- modelValue: [Number, String],
14611
- inputWidth: [Number, String],
14612
- buttonSize: [Number, String],
13981
+ modelValue: numericProp,
13982
+ inputWidth: numericProp,
13983
+ buttonSize: numericProp,
14613
13984
  placeholder: String,
14614
13985
  disablePlus: Boolean,
14615
13986
  disableMinus: Boolean,
14616
13987
  disableInput: Boolean,
14617
13988
  beforeChange: Function,
14618
- decimalLength: [Number, String],
14619
- name: {
14620
- type: [Number, String],
14621
- default: ""
14622
- },
14623
- min: {
14624
- type: [Number, String],
14625
- default: 1
14626
- },
14627
- max: {
14628
- type: [Number, String],
14629
- default: Infinity
14630
- },
14631
- step: {
14632
- type: [Number, String],
14633
- default: 1
14634
- },
14635
- defaultValue: {
14636
- type: [Number, String],
14637
- default: 1
14638
- }
13989
+ defaultValue: makeNumericProp(1),
13990
+ decimalLength: numericProp
14639
13991
  },
14640
13992
  emits: ["plus", "blur", "minus", "focus", "change", "overlimit", "update:modelValue"],
14641
13993
  setup(props2, {
@@ -14664,7 +14016,7 @@
14664
14016
  var _props$modelValue;
14665
14017
  var defaultValue = (_props$modelValue = props2.modelValue) != null ? _props$modelValue : props2.defaultValue;
14666
14018
  var value = format2(defaultValue);
14667
- if (!equal(value, props2.modelValue)) {
14019
+ if (!isEqual(value, props2.modelValue)) {
14668
14020
  emit("update:modelValue", value);
14669
14021
  }
14670
14022
  return value;
@@ -14681,7 +14033,7 @@
14681
14033
  var buttonStyle = vue.computed(() => getSizeStyle(props2.buttonSize));
14682
14034
  var check = () => {
14683
14035
  var value = format2(current.value);
14684
- if (!equal(value, current.value)) {
14036
+ if (!isEqual(value, current.value)) {
14685
14037
  current.value = value;
14686
14038
  }
14687
14039
  };
@@ -14723,7 +14075,7 @@
14723
14075
  }
14724
14076
  if (props2.beforeChange) {
14725
14077
  input.value = String(current.value);
14726
- } else if (!equal(value, formatted)) {
14078
+ } else if (!isEqual(value, formatted)) {
14727
14079
  input.value = formatted;
14728
14080
  }
14729
14081
  var isNumeric2 = formatted === String(+formatted);
@@ -14794,7 +14146,7 @@
14794
14146
  });
14795
14147
  vue.watch([() => props2.max, () => props2.min, () => props2.integer, () => props2.decimalLength], check);
14796
14148
  vue.watch(() => props2.modelValue, (value) => {
14797
- if (!equal(value, current.value)) {
14149
+ if (!isEqual(value, current.value)) {
14798
14150
  current.value = format2(value);
14799
14151
  }
14800
14152
  });
@@ -14851,24 +14203,15 @@
14851
14203
  price: Number,
14852
14204
  tipIcon: String,
14853
14205
  loading: Boolean,
14206
+ currency: makeStringProp("\xA5"),
14854
14207
  disabled: Boolean,
14855
14208
  textAlign: String,
14856
14209
  buttonText: String,
14210
+ buttonType: makeStringProp("danger"),
14857
14211
  buttonColor: String,
14858
14212
  suffixLabel: String,
14859
- safeAreaInsetBottom: truthProp,
14860
- decimalLength: {
14861
- type: [Number, String],
14862
- default: 2
14863
- },
14864
- currency: {
14865
- type: String,
14866
- default: "\xA5"
14867
- },
14868
- buttonType: {
14869
- type: String,
14870
- default: "danger"
14871
- }
14213
+ decimalLength: makeNumericProp(2),
14214
+ safeAreaInsetBottom: truthProp
14872
14215
  },
14873
14216
  emits: ["submit"],
14874
14217
  setup(props2, {
@@ -14945,15 +14288,12 @@
14945
14288
  var SubmitBar = withInstall(_SubmitBar);
14946
14289
  var [name$4, bem$4] = createNamespace("swipe-cell");
14947
14290
  var props$2 = {
14291
+ name: makeNumericProp(""),
14948
14292
  disabled: Boolean,
14949
- leftWidth: [Number, String],
14950
- rightWidth: [Number, String],
14293
+ leftWidth: numericProp,
14294
+ rightWidth: numericProp,
14951
14295
  beforeClose: Function,
14952
- stopPropagation: Boolean,
14953
- name: {
14954
- type: [Number, String],
14955
- default: ""
14956
- }
14296
+ stopPropagation: Boolean
14957
14297
  };
14958
14298
  var _SwipeCell = vue.defineComponent({
14959
14299
  name: name$4,
@@ -15101,15 +14441,12 @@
15101
14441
  route: Boolean,
15102
14442
  fixed: truthProp,
15103
14443
  border: truthProp,
15104
- zIndex: [Number, String],
14444
+ zIndex: numericProp,
15105
14445
  placeholder: Boolean,
15106
14446
  activeColor: String,
15107
14447
  beforeChange: Function,
15108
14448
  inactiveColor: String,
15109
- modelValue: {
15110
- type: [Number, String],
15111
- default: 0
15112
- },
14449
+ modelValue: makeNumericProp(0),
15113
14450
  safeAreaInsetBottom: {
15114
14451
  type: Boolean,
15115
14452
  default: null
@@ -15181,8 +14518,8 @@
15181
14518
  props: extend({}, routeProps, {
15182
14519
  dot: Boolean,
15183
14520
  icon: String,
15184
- name: [Number, String],
15185
- badge: [Number, String],
14521
+ name: numericProp,
14522
+ badge: numericProp,
15186
14523
  iconPrefix: String
15187
14524
  }),
15188
14525
  emits: ["click"],
@@ -15276,29 +14613,14 @@
15276
14613
  var _TreeSelect = vue.defineComponent({
15277
14614
  name: name$1,
15278
14615
  props: {
15279
- max: {
15280
- type: [Number, String],
15281
- default: Infinity
15282
- },
15283
- items: {
15284
- type: Array,
15285
- default: () => []
15286
- },
15287
- height: {
15288
- type: [Number, String],
15289
- default: 300
15290
- },
14616
+ max: makeNumericProp(Infinity),
14617
+ items: makeArrayProp(),
14618
+ height: makeNumericProp(300),
14619
+ selectedIcon: makeStringProp("success"),
14620
+ mainActiveIndex: makeNumericProp(0),
15291
14621
  activeId: {
15292
14622
  type: [Number, String, Array],
15293
14623
  default: 0
15294
- },
15295
- selectedIcon: {
15296
- type: String,
15297
- default: "success"
15298
- },
15299
- mainActiveIndex: {
15300
- type: [Number, String],
15301
- default: 0
15302
14624
  }
15303
14625
  },
15304
14626
  emits: ["click-nav", "click-item", "update:activeId", "update:mainActiveIndex"],
@@ -15380,12 +14702,7 @@
15380
14702
  });
15381
14703
  var TreeSelect = withInstall(_TreeSelect);
15382
14704
  var [name, bem] = createNamespace("uploader");
15383
- function toArray(item) {
15384
- if (Array.isArray(item)) {
15385
- return item;
15386
- }
15387
- return [item];
15388
- }
14705
+ var toArray = (item) => Array.isArray(item) ? item : [item];
15389
14706
  function readFileContent(file, resultType) {
15390
14707
  return new Promise((resolve) => {
15391
14708
  if (resultType === "file") {
@@ -15430,9 +14747,7 @@
15430
14747
  };
15431
14748
  }
15432
14749
  var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
15433
- function isImageUrl(url) {
15434
- return IMAGE_REGEXP.test(url);
15435
- }
14750
+ var isImageUrl = (url) => IMAGE_REGEXP.test(url);
15436
14751
  function isImageFile(item) {
15437
14752
  if (item.isImage) {
15438
14753
  return true;
@@ -15450,17 +14765,14 @@
15450
14765
  }
15451
14766
  var UploaderPreviewItem = vue.defineComponent({
15452
14767
  props: {
15453
- name: [Number, String],
14768
+ name: numericProp,
14769
+ item: makeRequiredProp(Object),
15454
14770
  index: Number,
15455
14771
  imageFit: String,
15456
14772
  lazyLoad: Boolean,
15457
14773
  deletable: Boolean,
15458
- previewSize: [Number, String],
15459
- beforeDelete: Function,
15460
- item: {
15461
- type: Object,
15462
- required: true
15463
- }
14774
+ previewSize: numericProp,
14775
+ beforeDelete: Function
15464
14776
  },
15465
14777
  emits: ["delete", "preview"],
15466
14778
  setup(props2, {
@@ -15562,52 +14874,31 @@
15562
14874
  }
15563
14875
  });
15564
14876
  var props = {
14877
+ name: makeNumericProp(""),
14878
+ accept: makeStringProp("image/*"),
15565
14879
  capture: String,
15566
14880
  multiple: Boolean,
15567
14881
  disabled: Boolean,
15568
14882
  readonly: Boolean,
15569
14883
  lazyLoad: Boolean,
14884
+ maxCount: makeNumericProp(Infinity),
14885
+ imageFit: makeStringProp("cover"),
14886
+ resultType: makeStringProp("dataUrl"),
14887
+ uploadIcon: makeStringProp("photograph"),
15570
14888
  uploadText: String,
15571
14889
  deletable: truthProp,
15572
14890
  afterRead: Function,
15573
14891
  showUpload: truthProp,
14892
+ modelValue: makeArrayProp(),
15574
14893
  beforeRead: Function,
15575
14894
  beforeDelete: Function,
15576
- previewSize: [Number, String],
14895
+ previewSize: numericProp,
15577
14896
  previewImage: truthProp,
15578
14897
  previewOptions: Object,
15579
14898
  previewFullImage: truthProp,
15580
- name: {
15581
- type: [Number, String],
15582
- default: ""
15583
- },
15584
- accept: {
15585
- type: String,
15586
- default: "image/*"
15587
- },
15588
- modelValue: {
15589
- type: Array,
15590
- default: () => []
15591
- },
15592
14899
  maxSize: {
15593
14900
  type: [Number, String, Function],
15594
- default: Number.MAX_VALUE
15595
- },
15596
- maxCount: {
15597
- type: [Number, String],
15598
- default: Number.MAX_VALUE
15599
- },
15600
- imageFit: {
15601
- type: String,
15602
- default: "cover"
15603
- },
15604
- resultType: {
15605
- type: String,
15606
- default: "dataUrl"
15607
- },
15608
- uploadIcon: {
15609
- type: String,
15610
- default: "photograph"
14901
+ default: Infinity
15611
14902
  }
15612
14903
  };
15613
14904
  var _Uploader = vue.defineComponent({
@@ -15811,7 +15102,7 @@
15811
15102
  }
15812
15103
  });
15813
15104
  var Uploader = withInstall(_Uploader);
15814
- var version = "3.2.4";
15105
+ var version = "3.2.5";
15815
15106
  function install(app) {
15816
15107
  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];
15817
15108
  components.forEach((item) => {