vant 3.4.4 → 3.4.7

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 (480) hide show
  1. package/changelog.generated.md +81 -0
  2. package/es/address-list/AddressListItem.d.ts +3 -2
  3. package/es/address-list/AddressListItem.js +1 -1
  4. package/es/badge/Badge.d.ts +4 -3
  5. package/es/badge/index.d.ts +2 -2
  6. package/es/calendar/Calendar.d.ts +4 -0
  7. package/es/calendar/Calendar.js +3 -1
  8. package/es/calendar/index.d.ts +3 -0
  9. package/es/calendar/types.d.ts +2 -1
  10. package/es/cascader/types.d.ts +2 -1
  11. package/es/checkbox/Checker.d.ts +2 -1
  12. package/es/collapse/Collapse.d.ts +7 -6
  13. package/es/collapse/index.d.ts +3 -3
  14. package/es/collapse-item/CollapseItem.d.ts +13 -0
  15. package/es/collapse-item/CollapseItem.js +3 -2
  16. package/es/collapse-item/index.d.ts +9 -0
  17. package/es/composables/use-touch.js +1 -1
  18. package/es/config-provider/ConfigProvider.d.ts +4 -3
  19. package/es/config-provider/index.d.ts +2 -2
  20. package/es/contact-list/ContactList.d.ts +3 -2
  21. package/es/coupon/Coupon.d.ts +2 -1
  22. package/es/coupon-list/CouponList.d.ts +3 -13
  23. package/es/coupon-list/CouponList.js +9 -7
  24. package/es/coupon-list/index.css +1 -1
  25. package/es/coupon-list/index.d.ts +2 -9
  26. package/es/coupon-list/index.less +4 -16
  27. package/es/coupon-list/style/index.js +1 -0
  28. package/es/coupon-list/style/less.js +1 -0
  29. package/es/coupon-list/var.less +0 -1
  30. package/es/datetime-picker/DatePicker.js +1 -2
  31. package/es/dialog/Dialog.d.ts +2 -1
  32. package/es/dialog/Dialog.js +19 -3
  33. package/es/dialog/function-call.d.ts +2 -1
  34. package/es/dialog/types.d.ts +2 -2
  35. package/es/dropdown-item/types.d.ts +2 -1
  36. package/es/index-bar/IndexBar.d.ts +5 -4
  37. package/es/index-bar/IndexBar.js +25 -4
  38. package/es/index-bar/index.d.ts +3 -3
  39. package/es/index-bar/types.d.ts +2 -1
  40. package/es/index.d.ts +1 -1
  41. package/es/index.js +1 -1
  42. package/es/locale/lang/bn-BD.d.ts +64 -0
  43. package/es/locale/lang/bn-BD.js +74 -0
  44. package/es/locale/lang/de-DE-formal.js +1 -1
  45. package/es/locale/lang/de-DE.js +1 -1
  46. package/es/locale/lang/en-US.js +1 -1
  47. package/es/locale/lang/es-ES.js +1 -1
  48. package/es/locale/lang/fr-FR.js +1 -1
  49. package/es/locale/lang/hi-IN.js +1 -1
  50. package/es/locale/lang/id-ID.d.ts +64 -0
  51. package/es/locale/lang/id-ID.js +66 -0
  52. package/es/locale/lang/is-IS.d.ts +64 -0
  53. package/es/locale/lang/is-IS.js +74 -0
  54. package/es/locale/lang/it-IT.d.ts +64 -0
  55. package/es/locale/lang/it-IT.js +74 -0
  56. package/es/locale/lang/ja-JP.js +1 -1
  57. package/es/locale/lang/ko-KR.js +1 -1
  58. package/es/locale/lang/la-LA.d.ts +64 -0
  59. package/es/locale/lang/la-LA.js +66 -0
  60. package/es/locale/lang/nb-NO.js +1 -1
  61. package/es/locale/lang/pt-BR.js +1 -1
  62. package/es/locale/lang/ro-RO.js +1 -1
  63. package/es/locale/lang/ru-RU.js +1 -1
  64. package/es/locale/lang/sv-SE.d.ts +64 -0
  65. package/es/locale/lang/sv-SE.js +66 -0
  66. package/es/locale/lang/th-TH.js +1 -1
  67. package/es/locale/lang/uk-UA.d.ts +64 -0
  68. package/es/locale/lang/uk-UA.js +74 -0
  69. package/es/locale/lang/vi-VN.d.ts +64 -0
  70. package/es/locale/lang/vi-VN.js +74 -0
  71. package/es/locale/lang/zh-CN.js +1 -1
  72. package/es/locale/lang/zh-HK.js +1 -1
  73. package/es/locale/lang/zh-TW.js +1 -1
  74. package/es/nav-bar/NavBar.d.ts +1 -1
  75. package/es/nav-bar/NavBar.js +3 -3
  76. package/es/nav-bar/index.d.ts +1 -1
  77. package/es/notify/types.d.ts +2 -1
  78. package/es/number-keyboard/NumberKeyboard.js +10 -1
  79. package/es/picker/types.d.ts +3 -2
  80. package/es/popup/Popup.d.ts +6 -1
  81. package/es/popup/Popup.js +14 -3
  82. package/es/popup/index.d.ts +5 -1
  83. package/es/popup/types.d.ts +5 -2
  84. package/es/progress/Progress.d.ts +4 -3
  85. package/es/progress/index.d.ts +2 -2
  86. package/es/skeleton/Skeleton.d.ts +5 -4
  87. package/es/skeleton/Skeleton.js +6 -4
  88. package/es/skeleton/index.d.ts +3 -3
  89. package/es/style/base.css +1 -1
  90. package/es/style/base.less +5 -0
  91. package/es/submit-bar/index.css +1 -1
  92. package/es/submit-bar/index.less +1 -0
  93. package/es/swipe-cell/SwipeCell.js +1 -1
  94. package/es/tabbar/Tabbar.d.ts +2 -2
  95. package/es/tabs/Tabs.d.ts +1 -1
  96. package/es/tabs/Tabs.js +1 -0
  97. package/es/tabs/types.d.ts +5 -4
  98. package/es/toast/Toast.d.ts +3 -0
  99. package/es/toast/Toast.js +3 -1
  100. package/es/toast/types.d.ts +3 -2
  101. package/es/tree-select/TreeSelect.d.ts +7 -6
  102. package/es/tree-select/index.d.ts +3 -3
  103. package/es/uploader/Uploader.d.ts +4 -4
  104. package/es/uploader/Uploader.js +2 -2
  105. package/es/uploader/UploaderPreviewItem.d.ts +3 -3
  106. package/es/uploader/UploaderPreviewItem.js +9 -6
  107. package/es/uploader/index.d.ts +2 -2
  108. package/es/uploader/types.d.ts +6 -8
  109. package/es/utils/basic.d.ts +1 -0
  110. package/es/utils/format.d.ts +7 -6
  111. package/es/utils/format.js +6 -0
  112. package/es/utils/interceptor.d.ts +1 -1
  113. package/es/utils/validate.d.ts +2 -1
  114. package/lib/action-bar/ActionBar.js +14 -13
  115. package/lib/action-bar/index.js +14 -8
  116. package/lib/action-bar-button/ActionBarButton.js +18 -17
  117. package/lib/action-bar-button/index.js +14 -8
  118. package/lib/action-bar-icon/ActionBarIcon.js +18 -17
  119. package/lib/action-bar-icon/index.js +14 -8
  120. package/lib/action-sheet/ActionSheet.js +17 -16
  121. package/lib/action-sheet/index.js +14 -8
  122. package/lib/address-edit/AddressEdit.js +25 -19
  123. package/lib/address-edit/AddressEditDetail.js +15 -14
  124. package/lib/address-edit/index.js +14 -8
  125. package/lib/address-edit/types.js +18 -1
  126. package/lib/address-list/AddressList.js +18 -12
  127. package/lib/address-list/AddressListItem.d.ts +3 -2
  128. package/lib/address-list/AddressListItem.js +17 -16
  129. package/lib/address-list/index.js +14 -8
  130. package/lib/area/Area.js +17 -16
  131. package/lib/area/index.js +14 -8
  132. package/lib/area/types.js +18 -1
  133. package/lib/badge/Badge.d.ts +4 -3
  134. package/lib/badge/Badge.js +13 -12
  135. package/lib/badge/index.d.ts +2 -2
  136. package/lib/badge/index.js +14 -8
  137. package/lib/button/Button.js +16 -15
  138. package/lib/button/index.js +14 -8
  139. package/lib/button/types.js +18 -1
  140. package/lib/calendar/Calendar.d.ts +4 -0
  141. package/lib/calendar/Calendar.js +27 -19
  142. package/lib/calendar/CalendarDay.js +14 -13
  143. package/lib/calendar/CalendarHeader.js +14 -13
  144. package/lib/calendar/CalendarMonth.js +21 -15
  145. package/lib/calendar/index.d.ts +3 -0
  146. package/lib/calendar/index.js +14 -8
  147. package/lib/calendar/types.d.ts +2 -1
  148. package/lib/calendar/types.js +18 -1
  149. package/lib/calendar/utils.js +11 -10
  150. package/lib/card/Card.js +15 -14
  151. package/lib/card/index.js +14 -8
  152. package/lib/cascader/Cascader.js +16 -15
  153. package/lib/cascader/index.js +14 -8
  154. package/lib/cascader/types.d.ts +2 -1
  155. package/lib/cascader/types.js +18 -1
  156. package/lib/cell/Cell.js +15 -14
  157. package/lib/cell/index.js +14 -8
  158. package/lib/cell-group/CellGroup.js +13 -12
  159. package/lib/cell-group/index.js +14 -8
  160. package/lib/checkbox/Checkbox.js +19 -13
  161. package/lib/checkbox/Checker.d.ts +2 -1
  162. package/lib/checkbox/Checker.js +14 -13
  163. package/lib/checkbox/index.js +14 -8
  164. package/lib/checkbox/types.js +18 -1
  165. package/lib/checkbox-group/CheckboxGroup.js +15 -14
  166. package/lib/checkbox-group/index.js +14 -8
  167. package/lib/checkbox-group/types.js +18 -1
  168. package/lib/circle/Circle.js +14 -13
  169. package/lib/circle/index.js +14 -8
  170. package/lib/col/Col.js +15 -14
  171. package/lib/col/index.js +14 -8
  172. package/lib/collapse/Collapse.d.ts +7 -6
  173. package/lib/collapse/Collapse.js +14 -13
  174. package/lib/collapse/index.d.ts +3 -3
  175. package/lib/collapse/index.js +14 -8
  176. package/lib/collapse-item/CollapseItem.d.ts +13 -0
  177. package/lib/collapse-item/CollapseItem.js +22 -20
  178. package/lib/collapse-item/index.d.ts +9 -0
  179. package/lib/collapse-item/index.js +14 -8
  180. package/lib/collapse-item/types.js +18 -1
  181. package/lib/composables/on-popup-reopen.js +11 -10
  182. package/lib/composables/use-expose.js +12 -11
  183. package/lib/composables/use-height.js +12 -11
  184. package/lib/composables/use-id.js +11 -10
  185. package/lib/composables/use-lazy-render.js +11 -10
  186. package/lib/composables/use-lock-scroll.js +14 -13
  187. package/lib/composables/use-placeholder.js +12 -11
  188. package/lib/composables/use-refs.js +11 -10
  189. package/lib/composables/use-route.js +11 -10
  190. package/lib/composables/use-tab-status.js +11 -10
  191. package/lib/composables/use-touch.js +12 -11
  192. package/lib/composables/use-visibility-change.js +13 -12
  193. package/lib/config-provider/ConfigProvider.d.ts +4 -3
  194. package/lib/config-provider/ConfigProvider.js +13 -12
  195. package/lib/config-provider/index.d.ts +2 -2
  196. package/lib/config-provider/index.js +14 -8
  197. package/lib/contact-card/ContactCard.js +14 -13
  198. package/lib/contact-card/index.js +14 -8
  199. package/lib/contact-edit/ContactEdit.js +18 -17
  200. package/lib/contact-edit/index.js +14 -8
  201. package/lib/contact-list/ContactList.d.ts +3 -2
  202. package/lib/contact-list/ContactList.js +19 -18
  203. package/lib/contact-list/index.js +14 -8
  204. package/lib/count-down/CountDown.js +16 -15
  205. package/lib/count-down/index.js +14 -8
  206. package/lib/count-down/types.js +18 -1
  207. package/lib/count-down/utils.js +11 -10
  208. package/lib/coupon/Coupon.d.ts +2 -1
  209. package/lib/coupon/Coupon.js +15 -14
  210. package/lib/coupon/index.js +14 -8
  211. package/lib/coupon/utils.js +11 -10
  212. package/lib/coupon-cell/CouponCell.js +14 -13
  213. package/lib/coupon-cell/index.js +14 -8
  214. package/lib/coupon-list/CouponList.d.ts +3 -13
  215. package/lib/coupon-list/CouponList.js +29 -26
  216. package/lib/coupon-list/index.css +1 -1
  217. package/lib/coupon-list/index.d.ts +2 -9
  218. package/lib/coupon-list/index.js +14 -8
  219. package/lib/coupon-list/index.less +4 -16
  220. package/lib/coupon-list/style/index.js +1 -0
  221. package/lib/coupon-list/style/less.js +1 -0
  222. package/lib/coupon-list/var.less +0 -1
  223. package/lib/datetime-picker/DatePicker.js +17 -17
  224. package/lib/datetime-picker/DatetimePicker.js +18 -12
  225. package/lib/datetime-picker/TimePicker.js +16 -15
  226. package/lib/datetime-picker/index.js +14 -8
  227. package/lib/datetime-picker/types.js +18 -1
  228. package/lib/datetime-picker/utils.js +12 -11
  229. package/lib/dialog/Dialog.d.ts +2 -1
  230. package/lib/dialog/Dialog.js +35 -18
  231. package/lib/dialog/function-call.d.ts +2 -1
  232. package/lib/dialog/function-call.js +16 -10
  233. package/lib/dialog/index.js +11 -10
  234. package/lib/dialog/types.d.ts +2 -2
  235. package/lib/dialog/types.js +18 -1
  236. package/lib/divider/Divider.js +13 -12
  237. package/lib/divider/index.js +14 -8
  238. package/lib/dropdown-item/DropdownItem.js +19 -18
  239. package/lib/dropdown-item/index.js +14 -8
  240. package/lib/dropdown-item/types.d.ts +2 -1
  241. package/lib/dropdown-item/types.js +18 -1
  242. package/lib/dropdown-menu/DropdownMenu.js +15 -14
  243. package/lib/dropdown-menu/index.js +14 -8
  244. package/lib/dropdown-menu/types.js +18 -1
  245. package/lib/empty/Empty.js +14 -13
  246. package/lib/empty/Network.js +11 -10
  247. package/lib/empty/index.js +14 -8
  248. package/lib/field/Field.js +20 -19
  249. package/lib/field/index.js +14 -8
  250. package/lib/field/types.js +18 -1
  251. package/lib/field/utils.js +11 -10
  252. package/lib/form/Form.js +15 -14
  253. package/lib/form/index.js +14 -8
  254. package/lib/form/types.js +18 -1
  255. package/lib/grid/Grid.js +15 -14
  256. package/lib/grid/index.js +14 -8
  257. package/lib/grid-item/GridItem.js +18 -17
  258. package/lib/grid-item/index.js +14 -8
  259. package/lib/icon/Icon.js +15 -14
  260. package/lib/icon/index.js +14 -8
  261. package/lib/image/Image.js +14 -13
  262. package/lib/image/index.js +14 -8
  263. package/lib/image-preview/ImagePreview.js +21 -15
  264. package/lib/image-preview/ImagePreviewItem.js +17 -16
  265. package/lib/image-preview/function-call.js +16 -10
  266. package/lib/image-preview/index.js +11 -10
  267. package/lib/image-preview/types.js +18 -1
  268. package/lib/index-anchor/IndexAnchor.js +17 -16
  269. package/lib/index-anchor/index.js +14 -8
  270. package/lib/index-bar/IndexBar.d.ts +5 -4
  271. package/lib/index-bar/IndexBar.js +41 -19
  272. package/lib/index-bar/index.d.ts +3 -3
  273. package/lib/index-bar/index.js +14 -8
  274. package/lib/index-bar/types.d.ts +2 -1
  275. package/lib/index-bar/types.js +18 -1
  276. package/lib/index.css +1 -1
  277. package/lib/index.d.ts +1 -1
  278. package/lib/index.js +182 -181
  279. package/lib/index.less +2 -2
  280. package/lib/lazyload/index.js +11 -10
  281. package/lib/lazyload/vue-lazyload/index.js +16 -10
  282. package/lib/lazyload/vue-lazyload/lazy-component.js +12 -11
  283. package/lib/lazyload/vue-lazyload/lazy-container.js +11 -10
  284. package/lib/lazyload/vue-lazyload/lazy-image.js +13 -12
  285. package/lib/lazyload/vue-lazyload/lazy.js +17 -11
  286. package/lib/lazyload/vue-lazyload/listener.js +13 -12
  287. package/lib/lazyload/vue-lazyload/util.js +11 -10
  288. package/lib/list/List.js +17 -16
  289. package/lib/list/index.js +14 -8
  290. package/lib/list/types.js +18 -1
  291. package/lib/loading/Loading.js +13 -12
  292. package/lib/loading/index.js +14 -8
  293. package/lib/locale/index.js +15 -9
  294. package/lib/locale/lang/bn-BD.d.ts +64 -0
  295. package/lib/locale/lang/bn-BD.js +98 -0
  296. package/lib/locale/lang/de-DE-formal.js +20 -3
  297. package/lib/locale/lang/de-DE.js +20 -3
  298. package/lib/locale/lang/en-US.js +20 -3
  299. package/lib/locale/lang/es-ES.js +20 -3
  300. package/lib/locale/lang/fr-FR.js +20 -3
  301. package/lib/locale/lang/hi-IN.js +20 -3
  302. package/lib/locale/lang/id-ID.d.ts +64 -0
  303. package/lib/locale/lang/id-ID.js +90 -0
  304. package/lib/locale/lang/is-IS.d.ts +64 -0
  305. package/lib/locale/lang/is-IS.js +98 -0
  306. package/lib/locale/lang/it-IT.d.ts +64 -0
  307. package/lib/locale/lang/it-IT.js +98 -0
  308. package/lib/locale/lang/ja-JP.js +20 -3
  309. package/lib/locale/lang/ko-KR.js +20 -3
  310. package/lib/locale/lang/la-LA.d.ts +64 -0
  311. package/lib/locale/lang/la-LA.js +90 -0
  312. package/lib/locale/lang/nb-NO.js +20 -3
  313. package/lib/locale/lang/pt-BR.js +20 -3
  314. package/lib/locale/lang/ro-RO.js +20 -3
  315. package/lib/locale/lang/ru-RU.js +20 -3
  316. package/lib/locale/lang/sv-SE.d.ts +64 -0
  317. package/lib/locale/lang/sv-SE.js +90 -0
  318. package/lib/locale/lang/th-TH.js +20 -3
  319. package/lib/locale/lang/tr-TR.js +19 -2
  320. package/lib/locale/lang/uk-UA.d.ts +64 -0
  321. package/lib/locale/lang/uk-UA.js +98 -0
  322. package/lib/locale/lang/vi-VN.d.ts +64 -0
  323. package/lib/locale/lang/vi-VN.js +98 -0
  324. package/lib/locale/lang/zh-CN.js +20 -3
  325. package/lib/locale/lang/zh-HK.js +20 -3
  326. package/lib/locale/lang/zh-TW.js +20 -3
  327. package/lib/nav-bar/NavBar.d.ts +1 -1
  328. package/lib/nav-bar/NavBar.js +18 -17
  329. package/lib/nav-bar/index.d.ts +1 -1
  330. package/lib/nav-bar/index.js +14 -8
  331. package/lib/notice-bar/NoticeBar.js +17 -16
  332. package/lib/notice-bar/index.js +14 -8
  333. package/lib/notice-bar/types.js +18 -1
  334. package/lib/notify/Notify.js +15 -14
  335. package/lib/notify/function-call.js +16 -10
  336. package/lib/notify/index.js +11 -10
  337. package/lib/notify/types.d.ts +2 -1
  338. package/lib/notify/types.js +18 -1
  339. package/lib/number-keyboard/NumberKeyboard.js +27 -12
  340. package/lib/number-keyboard/NumberKeyboardKey.js +15 -14
  341. package/lib/number-keyboard/index.js +14 -8
  342. package/lib/overlay/Overlay.js +14 -13
  343. package/lib/overlay/index.js +14 -8
  344. package/lib/pagination/Pagination.js +13 -12
  345. package/lib/pagination/index.js +14 -8
  346. package/lib/password-input/PasswordInput.js +13 -12
  347. package/lib/password-input/index.js +14 -8
  348. package/lib/picker/Picker.js +19 -13
  349. package/lib/picker/PickerColumn.js +17 -16
  350. package/lib/picker/index.js +14 -8
  351. package/lib/picker/types.d.ts +3 -2
  352. package/lib/picker/types.js +18 -1
  353. package/lib/popover/Popover.js +17 -16
  354. package/lib/popover/index.js +14 -8
  355. package/lib/popover/types.js +18 -1
  356. package/lib/popup/Popup.d.ts +6 -1
  357. package/lib/popup/Popup.js +34 -22
  358. package/lib/popup/index.d.ts +5 -1
  359. package/lib/popup/index.js +14 -8
  360. package/lib/popup/shared.js +11 -10
  361. package/lib/popup/types.d.ts +5 -2
  362. package/lib/popup/types.js +18 -1
  363. package/lib/progress/Progress.d.ts +4 -3
  364. package/lib/progress/Progress.js +13 -12
  365. package/lib/progress/index.d.ts +2 -2
  366. package/lib/progress/index.js +14 -8
  367. package/lib/progress/types.js +18 -1
  368. package/lib/pull-refresh/PullRefresh.js +16 -15
  369. package/lib/pull-refresh/index.js +14 -8
  370. package/lib/radio/Radio.js +18 -12
  371. package/lib/radio/index.js +14 -8
  372. package/lib/radio-group/RadioGroup.js +14 -13
  373. package/lib/radio-group/index.js +14 -8
  374. package/lib/rate/Rate.js +17 -16
  375. package/lib/rate/index.js +14 -8
  376. package/lib/row/Row.js +14 -13
  377. package/lib/row/index.js +14 -8
  378. package/lib/search/Search.js +17 -16
  379. package/lib/search/index.js +14 -8
  380. package/lib/search/types.js +18 -1
  381. package/lib/share-sheet/ShareSheet.js +15 -14
  382. package/lib/share-sheet/index.js +14 -8
  383. package/lib/sidebar/Sidebar.js +14 -13
  384. package/lib/sidebar/index.js +14 -8
  385. package/lib/sidebar-item/SidebarItem.js +17 -16
  386. package/lib/sidebar-item/index.js +14 -8
  387. package/lib/skeleton/Skeleton.d.ts +5 -4
  388. package/lib/skeleton/Skeleton.js +18 -15
  389. package/lib/skeleton/index.d.ts +3 -3
  390. package/lib/skeleton/index.js +14 -8
  391. package/lib/slider/Slider.js +15 -14
  392. package/lib/slider/index.js +14 -8
  393. package/lib/step/Step.js +16 -15
  394. package/lib/step/index.js +14 -8
  395. package/lib/stepper/Stepper.js +14 -13
  396. package/lib/stepper/index.js +14 -8
  397. package/lib/steps/Steps.js +14 -13
  398. package/lib/steps/index.js +14 -8
  399. package/lib/sticky/Sticky.js +15 -14
  400. package/lib/sticky/index.js +14 -8
  401. package/lib/style/base.css +1 -1
  402. package/lib/style/base.less +5 -0
  403. package/lib/submit-bar/SubmitBar.js +15 -14
  404. package/lib/submit-bar/index.css +1 -1
  405. package/lib/submit-bar/index.js +14 -8
  406. package/lib/submit-bar/index.less +1 -0
  407. package/lib/swipe/Swipe.js +17 -16
  408. package/lib/swipe/index.js +14 -8
  409. package/lib/swipe/types.js +18 -1
  410. package/lib/swipe-cell/SwipeCell.js +17 -16
  411. package/lib/swipe-cell/index.js +14 -8
  412. package/lib/swipe-cell/types.js +18 -1
  413. package/lib/swipe-item/SwipeItem.js +16 -15
  414. package/lib/swipe-item/index.js +14 -8
  415. package/lib/switch/Switch.js +15 -14
  416. package/lib/switch/index.js +14 -8
  417. package/lib/tab/Tab.js +20 -19
  418. package/lib/tab/index.js +14 -8
  419. package/lib/tabbar/Tabbar.d.ts +2 -2
  420. package/lib/tabbar/Tabbar.js +15 -14
  421. package/lib/tabbar/index.js +14 -8
  422. package/lib/tabbar-item/TabbarItem.js +18 -17
  423. package/lib/tabbar-item/index.js +14 -8
  424. package/lib/tabs/Tabs.d.ts +1 -1
  425. package/lib/tabs/Tabs.js +26 -19
  426. package/lib/tabs/TabsContent.js +14 -13
  427. package/lib/tabs/TabsTitle.js +14 -13
  428. package/lib/tabs/index.js +14 -8
  429. package/lib/tabs/types.d.ts +5 -4
  430. package/lib/tabs/types.js +18 -1
  431. package/lib/tabs/utils.js +12 -11
  432. package/lib/tag/Tag.js +14 -13
  433. package/lib/tag/index.js +14 -8
  434. package/lib/toast/Toast.d.ts +3 -0
  435. package/lib/toast/Toast.js +20 -17
  436. package/lib/toast/function-call.js +17 -11
  437. package/lib/toast/index.js +11 -10
  438. package/lib/toast/lock-click.js +19 -2
  439. package/lib/toast/types.d.ts +3 -2
  440. package/lib/toast/types.js +18 -1
  441. package/lib/tree-select/TreeSelect.d.ts +7 -6
  442. package/lib/tree-select/TreeSelect.js +16 -15
  443. package/lib/tree-select/index.d.ts +3 -3
  444. package/lib/tree-select/index.js +14 -8
  445. package/lib/uploader/Uploader.d.ts +4 -4
  446. package/lib/uploader/Uploader.js +22 -16
  447. package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
  448. package/lib/uploader/UploaderPreviewItem.js +26 -22
  449. package/lib/uploader/index.d.ts +2 -2
  450. package/lib/uploader/index.js +14 -8
  451. package/lib/uploader/types.d.ts +6 -8
  452. package/lib/uploader/types.js +18 -1
  453. package/lib/uploader/utils.js +11 -10
  454. package/lib/utils/basic.d.ts +1 -0
  455. package/lib/utils/basic.js +19 -2
  456. package/lib/utils/constant.js +19 -2
  457. package/lib/utils/create.js +16 -10
  458. package/lib/utils/deep-assign.js +11 -10
  459. package/lib/utils/deep-clone.js +11 -10
  460. package/lib/utils/dom.js +13 -12
  461. package/lib/utils/format.d.ts +7 -6
  462. package/lib/utils/format.js +19 -12
  463. package/lib/utils/index.js +18 -17
  464. package/lib/utils/interceptor.d.ts +1 -1
  465. package/lib/utils/interceptor.js +12 -11
  466. package/lib/utils/mount-component.js +13 -12
  467. package/lib/utils/props.js +19 -2
  468. package/lib/utils/validate.d.ts +2 -1
  469. package/lib/utils/validate.js +11 -10
  470. package/lib/utils/with-install.js +11 -10
  471. package/lib/vant.cjs.js +317 -243
  472. package/lib/vant.cjs.min.js +1 -1
  473. package/lib/vant.es.js +318 -244
  474. package/lib/vant.es.min.js +318 -244
  475. package/lib/vant.js +320 -246
  476. package/lib/vant.min.js +1 -1
  477. package/package.json +2 -2
  478. package/vetur/attributes.json +631 -616
  479. package/vetur/tags.json +220 -217
  480. package/vetur/web-types.json +2358 -2326
