vant 4.0.0-rc.7 → 4.0.0-rc.9

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 (433) hide show
  1. package/es/action-bar/ActionBar.d.ts +1 -1
  2. package/es/action-bar/types.d.ts +1 -1
  3. package/es/action-bar-button/ActionBarButton.d.ts +1 -1
  4. package/es/action-bar-button/types.d.ts +1 -1
  5. package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
  6. package/es/action-bar-icon/types.d.ts +1 -1
  7. package/es/action-sheet/ActionSheet.d.ts +3 -3
  8. package/es/action-sheet/index.d.ts +1 -1
  9. package/es/action-sheet/types.d.ts +1 -1
  10. package/es/address-edit/AddressEdit.d.ts +1 -1
  11. package/es/address-edit/types.d.ts +5 -5
  12. package/es/address-list/AddressList.d.ts +1 -1
  13. package/es/address-list/AddressListItem.d.ts +1 -1
  14. package/es/address-list/types.d.ts +1 -1
  15. package/es/area/Area.d.ts +2 -2
  16. package/es/area/index.d.ts +1 -1
  17. package/es/area/types.d.ts +2 -2
  18. package/es/back-top/BackTop.d.ts +66 -0
  19. package/es/back-top/BackTop.mjs +99 -0
  20. package/es/back-top/index.css +1 -0
  21. package/es/back-top/index.d.ts +53 -0
  22. package/es/back-top/index.mjs +10 -0
  23. package/es/back-top/style/index.d.ts +1 -0
  24. package/es/back-top/style/index.mjs +4 -0
  25. package/es/back-top/types.d.ts +6 -0
  26. package/es/back-top/types.mjs +0 -0
  27. package/es/badge/Badge.d.ts +2 -2
  28. package/es/badge/types.d.ts +1 -1
  29. package/es/button/Button.d.ts +1 -1
  30. package/es/button/types.d.ts +5 -5
  31. package/es/calendar/Calendar.d.ts +1 -1
  32. package/es/calendar/CalendarMonth.d.ts +1 -1
  33. package/es/calendar/types.d.ts +7 -7
  34. package/es/card/Card.d.ts +1 -1
  35. package/es/card/types.d.ts +1 -1
  36. package/es/cascader/Cascader.d.ts +1 -1
  37. package/es/cascader/types.d.ts +4 -4
  38. package/es/cell/Cell.d.ts +4 -4
  39. package/es/cell/Cell.mjs +1 -1
  40. package/es/cell/index.d.ts +1 -1
  41. package/es/cell/types.d.ts +1 -1
  42. package/es/cell-group/CellGroup.d.ts +1 -1
  43. package/es/cell-group/types.d.ts +1 -1
  44. package/es/checkbox/Checkbox.d.ts +1 -1
  45. package/es/checkbox/Checker.d.ts +4 -4
  46. package/es/checkbox/types.d.ts +5 -5
  47. package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
  48. package/es/checkbox-group/types.d.ts +5 -5
  49. package/es/circle/Circle.d.ts +2 -2
  50. package/es/circle/types.d.ts +1 -1
  51. package/es/col/Col.d.ts +1 -1
  52. package/es/collapse/Collapse.d.ts +4 -4
  53. package/es/collapse-item/CollapseItem.d.ts +2 -2
  54. package/es/collapse-item/index.d.ts +1 -1
  55. package/es/collapse-item/types.d.ts +3 -3
  56. package/es/composables/use-route.d.ts +1 -1
  57. package/es/composables/use-touch.d.ts +1 -1
  58. package/es/config-provider/ConfigProvider.d.ts +4 -4
  59. package/es/config-provider/types.d.ts +1 -1
  60. package/es/contact-card/ContactCard.d.ts +2 -2
  61. package/es/contact-card/types.d.ts +1 -1
  62. package/es/contact-edit/ContactEdit.d.ts +2 -2
  63. package/es/contact-edit/types.d.ts +1 -1
  64. package/es/contact-list/ContactList.d.ts +2 -2
  65. package/es/contact-list/types.d.ts +1 -1
  66. package/es/count-down/CountDown.d.ts +1 -1
  67. package/es/count-down/types.d.ts +4 -4
  68. package/es/coupon/Coupon.d.ts +1 -1
  69. package/es/coupon/types.d.ts +1 -1
  70. package/es/coupon-cell/CouponCell.d.ts +1 -1
  71. package/es/coupon-cell/types.d.ts +1 -1
  72. package/es/coupon-list/CouponList.d.ts +1 -1
  73. package/es/coupon-list/types.d.ts +1 -1
  74. package/es/date-picker/DatePicker.d.ts +3 -3
  75. package/es/date-picker/index.d.ts +1 -1
  76. package/es/date-picker/utils.d.ts +2 -2
  77. package/es/dialog/Dialog.d.ts +2 -2
  78. package/es/dialog/index.d.ts +1 -1
  79. package/es/dialog/types.d.ts +6 -6
  80. package/es/divider/Divider.d.ts +2 -2
  81. package/es/divider/types.d.ts +1 -1
  82. package/es/dropdown-item/DropdownItem.d.ts +3 -3
  83. package/es/dropdown-item/DropdownItem.mjs +6 -4
  84. package/es/dropdown-item/index.d.ts +2 -2
  85. package/es/dropdown-item/types.d.ts +4 -4
  86. package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
  87. package/es/dropdown-menu/types.d.ts +3 -3
  88. package/es/empty/Empty.d.ts +1 -1
  89. package/es/empty/types.d.ts +1 -1
  90. package/es/field/Field.d.ts +2 -2
  91. package/es/field/index.d.ts +1 -1
  92. package/es/field/types.d.ts +16 -16
  93. package/es/form/Form.d.ts +1 -1
  94. package/es/form/types.d.ts +3 -3
  95. package/es/grid/Grid.d.ts +3 -3
  96. package/es/grid-item/GridItem.d.ts +1 -1
  97. package/es/grid-item/types.d.ts +1 -1
  98. package/es/icon/Icon.d.ts +1 -1
  99. package/es/image/Image.d.ts +3 -3
  100. package/es/image/types.d.ts +1 -1
  101. package/es/image-preview/ImagePreview.d.ts +1 -1
  102. package/es/image-preview/types.d.ts +5 -5
  103. package/es/index-anchor/IndexAnchor.d.ts +1 -1
  104. package/es/index-anchor/types.d.ts +1 -1
  105. package/es/index-bar/IndexBar.d.ts +1 -1
  106. package/es/index-bar/types.d.ts +4 -4
  107. package/es/index.d.ts +2 -1
  108. package/es/index.mjs +4 -1
  109. package/es/lazyload/vue-lazyload/util.d.ts +25 -0
  110. package/es/list/List.d.ts +1 -1
  111. package/es/list/List.mjs +1 -1
  112. package/es/list/types.d.ts +4 -4
  113. package/es/loading/Loading.d.ts +2 -2
  114. package/es/loading/types.d.ts +1 -1
  115. package/es/locale/index.d.ts +1 -1
  116. package/es/nav-bar/NavBar.d.ts +1 -1
  117. package/es/nav-bar/types.d.ts +1 -1
  118. package/es/notice-bar/NoticeBar.d.ts +1 -1
  119. package/es/notice-bar/types.d.ts +4 -4
  120. package/es/notify/Notify.d.ts +1 -1
  121. package/es/notify/types.d.ts +5 -5
  122. package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
  123. package/es/number-keyboard/NumberKeyboard.mjs +6 -4
  124. package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  125. package/es/number-keyboard/types.d.ts +1 -1
  126. package/es/overlay/Overlay.d.ts +1 -1
  127. package/es/overlay/types.d.ts +1 -1
  128. package/es/pagination/Pagination.d.ts +2 -2
  129. package/es/pagination/types.d.ts +1 -1
  130. package/es/password-input/PasswordInput.d.ts +1 -1
  131. package/es/password-input/types.d.ts +1 -1
  132. package/es/picker/Picker.d.ts +2 -2
  133. package/es/picker/PickerToolbar.d.ts +1 -1
  134. package/es/picker/index.d.ts +1 -1
  135. package/es/picker/types.d.ts +11 -11
  136. package/es/picker-group/PickerGroup.d.ts +2 -2
  137. package/es/picker-group/types.d.ts +1 -1
  138. package/es/popover/Popover.d.ts +1 -1
  139. package/es/popover/types.d.ts +5 -5
  140. package/es/popup/Popup.d.ts +3 -3
  141. package/es/popup/index.d.ts +2 -2
  142. package/es/popup/shared.d.ts +1 -1
  143. package/es/popup/types.d.ts +5 -5
  144. package/es/progress/Progress.d.ts +1 -1
  145. package/es/progress/types.d.ts +3 -3
  146. package/es/pull-refresh/PullRefresh.d.ts +1 -1
  147. package/es/pull-refresh/types.d.ts +1 -1
  148. package/es/radio/Radio.d.ts +3 -3
  149. package/es/radio/types.d.ts +1 -1
  150. package/es/radio-group/RadioGroup.d.ts +3 -3
  151. package/es/rate/Rate.d.ts +1 -1
  152. package/es/rate/types.d.ts +1 -1
  153. package/es/row/Row.d.ts +5 -5
  154. package/es/search/Search.d.ts +1 -1
  155. package/es/search/types.d.ts +4 -4
  156. package/es/share-sheet/ShareSheet.d.ts +4 -4
  157. package/es/share-sheet/index.d.ts +1 -1
  158. package/es/share-sheet/types.d.ts +1 -1
  159. package/es/sidebar/Sidebar.d.ts +2 -2
  160. package/es/sidebar/types.d.ts +1 -1
  161. package/es/sidebar-item/SidebarItem.d.ts +1 -1
  162. package/es/sidebar-item/types.d.ts +1 -1
  163. package/es/skeleton/Skeleton.d.ts +1 -1
  164. package/es/skeleton/SkeletonAvatar.d.ts +1 -1
  165. package/es/skeleton/SkeletonImage.d.ts +1 -1
  166. package/es/skeleton/SkeletonParagraph.d.ts +1 -1
  167. package/es/skeleton/SkeletonTitle.d.ts +1 -1
  168. package/es/skeleton/types.d.ts +3 -3
  169. package/es/slider/Slider.d.ts +3 -3
  170. package/es/slider/types.d.ts +1 -1
  171. package/es/space/Space.d.ts +3 -3
  172. package/es/step/types.d.ts +1 -1
  173. package/es/stepper/Stepper.d.ts +2 -2
  174. package/es/stepper/types.d.ts +1 -1
  175. package/es/steps/Steps.d.ts +3 -3
  176. package/es/steps/types.d.ts +1 -1
  177. package/es/sticky/Sticky.d.ts +2 -2
  178. package/es/sticky/types.d.ts +1 -1
  179. package/es/style/base.css +1 -1
  180. package/es/style/normalize.css +1 -1
  181. package/es/submit-bar/SubmitBar.d.ts +2 -2
  182. package/es/submit-bar/types.d.ts +1 -1
  183. package/es/swipe/Swipe.d.ts +1 -1
  184. package/es/swipe/types.d.ts +6 -6
  185. package/es/swipe-cell/SwipeCell.d.ts +3 -3
  186. package/es/swipe-cell/index.d.ts +2 -2
  187. package/es/swipe-cell/types.d.ts +4 -4
  188. package/es/switch/Switch.d.ts +1 -1
  189. package/es/switch/types.d.ts +1 -1
  190. package/es/tab/Tab.d.ts +1 -1
  191. package/es/tabbar/Tabbar.d.ts +2 -2
  192. package/es/tabbar/types.d.ts +1 -1
  193. package/es/tabbar-item/TabbarItem.d.ts +1 -1
  194. package/es/tabbar-item/types.d.ts +1 -1
  195. package/es/tabs/Tabs.d.ts +1 -1
  196. package/es/tabs/types.d.ts +6 -6
  197. package/es/tag/Tag.d.ts +1 -1
  198. package/es/tag/types.d.ts +3 -3
  199. package/es/time-picker/TimePicker.d.ts +3 -3
  200. package/es/time-picker/index.d.ts +1 -1
  201. package/es/toast/Toast.d.ts +1 -1
  202. package/es/toast/types.d.ts +6 -6
  203. package/es/tree-select/TreeSelect.d.ts +3 -3
  204. package/es/tree-select/types.d.ts +1 -1
  205. package/es/uploader/Uploader.d.ts +1 -1
  206. package/es/uploader/types.d.ts +8 -8
  207. package/es/utils/basic.d.ts +3 -3
  208. package/es/utils/create.d.ts +4 -4
  209. package/es/utils/deep-assign.d.ts +1 -1
  210. package/es/utils/dom.d.ts +1 -1
  211. package/es/utils/interceptor.d.ts +1 -1
  212. package/es/utils/mount-component.d.ts +1 -1
  213. package/es/utils/with-install.d.ts +2 -2
  214. package/lib/action-bar/ActionBar.d.ts +1 -1
  215. package/lib/action-bar/types.d.ts +1 -1
  216. package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
  217. package/lib/action-bar-button/types.d.ts +1 -1
  218. package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
  219. package/lib/action-bar-icon/types.d.ts +1 -1
  220. package/lib/action-sheet/ActionSheet.d.ts +3 -3
  221. package/lib/action-sheet/index.d.ts +1 -1
  222. package/lib/action-sheet/types.d.ts +1 -1
  223. package/lib/address-edit/AddressEdit.d.ts +1 -1
  224. package/lib/address-edit/types.d.ts +5 -5
  225. package/lib/address-list/AddressList.d.ts +1 -1
  226. package/lib/address-list/AddressListItem.d.ts +1 -1
  227. package/lib/address-list/types.d.ts +1 -1
  228. package/lib/area/Area.d.ts +2 -2
  229. package/lib/area/index.d.ts +1 -1
  230. package/lib/area/types.d.ts +2 -2
  231. package/lib/back-top/BackTop.d.ts +66 -0
  232. package/lib/back-top/BackTop.js +118 -0
  233. package/lib/back-top/index.css +1 -0
  234. package/lib/back-top/index.d.ts +53 -0
  235. package/lib/back-top/index.js +35 -0
  236. package/lib/back-top/style/index.d.ts +1 -0
  237. package/lib/back-top/style/index.js +4 -0
  238. package/lib/back-top/types.d.ts +6 -0
  239. package/lib/back-top/types.js +15 -0
  240. package/lib/badge/Badge.d.ts +2 -2
  241. package/lib/badge/types.d.ts +1 -1
  242. package/lib/button/Button.d.ts +1 -1
  243. package/lib/button/types.d.ts +5 -5
  244. package/lib/calendar/Calendar.d.ts +1 -1
  245. package/lib/calendar/CalendarMonth.d.ts +1 -1
  246. package/lib/calendar/types.d.ts +7 -7
  247. package/lib/card/Card.d.ts +1 -1
  248. package/lib/card/types.d.ts +1 -1
  249. package/lib/cascader/Cascader.d.ts +1 -1
  250. package/lib/cascader/types.d.ts +4 -4
  251. package/lib/cell/Cell.d.ts +4 -4
  252. package/lib/cell/Cell.js +1 -1
  253. package/lib/cell/index.d.ts +1 -1
  254. package/lib/cell/types.d.ts +1 -1
  255. package/lib/cell-group/CellGroup.d.ts +1 -1
  256. package/lib/cell-group/types.d.ts +1 -1
  257. package/lib/checkbox/Checkbox.d.ts +1 -1
  258. package/lib/checkbox/Checker.d.ts +4 -4
  259. package/lib/checkbox/types.d.ts +5 -5
  260. package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
  261. package/lib/checkbox-group/types.d.ts +5 -5
  262. package/lib/circle/Circle.d.ts +2 -2
  263. package/lib/circle/types.d.ts +1 -1
  264. package/lib/col/Col.d.ts +1 -1
  265. package/lib/collapse/Collapse.d.ts +4 -4
  266. package/lib/collapse-item/CollapseItem.d.ts +2 -2
  267. package/lib/collapse-item/index.d.ts +1 -1
  268. package/lib/collapse-item/types.d.ts +3 -3
  269. package/lib/composables/use-route.d.ts +1 -1
  270. package/lib/composables/use-touch.d.ts +1 -1
  271. package/lib/config-provider/ConfigProvider.d.ts +4 -4
  272. package/lib/config-provider/types.d.ts +1 -1
  273. package/lib/contact-card/ContactCard.d.ts +2 -2
  274. package/lib/contact-card/types.d.ts +1 -1
  275. package/lib/contact-edit/ContactEdit.d.ts +2 -2
  276. package/lib/contact-edit/types.d.ts +1 -1
  277. package/lib/contact-list/ContactList.d.ts +2 -2
  278. package/lib/contact-list/types.d.ts +1 -1
  279. package/lib/count-down/CountDown.d.ts +1 -1
  280. package/lib/count-down/types.d.ts +4 -4
  281. package/lib/coupon/Coupon.d.ts +1 -1
  282. package/lib/coupon/types.d.ts +1 -1
  283. package/lib/coupon-cell/CouponCell.d.ts +1 -1
  284. package/lib/coupon-cell/types.d.ts +1 -1
  285. package/lib/coupon-list/CouponList.d.ts +1 -1
  286. package/lib/coupon-list/types.d.ts +1 -1
  287. package/lib/date-picker/DatePicker.d.ts +3 -3
  288. package/lib/date-picker/index.d.ts +1 -1
  289. package/lib/date-picker/utils.d.ts +2 -2
  290. package/lib/dialog/Dialog.d.ts +2 -2
  291. package/lib/dialog/index.d.ts +1 -1
  292. package/lib/dialog/types.d.ts +6 -6
  293. package/lib/divider/Divider.d.ts +2 -2
  294. package/lib/divider/types.d.ts +1 -1
  295. package/lib/dropdown-item/DropdownItem.d.ts +3 -3
  296. package/lib/dropdown-item/DropdownItem.js +5 -3
  297. package/lib/dropdown-item/index.d.ts +2 -2
  298. package/lib/dropdown-item/types.d.ts +4 -4
  299. package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
  300. package/lib/dropdown-menu/types.d.ts +3 -3
  301. package/lib/empty/Empty.d.ts +1 -1
  302. package/lib/empty/types.d.ts +1 -1
  303. package/lib/field/Field.d.ts +2 -2
  304. package/lib/field/index.d.ts +1 -1
  305. package/lib/field/types.d.ts +16 -16
  306. package/lib/form/Form.d.ts +1 -1
  307. package/lib/form/types.d.ts +3 -3
  308. package/lib/grid/Grid.d.ts +3 -3
  309. package/lib/grid-item/GridItem.d.ts +1 -1
  310. package/lib/grid-item/types.d.ts +1 -1
  311. package/lib/icon/Icon.d.ts +1 -1
  312. package/lib/image/Image.d.ts +3 -3
  313. package/lib/image/types.d.ts +1 -1
  314. package/lib/image-preview/ImagePreview.d.ts +1 -1
  315. package/lib/image-preview/types.d.ts +5 -5
  316. package/lib/index-anchor/IndexAnchor.d.ts +1 -1
  317. package/lib/index-anchor/types.d.ts +1 -1
  318. package/lib/index-bar/IndexBar.d.ts +1 -1
  319. package/lib/index-bar/types.d.ts +4 -4
  320. package/lib/index.css +1 -1
  321. package/lib/index.d.ts +2 -1
  322. package/lib/index.js +4 -1
  323. package/lib/lazyload/vue-lazyload/util.d.ts +25 -0
  324. package/lib/list/List.d.ts +1 -1
  325. package/lib/list/List.js +1 -1
  326. package/lib/list/types.d.ts +4 -4
  327. package/lib/loading/Loading.d.ts +2 -2
  328. package/lib/loading/types.d.ts +1 -1
  329. package/lib/locale/index.d.ts +1 -1
  330. package/lib/nav-bar/NavBar.d.ts +1 -1
  331. package/lib/nav-bar/types.d.ts +1 -1
  332. package/lib/notice-bar/NoticeBar.d.ts +1 -1
  333. package/lib/notice-bar/types.d.ts +4 -4
  334. package/lib/notify/Notify.d.ts +1 -1
  335. package/lib/notify/types.d.ts +5 -5
  336. package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
  337. package/lib/number-keyboard/NumberKeyboard.js +5 -3
  338. package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  339. package/lib/number-keyboard/types.d.ts +1 -1
  340. package/lib/overlay/Overlay.d.ts +1 -1
  341. package/lib/overlay/types.d.ts +1 -1
  342. package/lib/pagination/Pagination.d.ts +2 -2
  343. package/lib/pagination/types.d.ts +1 -1
  344. package/lib/password-input/PasswordInput.d.ts +1 -1
  345. package/lib/password-input/types.d.ts +1 -1
  346. package/lib/picker/Picker.d.ts +2 -2
  347. package/lib/picker/PickerToolbar.d.ts +1 -1
  348. package/lib/picker/index.d.ts +1 -1
  349. package/lib/picker/types.d.ts +11 -11
  350. package/lib/picker-group/PickerGroup.d.ts +2 -2
  351. package/lib/picker-group/types.d.ts +1 -1
  352. package/lib/popover/Popover.d.ts +1 -1
  353. package/lib/popover/types.d.ts +5 -5
  354. package/lib/popup/Popup.d.ts +3 -3
  355. package/lib/popup/index.d.ts +2 -2
  356. package/lib/popup/shared.d.ts +1 -1
  357. package/lib/popup/types.d.ts +5 -5
  358. package/lib/progress/Progress.d.ts +1 -1
  359. package/lib/progress/types.d.ts +3 -3
  360. package/lib/pull-refresh/PullRefresh.d.ts +1 -1
  361. package/lib/pull-refresh/types.d.ts +1 -1
  362. package/lib/radio/Radio.d.ts +3 -3
  363. package/lib/radio/types.d.ts +1 -1
  364. package/lib/radio-group/RadioGroup.d.ts +3 -3
  365. package/lib/rate/Rate.d.ts +1 -1
  366. package/lib/rate/types.d.ts +1 -1
  367. package/lib/row/Row.d.ts +5 -5
  368. package/lib/search/Search.d.ts +1 -1
  369. package/lib/search/types.d.ts +4 -4
  370. package/lib/share-sheet/ShareSheet.d.ts +4 -4
  371. package/lib/share-sheet/index.d.ts +1 -1
  372. package/lib/share-sheet/types.d.ts +1 -1
  373. package/lib/sidebar/Sidebar.d.ts +2 -2
  374. package/lib/sidebar/types.d.ts +1 -1
  375. package/lib/sidebar-item/SidebarItem.d.ts +1 -1
  376. package/lib/sidebar-item/types.d.ts +1 -1
  377. package/lib/skeleton/Skeleton.d.ts +1 -1
  378. package/lib/skeleton/SkeletonAvatar.d.ts +1 -1
  379. package/lib/skeleton/SkeletonImage.d.ts +1 -1
  380. package/lib/skeleton/SkeletonParagraph.d.ts +1 -1
  381. package/lib/skeleton/SkeletonTitle.d.ts +1 -1
  382. package/lib/skeleton/types.d.ts +3 -3
  383. package/lib/slider/Slider.d.ts +3 -3
  384. package/lib/slider/types.d.ts +1 -1
  385. package/lib/space/Space.d.ts +3 -3
  386. package/lib/step/types.d.ts +1 -1
  387. package/lib/stepper/Stepper.d.ts +2 -2
  388. package/lib/stepper/types.d.ts +1 -1
  389. package/lib/steps/Steps.d.ts +3 -3
  390. package/lib/steps/types.d.ts +1 -1
  391. package/lib/sticky/Sticky.d.ts +2 -2
  392. package/lib/sticky/types.d.ts +1 -1
  393. package/lib/style/base.css +1 -1
  394. package/lib/style/normalize.css +1 -1
  395. package/lib/submit-bar/SubmitBar.d.ts +2 -2
  396. package/lib/submit-bar/types.d.ts +1 -1
  397. package/lib/swipe/Swipe.d.ts +1 -1
  398. package/lib/swipe/types.d.ts +6 -6
  399. package/lib/swipe-cell/SwipeCell.d.ts +3 -3
  400. package/lib/swipe-cell/index.d.ts +2 -2
  401. package/lib/swipe-cell/types.d.ts +4 -4
  402. package/lib/switch/Switch.d.ts +1 -1
  403. package/lib/switch/types.d.ts +1 -1
  404. package/lib/tab/Tab.d.ts +1 -1
  405. package/lib/tabbar/Tabbar.d.ts +2 -2
  406. package/lib/tabbar/types.d.ts +1 -1
  407. package/lib/tabbar-item/TabbarItem.d.ts +1 -1
  408. package/lib/tabbar-item/types.d.ts +1 -1
  409. package/lib/tabs/Tabs.d.ts +1 -1
  410. package/lib/tabs/types.d.ts +6 -6
  411. package/lib/tag/Tag.d.ts +1 -1
  412. package/lib/tag/types.d.ts +3 -3
  413. package/lib/time-picker/TimePicker.d.ts +3 -3
  414. package/lib/time-picker/index.d.ts +1 -1
  415. package/lib/toast/Toast.d.ts +1 -1
  416. package/lib/toast/types.d.ts +6 -6
  417. package/lib/tree-select/TreeSelect.d.ts +3 -3
  418. package/lib/tree-select/types.d.ts +1 -1
  419. package/lib/uploader/Uploader.d.ts +1 -1
  420. package/lib/uploader/types.d.ts +8 -8
  421. package/lib/utils/basic.d.ts +3 -3
  422. package/lib/utils/create.d.ts +4 -4
  423. package/lib/utils/deep-assign.d.ts +1 -1
  424. package/lib/utils/dom.d.ts +1 -1
  425. package/lib/utils/interceptor.d.ts +1 -1
  426. package/lib/utils/mount-component.d.ts +1 -1
  427. package/lib/utils/with-install.d.ts +2 -2
  428. package/lib/vant.cjs.js +533 -436
  429. package/lib/vant.es.js +534 -437
  430. package/lib/vant.js +533 -436
  431. package/lib/vant.min.js +1 -1
  432. package/lib/web-types.json +1 -1
  433. package/package.json +2 -2
