vant 4.0.0-rc.6 → 4.0.0-rc.8

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 (481) 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.css +1 -1
  9. package/es/action-sheet/index.d.ts +1 -1
  10. package/es/action-sheet/types.d.ts +1 -1
  11. package/es/address-edit/AddressEdit.d.ts +1 -1
  12. package/es/address-edit/types.d.ts +5 -5
  13. package/es/address-list/AddressList.d.ts +1 -1
  14. package/es/address-list/AddressListItem.d.ts +1 -1
  15. package/es/address-list/types.d.ts +1 -1
  16. package/es/area/Area.d.ts +2 -2
  17. package/es/area/index.d.ts +1 -1
  18. package/es/area/types.d.ts +2 -2
  19. package/es/back-top/BackTop.d.ts +66 -0
  20. package/es/back-top/BackTop.mjs +99 -0
  21. package/es/back-top/index.css +1 -0
  22. package/es/back-top/index.d.ts +53 -0
  23. package/es/back-top/index.mjs +10 -0
  24. package/es/back-top/style/index.d.ts +1 -0
  25. package/es/back-top/style/index.mjs +4 -0
  26. package/es/back-top/types.d.ts +6 -0
  27. package/es/back-top/types.mjs +0 -0
  28. package/es/badge/Badge.d.ts +2 -2
  29. package/es/badge/types.d.ts +1 -1
  30. package/es/button/Button.d.ts +1 -1
  31. package/es/button/types.d.ts +5 -5
  32. package/es/calendar/Calendar.d.ts +1 -1
  33. package/es/calendar/CalendarMonth.d.ts +1 -1
  34. package/es/calendar/types.d.ts +7 -7
  35. package/es/card/Card.d.ts +1 -1
  36. package/es/card/types.d.ts +1 -1
  37. package/es/cascader/Cascader.d.ts +1 -1
  38. package/es/cascader/types.d.ts +4 -4
  39. package/es/cell/Cell.d.ts +4 -4
  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-sync-prop-ref.d.ts +2 -0
  58. package/es/composables/use-sync-prop-ref.mjs +18 -0
  59. package/es/composables/use-touch.d.ts +1 -1
  60. package/es/config-provider/ConfigProvider.d.ts +4 -4
  61. package/es/config-provider/types.d.ts +1 -1
  62. package/es/contact-card/ContactCard.d.ts +2 -2
  63. package/es/contact-card/types.d.ts +1 -1
  64. package/es/contact-edit/ContactEdit.d.ts +2 -2
  65. package/es/contact-edit/types.d.ts +1 -1
  66. package/es/contact-list/ContactList.d.ts +2 -2
  67. package/es/contact-list/types.d.ts +1 -1
  68. package/es/count-down/CountDown.d.ts +1 -1
  69. package/es/count-down/types.d.ts +4 -4
  70. package/es/coupon/Coupon.d.ts +1 -1
  71. package/es/coupon/types.d.ts +1 -1
  72. package/es/coupon-cell/CouponCell.d.ts +1 -1
  73. package/es/coupon-cell/types.d.ts +1 -1
  74. package/es/coupon-list/CouponList.d.ts +1 -1
  75. package/es/coupon-list/types.d.ts +1 -1
  76. package/es/date-picker/DatePicker.d.ts +3 -3
  77. package/es/date-picker/DatePicker.mjs +4 -1
  78. package/es/date-picker/index.d.ts +1 -1
  79. package/es/date-picker/utils.d.ts +2 -2
  80. package/es/dialog/Dialog.d.ts +2 -2
  81. package/es/dialog/index.d.ts +1 -1
  82. package/es/dialog/types.d.ts +6 -6
  83. package/es/divider/Divider.d.ts +2 -2
  84. package/es/divider/types.d.ts +1 -1
  85. package/es/dropdown-item/DropdownItem.d.ts +3 -3
  86. package/es/dropdown-item/DropdownItem.mjs +6 -4
  87. package/es/dropdown-item/index.d.ts +2 -2
  88. package/es/dropdown-item/types.d.ts +4 -4
  89. package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
  90. package/es/dropdown-menu/types.d.ts +3 -3
  91. package/es/empty/Empty.d.ts +1 -1
  92. package/es/empty/types.d.ts +1 -1
  93. package/es/field/Field.d.ts +2 -2
  94. package/es/field/index.d.ts +1 -1
  95. package/es/field/types.d.ts +16 -16
  96. package/es/form/Form.d.ts +1 -1
  97. package/es/form/types.d.ts +3 -3
  98. package/es/grid/Grid.d.ts +3 -3
  99. package/es/grid-item/GridItem.d.ts +1 -1
  100. package/es/grid-item/types.d.ts +1 -1
  101. package/es/icon/Icon.d.ts +1 -1
  102. package/es/image/Image.d.ts +3 -3
  103. package/es/image/types.d.ts +1 -1
  104. package/es/image-preview/ImagePreview.d.ts +3 -2
  105. package/es/image-preview/ImagePreview.mjs +6 -3
  106. package/es/image-preview/ImagePreviewItem.d.ts +2 -1
  107. package/es/image-preview/ImagePreviewItem.mjs +15 -11
  108. package/es/image-preview/index.d.ts +2 -1
  109. package/es/image-preview/types.d.ts +5 -5
  110. package/es/index-anchor/IndexAnchor.d.ts +1 -1
  111. package/es/index-anchor/types.d.ts +1 -1
  112. package/es/index-bar/IndexBar.d.ts +1 -1
  113. package/es/index-bar/types.d.ts +4 -4
  114. package/es/index.d.ts +2 -1
  115. package/es/index.mjs +4 -1
  116. package/es/lazyload/vue-lazyload/lazy-image.mjs +5 -5
  117. package/es/lazyload/vue-lazyload/util.d.ts +25 -0
  118. package/es/list/List.d.ts +1 -1
  119. package/es/list/List.mjs +1 -1
  120. package/es/list/types.d.ts +4 -4
  121. package/es/loading/Loading.d.ts +2 -2
  122. package/es/loading/types.d.ts +1 -1
  123. package/es/locale/index.d.ts +1 -1
  124. package/es/nav-bar/NavBar.d.ts +1 -1
  125. package/es/nav-bar/types.d.ts +1 -1
  126. package/es/notice-bar/NoticeBar.d.ts +1 -1
  127. package/es/notice-bar/types.d.ts +4 -4
  128. package/es/notify/Notify.d.ts +1 -1
  129. package/es/notify/types.d.ts +5 -5
  130. package/es/number-keyboard/NumberKeyboard.d.ts +2 -2
  131. package/es/number-keyboard/NumberKeyboard.mjs +6 -4
  132. package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  133. package/es/number-keyboard/types.d.ts +1 -1
  134. package/es/overlay/Overlay.d.ts +1 -1
  135. package/es/overlay/types.d.ts +1 -1
  136. package/es/pagination/Pagination.d.ts +2 -2
  137. package/es/pagination/types.d.ts +1 -1
  138. package/es/password-input/PasswordInput.d.ts +1 -1
  139. package/es/password-input/types.d.ts +1 -1
  140. package/es/picker/Picker.d.ts +2 -2
  141. package/es/picker/Picker.mjs +4 -2
  142. package/es/picker/PickerColumn.mjs +5 -4
  143. package/es/picker/PickerToolbar.d.ts +1 -1
  144. package/es/picker/index.d.ts +1 -1
  145. package/es/picker/types.d.ts +11 -11
  146. package/es/picker-group/PickerGroup.d.ts +2 -2
  147. package/es/picker-group/types.d.ts +1 -1
  148. package/es/popover/Popover.d.ts +1 -1
  149. package/es/popover/Popover.mjs +13 -8
  150. package/es/popover/types.d.ts +5 -5
  151. package/es/popup/Popup.d.ts +3 -3
  152. package/es/popup/index.d.ts +2 -2
  153. package/es/popup/shared.d.ts +1 -1
  154. package/es/popup/types.d.ts +5 -5
  155. package/es/progress/Progress.d.ts +1 -1
  156. package/es/progress/types.d.ts +3 -3
  157. package/es/pull-refresh/PullRefresh.d.ts +1 -1
  158. package/es/pull-refresh/types.d.ts +1 -1
  159. package/es/radio/Radio.d.ts +3 -3
  160. package/es/radio/types.d.ts +1 -1
  161. package/es/radio-group/RadioGroup.d.ts +3 -3
  162. package/es/rate/Rate.d.ts +1 -1
  163. package/es/rate/types.d.ts +1 -1
  164. package/es/row/Row.d.ts +5 -5
  165. package/es/search/Search.d.ts +1 -1
  166. package/es/search/types.d.ts +4 -4
  167. package/es/share-sheet/ShareSheet.d.ts +4 -4
  168. package/es/share-sheet/index.d.ts +1 -1
  169. package/es/share-sheet/types.d.ts +1 -1
  170. package/es/sidebar/Sidebar.d.ts +2 -2
  171. package/es/sidebar/types.d.ts +1 -1
  172. package/es/sidebar-item/SidebarItem.d.ts +1 -1
  173. package/es/sidebar-item/types.d.ts +1 -1
  174. package/es/skeleton/Skeleton.d.ts +24 -24
  175. package/es/skeleton/Skeleton.mjs +28 -23
  176. package/es/skeleton/SkeletonAvatar.d.ts +26 -0
  177. package/es/skeleton/SkeletonAvatar.mjs +22 -0
  178. package/es/skeleton/SkeletonImage.d.ts +26 -0
  179. package/es/skeleton/SkeletonImage.mjs +26 -0
  180. package/es/skeleton/SkeletonParagraph.d.ts +27 -0
  181. package/es/skeleton/SkeletonParagraph.mjs +31 -0
  182. package/es/skeleton/SkeletonTitle.d.ts +16 -0
  183. package/es/skeleton/SkeletonTitle.mjs +26 -0
  184. package/es/skeleton/index.css +1 -1
  185. package/es/skeleton/index.d.ts +85 -18
  186. package/es/skeleton/index.mjs +22 -2
  187. package/es/skeleton/style/index.mjs +2 -0
  188. package/es/skeleton/types.d.ts +8 -4
  189. package/es/slider/Slider.d.ts +3 -3
  190. package/es/slider/types.d.ts +1 -1
  191. package/es/space/Space.d.ts +3 -3
  192. package/es/step/types.d.ts +1 -1
  193. package/es/stepper/Stepper.d.ts +3 -3
  194. package/es/stepper/Stepper.mjs +1 -2
  195. package/es/stepper/index.d.ts +1 -1
  196. package/es/stepper/types.d.ts +1 -1
  197. package/es/steps/Steps.d.ts +3 -3
  198. package/es/steps/types.d.ts +1 -1
  199. package/es/sticky/Sticky.d.ts +2 -2
  200. package/es/sticky/types.d.ts +1 -1
  201. package/es/submit-bar/SubmitBar.d.ts +2 -2
  202. package/es/submit-bar/types.d.ts +1 -1
  203. package/es/swipe/Swipe.d.ts +1 -1
  204. package/es/swipe/types.d.ts +6 -6
  205. package/es/swipe-cell/SwipeCell.d.ts +3 -3
  206. package/es/swipe-cell/index.d.ts +2 -2
  207. package/es/swipe-cell/types.d.ts +4 -4
  208. package/es/switch/Switch.d.ts +1 -1
  209. package/es/switch/types.d.ts +1 -1
  210. package/es/tab/Tab.d.ts +1 -1
  211. package/es/tabbar/Tabbar.d.ts +2 -2
  212. package/es/tabbar/types.d.ts +1 -1
  213. package/es/tabbar-item/TabbarItem.d.ts +1 -1
  214. package/es/tabbar-item/types.d.ts +1 -1
  215. package/es/tabs/Tabs.d.ts +1 -1
  216. package/es/tabs/types.d.ts +6 -6
  217. package/es/tag/Tag.d.ts +1 -1
  218. package/es/tag/types.d.ts +3 -3
  219. package/es/time-picker/TimePicker.d.ts +3 -3
  220. package/es/time-picker/TimePicker.mjs +4 -1
  221. package/es/time-picker/index.d.ts +1 -1
  222. package/es/toast/Toast.d.ts +1 -1
  223. package/es/toast/types.d.ts +6 -6
  224. package/es/tree-select/TreeSelect.d.ts +3 -3
  225. package/es/tree-select/types.d.ts +1 -1
  226. package/es/uploader/Uploader.d.ts +1 -1
  227. package/es/uploader/Uploader.mjs +4 -4
  228. package/es/uploader/types.d.ts +8 -8
  229. package/es/utils/basic.d.ts +3 -3
  230. package/es/utils/constant.d.ts +1 -0
  231. package/es/utils/constant.mjs +3 -1
  232. package/es/utils/create.d.ts +4 -4
  233. package/es/utils/deep-assign.d.ts +1 -1
  234. package/es/utils/dom.d.ts +1 -1
  235. package/es/utils/interceptor.d.ts +1 -1
  236. package/es/utils/mount-component.d.ts +1 -1
  237. package/es/utils/with-install.d.ts +2 -2
  238. package/lib/action-bar/ActionBar.d.ts +1 -1
  239. package/lib/action-bar/types.d.ts +1 -1
  240. package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
  241. package/lib/action-bar-button/types.d.ts +1 -1
  242. package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
  243. package/lib/action-bar-icon/types.d.ts +1 -1
  244. package/lib/action-sheet/ActionSheet.d.ts +3 -3
  245. package/lib/action-sheet/index.css +1 -1
  246. package/lib/action-sheet/index.d.ts +1 -1
  247. package/lib/action-sheet/types.d.ts +1 -1
  248. package/lib/address-edit/AddressEdit.d.ts +1 -1
  249. package/lib/address-edit/types.d.ts +5 -5
  250. package/lib/address-list/AddressList.d.ts +1 -1
  251. package/lib/address-list/AddressListItem.d.ts +1 -1
  252. package/lib/address-list/types.d.ts +1 -1
  253. package/lib/area/Area.d.ts +2 -2
  254. package/lib/area/index.d.ts +1 -1
  255. package/lib/area/types.d.ts +2 -2
  256. package/lib/back-top/BackTop.d.ts +66 -0
  257. package/lib/back-top/BackTop.js +118 -0
  258. package/lib/back-top/index.css +1 -0
  259. package/lib/back-top/index.d.ts +53 -0
  260. package/lib/back-top/index.js +35 -0
  261. package/lib/back-top/style/index.d.ts +1 -0
  262. package/lib/back-top/style/index.js +4 -0
  263. package/lib/back-top/types.d.ts +6 -0
  264. package/lib/back-top/types.js +15 -0
  265. package/lib/badge/Badge.d.ts +2 -2
  266. package/lib/badge/types.d.ts +1 -1
  267. package/lib/button/Button.d.ts +1 -1
  268. package/lib/button/types.d.ts +5 -5
  269. package/lib/calendar/Calendar.d.ts +1 -1
  270. package/lib/calendar/CalendarMonth.d.ts +1 -1
  271. package/lib/calendar/types.d.ts +7 -7
  272. package/lib/card/Card.d.ts +1 -1
  273. package/lib/card/types.d.ts +1 -1
  274. package/lib/cascader/Cascader.d.ts +1 -1
  275. package/lib/cascader/types.d.ts +4 -4
  276. package/lib/cell/Cell.d.ts +4 -4
  277. package/lib/cell/index.d.ts +1 -1
  278. package/lib/cell/types.d.ts +1 -1
  279. package/lib/cell-group/CellGroup.d.ts +1 -1
  280. package/lib/cell-group/types.d.ts +1 -1
  281. package/lib/checkbox/Checkbox.d.ts +1 -1
  282. package/lib/checkbox/Checker.d.ts +4 -4
  283. package/lib/checkbox/types.d.ts +5 -5
  284. package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
  285. package/lib/checkbox-group/types.d.ts +5 -5
  286. package/lib/circle/Circle.d.ts +2 -2
  287. package/lib/circle/types.d.ts +1 -1
  288. package/lib/col/Col.d.ts +1 -1
  289. package/lib/collapse/Collapse.d.ts +4 -4
  290. package/lib/collapse-item/CollapseItem.d.ts +2 -2
  291. package/lib/collapse-item/index.d.ts +1 -1
  292. package/lib/collapse-item/types.d.ts +3 -3
  293. package/lib/composables/use-route.d.ts +1 -1
  294. package/lib/composables/use-sync-prop-ref.d.ts +2 -0
  295. package/lib/composables/use-sync-prop-ref.js +37 -0
  296. package/lib/composables/use-touch.d.ts +1 -1
  297. package/lib/config-provider/ConfigProvider.d.ts +4 -4
  298. package/lib/config-provider/types.d.ts +1 -1
  299. package/lib/contact-card/ContactCard.d.ts +2 -2
  300. package/lib/contact-card/types.d.ts +1 -1
  301. package/lib/contact-edit/ContactEdit.d.ts +2 -2
  302. package/lib/contact-edit/types.d.ts +1 -1
  303. package/lib/contact-list/ContactList.d.ts +2 -2
  304. package/lib/contact-list/types.d.ts +1 -1
  305. package/lib/count-down/CountDown.d.ts +1 -1
  306. package/lib/count-down/types.d.ts +4 -4
  307. package/lib/coupon/Coupon.d.ts +1 -1
  308. package/lib/coupon/types.d.ts +1 -1
  309. package/lib/coupon-cell/CouponCell.d.ts +1 -1
  310. package/lib/coupon-cell/types.d.ts +1 -1
  311. package/lib/coupon-list/CouponList.d.ts +1 -1
  312. package/lib/coupon-list/types.d.ts +1 -1
  313. package/lib/date-picker/DatePicker.d.ts +3 -3
  314. package/lib/date-picker/DatePicker.js +4 -1
  315. package/lib/date-picker/index.d.ts +1 -1
  316. package/lib/date-picker/utils.d.ts +2 -2
  317. package/lib/dialog/Dialog.d.ts +2 -2
  318. package/lib/dialog/index.d.ts +1 -1
  319. package/lib/dialog/types.d.ts +6 -6
  320. package/lib/divider/Divider.d.ts +2 -2
  321. package/lib/divider/types.d.ts +1 -1
  322. package/lib/dropdown-item/DropdownItem.d.ts +3 -3
  323. package/lib/dropdown-item/DropdownItem.js +5 -3
  324. package/lib/dropdown-item/index.d.ts +2 -2
  325. package/lib/dropdown-item/types.d.ts +4 -4
  326. package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
  327. package/lib/dropdown-menu/types.d.ts +3 -3
  328. package/lib/empty/Empty.d.ts +1 -1
  329. package/lib/empty/types.d.ts +1 -1
  330. package/lib/field/Field.d.ts +2 -2
  331. package/lib/field/index.d.ts +1 -1
  332. package/lib/field/types.d.ts +16 -16
  333. package/lib/form/Form.d.ts +1 -1
  334. package/lib/form/types.d.ts +3 -3
  335. package/lib/grid/Grid.d.ts +3 -3
  336. package/lib/grid-item/GridItem.d.ts +1 -1
  337. package/lib/grid-item/types.d.ts +1 -1
  338. package/lib/icon/Icon.d.ts +1 -1
  339. package/lib/image/Image.d.ts +3 -3
  340. package/lib/image/types.d.ts +1 -1
  341. package/lib/image-preview/ImagePreview.d.ts +3 -2
  342. package/lib/image-preview/ImagePreview.js +6 -3
  343. package/lib/image-preview/ImagePreviewItem.d.ts +2 -1
  344. package/lib/image-preview/ImagePreviewItem.js +14 -10
  345. package/lib/image-preview/index.d.ts +2 -1
  346. package/lib/image-preview/types.d.ts +5 -5
  347. package/lib/index-anchor/IndexAnchor.d.ts +1 -1
  348. package/lib/index-anchor/types.d.ts +1 -1
  349. package/lib/index-bar/IndexBar.d.ts +1 -1
  350. package/lib/index-bar/types.d.ts +4 -4
  351. package/lib/index.css +1 -1
  352. package/lib/index.d.ts +2 -1
  353. package/lib/index.js +4 -1
  354. package/lib/lazyload/vue-lazyload/lazy-image.js +6 -6
  355. package/lib/lazyload/vue-lazyload/util.d.ts +25 -0
  356. package/lib/list/List.d.ts +1 -1
  357. package/lib/list/List.js +1 -1
  358. package/lib/list/types.d.ts +4 -4
  359. package/lib/loading/Loading.d.ts +2 -2
  360. package/lib/loading/types.d.ts +1 -1
  361. package/lib/locale/index.d.ts +1 -1
  362. package/lib/nav-bar/NavBar.d.ts +1 -1
  363. package/lib/nav-bar/types.d.ts +1 -1
  364. package/lib/notice-bar/NoticeBar.d.ts +1 -1
  365. package/lib/notice-bar/types.d.ts +4 -4
  366. package/lib/notify/Notify.d.ts +1 -1
  367. package/lib/notify/types.d.ts +5 -5
  368. package/lib/number-keyboard/NumberKeyboard.d.ts +2 -2
  369. package/lib/number-keyboard/NumberKeyboard.js +5 -3
  370. package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  371. package/lib/number-keyboard/types.d.ts +1 -1
  372. package/lib/overlay/Overlay.d.ts +1 -1
  373. package/lib/overlay/types.d.ts +1 -1
  374. package/lib/pagination/Pagination.d.ts +2 -2
  375. package/lib/pagination/types.d.ts +1 -1
  376. package/lib/password-input/PasswordInput.d.ts +1 -1
  377. package/lib/password-input/types.d.ts +1 -1
  378. package/lib/picker/Picker.d.ts +2 -2
  379. package/lib/picker/Picker.js +3 -1
  380. package/lib/picker/PickerColumn.js +5 -4
  381. package/lib/picker/PickerToolbar.d.ts +1 -1
  382. package/lib/picker/index.d.ts +1 -1
  383. package/lib/picker/types.d.ts +11 -11
  384. package/lib/picker-group/PickerGroup.d.ts +2 -2
  385. package/lib/picker-group/types.d.ts +1 -1
  386. package/lib/popover/Popover.d.ts +1 -1
  387. package/lib/popover/Popover.js +13 -8
  388. package/lib/popover/types.d.ts +5 -5
  389. package/lib/popup/Popup.d.ts +3 -3
  390. package/lib/popup/index.d.ts +2 -2
  391. package/lib/popup/shared.d.ts +1 -1
  392. package/lib/popup/types.d.ts +5 -5
  393. package/lib/progress/Progress.d.ts +1 -1
  394. package/lib/progress/types.d.ts +3 -3
  395. package/lib/pull-refresh/PullRefresh.d.ts +1 -1
  396. package/lib/pull-refresh/types.d.ts +1 -1
  397. package/lib/radio/Radio.d.ts +3 -3
  398. package/lib/radio/types.d.ts +1 -1
  399. package/lib/radio-group/RadioGroup.d.ts +3 -3
  400. package/lib/rate/Rate.d.ts +1 -1
  401. package/lib/rate/types.d.ts +1 -1
  402. package/lib/row/Row.d.ts +5 -5
  403. package/lib/search/Search.d.ts +1 -1
  404. package/lib/search/types.d.ts +4 -4
  405. package/lib/share-sheet/ShareSheet.d.ts +4 -4
  406. package/lib/share-sheet/index.d.ts +1 -1
  407. package/lib/share-sheet/types.d.ts +1 -1
  408. package/lib/sidebar/Sidebar.d.ts +2 -2
  409. package/lib/sidebar/types.d.ts +1 -1
  410. package/lib/sidebar-item/SidebarItem.d.ts +1 -1
  411. package/lib/sidebar-item/types.d.ts +1 -1
  412. package/lib/skeleton/Skeleton.d.ts +24 -24
  413. package/lib/skeleton/Skeleton.js +34 -23
  414. package/lib/skeleton/SkeletonAvatar.d.ts +26 -0
  415. package/lib/skeleton/SkeletonAvatar.js +41 -0
  416. package/lib/skeleton/SkeletonImage.d.ts +26 -0
  417. package/lib/skeleton/SkeletonImage.js +45 -0
  418. package/lib/skeleton/SkeletonParagraph.d.ts +27 -0
  419. package/lib/skeleton/SkeletonParagraph.js +50 -0
  420. package/lib/skeleton/SkeletonTitle.d.ts +16 -0
  421. package/lib/skeleton/SkeletonTitle.js +45 -0
  422. package/lib/skeleton/index.css +1 -1
  423. package/lib/skeleton/index.d.ts +85 -18
  424. package/lib/skeleton/index.js +22 -2
  425. package/lib/skeleton/style/index.js +2 -0
  426. package/lib/skeleton/types.d.ts +8 -4
  427. package/lib/slider/Slider.d.ts +3 -3
  428. package/lib/slider/types.d.ts +1 -1
  429. package/lib/space/Space.d.ts +3 -3
  430. package/lib/step/types.d.ts +1 -1
  431. package/lib/stepper/Stepper.d.ts +3 -3
  432. package/lib/stepper/Stepper.js +1 -2
  433. package/lib/stepper/index.d.ts +1 -1
  434. package/lib/stepper/types.d.ts +1 -1
  435. package/lib/steps/Steps.d.ts +3 -3
  436. package/lib/steps/types.d.ts +1 -1
  437. package/lib/sticky/Sticky.d.ts +2 -2
  438. package/lib/sticky/types.d.ts +1 -1
  439. package/lib/submit-bar/SubmitBar.d.ts +2 -2
  440. package/lib/submit-bar/types.d.ts +1 -1
  441. package/lib/swipe/Swipe.d.ts +1 -1
  442. package/lib/swipe/types.d.ts +6 -6
  443. package/lib/swipe-cell/SwipeCell.d.ts +3 -3
  444. package/lib/swipe-cell/index.d.ts +2 -2
  445. package/lib/swipe-cell/types.d.ts +4 -4
  446. package/lib/switch/Switch.d.ts +1 -1
  447. package/lib/switch/types.d.ts +1 -1
  448. package/lib/tab/Tab.d.ts +1 -1
  449. package/lib/tabbar/Tabbar.d.ts +2 -2
  450. package/lib/tabbar/types.d.ts +1 -1
  451. package/lib/tabbar-item/TabbarItem.d.ts +1 -1
  452. package/lib/tabbar-item/types.d.ts +1 -1
  453. package/lib/tabs/Tabs.d.ts +1 -1
  454. package/lib/tabs/types.d.ts +6 -6
  455. package/lib/tag/Tag.d.ts +1 -1
  456. package/lib/tag/types.d.ts +3 -3
  457. package/lib/time-picker/TimePicker.d.ts +3 -3
  458. package/lib/time-picker/TimePicker.js +4 -1
  459. package/lib/time-picker/index.d.ts +1 -1
  460. package/lib/toast/Toast.d.ts +1 -1
  461. package/lib/toast/types.d.ts +6 -6
  462. package/lib/tree-select/TreeSelect.d.ts +3 -3
  463. package/lib/tree-select/types.d.ts +1 -1
  464. package/lib/uploader/Uploader.d.ts +1 -1
  465. package/lib/uploader/Uploader.js +3 -3
  466. package/lib/uploader/types.d.ts +8 -8
  467. package/lib/utils/basic.d.ts +3 -3
  468. package/lib/utils/constant.d.ts +1 -0
  469. package/lib/utils/constant.js +3 -1
  470. package/lib/utils/create.d.ts +4 -4
  471. package/lib/utils/deep-assign.d.ts +1 -1
  472. package/lib/utils/dom.d.ts +1 -1
  473. package/lib/utils/interceptor.d.ts +1 -1
  474. package/lib/utils/mount-component.d.ts +1 -1
  475. package/lib/utils/with-install.d.ts +2 -2
  476. package/lib/vant.cjs.js +1182 -963
  477. package/lib/vant.es.js +1183 -964
  478. package/lib/vant.js +1176 -963
  479. package/lib/vant.min.js +1 -1
  480. package/lib/web-types.json +1 -12164
  481. package/package.json +2 -2