@@ -0,0 +1,81 @@
1
+ ### [v3.4.7](https://github.com/youzan/vant/compare/v3.4.6...v3.4.7)
2
+
3
+ `2022-03-29`
4
+
5
+ **Bug Fixes**
6
+
7
+ - calendar: scrollToDate method is invalid [#10432](https://github.com/youzan/vant/issues/10432)
8
+ - DatetimePicker: fix minDate && maxDate wacher [#10431](https://github.com/youzan/vant/issues/10431)
9
+ - fix wrong ternary expression [#10426](https://github.com/youzan/vant/issues/10426)
10
+ - IndexBar: allow active bottom anchor [#10404](https://github.com/youzan/vant/issues/10404)
11
+ - Tab: add key when render TabsTitle [#10392](https://github.com/youzan/vant/issues/10392)
12
+
13
+ **Document**
14
+
15
+ - add area data update tips [#10400](https://github.com/youzan/vant/issues/10400)
16
+ - add dark mode to features [#10398](https://github.com/youzan/vant/issues/10398)
17
+ - add Select component faq [#10397](https://github.com/youzan/vant/issues/10397)
18
+ - changelog: 3.4.6 [0dc490](https://github.com/youzan/vant/commit/0dc490c9bca4206b4050824bf707094027ed5872)
19
+ - DatetimePicker: add select second faq [#10399](https://github.com/youzan/vant/issues/10399)
20
+ - Grid: fix reverse prop [#10437](https://github.com/youzan/vant/issues/10437)
21
+ - Locale: add Lao to document [#10389](https://github.com/youzan/vant/issues/10389)
22
+ - SwipeCell: remove css variables document [#10429](https://github.com/youzan/vant/issues/10429)
23
+ - update readme [#10425](https://github.com/youzan/vant/issues/10425)
24
+ - using jsdelivr for assets [#10434](https://github.com/youzan/vant/issues/10434)
25
+
26
+ **Feature**
27
+
28
+ - area-data: update counties of NanJing [#10410](https://github.com/youzan/vant/issues/10410)
29
+ - CouponList: update empty image [#10436](https://github.com/youzan/vant/issues/10436)
30
+ - Locale: add Icelandic lang [#10418](https://github.com/youzan/vant/issues/10418)
31
+ - Locale: add la-LA.ts [#10388](https://github.com/youzan/vant/issues/10388)
32
+ - Locale: add Swedish lang [#10419](https://github.com/youzan/vant/issues/10419)
33
+ - NumberKeyboard: improve shuffle algorithm [#10428](https://github.com/youzan/vant/issues/10428)
34
+ - Uploader: support set the preview size separately [#10438](https://github.com/youzan/vant/issues/10438)
35
+
36
+ **release**
37
+
38
+ - @vant/area-data 1.2.3 [029c93](https://github.com/youzan/vant/commit/029c93a4669ff3ee4d88615adb000668535f46d0)
39
+ ### [v3.4.6](https://github.com/youzan/vant/compare/v3.4.5...v3.4.6)
40
+
41
+ `2022-03-13`
42
+
43
+ **Bug Fixes**
44
+
45
+ - 🐛 修复官网更新日志的版本链接及 issue 链接异常的问题 [#10329](https://github.com/youzan/vant/issues/10329)
46
+ - cli: issue link in generated changelog [#10337](https://github.com/youzan/vant/issues/10337)
47
+ - Skeleton: fix non-props attributes warning [#10384](https://github.com/youzan/vant/issues/10384)
48
+ - SwipeCell: cell should stopPropagation when lockClick is true [#10319](https://github.com/youzan/vant/issues/10319)
49
+ - Toast: failed to render message after changing type [#10311](https://github.com/youzan/vant/issues/10311)
50
+ - vant-cli: decamelize ReDoS [#10351](https://github.com/youzan/vant/issues/10351)
51
+
52
+ **Document**
53
+
54
+ - @vant/use: changelog 1.3.6 [f95239](https://github.com/youzan/vant/commit/f95239006cf23665593c8316258f4cec4237f29a)
55
+ - add mirror repo description [#10382](https://github.com/youzan/vant/issues/10382)
56
+ - add Vant 4 link [#10340](https://github.com/youzan/vant/issues/10340)
57
+ - Calendar: add formatter async usage [#10385](https://github.com/youzan/vant/issues/10385)
58
+ - changelog: 3.4.5 [0a50e7](https://github.com/youzan/vant/commit/0a50e721aa399b2540474d979e185795790b7a56)
59
+ - changelog: fix link mistake [#10328](https://github.com/youzan/vant/issues/10328)
60
+ - Field: add v-model type guide [#10383](https://github.com/youzan/vant/issues/10383)
61
+ - modify JSX.ELement to JSX.Element [#10344](https://github.com/youzan/vant/issues/10344)
62
+ - update react-vant address [#10305](https://github.com/youzan/vant/issues/10305)
63
+ - update vite-plugin-style-import version [#10303](https://github.com/youzan/vant/issues/10303)
64
+
65
+ - Update contribution.zh-CN.md (#10314) [#10314](https://github.com/youzan/vant/issues/10314)
66
+
67
+ **Feature**
68
+
69
+ - add van-safe-area-top class [#10356](https://github.com/youzan/vant/issues/10356)
70
+ - Calendar: add safe-area-inset-top prop [#10358](https://github.com/youzan/vant/issues/10358)
71
+ - Popup: add safe-area-inset-top prop [#10357](https://github.com/youzan/vant/issues/10357)
72
+
73
+ **release**
74
+
75
+ - @vant/cli 4.0.1 [202efb](https://github.com/youzan/vant/commit/202efbbf85ec94f7d804075d1ecbfb71c6824cb4)
76
+ - @vant/use 1.3.6 [1040af](https://github.com/youzan/vant/commit/1040afdda6e6f8bb98ea36cbc9212b65ecb8c49b)
77
+ - 3.4.6 [1cfa46](https://github.com/youzan/vant/commit/1cfa46e9219b2d0dac04e3657395c306df90a87a)
78
+
79
+ **Types**
80
+
81
+ - fix missing VisibilityState after typescript 4.6.0 [#10370](https://github.com/youzan/vant/issues/10370)
@@ -1,7 +1,8 @@
1
1
  import { type PropType } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type AddressListAddress = {
3
- id: number | string;
4
- tel: number | string;
4
+ id: Numeric;
5
+ tel: Numeric;
5
6
  name: string;
6
7
  address: string;
7
8
  isDefault?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
- import { createNamespace, extend, makeRequiredProp } from "../utils";
3
+ import { extend, createNamespace, makeRequiredProp } from "../utils";
4
4
  import { Tag } from "../tag";
5
5
  import { Icon } from "../icon";
6
6
  import { Cell } from "../cell";
@@ -1,4 +1,5 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type BadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
3
4
  declare const badgeProps: {
4
5
  dot: BooleanConstructor;
@@ -8,7 +9,7 @@ declare const badgeProps: {
8
9
  default: keyof HTMLElementTagNameMap;
9
10
  };
10
11
  color: StringConstructor;
11
- offset: PropType<[string | number, string | number]>;
12
+ offset: PropType<[Numeric, Numeric]>;
12
13
  content: (NumberConstructor | StringConstructor)[];
13
14
  showZero: {
14
15
  type: BooleanConstructor;
@@ -28,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
28
29
  default: keyof HTMLElementTagNameMap;
29
30
  };
30
31
  color: StringConstructor;
31
- offset: PropType<[string | number, string | number]>;
32
+ offset: PropType<[Numeric, Numeric]>;
32
33
  content: (NumberConstructor | StringConstructor)[];
33
34
  showZero: {
34
35
  type: BooleanConstructor;
@@ -46,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
46
47
  default: keyof HTMLElementTagNameMap;
47
48
  };
48
49
  color: StringConstructor;
49
- offset: PropType<[string | number, string | number]>;
50
+ offset: PropType<[Numeric, Numeric]>;
50
51
  content: (NumberConstructor | StringConstructor)[];
51
52
  showZero: {
52
53
  type: BooleanConstructor;
@@ -6,7 +6,7 @@ export declare const Badge: import("../utils").WithInstall<import("vue").DefineC
6
6
  default: keyof HTMLElementTagNameMap;
7
7
  };
8
8
  color: StringConstructor;
9
- offset: import("vue").PropType<[string | number, string | number]>;
9
+ offset: import("vue").PropType<[import("../utils").Numeric, import("../utils").Numeric]>;
10
10
  content: (NumberConstructor | StringConstructor)[];
11
11
  showZero: {
12
12
  type: BooleanConstructor;
@@ -24,7 +24,7 @@ export declare const Badge: import("../utils").WithInstall<import("vue").DefineC
24
24
  default: keyof HTMLElementTagNameMap;
25
25
  };
26
26
  color: StringConstructor;
27
- offset: import("vue").PropType<[string | number, string | number]>;
27
+ offset: import("vue").PropType<[import("../utils").Numeric, import("../utils").Numeric]>;
28
28
  content: (NumberConstructor | StringConstructor)[];
29
29
  showZero: {
30
30
  type: BooleanConstructor;
@@ -66,6 +66,7 @@ declare const calendarProps: {
66
66
  type: BooleanConstructor;
67
67
  default: true;
68
68
  };
69
+ safeAreaInsetTop: BooleanConstructor;
69
70
  safeAreaInsetBottom: {
70
71
  type: BooleanConstructor;
71
72
  default: true;
@@ -152,6 +153,7 @@ declare const _default: import("vue").DefineComponent<{
152
153
  type: BooleanConstructor;
153
154
  default: true;
154
155
  };
156
+ safeAreaInsetTop: BooleanConstructor;
155
157
  safeAreaInsetBottom: {
156
158
  type: BooleanConstructor;
157
159
  default: true;
@@ -236,6 +238,7 @@ declare const _default: import("vue").DefineComponent<{
236
238
  type: BooleanConstructor;
237
239
  default: true;
238
240
  };
241
+ safeAreaInsetTop: BooleanConstructor;
239
242
  safeAreaInsetBottom: {
240
243
  type: BooleanConstructor;
241
244
  default: true;
@@ -273,6 +276,7 @@ declare const _default: import("vue").DefineComponent<{
273
276
  lazyRender: boolean;
274
277
  closeOnClickOverlay: boolean;
275
278
  closeOnPopstate: boolean;
279
+ safeAreaInsetTop: boolean;
276
280
  minDate: Date;
277
281
  maxDate: Date;
278
282
  poppable: boolean;
@@ -36,6 +36,7 @@ const calendarProps = {
36
36
  showRangePrompt: truthProp,
37
37
  confirmDisabledText: String,
38
38
  closeOnClickOverlay: truthProp,
39
+ safeAreaInsetTop: Boolean,
39
40
  safeAreaInsetBottom: truthProp,
40
41
  minDate: {
41
42
  type: Date,
@@ -198,8 +199,8 @@ var stdin_default = defineComponent({
198
199
  }
199
200
  raf(() => {
200
201
  bodyHeight = Math.floor(useRect(bodyRef).height);
201
- scrollToCurrentDate();
202
202
  });
203
+ scrollToCurrentDate();
203
204
  };
204
205
  const reset = (date = getInitialDate()) => {
205
206
  currentDate.value = date;
@@ -384,6 +385,7 @@ var stdin_default = defineComponent({
384
385
  "closeable": props.showTitle || props.showSubtitle,
385
386
  "teleport": props.teleport,
386
387
  "closeOnPopstate": props.closeOnPopstate,
388
+ "safeAreaInsetTop": props.safeAreaInsetTop,
387
389
  "closeOnClickOverlay": props.closeOnClickOverlay,
388
390
  "onUpdate:show": updateShow
389
391
  }, {
@@ -63,6 +63,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
63
63
  type: BooleanConstructor;
64
64
  default: true;
65
65
  };
66
+ safeAreaInsetTop: BooleanConstructor;
66
67
  safeAreaInsetBottom: {
67
68
  type: BooleanConstructor;
68
69
  default: true;
@@ -147,6 +148,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
147
148
  type: BooleanConstructor;
148
149
  default: true;
149
150
  };
151
+ safeAreaInsetTop: BooleanConstructor;
150
152
  safeAreaInsetBottom: {
151
153
  type: BooleanConstructor;
152
154
  default: true;
@@ -184,6 +186,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
184
186
  lazyRender: boolean;
185
187
  closeOnClickOverlay: boolean;
186
188
  closeOnPopstate: boolean;
189
+ safeAreaInsetTop: boolean;
187
190
  minDate: Date;
188
191
  maxDate: Date;
189
192
  poppable: boolean;
@@ -1,11 +1,12 @@
1
1
  import type { ComponentPublicInstance, ComputedRef, Ref } from 'vue';
2
+ import type { Numeric } from '../utils';
2
3
  import type { CalendarProps } from './Calendar';
3
4
  import type { CalendarMonthProps } from './CalendarMonth';
4
5
  export declare type CalendarType = 'single' | 'range' | 'multiple';
5
6
  export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder';
6
7
  export declare type CalendarDayItem = {
7
8
  date?: Date;
8
- text?: string | number;
9
+ text?: Numeric;
9
10
  type?: CalendarDayType;
10
11
  topInfo?: string;
11
12
  className?: unknown;
@@ -1,6 +1,7 @@
1
+ import type { Numeric } from '../utils';
1
2
  export declare type CascaderOption = {
2
3
  text?: string;
3
- value?: string | number;
4
+ value?: Numeric;
4
5
  color?: string;
5
6
  disabled?: boolean;
6
7
  children?: CascaderOption[];
@@ -1,11 +1,12 @@
1
1
  import { type PropType } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type CheckerShape = 'square' | 'round';
3
4
  export declare type CheckerDirection = 'horizontal' | 'vertical';
4
5
  export declare type CheckerLabelPosition = 'left' | 'right';
5
6
  export declare type CheckerParent = {
6
7
  props: {
7
8
  disabled?: boolean;
8
- iconSize?: number | string;
9
+ iconSize?: Numeric;
9
10
  direction?: CheckerDirection;
10
11
  checkedColor?: string;
11
12
  };
@@ -1,7 +1,8 @@
1
1
  import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type CollapseProvide = {
3
- toggle: (name: number | string, expanded: boolean) => void;
4
- isExpanded: (name: number | string) => boolean;
4
+ toggle: (name: Numeric, expanded: boolean) => void;
5
+ isExpanded: (name: Numeric) => boolean;
5
6
  };
6
7
  export declare const COLLAPSE_KEY: InjectionKey<CollapseProvide>;
7
8
  declare const collapseProps: {
@@ -11,7 +12,7 @@ declare const collapseProps: {
11
12
  };
12
13
  accordion: BooleanConstructor;
13
14
  modelValue: {
14
- type: PropType<string | number | (string | number)[]>;
15
+ type: PropType<Numeric | Numeric[]>;
15
16
  default: string;
16
17
  };
17
18
  };
@@ -23,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
23
24
  };
24
25
  accordion: BooleanConstructor;
25
26
  modelValue: {
26
- type: PropType<string | number | (string | number)[]>;
27
+ type: PropType<Numeric | Numeric[]>;
27
28
  default: string;
28
29
  };
29
30
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
33
34
  };
34
35
  accordion: BooleanConstructor;
35
36
  modelValue: {
36
- type: PropType<string | number | (string | number)[]>;
37
+ type: PropType<Numeric | Numeric[]>;
37
38
  default: string;
38
39
  };
39
40
  }>> & {
@@ -41,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
41
42
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
42
43
  }, {
43
44
  border: boolean;
44
- modelValue: string | number | (string | number)[];
45
+ modelValue: Numeric | Numeric[];
45
46
  accordion: boolean;
46
47
  }>;
47
48
  export default _default;
@@ -5,7 +5,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
5
5
  };
6
6
  accordion: BooleanConstructor;
7
7
  modelValue: {
8
- type: import("vue").PropType<string | number | (string | number)[]>;
8
+ type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
9
9
  default: string;
10
10
  };
11
11
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -15,7 +15,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
15
15
  };
16
16
  accordion: BooleanConstructor;
17
17
  modelValue: {
18
- type: import("vue").PropType<string | number | (string | number)[]>;
18
+ type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
19
19
  default: string;
20
20
  };
21
21
  }>> & {
@@ -23,7 +23,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
23
23
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
24
24
  }, {
25
25
  border: boolean;
26
- modelValue: string | number | (string | number)[];
26
+ modelValue: import("../utils").Numeric | import("../utils").Numeric[];
27
27
  accordion: boolean;
28
28
  }>>;
29
29
  export default Collapse;
@@ -30,6 +30,10 @@ declare const collapseItemProps: {
30
30
  };
31
31
  disabled: BooleanConstructor;
32
32
  readonly: BooleanConstructor;
33
+ lazyRender: {
34
+ type: BooleanConstructor;
35
+ default: true;
36
+ };
33
37
  };
34
38
  export declare type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>;
35
39
  declare const _default: import("vue").DefineComponent<{
@@ -63,6 +67,10 @@ declare const _default: import("vue").DefineComponent<{
63
67
  };
64
68
  disabled: BooleanConstructor;
65
69
  readonly: BooleanConstructor;
70
+ lazyRender: {
71
+ type: BooleanConstructor;
72
+ default: true;
73
+ };
66
74
  }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
67
75
  icon: StringConstructor;
68
76
  size: import("vue").PropType<import("../cell").CellSize>;
@@ -94,6 +102,10 @@ declare const _default: import("vue").DefineComponent<{
94
102
  };
95
103
  disabled: BooleanConstructor;
96
104
  readonly: BooleanConstructor;
105
+ lazyRender: {
106
+ type: BooleanConstructor;
107
+ default: true;
108
+ };
97
109
  }>>, {
98
110
  center: boolean;
99
111
  disabled: boolean;
@@ -102,5 +114,6 @@ declare const _default: import("vue").DefineComponent<{
102
114
  required: boolean;
103
115
  clickable: boolean | null;
104
116
  readonly: boolean;
117
+ lazyRender: boolean;
105
118
  }>;
106
119
  export default _default;
@@ -13,7 +13,8 @@ const collapseItemProps = extend({}, cellSharedProps, {
13
13
  name: numericProp,
14
14
  isLink: truthProp,
15
15
  disabled: Boolean,
16
- readonly: Boolean
16
+ readonly: Boolean,
17
+ lazyRender: truthProp
17
18
  });
18
19
  var stdin_default = defineComponent({
19
20
  name,
@@ -39,7 +40,7 @@ var stdin_default = defineComponent({
39
40
  });
40
41
  const expanded = computed(() => parent.isExpanded(name2.value));
41
42
  const show = ref(expanded.value);
42
- const lazyRender = useLazyRender(show);
43
+ const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
43
44
  const onTransitionEnd = () => {
44
45
  if (!expanded.value) {
45
46
  show.value = false;
@@ -29,6 +29,10 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
29
29
  };
30
30
  disabled: BooleanConstructor;
31
31
  readonly: BooleanConstructor;
32
+ lazyRender: {
33
+ type: BooleanConstructor;
34
+ default: true;
35
+ };
32
36
  }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
37
  icon: StringConstructor;
34
38
  size: import("vue").PropType<import("..").CellSize>;
@@ -60,6 +64,10 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
60
64
  };
61
65
  disabled: BooleanConstructor;
62
66
  readonly: BooleanConstructor;
67
+ lazyRender: {
68
+ type: BooleanConstructor;
69
+ default: true;
70
+ };
63
71
  }>>, {
64
72
  center: boolean;
65
73
  disabled: boolean;
@@ -68,6 +76,7 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
68
76
  required: boolean;
69
77
  clickable: boolean | null;
70
78
  readonly: boolean;
79
+ lazyRender: boolean;
71
80
  }>>;
72
81
  export default CollapseItem;
73
82
  export type { CollapseItemProps } from './CollapseItem';
@@ -32,7 +32,7 @@ function useTouch() {
32
32
  };
33
33
  const move = (event) => {
34
34
  const touch = event.touches[0];
35
- deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
35
+ deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
36
36
  deltaY.value = touch.clientY - startY.value;
37
37
  offsetX.value = Math.abs(deltaX.value);
38
38
  offsetY.value = Math.abs(deltaY.value);
@@ -1,4 +1,5 @@
1
1
  import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type ConfigProviderProvide = {
3
4
  iconPrefix?: string;
4
5
  };
@@ -8,7 +9,7 @@ declare const configProviderProps: {
8
9
  type: PropType<keyof HTMLElementTagNameMap>;
9
10
  default: keyof HTMLElementTagNameMap;
10
11
  };
11
- themeVars: PropType<Record<string, string | number>>;
12
+ themeVars: PropType<Record<string, Numeric>>;
12
13
  iconPrefix: StringConstructor;
13
14
  };
14
15
  export declare type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
@@ -17,14 +18,14 @@ declare const _default: import("vue").DefineComponent<{
17
18
  type: PropType<keyof HTMLElementTagNameMap>;
18
19
  default: keyof HTMLElementTagNameMap;
19
20
  };
20
- themeVars: PropType<Record<string, string | number>>;
21
+ themeVars: PropType<Record<string, Numeric>>;
21
22
  iconPrefix: StringConstructor;
22
23
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
23
24
  tag: {
24
25
  type: PropType<keyof HTMLElementTagNameMap>;
25
26
  default: keyof HTMLElementTagNameMap;
26
27
  };
27
- themeVars: PropType<Record<string, string | number>>;
28
+ themeVars: PropType<Record<string, Numeric>>;
28
29
  iconPrefix: StringConstructor;
29
30
  }>>, {
30
31
  tag: keyof HTMLElementTagNameMap;
@@ -3,14 +3,14 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
3
3
  type: import("vue").PropType<keyof HTMLElementTagNameMap>;
4
4
  default: keyof HTMLElementTagNameMap;
5
5
  };
6
- themeVars: import("vue").PropType<Record<string, string | number>>;
6
+ themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
7
7
  iconPrefix: StringConstructor;
8
8
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  tag: {
10
10
  type: import("vue").PropType<keyof HTMLElementTagNameMap>;
11
11
  default: keyof HTMLElementTagNameMap;
12
12
  };
13
- themeVars: import("vue").PropType<Record<string, string | number>>;
13
+ themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
14
14
  iconPrefix: StringConstructor;
15
15
  }>>, {
16
16
  tag: keyof HTMLElementTagNameMap;
@@ -1,7 +1,8 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type ContactListItem = {
3
- id?: number | string;
4
- tel: number | string;
4
+ id?: Numeric;
5
+ tel: Numeric;
5
6
  name: string;
6
7
  isDefault?: boolean;
7
8
  };
@@ -1,6 +1,7 @@
1
1
  import { type PropType } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type CouponInfo = {
3
- id: string | number;
4
+ id: Numeric;
4
5
  name: string;
5
6
  endAt: number;
6
7
  value: number;
@@ -17,10 +17,7 @@ declare const couponListProps: {
17
17
  type: BooleanConstructor;
18
18
  default: true;
19
19
  };
20
- emptyImage: {
21
- type: import("vue").PropType<string>;
22
- default: string;
23
- };
20
+ emptyImage: StringConstructor;
24
21
  chosenCoupon: {
25
22
  type: NumberConstructor;
26
23
  default: number;
@@ -71,10 +68,7 @@ declare const _default: import("vue").DefineComponent<{
71
68
  type: BooleanConstructor;
72
69
  default: true;
73
70
  };
74
- emptyImage: {
75
- type: import("vue").PropType<string>;
76
- default: string;
77
- };
71
+ emptyImage: StringConstructor;
78
72
  chosenCoupon: {
79
73
  type: NumberConstructor;
80
74
  default: number;
@@ -123,10 +117,7 @@ declare const _default: import("vue").DefineComponent<{
123
117
  type: BooleanConstructor;
124
118
  default: true;
125
119
  };
126
- emptyImage: {
127
- type: import("vue").PropType<string>;
128
- default: string;
129
- };
120
+ emptyImage: StringConstructor;
130
121
  chosenCoupon: {
131
122
  type: NumberConstructor;
132
123
  default: number;
@@ -168,7 +159,6 @@ declare const _default: import("vue").DefineComponent<{
168
159
  coupons: CouponInfo[];
169
160
  chosenCoupon: number;
170
161
  showCount: boolean;
171
- emptyImage: string;
172
162
  disabledCoupons: CouponInfo[];
173
163
  showExchangeBar: boolean;
174
164
  showCloseButton: boolean;
@@ -4,18 +4,18 @@ import { truthProp, windowHeight, makeArrayProp, makeStringProp, makeNumberProp,
4
4
  import { useRefs } from "../composables/use-refs";
5
5
  import { Tab } from "../tab";
6
6
  import { Tabs } from "../tabs";
7
+ import { Empty } from "../empty";
7
8
  import { Field } from "../field";
8
9
  import { Button } from "../button";
9
10
  import { Coupon } from "../coupon";
10
11
  import { useRect } from "@vant/use";
11
12
  const [name, bem, t] = createNamespace("coupon-list");
12
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
13
13
  const couponListProps = {
14
14
  code: makeStringProp(""),
15
15
  coupons: makeArrayProp(),
16
16
  currency: makeStringProp("\xA5"),
17
17
  showCount: truthProp,
18
- emptyImage: makeStringProp(EMPTY_IMAGE),
18
+ emptyImage: String,
19
19
  chosenCoupon: makeNumberProp(-1),
20
20
  enabledTitle: String,
21
21
  disabledTitle: String,
@@ -63,11 +63,13 @@ var stdin_default = defineComponent({
63
63
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
64
64
  });
65
65
  };
66
- const renderEmpty = () => _createVNode("div", {
67
- "class": bem("empty")
68
- }, [_createVNode("img", {
69
- "src": props.emptyImage
70
- }, null), _createVNode("p", null, [t("noCoupon")])]);
66
+ const renderEmpty = () => _createVNode(Empty, {
67
+ "image": props.emptyImage
68
+ }, {
69
+ default: () => [_createVNode("p", {
70
+ "class": bem("empty-tip")
71
+ }, [t("noCoupon")])]
72
+ });
71
73
  const renderExchangeBar = () => {
72
74
  if (props.showExchangeBar) {
73
75
  return _createVNode("div", {
@@ -1 +1 @@
1
- :root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-image-size: 200px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
1
+ :root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}
@@ -15,10 +15,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
15
15
  type: BooleanConstructor;
16
16
  default: true;
17
17
  };
18
- emptyImage: {
19
- type: import("vue").PropType<string>;
20
- default: string;
21
- };
18
+ emptyImage: StringConstructor;
22
19
  chosenCoupon: {
23
20
  type: NumberConstructor;
24
21
  default: number;
@@ -67,10 +64,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
67
64
  type: BooleanConstructor;
68
65
  default: true;
69
66
  };
70
- emptyImage: {
71
- type: import("vue").PropType<string>;
72
- default: string;
73
- };
67
+ emptyImage: StringConstructor;
74
68
  chosenCoupon: {
75
69
  type: NumberConstructor;
76
70
  default: number;
@@ -112,7 +106,6 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
112
106
  coupons: import("..").CouponInfo[];
113
107
  chosenCoupon: number;
114
108
  showCount: boolean;
115
- emptyImage: string;
116
109
  disabledCoupons: import("..").CouponInfo[];
117
110
  showExchangeBar: boolean;
118
111
  showCloseButton: boolean;