@@ -2,8 +2,8 @@ import type { ComponentPublicInstance } from 'vue';
2
2
  import type { ImageFit } from '../image';
3
3
  import type { Numeric, Interceptor } from '../utils';
4
4
  import type { UploaderProps } from './Uploader';
5
- export declare type UploaderResultType = 'dataUrl' | 'text' | 'file';
6
- export declare type UploaderFileListItem = {
5
+ export type UploaderResultType = 'dataUrl' | 'text' | 'file';
6
+ export type UploaderFileListItem = {
7
7
  url?: string;
8
8
  file?: File;
9
9
  content?: string;
@@ -15,21 +15,21 @@ export declare type UploaderFileListItem = {
15
15
  previewSize?: Numeric;
16
16
  beforeDelete?: Interceptor;
17
17
  };
18
- export declare type UploaderMaxSize = Numeric | ((file: File) => boolean);
19
- export declare type UploaderBeforeRead = (file: File | File[], detail: {
18
+ export type UploaderMaxSize = Numeric | ((file: File) => boolean);
19
+ export type UploaderBeforeRead = (file: File | File[], detail: {
20
20
  name: Numeric;
21
21
  index: number;
22
22
  }) => boolean | undefined | Promise<File | File[] | undefined>;
23
- export declare type UploaderAfterRead = (items: UploaderFileListItem | UploaderFileListItem[], detail: {
23
+ export type UploaderAfterRead = (items: UploaderFileListItem | UploaderFileListItem[], detail: {
24
24
  name: Numeric;
25
25
  index: number;
26
26
  }) => void;
27
- export declare type UploaderExpose = {
27
+ export type UploaderExpose = {
28
28
  chooseFile: () => void;
29
29
  closeImagePreview: () => void;
30
30
  };
31
- export declare type UploaderInstance = ComponentPublicInstance<UploaderProps, UploaderExpose>;
32
- export declare type UploaderThemeVars = {
31
+ export type UploaderInstance = ComponentPublicInstance<UploaderProps, UploaderExpose>;
32
+ export type UploaderThemeVars = {
33
33
  uploaderSize?: string;
34
34
  uploaderIconSize?: string;
35
35
  uploaderIconColor?: string;
@@ -7,10 +7,10 @@ export declare const extend: {
7
7
  (target: object, ...sources: any[]): any;
8
8
  };
9
9
  export declare const inBrowser: boolean;
10
- export declare type Numeric = number | string;
11
- export declare type ComponentInstance = ComponentPublicInstance<{}, any>;
10
+ export type Numeric = number | string;
11
+ export type ComponentInstance = ComponentPublicInstance<{}, any>;
12
12
  export declare function get(object: any, path: string): any;
13
- export declare type Writeable<T> = {
13
+ export type Writeable<T> = {
14
14
  -readonly [P in keyof T]: T[P];
15
15
  };
16
16
  export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U>, ignoreUndefined?: boolean): Writeable<Pick<T, U>>;
@@ -1,9 +1,9 @@
1
1
  export declare function createTranslate(name: string): (path: string, ...args: unknown[]) => any;
2
- export declare type Translate = ReturnType<typeof createTranslate>;
3
- export declare type Mod = string | {
2
+ export type Translate = ReturnType<typeof createTranslate>;
3
+ export type Mod = string | {
4
4
  [key: string]: any;
5
5
  };
6
- export declare type Mods = Mod | Mod[];
6
+ export type Mods = Mod | Mod[];
7
7
  /**
8
8
  * bem helper
9
9
  * b() // 'button'
@@ -13,5 +13,5 @@ export declare type Mods = Mod | Mod[];
13
13
  * b(['disabled', 'primary']) // 'button button--disabled button--primary'
14
14
  */
15
15
  export declare function createBEM(name: string): (el?: Mods, mods?: Mods) => Mods;
16
- export declare type BEM = ReturnType<typeof createBEM>;
16
+ export type BEM = ReturnType<typeof createBEM>;
17
17
  export declare function createNamespace(name: string): readonly [string, (el?: Mods | undefined, mods?: Mods | undefined) => Mods, (path: string, ...args: unknown[]) => any];
@@ -1,3 +1,3 @@
1
- declare type ObjectIndex = Record<string, unknown>;
1
+ type ObjectIndex = Record<string, unknown>;
2
2
  export declare function deepAssign(to: ObjectIndex, from: ObjectIndex): ObjectIndex;
3
3
  export {};
package/es/utils/dom.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
- export declare type ScrollElement = Element | Window;
2
+ export type ScrollElement = Element | Window;
3
3
  export declare function getScrollTop(el: ScrollElement): number;
4
4
  export declare function setScrollTop(el: ScrollElement, value: number): void;
5
5
  export declare function getRootScrollTop(): number;
@@ -1,4 +1,4 @@
1
- export declare type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined | void;
1
+ export type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined | void;
2
2
  export declare function callInterceptor(interceptor: Interceptor | undefined, { args, done, canceled, }: {
3
3
  args?: unknown[];
4
4
  done: () => void;
@@ -9,6 +9,6 @@ export declare function usePopupState(): {
9
9
  toggle: (show: boolean) => void;
10
10
  };
11
11
  export declare function mountComponent(RootComponent: Component): {
12
- instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
12
+ instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
13
13
  unmount(): void;
14
14
  };
@@ -1,12 +1,12 @@
1
1
  import type { App, Component } from 'vue';
2
- declare type EventShim = {
2
+ type EventShim = {
3
3
  new (...args: any[]): {
4
4
  $props: {
5
5
  onClick?: (...args: any[]) => void;
6
6
  };
7
7
  };
8
8
  };
9
- export declare type WithInstall<T> = T & {
9
+ export type WithInstall<T> = T & {
10
10
  install(app: App): void;
11
11
  } & EventShim;
12
12
  export declare function withInstall<T extends Component>(options: T): WithInstall<T>;
@@ -7,7 +7,7 @@ export declare const actionBarProps: {
7
7
  default: true;
8
8
  };
9
9
  };
10
- export declare type ActionBarProps = ExtractPropTypes<typeof actionBarProps>;
10
+ export type ActionBarProps = ExtractPropTypes<typeof actionBarProps>;
11
11
  declare const _default: import("vue").DefineComponent<{
12
12
  placeholder: BooleanConstructor;
13
13
  safeAreaInsetBottom: {
@@ -1,4 +1,4 @@
1
- export declare type ActionBarThemeVars = {
1
+ export type ActionBarThemeVars = {
2
2
  actionBarBackground?: string;
3
3
  actionBarHeight?: string;
4
4
  };
@@ -12,7 +12,7 @@ export declare const actionBarButtonProps: {
12
12
  loading: BooleanConstructor;
13
13
  disabled: BooleanConstructor;
14
14
  };
15
- export declare type ActionBarButtonProps = ExtractPropTypes<typeof actionBarButtonProps>;
15
+ export type ActionBarButtonProps = ExtractPropTypes<typeof actionBarButtonProps>;
16
16
  declare const _default: import("vue").DefineComponent<{
17
17
  to: PropType<import("vue-router").RouteLocationRaw>;
18
18
  url: StringConstructor;
@@ -1,4 +1,4 @@
1
- export declare type ActionBarButtonThemeVars = {
1
+ export type ActionBarButtonThemeVars = {
2
2
  actionBarButtonHeight?: string;
3
3
  actionBarButtonWarningColor?: string;
4
4
  actionBarButtonDangerColor?: string;
@@ -14,7 +14,7 @@ export declare const actionBarIconProps: {
14
14
  badgeProps: PropType<Partial<BadgeProps>>;
15
15
  iconPrefix: StringConstructor;
16
16
  };
17
- export declare type ActionBarIconProps = ExtractPropTypes<typeof actionBarIconProps>;
17
+ export type ActionBarIconProps = ExtractPropTypes<typeof actionBarIconProps>;
18
18
  declare const _default: import("vue").DefineComponent<{
19
19
  to: PropType<import("vue-router").RouteLocationRaw>;
20
20
  url: StringConstructor;
@@ -1,4 +1,4 @@
1
- export declare type ActionBarIconThemeVars = {
1
+ export type ActionBarIconThemeVars = {
2
2
  actionBarIconWidth?: string;
3
3
  actionBarIconHeight?: string;
4
4
  actionBarIconColor?: string;
@@ -1,5 +1,5 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
- export declare type ActionSheetAction = {
2
+ export type ActionSheetAction = {
3
3
  name?: string;
4
4
  color?: string;
5
5
  subname?: string;
@@ -63,7 +63,7 @@ export declare const actionSheetProps: {
63
63
  default: true;
64
64
  };
65
65
  };
66
- export declare type ActionSheetProps = ExtractPropTypes<typeof actionSheetProps>;
66
+ export type ActionSheetProps = ExtractPropTypes<typeof actionSheetProps>;
67
67
  declare const _default: import("vue").DefineComponent<{
68
68
  show: BooleanConstructor;
69
69
  zIndex: (NumberConstructor | StringConstructor)[];
@@ -118,7 +118,7 @@ declare const _default: import("vue").DefineComponent<{
118
118
  type: BooleanConstructor;
119
119
  default: true;
120
120
  };
121
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show" | "cancel")[], "select" | "update:show" | "cancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
121
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "cancel" | "update:show")[], "select" | "cancel" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
122
122
  show: BooleanConstructor;
123
123
  zIndex: (NumberConstructor | StringConstructor)[];
124
124
  overlay: {
@@ -52,7 +52,7 @@ export declare const ActionSheet: import("../utils").WithInstall<import("vue").D
52
52
  type: BooleanConstructor;
53
53
  default: true;
54
54
  };
55
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show" | "cancel")[], "select" | "update:show" | "cancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
55
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "cancel" | "update:show")[], "select" | "cancel" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
56
56
  show: BooleanConstructor;
57
57
  zIndex: (NumberConstructor | StringConstructor)[];
58
58
  overlay: {
@@ -1,4 +1,4 @@
1
- export declare type ActionSheetThemeVars = {
1
+ export type ActionSheetThemeVars = {
2
2
  actionSheetMaxHeight?: string;
3
3
  actionSheetHeaderHeight?: string;
4
4
  actionSheetHeaderFontSize?: string;
@@ -45,7 +45,7 @@ export declare const addressEditProps: {
45
45
  default: typeof isMobile;
46
46
  };
47
47
  };
48
- export declare type AddressEditProps = ExtractPropTypes<typeof addressEditProps>;
48
+ export type AddressEditProps = ExtractPropTypes<typeof addressEditProps>;
49
49
  declare const _default: import("vue").DefineComponent<{
50
50
  areaList: PropType<AreaList>;
51
51
  isSaving: BooleanConstructor;
@@ -1,10 +1,10 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { AddressEditProps } from './AddressEdit';
3
- export declare type AddressEditSearchItem = {
3
+ export type AddressEditSearchItem = {
4
4
  name?: string;
5
5
  address?: string;
6
6
  };
7
- export declare type AddressEditInfo = {
7
+ export type AddressEditInfo = {
8
8
  tel: string;
9
9
  name: string;
10
10
  city: string;
@@ -15,12 +15,12 @@ export declare type AddressEditInfo = {
15
15
  isDefault?: boolean;
16
16
  addressDetail: string;
17
17
  };
18
- export declare type AddressEditExpose = {
18
+ export type AddressEditExpose = {
19
19
  setAreaCode: (code?: string | undefined) => void;
20
20
  setAddressDetail: (value: string) => void;
21
21
  };
22
- export declare type AddressEditInstance = ComponentPublicInstance<AddressEditProps, AddressEditExpose>;
23
- export declare type AddressEditThemeVars = {
22
+ export type AddressEditInstance = ComponentPublicInstance<AddressEditProps, AddressEditExpose>;
23
+ export type AddressEditThemeVars = {
24
24
  addressEditPadding?: string;
25
25
  addressEditButtonsPadding?: string;
26
26
  addressEditButtonMarginBottom?: string;
@@ -18,7 +18,7 @@ export declare const addressListProps: {
18
18
  addButtonText: StringConstructor;
19
19
  defaultTagText: StringConstructor;
20
20
  };
21
- export declare type AddressListProps = ExtractPropTypes<typeof addressListProps>;
21
+ export type AddressListProps = ExtractPropTypes<typeof addressListProps>;
22
22
  declare const _default: import("vue").DefineComponent<{
23
23
  list: {
24
24
  type: import("vue").PropType<AddressListAddress[]>;
@@ -1,6 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type Numeric } from '../utils';
3
- export declare type AddressListAddress = {
3
+ export type AddressListAddress = {
4
4
  id: Numeric;
5
5
  tel: Numeric;
6
6
  name: string;
@@ -1,4 +1,4 @@
1
- export declare type AddressListThemeVars = {
1
+ export type AddressListThemeVars = {
2
2
  addressListPadding?: string;
3
3
  addressListDisabledTextColor?: string;
4
4
  addressListDisabledTextPadding?: string;
@@ -39,7 +39,7 @@ export declare const areaProps: {
39
39
  default: () => {};
40
40
  };
41
41
  };
42
- export declare type AreaProps = ExtractPropTypes<typeof areaProps>;
42
+ export type AreaProps = ExtractPropTypes<typeof areaProps>;
43
43
  declare const _default: import("vue").DefineComponent<{
44
44
  loading: BooleanConstructor;
45
45
  readonly: BooleanConstructor;
@@ -78,7 +78,7 @@ declare const _default: import("vue").DefineComponent<{
78
78
  type: PropType<AreaList>;
79
79
  default: () => {};
80
80
  };
81
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
81
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
82
82
  loading: BooleanConstructor;
83
83
  readonly: BooleanConstructor;
84
84
  allowHtml: BooleanConstructor;
@@ -36,7 +36,7 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
36
36
  type: import("vue").PropType<import("./types").AreaList>;
37
37
  default: () => {};
38
38
  };
39
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
39
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
40
  loading: BooleanConstructor;
41
41
  readonly: BooleanConstructor;
42
42
  allowHtml: BooleanConstructor;
@@ -1,9 +1,9 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import { PickerExpose } from '../picker/types';
3
3
  import type { AreaProps } from './Area';
4
- export declare type AreaList = {
4
+ export type AreaList = {
5
5
  city_list: Record<string, string>;
6
6
  county_list: Record<string, string>;
7
7
  province_list: Record<string, string>;
8
8
  };
9
- export declare type AreaInstance = ComponentPublicInstance<AreaProps, PickerExpose>;
9
+ export type AreaInstance = ComponentPublicInstance<AreaProps, PickerExpose>;
@@ -0,0 +1,66 @@
1
+ import { type PropType, type ExtractPropTypes } from 'vue';
2
+ export declare const backTopProps: {
3
+ right: {
4
+ type: (NumberConstructor | StringConstructor)[];
5
+ default: number;
6
+ };
7
+ bottom: {
8
+ type: (NumberConstructor | StringConstructor)[];
9
+ default: number;
10
+ };
11
+ target: PropType<string | import("vue").RendererElement | null | undefined>;
12
+ visibilityHeight: {
13
+ type: (NumberConstructor | StringConstructor)[];
14
+ default: number;
15
+ };
16
+ teleport: {
17
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
18
+ default: string;
19
+ };
20
+ };
21
+ export type BackTopProps = ExtractPropTypes<typeof backTopProps>;
22
+ declare const _default: import("vue").DefineComponent<{
23
+ right: {
24
+ type: (NumberConstructor | StringConstructor)[];
25
+ default: number;
26
+ };
27
+ bottom: {
28
+ type: (NumberConstructor | StringConstructor)[];
29
+ default: number;
30
+ };
31
+ target: PropType<string | import("vue").RendererElement | null | undefined>;
32
+ visibilityHeight: {
33
+ type: (NumberConstructor | StringConstructor)[];
34
+ default: number;
35
+ };
36
+ teleport: {
37
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
38
+ default: string;
39
+ };
40
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
41
+ right: {
42
+ type: (NumberConstructor | StringConstructor)[];
43
+ default: number;
44
+ };
45
+ bottom: {
46
+ type: (NumberConstructor | StringConstructor)[];
47
+ default: number;
48
+ };
49
+ target: PropType<string | import("vue").RendererElement | null | undefined>;
50
+ visibilityHeight: {
51
+ type: (NumberConstructor | StringConstructor)[];
52
+ default: number;
53
+ };
54
+ teleport: {
55
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
56
+ default: string;
57
+ };
58
+ }>> & {
59
+ onClick?: ((...args: any[]) => any) | undefined;
60
+ }, {
61
+ bottom: string | number;
62
+ right: string | number;
63
+ teleport: string | import("vue").RendererElement | null | undefined;
64
+ visibilityHeight: string | number;
65
+ }>;
66
+ export default _default;
@@ -0,0 +1,118 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name2 in all)
7
+ __defProp(target, name2, { get: all[name2], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ backTopProps: () => backTopProps,
21
+ default: () => stdin_default
22
+ });
23
+ module.exports = __toCommonJS(stdin_exports);
24
+ var import_vue = require("vue");
25
+ var import_vue2 = require("vue");
26
+ var import_utils = require("../utils");
27
+ var import_util = require("../lazyload/vue-lazyload/util");
28
+ var import_use = require("@vant/use");
29
+ var import_icon = require("../icon");
30
+ const [name, bem] = (0, import_utils.createNamespace)("back-top");
31
+ const backTopProps = {
32
+ right: (0, import_utils.makeNumericProp)(30),
33
+ bottom: (0, import_utils.makeNumericProp)(40),
34
+ target: [String, Object],
35
+ visibilityHeight: (0, import_utils.makeNumericProp)(200),
36
+ teleport: {
37
+ type: [String, Object],
38
+ default: "body"
39
+ }
40
+ };
41
+ var stdin_default = (0, import_vue2.defineComponent)({
42
+ name,
43
+ inheritAttrs: false,
44
+ props: backTopProps,
45
+ emits: ["click"],
46
+ setup(props, {
47
+ emit,
48
+ slots,
49
+ attrs
50
+ }) {
51
+ const show = (0, import_vue2.ref)(false);
52
+ const scrollParent = (0, import_vue2.ref)();
53
+ const root = (0, import_vue2.ref)(null);
54
+ let target;
55
+ const style = (0, import_vue2.computed)(() => ({
56
+ right: (0, import_utils.addUnit)(props.right),
57
+ bottom: (0, import_utils.addUnit)(props.bottom)
58
+ }));
59
+ const onClick = (event) => {
60
+ emit("click", event);
61
+ target.scrollTo({
62
+ top: 0,
63
+ behavior: "smooth"
64
+ });
65
+ };
66
+ const scroll = () => {
67
+ show.value = (0, import_utils.getScrollTop)(target) >= props.visibilityHeight;
68
+ };
69
+ const getTarget = () => {
70
+ const {
71
+ target: target2
72
+ } = props;
73
+ if (typeof target2 === "string") {
74
+ const el = document.querySelector(props.target);
75
+ if (!el) {
76
+ throw Error("[Vant] BackTop: target element is not found.");
77
+ }
78
+ return el;
79
+ }
80
+ if ((0, import_utils.isObject)(target2)) {
81
+ return target2;
82
+ }
83
+ throw Error('[Vant] BackTop: type of prop "target" should be a selector or an element object');
84
+ };
85
+ (0, import_use.useEventListener)("scroll", (0, import_util.throttle)(scroll, 300), {
86
+ target: scrollParent
87
+ });
88
+ (0, import_vue2.onMounted)(() => {
89
+ (0, import_vue2.nextTick)(() => {
90
+ if (import_utils.inBrowser) {
91
+ target = props.target ? getTarget() : (0, import_use.getScrollParent)(root.value);
92
+ scrollParent.value = target;
93
+ }
94
+ });
95
+ });
96
+ return () => {
97
+ const Content = (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
98
+ "ref": root,
99
+ "class": bem({
100
+ active: show.value
101
+ }),
102
+ "style": style.value,
103
+ "onClick": onClick
104
+ }, attrs), [slots.default ? slots.default() : (0, import_vue.createVNode)(import_icon.Icon, {
105
+ "name": "back-top",
106
+ "class": bem("icon")
107
+ }, null)]);
108
+ if (props.teleport) {
109
+ return (0, import_vue.createVNode)(import_vue2.Teleport, {
110
+ "to": props.teleport
111
+ }, {
112
+ default: () => [Content]
113
+ });
114
+ }
115
+ return Content;
116
+ };
117
+ }
118
+ });
@@ -0,0 +1 @@
1
+ :root{--van-back-top-size: 40px;--van-back-top-icon-size: 20px;--van-back-top-text-color: #fff;--van-back-top-background: var(--van-blue)}.van-back-top{position:fixed;display:flex;align-items:center;justify-content:center;width:var(--van-back-top-size);height:var(--van-back-top-size);cursor:pointer;color:var(--van-back-top-text-color);border-radius:var(--van-radius-max);box-shadow:0 2px 8px rgba(0,0,0,.12);transform:scale(0);transition:.3s cubic-bezier(.25,.8,.5,1);background-color:var(--van-back-top-background)}.van-back-top:active{opacity:var(--van-active-opacity)}.van-back-top--active{transform:scale(1)}.van-back-top__icon{font-size:var(--van-back-top-icon-size);font-weight:var(--van-font-bold)}
@@ -0,0 +1,53 @@
1
+ export declare const BackTop: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ right: {
3
+ type: (NumberConstructor | StringConstructor)[];
4
+ default: number;
5
+ };
6
+ bottom: {
7
+ type: (NumberConstructor | StringConstructor)[];
8
+ default: number;
9
+ };
10
+ target: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
11
+ visibilityHeight: {
12
+ type: (NumberConstructor | StringConstructor)[];
13
+ default: number;
14
+ };
15
+ teleport: {
16
+ type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
17
+ default: string;
18
+ };
19
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ right: {
21
+ type: (NumberConstructor | StringConstructor)[];
22
+ default: number;
23
+ };
24
+ bottom: {
25
+ type: (NumberConstructor | StringConstructor)[];
26
+ default: number;
27
+ };
28
+ target: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
29
+ visibilityHeight: {
30
+ type: (NumberConstructor | StringConstructor)[];
31
+ default: number;
32
+ };
33
+ teleport: {
34
+ type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
35
+ default: string;
36
+ };
37
+ }>> & {
38
+ onClick?: ((...args: any[]) => any) | undefined;
39
+ }, {
40
+ bottom: string | number;
41
+ right: string | number;
42
+ teleport: string | import("vue").RendererElement | null | undefined;
43
+ visibilityHeight: string | number;
44
+ }>>;
45
+ export default BackTop;
46
+ export { backTopProps } from './BackTop';
47
+ export type { BackTopProps } from './BackTop';
48
+ export type { BackTopThemeVars } from './types';
49
+ declare module 'vue' {
50
+ interface GlobalComponents {
51
+ VanBackTop: typeof BackTop;
52
+ }
53
+ }
@@ -0,0 +1,35 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
+ mod
22
+ ));
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var stdin_exports = {};
25
+ __export(stdin_exports, {
26
+ BackTop: () => BackTop,
27
+ backTopProps: () => import_BackTop2.backTopProps,
28
+ default: () => stdin_default
29
+ });
30
+ module.exports = __toCommonJS(stdin_exports);
31
+ var import_utils = require("../utils");
32
+ var import_BackTop = __toESM(require("./BackTop"));
33
+ var import_BackTop2 = require("./BackTop");
34
+ const BackTop = (0, import_utils.withInstall)(import_BackTop.default);
35
+ var stdin_default = BackTop;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ require("../../style/base.css");
2
+ require("../../badge/index.css");
3
+ require("../../icon/index.css");
4
+ require("../index.css");
@@ -0,0 +1,6 @@
1
+ export type BackTopThemeVars = {
2
+ backTopSize?: string;
3
+ backTopIconSize?: string;
4
+ backTopTextColor?: string;
5
+ backTopBackground?: string;
6
+ };
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var stdin_exports = {};
15
+ module.exports = __toCommonJS(stdin_exports);