package/es/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./action-sheet";
5
5
  export * from "./address-edit";
6
6
  export * from "./address-list";
7
7
  export * from "./area";
8
+ export * from "./back-top";
8
9
  export * from "./badge";
9
10
  export * from "./button";
10
11
  export * from "./calendar";
@@ -93,4 +94,4 @@ declare namespace _default {
93
94
  }
94
95
  export default _default;
95
96
  export function install(app: any): void;
96
- export const version: "4.0.0-rc.6";
97
+ export const version: "4.0.0-rc.8";
package/es/index.mjs CHANGED
@@ -5,6 +5,7 @@ import { ActionSheet } from "./action-sheet/index.mjs";
5
5
  import { AddressEdit } from "./address-edit/index.mjs";
6
6
  import { AddressList } from "./address-list/index.mjs";
7
7
  import { Area } from "./area/index.mjs";
8
+ import { BackTop } from "./back-top/index.mjs";
8
9
  import { Badge } from "./badge/index.mjs";
9
10
  import { Button } from "./button/index.mjs";
10
11
  import { Calendar } from "./calendar/index.mjs";
@@ -86,7 +87,7 @@ import { TimePicker } from "./time-picker/index.mjs";
86
87
  import { Toast } from "./toast/index.mjs";
87
88
  import { TreeSelect } from "./tree-select/index.mjs";
88
89
  import { Uploader } from "./uploader/index.mjs";
89
- const version = "4.0.0-rc.6";
90
+ const version = "4.0.0-rc.8";
90
91
  function install(app) {
91
92
  const components = [
92
93
  ActionBar,
@@ -96,6 +97,7 @@ function install(app) {
96
97
  AddressEdit,
97
98
  AddressList,
98
99
  Area,
100
+ BackTop,
99
101
  Badge,
100
102
  Button,
101
103
  Calendar,
@@ -193,6 +195,7 @@ export * from "./action-sheet/index.mjs";
193
195
  export * from "./address-edit/index.mjs";
194
196
  export * from "./address-list/index.mjs";
195
197
  export * from "./area/index.mjs";
198
+ export * from "./back-top/index.mjs";
196
199
  export * from "./badge/index.mjs";
197
200
  export * from "./button/index.mjs";
198
201
  export * from "./calendar/index.mjs";
@@ -1,6 +1,7 @@
1
1
  import { useRect } from "@vant/use";
2
2
  import { loadImageAsync } from "./util.mjs";
3
3
  import { noop } from "../../utils/index.mjs";
4
+ import { h } from "vue";
4
5
  var stdin_default = (lazyManager) => ({
5
6
  props: {
6
7
  src: [String, Object],
@@ -9,15 +10,14 @@ var stdin_default = (lazyManager) => ({
9
10
  default: "img"
10
11
  }
11
12
  },
12
- render(h) {
13
+ render() {
14
+ var _a, _b;
13
15
  return h(
14
16
  this.tag,
15
17
  {
16
- attrs: {
17
- src: this.renderSrc
18
- }
18
+ src: this.renderSrc
19
19
  },
20
- this.$slots.default
20
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
21
21
  );
22
22
  },
23
23
  data() {
@@ -0,0 +1,25 @@
1
+ export function remove(arr: any, item: any): any;
2
+ export function getBestSelectionFromSrcset(el: any, scale: any): string | undefined;
3
+ export function supportWebp(): boolean;
4
+ export function throttle(action: any, delay: any): (...args: any[]) => void;
5
+ export function on(el: any, type: any, func: any): void;
6
+ export function off(el: any, type: any, func: any): void;
7
+ export const hasIntersectionObserver: boolean;
8
+ export namespace modeType {
9
+ const event: string;
10
+ const observer: string;
11
+ }
12
+ export function getDPR(scale?: number): number;
13
+ export function loadImageAsync(item: any, resolve: any, reject: any): any;
14
+ export class ImageCache {
15
+ constructor({ max }: {
16
+ max: any;
17
+ });
18
+ options: {
19
+ max: any;
20
+ };
21
+ caches: any[];
22
+ has(key: any): boolean;
23
+ add(key: any): void;
24
+ free(): void;
25
+ }
package/es/list/List.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare const listProps: {
20
20
  default: true;
21
21
  };
22
22
  };
23
- export declare type ListProps = ExtractPropTypes<typeof listProps>;
23
+ export type ListProps = ExtractPropTypes<typeof listProps>;
24
24
  declare const _default: import("vue").DefineComponent<{
25
25
  error: BooleanConstructor;
26
26
  offset: {
package/es/list/List.mjs CHANGED
@@ -25,7 +25,7 @@ var stdin_default = defineComponent({
25
25
  emit,
26
26
  slots
27
27
  }) {
28
- const loading = ref(false);
28
+ const loading = ref(props.loading);
29
29
  const root = ref();
30
30
  const placeholder = ref();
31
31
  const tabStatus = useTabStatus();
@@ -1,11 +1,11 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { ListProps } from './List';
3
- export declare type ListDirection = 'up' | 'down';
4
- export declare type ListExpose = {
3
+ export type ListDirection = 'up' | 'down';
4
+ export type ListExpose = {
5
5
  check: () => void;
6
6
  };
7
- export declare type ListInstance = ComponentPublicInstance<ListProps, ListExpose>;
8
- export declare type ListThemeVars = {
7
+ export type ListInstance = ComponentPublicInstance<ListProps, ListExpose>;
8
+ export type ListThemeVars = {
9
9
  listTextColor?: string;
10
10
  listTextFontSize?: string;
11
11
  listTextLineHeight?: number | string;
@@ -1,5 +1,5 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
- export declare type LoadingType = 'circular' | 'spinner';
2
+ export type LoadingType = 'circular' | 'spinner';
3
3
  export declare const loadingProps: {
4
4
  size: (NumberConstructor | StringConstructor)[];
5
5
  type: {
@@ -11,7 +11,7 @@ export declare const loadingProps: {
11
11
  textSize: (NumberConstructor | StringConstructor)[];
12
12
  textColor: StringConstructor;
13
13
  };
14
- export declare type LoadingProps = ExtractPropTypes<typeof loadingProps>;
14
+ export type LoadingProps = ExtractPropTypes<typeof loadingProps>;
15
15
  declare const _default: import("vue").DefineComponent<{
16
16
  size: (NumberConstructor | StringConstructor)[];
17
17
  type: {
@@ -1,4 +1,4 @@
1
- export declare type LoadingThemeVars = {
1
+ export type LoadingThemeVars = {
2
2
  loadingTextColor?: string;
3
3
  loadingTextFontSize?: string;
4
4
  loadingSpinnerColor?: string;
@@ -1,4 +1,4 @@
1
- declare type Message = Record<string, any>;
1
+ type Message = Record<string, any>;
2
2
  export declare const Locale: {
3
3
  messages(): Message;
4
4
  use(newLang: string, newMessages?: Message): void;
@@ -17,7 +17,7 @@ export declare const navBarProps: {
17
17
  default: true;
18
18
  };
19
19
  };
20
- export declare type NavBarProps = ExtractPropTypes<typeof navBarProps>;
20
+ export type NavBarProps = ExtractPropTypes<typeof navBarProps>;
21
21
  declare const _default: import("vue").DefineComponent<{
22
22
  title: StringConstructor;
23
23
  fixed: BooleanConstructor;
@@ -1,4 +1,4 @@
1
- export declare type NavBarThemeVars = {
1
+ export type NavBarThemeVars = {
2
2
  navBarHeight?: string;
3
3
  navBarBackground?: string;
4
4
  navBarArrowSize?: string;
@@ -20,7 +20,7 @@ export declare const noticeBarProps: {
20
20
  default: null;
21
21
  };
22
22
  };
23
- export declare type NoticeBarProps = ExtractPropTypes<typeof noticeBarProps>;
23
+ export type NoticeBarProps = ExtractPropTypes<typeof noticeBarProps>;
24
24
  declare const _default: import("vue").DefineComponent<{
25
25
  text: StringConstructor;
26
26
  mode: PropType<NoticeBarMode>;
@@ -1,11 +1,11 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { NoticeBarProps } from './NoticeBar';
3
- export declare type NoticeBarMode = 'closeable' | 'link';
4
- export declare type NoticeBarExpose = {
3
+ export type NoticeBarMode = 'closeable' | 'link';
4
+ export type NoticeBarExpose = {
5
5
  reset: () => void;
6
6
  };
7
- export declare type NoticeBarInstance = ComponentPublicInstance<NoticeBarProps, NoticeBarExpose>;
8
- export declare type NoticeBarThemeVars = {
7
+ export type NoticeBarInstance = ComponentPublicInstance<NoticeBarProps, NoticeBarExpose>;
8
+ export type NoticeBarThemeVars = {
9
9
  noticeBarHeight?: string;
10
10
  noticeBarPadding?: string;
11
11
  noticeBarWrapablePadding?: string;
@@ -40,7 +40,7 @@ export declare const notifyProps: {
40
40
  background: StringConstructor;
41
41
  lockScroll: BooleanConstructor;
42
42
  };
43
- export declare type NotifyProps = ExtractPropTypes<typeof notifyProps>;
43
+ export type NotifyProps = ExtractPropTypes<typeof notifyProps>;
44
44
  declare const _default: import("vue").DefineComponent<{
45
45
  show: BooleanConstructor;
46
46
  zIndex: (NumberConstructor | StringConstructor)[];
@@ -1,8 +1,8 @@
1
1
  import type { Numeric } from '../utils';
2
- export declare type NotifyMessage = Numeric;
3
- export declare type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
4
- export declare type NotifyPosition = 'top' | 'bottom';
5
- export declare type NotifyOptions = {
2
+ export type NotifyMessage = Numeric;
3
+ export type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
4
+ export type NotifyPosition = 'top' | 'bottom';
5
+ export type NotifyOptions = {
6
6
  type?: NotifyType;
7
7
  color?: string;
8
8
  message?: NotifyMessage;
@@ -15,7 +15,7 @@ export declare type NotifyOptions = {
15
15
  onClose?: () => void;
16
16
  onOpened?: () => void;
17
17
  };
18
- export declare type NotifyThemeVars = {
18
+ export type NotifyThemeVars = {
19
19
  notifyTextColor?: string;
20
20
  notifyPadding?: string;
21
21
  notifyFontSize?: string;
@@ -1,5 +1,5 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
- export declare type NumberKeyboardTheme = 'default' | 'custom';
2
+ export type NumberKeyboardTheme = 'default' | 'custom';
3
3
  export declare const numberKeyboardProps: {
4
4
  show: BooleanConstructor;
5
5
  title: StringConstructor;
@@ -46,7 +46,7 @@ export declare const numberKeyboardProps: {
46
46
  default: string;
47
47
  };
48
48
  };
49
- export declare type NumberKeyboardProps = ExtractPropTypes<typeof numberKeyboardProps>;
49
+ export type NumberKeyboardProps = ExtractPropTypes<typeof numberKeyboardProps>;
50
50
  declare const _default: import("vue").DefineComponent<{
51
51
  show: BooleanConstructor;
52
52
  title: StringConstructor;
@@ -1,4 +1,4 @@
1
- import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
1
+ import { withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from "vue";
2
2
  import { ref, watch, computed, Teleport, Transition, defineComponent } from "vue";
3
3
  import { truthProp, numericProp, getZIndexStyle, makeStringProp, makeNumericProp, stopPropagation, createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
4
4
  import { useClickAway } from "@vant/use";
@@ -37,11 +37,13 @@ function shuffle(array) {
37
37
  }
38
38
  var stdin_default = defineComponent({
39
39
  name,
40
+ inheritAttrs: false,
40
41
  props: numberKeyboardProps,
41
42
  emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
42
43
  setup(props, {
43
44
  emit,
44
- slots
45
+ slots,
46
+ attrs
45
47
  }) {
46
48
  const root = ref();
47
49
  const genBasicKeys = () => {
@@ -197,7 +199,7 @@ var stdin_default = defineComponent({
197
199
  const Content = _createVNode(Transition, {
198
200
  "name": props.transition ? "van-slide-up" : ""
199
201
  }, {
200
- default: () => [_withDirectives(_createVNode("div", {
202
+ default: () => [_withDirectives(_createVNode("div", _mergeProps({
201
203
  "ref": root,
202
204
  "style": getZIndexStyle(props.zIndex),
203
205
  "class": bem({
@@ -206,7 +208,7 @@ var stdin_default = defineComponent({
206
208
  }),
207
209
  "onAnimationend": onAnimationEnd,
208
210
  "onTouchstartPassive": stopPropagation
209
- }, [Title, _createVNode("div", {
211
+ }, attrs), [Title, _createVNode("div", {
210
212
  "class": bem("body")
211
213
  }, [_createVNode("div", {
212
214
  "class": bem("keys")
@@ -1,5 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
- export declare type KeyType = '' | 'delete' | 'extra' | 'close';
2
+ export type KeyType = '' | 'delete' | 'extra' | 'close';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  type: PropType<KeyType>;
5
5
  text: (NumberConstructor | StringConstructor)[];
@@ -1,4 +1,4 @@
1
- export declare type NumberKeyboardThemeVars = {
1
+ export type NumberKeyboardThemeVars = {
2
2
  numberKeyboardBackground?: string;
3
3
  numberKeyboardKeyHeight?: string;
4
4
  numberKeyboardKeyFontSize?: string;
@@ -14,7 +14,7 @@ export declare const overlayProps: {
14
14
  };
15
15
  customStyle: PropType<CSSProperties>;
16
16
  };
17
- export declare type OverlayProps = ExtractPropTypes<typeof overlayProps>;
17
+ export type OverlayProps = ExtractPropTypes<typeof overlayProps>;
18
18
  declare const _default: import("vue").DefineComponent<{
19
19
  show: BooleanConstructor;
20
20
  zIndex: (NumberConstructor | StringConstructor)[];
@@ -1,4 +1,4 @@
1
- export declare type OverlayThemeVars = {
1
+ export type OverlayThemeVars = {
2
2
  overlayZIndex?: number | string;
3
3
  overlayBackground?: string;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
- export declare type PaginationMode = 'simple' | 'multi';
2
+ export type PaginationMode = 'simple' | 'multi';
3
3
  export declare const paginationProps: {
4
4
  mode: {
5
5
  type: import("vue").PropType<PaginationMode>;
@@ -29,7 +29,7 @@ export declare const paginationProps: {
29
29
  };
30
30
  forceEllipses: BooleanConstructor;
31
31
  };
32
- export declare type PaginationProps = ExtractPropTypes<typeof paginationProps>;
32
+ export type PaginationProps = ExtractPropTypes<typeof paginationProps>;
33
33
  declare const _default: import("vue").DefineComponent<{
34
34
  mode: {
35
35
  type: import("vue").PropType<PaginationMode>;
@@ -1,4 +1,4 @@
1
- export declare type PaginationThemeVars = {
1
+ export type PaginationThemeVars = {
2
2
  paginationHeight?: string;
3
3
  paginationFontSize?: string;
4
4
  paginationItemWidth?: string;
@@ -17,7 +17,7 @@ export declare const passwordInputProps: {
17
17
  focused: BooleanConstructor;
18
18
  errorInfo: StringConstructor;
19
19
  };
20
- export declare type PasswordInputProps = ExtractPropTypes<typeof passwordInputProps>;
20
+ export type PasswordInputProps = ExtractPropTypes<typeof passwordInputProps>;
21
21
  declare const _default: import("vue").DefineComponent<{
22
22
  info: StringConstructor;
23
23
  mask: {
@@ -1,4 +1,4 @@
1
- export declare type PasswordInputThemeVars = {
1
+ export type PasswordInputThemeVars = {
2
2
  passwordInputHeight?: string;
3
3
  passwordInputMargin?: string;
4
4
  passwordInputFontSize?: string;
@@ -65,7 +65,7 @@ export declare const pickerProps: {
65
65
  };
66
66
  columnsFieldNames: PropType<PickerFieldNames>;
67
67
  };
68
- export declare type PickerProps = ExtractPropTypes<typeof pickerProps>;
68
+ export type PickerProps = ExtractPropTypes<typeof pickerProps>;
69
69
  declare const _default: import("vue").DefineComponent<{
70
70
  loading: BooleanConstructor;
71
71
  readonly: BooleanConstructor;
@@ -104,7 +104,7 @@ declare const _default: import("vue").DefineComponent<{
104
104
  default: PickerToolbarPosition;
105
105
  };
106
106
  columnsFieldNames: PropType<PickerFieldNames>;
107
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "clickOption" | "confirm")[], "update:modelValue" | "change" | "cancel" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
107
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
108
108
  loading: BooleanConstructor;
109
109
  readonly: BooleanConstructor;
110
110
  allowHtml: BooleanConstructor;
@@ -1,5 +1,5 @@
1
1
  import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
- import { ref, watch, computed, defineComponent } from "vue";
2
+ import { ref, watch, computed, nextTick, defineComponent } from "vue";
3
3
  import { pick, extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp, BORDER_UNSET_TOP_BOTTOM } from "../utils/index.mjs";
4
4
  import { bem, name, isOptionExist, getColumnsType, findOptionByValue, assignDefaultFields, formatCascadeColumns, getFirstEnabledOption } from "./utils.mjs";
5
5
  import { useChildren, useEventListener, useParent } from "@vant/use";
@@ -91,7 +91,9 @@ var stdin_default = defineComponent({
91
91
  const confirm = () => {
92
92
  children.forEach((child) => child.stopMomentum());
93
93
  const params = getEventParams();
94
- emit("confirm", params);
94
+ nextTick(() => {
95
+ emit("confirm", params);
96
+ });
95
97
  return params;
96
98
  };
97
99
  const cancel = () => emit("cancel", getEventParams());
@@ -55,8 +55,9 @@ var stdin_default = defineComponent({
55
55
  }
56
56
  currentOffset.value = offset;
57
57
  };
58
+ const isReadonly = () => props.readonly || !props.options.length;
58
59
  const onClickOption = (index) => {
59
- if (moving || props.readonly) {
60
+ if (moving || isReadonly()) {
60
61
  return;
61
62
  }
62
63
  transitionEndTrigger = null;
@@ -81,7 +82,7 @@ var stdin_default = defineComponent({
81
82
  }
82
83
  };
83
84
  const onTouchStart = (event) => {
84
- if (props.readonly) {
85
+ if (isReadonly()) {
85
86
  return;
86
87
  }
87
88
  touch.start(event);
@@ -96,7 +97,7 @@ var stdin_default = defineComponent({
96
97
  transitionEndTrigger = null;
97
98
  };
98
99
  const onTouchMove = (event) => {
99
- if (props.readonly) {
100
+ if (isReadonly()) {
100
101
  return;
101
102
  }
102
103
  touch.move(event);
@@ -112,7 +113,7 @@ var stdin_default = defineComponent({
112
113
  }
113
114
  };
114
115
  const onTouchEnd = () => {
115
- if (props.readonly) {
116
+ if (isReadonly()) {
116
117
  return;
117
118
  }
118
119
  const distance = currentOffset.value - momentumOffset;
@@ -4,7 +4,7 @@ export declare const pickerToolbarProps: {
4
4
  confirmButtonText: StringConstructor;
5
5
  };
6
6
  export declare const pickerToolbarSlots: string[];
7
- export declare type PickerToolbarPropKeys = Array<keyof typeof pickerToolbarProps>;
7
+ export type PickerToolbarPropKeys = Array<keyof typeof pickerToolbarProps>;
8
8
  export declare const pickerToolbarPropKeys: PickerToolbarPropKeys;
9
9
  declare const _default: import("vue").DefineComponent<{
10
10
  title: StringConstructor;
@@ -37,7 +37,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
37
37
  default: import("./types").PickerToolbarPosition;
38
38
  };
39
39
  columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
40
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "clickOption" | "confirm")[], "update:modelValue" | "change" | "cancel" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
41
  loading: BooleanConstructor;
42
42
  readonly: BooleanConstructor;
43
43
  allowHtml: BooleanConstructor;
@@ -1,13 +1,13 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { Numeric } from '../utils';
3
3
  import type { PickerProps } from './Picker';
4
- export declare type PickerToolbarPosition = 'top' | 'bottom';
5
- export declare type PickerFieldNames = {
4
+ export type PickerToolbarPosition = 'top' | 'bottom';
5
+ export type PickerFieldNames = {
6
6
  text?: string;
7
7
  value?: string;
8
8
  children?: string;
9
9
  };
10
- export declare type PickerOption = {
10
+ export type PickerOption = {
11
11
  text?: Numeric;
12
12
  value?: Numeric;
13
13
  disabled?: boolean;
@@ -15,12 +15,12 @@ export declare type PickerOption = {
15
15
  className?: unknown;
16
16
  [key: PropertyKey]: any;
17
17
  };
18
- export declare type PickerColumn = PickerOption[];
19
- export declare type PickerExpose = {
18
+ export type PickerColumn = PickerOption[];
19
+ export type PickerExpose = {
20
20
  confirm: () => void;
21
21
  getSelectedOptions: () => Array<PickerOption | undefined>;
22
22
  };
23
- export declare type PickerColumnProvide = {
23
+ export type PickerColumnProvide = {
24
24
  state: {
25
25
  index: number;
26
26
  offset: number;
@@ -33,16 +33,16 @@ export declare type PickerColumnProvide = {
33
33
  setOptions: (options: PickerOption[]) => void;
34
34
  stopMomentum: () => void;
35
35
  };
36
- export declare type PickerInstance = ComponentPublicInstance<PickerProps, PickerExpose>;
37
- export declare type PickerConfirmEventParams = {
36
+ export type PickerInstance = ComponentPublicInstance<PickerProps, PickerExpose>;
37
+ export type PickerConfirmEventParams = {
38
38
  selectedValues: Numeric[];
39
39
  selectedOptions: Array<PickerOption | undefined>;
40
40
  };
41
- export declare type PickerCancelEventParams = PickerConfirmEventParams;
42
- export declare type PickerChangeEventParams = PickerConfirmEventParams & {
41
+ export type PickerCancelEventParams = PickerConfirmEventParams;
42
+ export type PickerChangeEventParams = PickerConfirmEventParams & {
43
43
  columnIndex: number;
44
44
  };
45
- export declare type PickerThemeVars = {
45
+ export type PickerThemeVars = {
46
46
  pickerBackground?: string;
47
47
  pickerToolbarHeight?: string;
48
48
  pickerTitleFontSize?: string;
@@ -1,5 +1,5 @@
1
1
  import { type InjectionKey, type ExtractPropTypes } from 'vue';
2
- export declare type PickerGroupProvide = Record<string, string>;
2
+ export type PickerGroupProvide = Record<string, string>;
3
3
  export declare const PICKER_GROUP_KEY: InjectionKey<PickerGroupProvide>;
4
4
  export declare const pickerGroupProps: {
5
5
  tabs: {
@@ -11,7 +11,7 @@ export declare const pickerGroupProps: {
11
11
  cancelButtonText: StringConstructor;
12
12
  confirmButtonText: StringConstructor;
13
13
  };
14
- export declare type PickerGroupProps = ExtractPropTypes<typeof pickerGroupProps>;
14
+ export type PickerGroupProps = ExtractPropTypes<typeof pickerGroupProps>;
15
15
  declare const _default: import("vue").DefineComponent<{
16
16
  tabs: {
17
17
  type: import("vue").PropType<string[]>;
@@ -1,3 +1,3 @@
1
- export declare type PickerGroupThemeVars = {
1
+ export type PickerGroupThemeVars = {
2
2
  pickerGroupBackground?: string;
3
3
  };
@@ -48,7 +48,7 @@ export declare const popoverProps: {
48
48
  default: string;
49
49
  };
50
50
  };
51
- export declare type PopoverProps = ExtractPropTypes<typeof popoverProps>;
51
+ export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
52
52
  declare const _default: import("vue").DefineComponent<{
53
53
  show: BooleanConstructor;
54
54
  theme: {
@@ -3,10 +3,11 @@ import { ref, watch, nextTick, onMounted, watchEffect, onBeforeUnmount, defineCo
3
3
  import { createPopper, offsetModifier } from "@vant/popperjs";
4
4
  import { pick, extend, truthProp, numericProp, unknownProp, BORDER_BOTTOM, makeArrayProp, makeStringProp, createNamespace } from "../utils/index.mjs";
5
5
  import { useClickAway } from "@vant/use";
6
+ import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
6
7
  import { Icon } from "../icon/index.mjs";
7
8
  import { Popup } from "../popup/index.mjs";
8
9
  const [name, bem] = createNamespace("popover");
9
- const popupProps = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
10
+ const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
10
11
  const popoverProps = {
11
12
  show: Boolean,
12
13
  theme: makeStringProp("light"),
@@ -44,6 +45,7 @@ var stdin_default = defineComponent({
44
45
  const popupRef = ref();
45
46
  const wrapperRef = ref();
46
47
  const popoverRef = ref();
48
+ const show = useSyncPropRef(() => props.show, (value) => emit("update:show", value));
47
49
  const getPopoverOptions = () => ({
48
50
  placement: props.placement,
49
51
  modifiers: [{
@@ -66,7 +68,7 @@ var stdin_default = defineComponent({
66
68
  };
67
69
  const updateLocation = () => {
68
70
  nextTick(() => {
69
- if (!props.show) {
71
+ if (!show.value) {
70
72
  return;
71
73
  }
72
74
  if (!popper) {
@@ -76,10 +78,12 @@ var stdin_default = defineComponent({
76
78
  }
77
79
  });
78
80
  };
79
- const updateShow = (value) => emit("update:show", value);
81
+ const updateShow = (value) => {
82
+ show.value = value;
83
+ };
80
84
  const onClickWrapper = () => {
81
85
  if (props.trigger === "click") {
82
- updateShow(!props.show);
86
+ show.value = !show.value;
83
87
  }
84
88
  };
85
89
  const onClickAction = (action, index) => {
@@ -88,12 +92,12 @@ var stdin_default = defineComponent({
88
92
  }
89
93
  emit("select", action, index);
90
94
  if (props.closeOnClickAction) {
91
- updateShow(false);
95
+ show.value = false;
92
96
  }
93
97
  };
94
98
  const onClickAway = () => {
95
- if (props.show && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
96
- updateShow(false);
99
+ if (show.value && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
100
+ show.value = false;
97
101
  }
98
102
  };
99
103
  const renderActionContent = (action, index) => {
@@ -145,7 +149,7 @@ var stdin_default = defineComponent({
145
149
  popper = null;
146
150
  }
147
151
  });
148
- watch(() => [props.show, props.offset, props.placement], updateLocation);
152
+ watch(() => [show.value, props.offset, props.placement], updateLocation);
149
153
  useClickAway([wrapperRef, popupRef], onClickAway, {
150
154
  eventName: "touchstart"
151
155
  });
@@ -157,6 +161,7 @@ var stdin_default = defineComponent({
157
161
  "onClick": onClickWrapper
158
162
  }, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), _createVNode(Popup, _mergeProps({
159
163
  "ref": popoverRef,
164
+ "show": show.value,
160
165
  "class": bem([props.theme]),
161
166
  "position": "",
162
167
  "transition": "van-popover-zoom",