vant 3.4.5 → 3.4.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 (476) hide show
  1. package/README.md +141 -0
  2. package/changelog.generated.md +79 -0
  3. package/es/address-list/AddressListItem.d.ts +3 -2
  4. package/es/address-list/AddressListItem.js +1 -1
  5. package/es/badge/Badge.d.ts +4 -3
  6. package/es/badge/index.d.ts +2 -2
  7. package/es/calendar/Calendar.d.ts +4 -0
  8. package/es/calendar/Calendar.js +3 -1
  9. package/es/calendar/CalendarDay.js +4 -0
  10. package/es/calendar/index.css +1 -1
  11. package/es/calendar/index.d.ts +3 -0
  12. package/es/calendar/index.less +2 -0
  13. package/es/calendar/types.d.ts +2 -1
  14. package/es/calendar/var.less +1 -0
  15. package/es/cascader/types.d.ts +2 -1
  16. package/es/checkbox/Checker.d.ts +2 -1
  17. package/es/collapse/Collapse.d.ts +7 -6
  18. package/es/collapse/index.d.ts +3 -3
  19. package/es/composables/use-touch.js +1 -1
  20. package/es/config-provider/ConfigProvider.d.ts +4 -3
  21. package/es/config-provider/index.d.ts +2 -2
  22. package/es/contact-list/ContactList.d.ts +3 -2
  23. package/es/coupon/Coupon.d.ts +2 -1
  24. package/es/coupon-list/CouponList.d.ts +3 -13
  25. package/es/coupon-list/CouponList.js +9 -7
  26. package/es/coupon-list/index.css +1 -1
  27. package/es/coupon-list/index.d.ts +2 -9
  28. package/es/coupon-list/index.less +4 -16
  29. package/es/coupon-list/style/index.js +1 -0
  30. package/es/coupon-list/style/less.js +1 -0
  31. package/es/coupon-list/var.less +0 -1
  32. package/es/datetime-picker/DatePicker.js +2 -2
  33. package/es/dialog/index.css +1 -1
  34. package/es/dialog/types.d.ts +2 -2
  35. package/es/dropdown-item/types.d.ts +2 -1
  36. package/es/empty/Empty.d.ts +8 -7
  37. package/es/empty/Empty.js +2 -2
  38. package/es/empty/index.d.ts +2 -2
  39. package/es/field/Field.d.ts +4 -0
  40. package/es/field/Field.js +2 -0
  41. package/es/field/index.d.ts +2 -0
  42. package/es/form/Form.js +1 -0
  43. package/es/form/types.d.ts +1 -0
  44. package/es/icon/index.css +1 -1
  45. package/es/index-bar/IndexBar.d.ts +5 -4
  46. package/es/index-bar/IndexBar.js +25 -4
  47. package/es/index-bar/index.d.ts +3 -3
  48. package/es/index-bar/types.d.ts +2 -1
  49. package/es/index.d.ts +1 -1
  50. package/es/index.js +1 -1
  51. package/es/locale/lang/da-DK.d.ts +64 -0
  52. package/es/locale/lang/da-DK.js +66 -0
  53. package/es/locale/lang/is-IS.d.ts +64 -0
  54. package/es/locale/lang/is-IS.js +74 -0
  55. package/es/locale/lang/la-LA.d.ts +64 -0
  56. package/es/locale/lang/la-LA.js +66 -0
  57. package/es/locale/lang/sv-SE.d.ts +64 -0
  58. package/es/locale/lang/sv-SE.js +66 -0
  59. package/es/nav-bar/NavBar.d.ts +1 -1
  60. package/es/nav-bar/NavBar.js +3 -3
  61. package/es/nav-bar/index.d.ts +1 -1
  62. package/es/notify/types.d.ts +2 -1
  63. package/es/number-keyboard/NumberKeyboard.js +10 -1
  64. package/es/picker/types.d.ts +3 -2
  65. package/es/popup/Popup.d.ts +4 -0
  66. package/es/popup/Popup.js +3 -0
  67. package/es/popup/index.css +1 -1
  68. package/es/popup/index.d.ts +3 -0
  69. package/es/progress/Progress.d.ts +4 -3
  70. package/es/progress/index.d.ts +2 -2
  71. package/es/rate/Rate.js +32 -10
  72. package/es/search/Search.d.ts +3 -0
  73. package/es/search/index.d.ts +2 -0
  74. package/es/share-sheet/ShareSheet.js +25 -11
  75. package/es/share-sheet/index.css +1 -1
  76. package/es/share-sheet/index.less +45 -1
  77. package/es/skeleton/Skeleton.d.ts +5 -4
  78. package/es/skeleton/Skeleton.js +6 -4
  79. package/es/skeleton/index.d.ts +3 -3
  80. package/es/slider/index.css +1 -1
  81. package/es/style/animation.css +1 -1
  82. package/es/style/base.css +1 -1
  83. package/es/style/base.less +5 -0
  84. package/es/swipe-cell/SwipeCell.js +1 -1
  85. package/es/swipe-cell/index.css +1 -1
  86. package/es/tabbar/Tabbar.d.ts +2 -2
  87. package/es/tabs/Tabs.d.ts +1 -1
  88. package/es/tabs/Tabs.js +1 -0
  89. package/es/tabs/types.d.ts +5 -4
  90. package/es/toast/Toast.js +1 -0
  91. package/es/toast/types.d.ts +3 -2
  92. package/es/tree-select/TreeSelect.d.ts +7 -6
  93. package/es/tree-select/index.d.ts +3 -3
  94. package/es/uploader/Uploader.d.ts +4 -4
  95. package/es/uploader/Uploader.js +2 -2
  96. package/es/uploader/UploaderPreviewItem.d.ts +3 -3
  97. package/es/uploader/UploaderPreviewItem.js +9 -6
  98. package/es/uploader/index.d.ts +2 -2
  99. package/es/uploader/types.d.ts +5 -5
  100. package/es/utils/basic.d.ts +1 -0
  101. package/es/utils/format.d.ts +7 -6
  102. package/es/utils/format.js +6 -0
  103. package/es/utils/validate.d.ts +2 -1
  104. package/lib/action-bar/ActionBar.js +8 -13
  105. package/lib/action-bar/index.js +9 -16
  106. package/lib/action-bar-button/ActionBarButton.js +8 -13
  107. package/lib/action-bar-button/index.js +9 -16
  108. package/lib/action-bar-icon/ActionBarIcon.js +8 -13
  109. package/lib/action-bar-icon/index.js +9 -16
  110. package/lib/action-sheet/ActionSheet.js +8 -13
  111. package/lib/action-sheet/index.js +9 -16
  112. package/lib/address-edit/AddressEdit.js +9 -16
  113. package/lib/address-edit/AddressEditDetail.js +8 -13
  114. package/lib/address-edit/index.js +9 -16
  115. package/lib/address-edit/types.js +7 -12
  116. package/lib/address-list/AddressList.js +9 -16
  117. package/lib/address-list/AddressListItem.d.ts +3 -2
  118. package/lib/address-list/AddressListItem.js +8 -13
  119. package/lib/address-list/index.js +9 -16
  120. package/lib/area/Area.js +8 -13
  121. package/lib/area/index.js +9 -16
  122. package/lib/area/types.js +7 -12
  123. package/lib/badge/Badge.d.ts +4 -3
  124. package/lib/badge/Badge.js +8 -13
  125. package/lib/badge/index.d.ts +2 -2
  126. package/lib/badge/index.js +9 -16
  127. package/lib/button/Button.js +8 -13
  128. package/lib/button/index.js +9 -16
  129. package/lib/button/types.js +7 -12
  130. package/lib/calendar/Calendar.d.ts +4 -0
  131. package/lib/calendar/Calendar.js +12 -17
  132. package/lib/calendar/CalendarDay.js +12 -13
  133. package/lib/calendar/CalendarHeader.js +8 -13
  134. package/lib/calendar/CalendarMonth.js +9 -16
  135. package/lib/calendar/index.css +1 -1
  136. package/lib/calendar/index.d.ts +3 -0
  137. package/lib/calendar/index.js +9 -16
  138. package/lib/calendar/index.less +2 -0
  139. package/lib/calendar/types.d.ts +2 -1
  140. package/lib/calendar/types.js +7 -12
  141. package/lib/calendar/utils.js +8 -13
  142. package/lib/calendar/var.less +1 -0
  143. package/lib/card/Card.js +8 -13
  144. package/lib/card/index.js +9 -16
  145. package/lib/cascader/Cascader.js +8 -13
  146. package/lib/cascader/index.js +9 -16
  147. package/lib/cascader/types.d.ts +2 -1
  148. package/lib/cascader/types.js +7 -12
  149. package/lib/cell/Cell.js +8 -13
  150. package/lib/cell/index.js +9 -16
  151. package/lib/cell-group/CellGroup.js +8 -13
  152. package/lib/cell-group/index.js +9 -16
  153. package/lib/checkbox/Checkbox.js +9 -16
  154. package/lib/checkbox/Checker.d.ts +2 -1
  155. package/lib/checkbox/Checker.js +8 -13
  156. package/lib/checkbox/index.js +9 -16
  157. package/lib/checkbox/types.js +7 -12
  158. package/lib/checkbox-group/CheckboxGroup.js +8 -13
  159. package/lib/checkbox-group/index.js +9 -16
  160. package/lib/checkbox-group/types.js +7 -12
  161. package/lib/circle/Circle.js +8 -13
  162. package/lib/circle/index.js +9 -16
  163. package/lib/col/Col.js +8 -13
  164. package/lib/col/index.js +9 -16
  165. package/lib/collapse/Collapse.d.ts +7 -6
  166. package/lib/collapse/Collapse.js +8 -13
  167. package/lib/collapse/index.d.ts +3 -3
  168. package/lib/collapse/index.js +9 -16
  169. package/lib/collapse-item/CollapseItem.js +8 -13
  170. package/lib/collapse-item/index.js +9 -16
  171. package/lib/collapse-item/types.js +7 -12
  172. package/lib/composables/on-popup-reopen.js +8 -13
  173. package/lib/composables/use-expose.js +8 -13
  174. package/lib/composables/use-height.js +8 -13
  175. package/lib/composables/use-id.js +8 -13
  176. package/lib/composables/use-lazy-render.js +8 -13
  177. package/lib/composables/use-lock-scroll.js +8 -13
  178. package/lib/composables/use-placeholder.js +8 -13
  179. package/lib/composables/use-refs.js +8 -13
  180. package/lib/composables/use-route.js +8 -13
  181. package/lib/composables/use-tab-status.js +8 -13
  182. package/lib/composables/use-touch.js +9 -14
  183. package/lib/composables/use-visibility-change.js +8 -13
  184. package/lib/config-provider/ConfigProvider.d.ts +4 -3
  185. package/lib/config-provider/ConfigProvider.js +8 -13
  186. package/lib/config-provider/index.d.ts +2 -2
  187. package/lib/config-provider/index.js +9 -16
  188. package/lib/contact-card/ContactCard.js +8 -13
  189. package/lib/contact-card/index.js +9 -16
  190. package/lib/contact-edit/ContactEdit.js +8 -13
  191. package/lib/contact-edit/index.js +9 -16
  192. package/lib/contact-list/ContactList.d.ts +3 -2
  193. package/lib/contact-list/ContactList.js +8 -13
  194. package/lib/contact-list/index.js +9 -16
  195. package/lib/count-down/CountDown.js +8 -13
  196. package/lib/count-down/index.js +9 -16
  197. package/lib/count-down/types.js +7 -12
  198. package/lib/count-down/utils.js +8 -13
  199. package/lib/coupon/Coupon.d.ts +2 -1
  200. package/lib/coupon/Coupon.js +8 -13
  201. package/lib/coupon/index.js +9 -16
  202. package/lib/coupon/utils.js +8 -13
  203. package/lib/coupon-cell/CouponCell.js +8 -13
  204. package/lib/coupon-cell/index.js +9 -16
  205. package/lib/coupon-list/CouponList.d.ts +3 -13
  206. package/lib/coupon-list/CouponList.js +17 -20
  207. package/lib/coupon-list/index.css +1 -1
  208. package/lib/coupon-list/index.d.ts +2 -9
  209. package/lib/coupon-list/index.js +9 -16
  210. package/lib/coupon-list/index.less +4 -16
  211. package/lib/coupon-list/style/index.js +1 -0
  212. package/lib/coupon-list/style/less.js +1 -0
  213. package/lib/coupon-list/var.less +0 -1
  214. package/lib/datetime-picker/DatePicker.js +10 -15
  215. package/lib/datetime-picker/DatetimePicker.js +9 -16
  216. package/lib/datetime-picker/TimePicker.js +8 -13
  217. package/lib/datetime-picker/index.js +9 -16
  218. package/lib/datetime-picker/types.js +7 -12
  219. package/lib/datetime-picker/utils.js +8 -13
  220. package/lib/dialog/Dialog.js +8 -13
  221. package/lib/dialog/function-call.js +9 -16
  222. package/lib/dialog/index.css +1 -1
  223. package/lib/dialog/index.js +8 -13
  224. package/lib/dialog/types.d.ts +2 -2
  225. package/lib/dialog/types.js +7 -12
  226. package/lib/divider/Divider.js +8 -13
  227. package/lib/divider/index.js +9 -16
  228. package/lib/dropdown-item/DropdownItem.js +8 -13
  229. package/lib/dropdown-item/index.js +9 -16
  230. package/lib/dropdown-item/types.d.ts +2 -1
  231. package/lib/dropdown-item/types.js +7 -12
  232. package/lib/dropdown-menu/DropdownMenu.js +8 -13
  233. package/lib/dropdown-menu/index.js +9 -16
  234. package/lib/dropdown-menu/types.js +7 -12
  235. package/lib/empty/Empty.d.ts +8 -7
  236. package/lib/empty/Empty.js +9 -14
  237. package/lib/empty/Network.js +8 -13
  238. package/lib/empty/index.d.ts +2 -2
  239. package/lib/empty/index.js +9 -16
  240. package/lib/field/Field.d.ts +4 -0
  241. package/lib/field/Field.js +10 -13
  242. package/lib/field/index.d.ts +2 -0
  243. package/lib/field/index.js +9 -16
  244. package/lib/field/types.js +7 -12
  245. package/lib/field/utils.js +8 -13
  246. package/lib/form/Form.js +9 -13
  247. package/lib/form/index.js +9 -16
  248. package/lib/form/types.d.ts +1 -0
  249. package/lib/form/types.js +7 -12
  250. package/lib/grid/Grid.js +8 -13
  251. package/lib/grid/index.js +9 -16
  252. package/lib/grid-item/GridItem.js +8 -13
  253. package/lib/grid-item/index.js +9 -16
  254. package/lib/icon/Icon.js +8 -13
  255. package/lib/icon/index.css +1 -1
  256. package/lib/icon/index.js +9 -16
  257. package/lib/image/Image.js +8 -13
  258. package/lib/image/index.js +9 -16
  259. package/lib/image-preview/ImagePreview.js +9 -16
  260. package/lib/image-preview/ImagePreviewItem.js +8 -13
  261. package/lib/image-preview/function-call.js +9 -16
  262. package/lib/image-preview/index.js +8 -13
  263. package/lib/image-preview/types.js +7 -12
  264. package/lib/index-anchor/IndexAnchor.js +8 -13
  265. package/lib/index-anchor/index.js +9 -16
  266. package/lib/index-bar/IndexBar.d.ts +5 -4
  267. package/lib/index-bar/IndexBar.js +33 -17
  268. package/lib/index-bar/index.d.ts +3 -3
  269. package/lib/index-bar/index.js +9 -16
  270. package/lib/index-bar/types.d.ts +2 -1
  271. package/lib/index-bar/types.js +7 -12
  272. package/lib/index.css +1 -1
  273. package/lib/index.d.ts +1 -1
  274. package/lib/index.js +96 -100
  275. package/lib/index.less +2 -2
  276. package/lib/lazyload/index.js +8 -13
  277. package/lib/lazyload/vue-lazyload/index.js +9 -16
  278. package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
  279. package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
  280. package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
  281. package/lib/lazyload/vue-lazyload/lazy.js +9 -16
  282. package/lib/lazyload/vue-lazyload/listener.js +8 -13
  283. package/lib/lazyload/vue-lazyload/util.js +8 -13
  284. package/lib/list/List.js +8 -13
  285. package/lib/list/index.js +9 -16
  286. package/lib/list/types.js +7 -12
  287. package/lib/loading/Loading.js +8 -13
  288. package/lib/loading/index.js +9 -16
  289. package/lib/locale/index.js +9 -16
  290. package/lib/locale/lang/bn-BD.js +8 -13
  291. package/lib/locale/lang/da-DK.d.ts +64 -0
  292. package/lib/locale/lang/da-DK.js +85 -0
  293. package/lib/locale/lang/de-DE-formal.js +8 -13
  294. package/lib/locale/lang/de-DE.js +8 -13
  295. package/lib/locale/lang/en-US.js +8 -13
  296. package/lib/locale/lang/es-ES.js +8 -13
  297. package/lib/locale/lang/fr-FR.js +8 -13
  298. package/lib/locale/lang/hi-IN.js +8 -13
  299. package/lib/locale/lang/id-ID.js +8 -13
  300. package/lib/locale/lang/is-IS.d.ts +64 -0
  301. package/lib/locale/lang/is-IS.js +93 -0
  302. package/lib/locale/lang/it-IT.js +8 -13
  303. package/lib/locale/lang/ja-JP.js +8 -13
  304. package/lib/locale/lang/ko-KR.js +8 -13
  305. package/lib/locale/lang/la-LA.d.ts +64 -0
  306. package/lib/locale/lang/la-LA.js +85 -0
  307. package/lib/locale/lang/nb-NO.js +8 -13
  308. package/lib/locale/lang/pt-BR.js +8 -13
  309. package/lib/locale/lang/ro-RO.js +8 -13
  310. package/lib/locale/lang/ru-RU.js +8 -13
  311. package/lib/locale/lang/sv-SE.d.ts +64 -0
  312. package/lib/locale/lang/sv-SE.js +85 -0
  313. package/lib/locale/lang/th-TH.js +8 -13
  314. package/lib/locale/lang/tr-TR.js +8 -13
  315. package/lib/locale/lang/uk-UA.js +8 -13
  316. package/lib/locale/lang/vi-VN.js +8 -13
  317. package/lib/locale/lang/zh-CN.js +8 -13
  318. package/lib/locale/lang/zh-HK.js +8 -13
  319. package/lib/locale/lang/zh-TW.js +8 -13
  320. package/lib/nav-bar/NavBar.d.ts +1 -1
  321. package/lib/nav-bar/NavBar.js +11 -16
  322. package/lib/nav-bar/index.d.ts +1 -1
  323. package/lib/nav-bar/index.js +9 -16
  324. package/lib/notice-bar/NoticeBar.js +8 -13
  325. package/lib/notice-bar/index.js +9 -16
  326. package/lib/notice-bar/types.js +7 -12
  327. package/lib/notify/Notify.js +8 -13
  328. package/lib/notify/function-call.js +9 -16
  329. package/lib/notify/index.js +8 -13
  330. package/lib/notify/types.d.ts +2 -1
  331. package/lib/notify/types.js +7 -12
  332. package/lib/number-keyboard/NumberKeyboard.js +19 -17
  333. package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
  334. package/lib/number-keyboard/index.js +9 -16
  335. package/lib/overlay/Overlay.js +8 -13
  336. package/lib/overlay/index.js +9 -16
  337. package/lib/pagination/Pagination.js +8 -13
  338. package/lib/pagination/index.js +9 -16
  339. package/lib/password-input/PasswordInput.js +8 -13
  340. package/lib/password-input/index.js +9 -16
  341. package/lib/picker/Picker.js +9 -16
  342. package/lib/picker/PickerColumn.js +8 -13
  343. package/lib/picker/index.js +9 -16
  344. package/lib/picker/types.d.ts +3 -2
  345. package/lib/picker/types.js +7 -12
  346. package/lib/popover/Popover.js +8 -13
  347. package/lib/popover/index.js +9 -16
  348. package/lib/popover/types.js +7 -12
  349. package/lib/popup/Popup.d.ts +4 -0
  350. package/lib/popup/Popup.js +11 -13
  351. package/lib/popup/index.css +1 -1
  352. package/lib/popup/index.d.ts +3 -0
  353. package/lib/popup/index.js +9 -16
  354. package/lib/popup/shared.js +8 -13
  355. package/lib/popup/types.js +7 -12
  356. package/lib/progress/Progress.d.ts +4 -3
  357. package/lib/progress/Progress.js +8 -13
  358. package/lib/progress/index.d.ts +2 -2
  359. package/lib/progress/index.js +9 -16
  360. package/lib/progress/types.js +7 -12
  361. package/lib/pull-refresh/PullRefresh.js +8 -13
  362. package/lib/pull-refresh/index.js +9 -16
  363. package/lib/radio/Radio.js +9 -16
  364. package/lib/radio/index.js +9 -16
  365. package/lib/radio-group/RadioGroup.js +8 -13
  366. package/lib/radio-group/index.js +9 -16
  367. package/lib/rate/Rate.js +39 -22
  368. package/lib/rate/index.js +9 -16
  369. package/lib/row/Row.js +8 -13
  370. package/lib/row/index.js +9 -16
  371. package/lib/search/Search.d.ts +3 -0
  372. package/lib/search/Search.js +8 -13
  373. package/lib/search/index.d.ts +2 -0
  374. package/lib/search/index.js +9 -16
  375. package/lib/search/types.js +7 -12
  376. package/lib/share-sheet/ShareSheet.js +33 -24
  377. package/lib/share-sheet/index.css +1 -1
  378. package/lib/share-sheet/index.js +9 -16
  379. package/lib/share-sheet/index.less +45 -1
  380. package/lib/sidebar/Sidebar.js +8 -13
  381. package/lib/sidebar/index.js +9 -16
  382. package/lib/sidebar-item/SidebarItem.js +8 -13
  383. package/lib/sidebar-item/index.js +9 -16
  384. package/lib/skeleton/Skeleton.d.ts +5 -4
  385. package/lib/skeleton/Skeleton.js +13 -16
  386. package/lib/skeleton/index.d.ts +3 -3
  387. package/lib/skeleton/index.js +9 -16
  388. package/lib/slider/Slider.js +8 -13
  389. package/lib/slider/index.css +1 -1
  390. package/lib/slider/index.js +9 -16
  391. package/lib/step/Step.js +8 -13
  392. package/lib/step/index.js +9 -16
  393. package/lib/stepper/Stepper.js +8 -13
  394. package/lib/stepper/index.js +9 -16
  395. package/lib/steps/Steps.js +8 -13
  396. package/lib/steps/index.js +9 -16
  397. package/lib/sticky/Sticky.js +8 -13
  398. package/lib/sticky/index.js +9 -16
  399. package/lib/style/animation.css +1 -1
  400. package/lib/style/base.css +1 -1
  401. package/lib/style/base.less +5 -0
  402. package/lib/submit-bar/SubmitBar.js +8 -13
  403. package/lib/submit-bar/index.js +9 -16
  404. package/lib/swipe/Swipe.js +8 -13
  405. package/lib/swipe/index.js +9 -16
  406. package/lib/swipe/types.js +7 -12
  407. package/lib/swipe-cell/SwipeCell.js +9 -14
  408. package/lib/swipe-cell/index.css +1 -1
  409. package/lib/swipe-cell/index.js +9 -16
  410. package/lib/swipe-cell/types.js +7 -12
  411. package/lib/swipe-item/SwipeItem.js +8 -13
  412. package/lib/swipe-item/index.js +9 -16
  413. package/lib/switch/Switch.js +8 -13
  414. package/lib/switch/index.js +9 -16
  415. package/lib/tab/Tab.js +8 -13
  416. package/lib/tab/index.js +9 -16
  417. package/lib/tabbar/Tabbar.d.ts +2 -2
  418. package/lib/tabbar/Tabbar.js +8 -13
  419. package/lib/tabbar/index.js +9 -16
  420. package/lib/tabbar-item/TabbarItem.js +8 -13
  421. package/lib/tabbar-item/index.js +9 -16
  422. package/lib/tabs/Tabs.d.ts +1 -1
  423. package/lib/tabs/Tabs.js +10 -16
  424. package/lib/tabs/TabsContent.js +8 -13
  425. package/lib/tabs/TabsTitle.js +8 -13
  426. package/lib/tabs/index.js +9 -16
  427. package/lib/tabs/types.d.ts +5 -4
  428. package/lib/tabs/types.js +7 -12
  429. package/lib/tabs/utils.js +8 -13
  430. package/lib/tag/Tag.js +8 -13
  431. package/lib/tag/index.js +9 -16
  432. package/lib/toast/Toast.js +9 -13
  433. package/lib/toast/function-call.js +9 -16
  434. package/lib/toast/index.js +8 -13
  435. package/lib/toast/lock-click.js +8 -13
  436. package/lib/toast/types.d.ts +3 -2
  437. package/lib/toast/types.js +7 -12
  438. package/lib/tree-select/TreeSelect.d.ts +7 -6
  439. package/lib/tree-select/TreeSelect.js +8 -13
  440. package/lib/tree-select/index.d.ts +3 -3
  441. package/lib/tree-select/index.js +9 -16
  442. package/lib/uploader/Uploader.d.ts +4 -4
  443. package/lib/uploader/Uploader.js +10 -17
  444. package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
  445. package/lib/uploader/UploaderPreviewItem.js +17 -19
  446. package/lib/uploader/index.d.ts +2 -2
  447. package/lib/uploader/index.js +9 -16
  448. package/lib/uploader/types.d.ts +5 -5
  449. package/lib/uploader/types.js +7 -12
  450. package/lib/uploader/utils.js +8 -13
  451. package/lib/utils/basic.d.ts +1 -0
  452. package/lib/utils/basic.js +8 -13
  453. package/lib/utils/constant.js +8 -13
  454. package/lib/utils/create.js +9 -16
  455. package/lib/utils/deep-assign.js +8 -13
  456. package/lib/utils/deep-clone.js +8 -13
  457. package/lib/utils/dom.js +8 -13
  458. package/lib/utils/format.d.ts +7 -6
  459. package/lib/utils/format.js +14 -13
  460. package/lib/utils/index.js +17 -21
  461. package/lib/utils/interceptor.js +8 -13
  462. package/lib/utils/mount-component.js +8 -13
  463. package/lib/utils/props.js +8 -13
  464. package/lib/utils/validate.d.ts +2 -1
  465. package/lib/utils/validate.js +8 -13
  466. package/lib/utils/with-install.js +8 -13
  467. package/lib/vant.cjs.js +347 -256
  468. package/lib/vant.cjs.min.js +1 -1
  469. package/lib/vant.es.js +347 -256
  470. package/lib/vant.es.min.js +347 -256
  471. package/lib/vant.js +347 -256
  472. package/lib/vant.min.js +1 -1
  473. package/package.json +4 -4
  474. package/vetur/attributes.json +223 -279
  475. package/vetur/tags.json +53 -49
  476. package/vetur/web-types.json +1628 -753
package/lib/vant.js CHANGED
@@ -472,6 +472,12 @@
472
472
  }
473
473
  function getSizeStyle(originSize) {
474
474
  if (isDef(originSize)) {
475
+ if (Array.isArray(originSize)) {
476
+ return {
477
+ width: addUnit(originSize[0]),
478
+ height: addUnit(originSize[1])
479
+ };
480
+ }
475
481
  const size = addUnit(originSize);
476
482
  return {
477
483
  width: size,
@@ -1340,7 +1346,7 @@
1340
1346
  };
1341
1347
  const move = (event) => {
1342
1348
  const touch = event.touches[0];
1343
- deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
1349
+ deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
1344
1350
  deltaY.value = touch.clientY - startY.value;
1345
1351
  offsetX.value = Math.abs(deltaX.value);
1346
1352
  offsetY.value = Math.abs(deltaY.value);
@@ -1480,6 +1486,7 @@
1480
1486
  iconPrefix: String,
1481
1487
  closeOnPopstate: Boolean,
1482
1488
  closeIconPosition: makeStringProp("top-right"),
1489
+ safeAreaInsetTop: Boolean,
1483
1490
  safeAreaInsetBottom: Boolean
1484
1491
  });
1485
1492
  const [name$1l, bem$1h] = createNamespace("popup");
@@ -1574,6 +1581,7 @@
1574
1581
  const {
1575
1582
  round: round2,
1576
1583
  position,
1584
+ safeAreaInsetTop,
1577
1585
  safeAreaInsetBottom
1578
1586
  } = props;
1579
1587
  return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
@@ -1583,6 +1591,7 @@
1583
1591
  round: round2,
1584
1592
  [position]: position
1585
1593
  }), {
1594
+ "van-safe-area-top": safeAreaInsetTop,
1586
1595
  "van-safe-area-bottom": safeAreaInsetBottom
1587
1596
  }],
1588
1597
  "onKeydown": onKeydown
@@ -2793,6 +2802,7 @@
2793
2802
  useExpose({
2794
2803
  submit,
2795
2804
  validate,
2805
+ getValues,
2796
2806
  scrollToField,
2797
2807
  resetValidation
2798
2808
  });
@@ -2911,6 +2921,7 @@
2911
2921
  placeholder: String,
2912
2922
  autocomplete: String,
2913
2923
  errorMessage: String,
2924
+ enterkeyhint: String,
2914
2925
  clearTrigger: makeStringProp("focus"),
2915
2926
  formatTrigger: makeStringProp("onChange"),
2916
2927
  error: {
@@ -3180,6 +3191,7 @@
3180
3191
  autofocus: props.autofocus,
3181
3192
  placeholder: props.placeholder,
3182
3193
  autocomplete: props.autocomplete,
3194
+ enterkeyhint: props.enterkeyhint,
3183
3195
  "aria-labelledby": props.label ? `${id}-label` : void 0,
3184
3196
  onBlur,
3185
3197
  onFocus,
@@ -3443,6 +3455,7 @@
3443
3455
  } = props;
3444
3456
  if (isDef(message) && message !== "") {
3445
3457
  return type === "html" ? vue.createVNode("div", {
3458
+ "key": 0,
3446
3459
  "class": bem$19("text"),
3447
3460
  "innerHTML": String(message)
3448
3461
  }, null) : vue.createVNode("div", {
@@ -4591,6 +4604,7 @@
4591
4604
  slots
4592
4605
  }) {
4593
4606
  const style = vue.computed(() => {
4607
+ var _a;
4594
4608
  const {
4595
4609
  item,
4596
4610
  index,
@@ -4622,6 +4636,9 @@
4622
4636
  break;
4623
4637
  }
4624
4638
  }
4639
+ if (offset2 + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4640
+ style2.marginBottom = 0;
4641
+ }
4625
4642
  return style2;
4626
4643
  });
4627
4644
  const onClick = () => {
@@ -4966,6 +4983,7 @@
4966
4983
  showRangePrompt: truthProp,
4967
4984
  confirmDisabledText: String,
4968
4985
  closeOnClickOverlay: truthProp,
4986
+ safeAreaInsetTop: Boolean,
4969
4987
  safeAreaInsetBottom: truthProp,
4970
4988
  minDate: {
4971
4989
  type: Date,
@@ -5128,8 +5146,8 @@
5128
5146
  }
5129
5147
  raf(() => {
5130
5148
  bodyHeight = Math.floor(useRect(bodyRef).height);
5131
- scrollToCurrentDate();
5132
5149
  });
5150
+ scrollToCurrentDate();
5133
5151
  };
5134
5152
  const reset = (date = getInitialDate()) => {
5135
5153
  currentDate.value = date;
@@ -5314,6 +5332,7 @@
5314
5332
  "closeable": props.showTitle || props.showSubtitle,
5315
5333
  "teleport": props.teleport,
5316
5334
  "closeOnPopstate": props.closeOnPopstate,
5335
+ "safeAreaInsetTop": props.safeAreaInsetTop,
5317
5336
  "closeOnClickOverlay": props.closeOnClickOverlay,
5318
5337
  "onUpdate:show": updateShow
5319
5338
  }, {
@@ -6442,6 +6461,7 @@
6442
6461
  }
6443
6462
  };
6444
6463
  const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$13, vue.mergeProps({
6464
+ "key": item.id,
6445
6465
  "id": `${id}-${index}`,
6446
6466
  "ref": setTitleRefs(index),
6447
6467
  "type": props.type,
@@ -8032,14 +8052,152 @@
8032
8052
  }
8033
8053
  });
8034
8054
  const CouponCell = withInstall(stdin_default$L);
8035
- const [name$E, bem$D, t$8] = createNamespace("coupon-list");
8036
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
8055
+ const prefix = "van-empty-network-";
8056
+ const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
8057
+ "stop-color": color,
8058
+ "offset": `${offset2}%`,
8059
+ "stop-opacity": opacity
8060
+ }, null);
8061
+ const Network = vue.createVNode("svg", {
8062
+ "viewBox": "0 0 160 160"
8063
+ }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
8064
+ "id": `${prefix}1`,
8065
+ "x1": "64%",
8066
+ "y1": "100%",
8067
+ "x2": "64%"
8068
+ }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
8069
+ "id": `${prefix}2`,
8070
+ "x1": "50%",
8071
+ "x2": "50%",
8072
+ "y2": "84%"
8073
+ }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
8074
+ "id": `${prefix}3`,
8075
+ "x1": "100%",
8076
+ "x2": "100%",
8077
+ "y2": "100%"
8078
+ }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
8079
+ "id": `${prefix}4`,
8080
+ "cx": "50%",
8081
+ "cy": "0%",
8082
+ "fx": "50%",
8083
+ "fy": "0%",
8084
+ "r": "100%",
8085
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
8086
+ }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
8087
+ "fill": "none"
8088
+ }, [vue.createVNode("g", {
8089
+ "opacity": ".8"
8090
+ }, [vue.createVNode("path", {
8091
+ "d": "M36 131V53H16v20H2v58h34z",
8092
+ "fill": `url(#${prefix}1)`
8093
+ }, null), vue.createVNode("path", {
8094
+ "d": "M123 15h22v14h9v77h-31V15z",
8095
+ "fill": `url(#${prefix}1)`
8096
+ }, null)]), vue.createVNode("path", {
8097
+ "fill": `url(#${prefix}4)`,
8098
+ "d": "M0 139h160v21H0z"
8099
+ }, null), vue.createVNode("path", {
8100
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
8101
+ "fill": `url(#${prefix}2)`
8102
+ }, null), vue.createVNode("g", {
8103
+ "opacity": ".6",
8104
+ "stroke-linecap": "round",
8105
+ "stroke-width": "7"
8106
+ }, [vue.createVNode("path", {
8107
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
8108
+ "stroke": `url(#${prefix}3)`
8109
+ }, null), vue.createVNode("path", {
8110
+ "d": "M53 36a34 34 0 0 0 0 48",
8111
+ "stroke": `url(#${prefix}3)`
8112
+ }, null), vue.createVNode("path", {
8113
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
8114
+ "stroke": `url(#${prefix}3)`
8115
+ }, null), vue.createVNode("path", {
8116
+ "d": "M106 84a34 34 0 0 0 0-48",
8117
+ "stroke": `url(#${prefix}3)`
8118
+ }, null)]), vue.createVNode("g", {
8119
+ "transform": "translate(31 105)"
8120
+ }, [vue.createVNode("rect", {
8121
+ "fill": "#EBEDF0",
8122
+ "width": "98",
8123
+ "height": "34",
8124
+ "rx": "2"
8125
+ }, null), vue.createVNode("rect", {
8126
+ "fill": "#FFF",
8127
+ "x": "9",
8128
+ "y": "8",
8129
+ "width": "80",
8130
+ "height": "18",
8131
+ "rx": "1.1"
8132
+ }, null), vue.createVNode("rect", {
8133
+ "fill": "#EBEDF0",
8134
+ "x": "15",
8135
+ "y": "12",
8136
+ "width": "18",
8137
+ "height": "6",
8138
+ "rx": "1.1"
8139
+ }, null)])])]);
8140
+ const [name$E, bem$D] = createNamespace("empty");
8141
+ const PRESET_IMAGES = ["error", "search", "default"];
8142
+ const emptyProps = {
8143
+ image: makeStringProp("default"),
8144
+ imageSize: [Number, String, Array],
8145
+ description: String
8146
+ };
8147
+ var stdin_default$K = vue.defineComponent({
8148
+ name: name$E,
8149
+ props: emptyProps,
8150
+ setup(props, {
8151
+ slots
8152
+ }) {
8153
+ const renderImage = () => {
8154
+ if (slots.image) {
8155
+ return slots.image();
8156
+ }
8157
+ let {
8158
+ image
8159
+ } = props;
8160
+ if (image === "network") {
8161
+ return Network;
8162
+ }
8163
+ if (PRESET_IMAGES.includes(image)) {
8164
+ image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
8165
+ }
8166
+ return vue.createVNode("img", {
8167
+ "src": image
8168
+ }, null);
8169
+ };
8170
+ const renderDescription = () => {
8171
+ const description = slots.description ? slots.description() : props.description;
8172
+ if (description) {
8173
+ return vue.createVNode("p", {
8174
+ "class": bem$D("description")
8175
+ }, [description]);
8176
+ }
8177
+ };
8178
+ const renderBottom = () => {
8179
+ if (slots.default) {
8180
+ return vue.createVNode("div", {
8181
+ "class": bem$D("bottom")
8182
+ }, [slots.default()]);
8183
+ }
8184
+ };
8185
+ return () => vue.createVNode("div", {
8186
+ "class": bem$D()
8187
+ }, [vue.createVNode("div", {
8188
+ "class": bem$D("image"),
8189
+ "style": getSizeStyle(props.imageSize)
8190
+ }, [renderImage()]), renderDescription(), renderBottom()]);
8191
+ }
8192
+ });
8193
+ const Empty = withInstall(stdin_default$K);
8194
+ const [name$D, bem$C, t$8] = createNamespace("coupon-list");
8037
8195
  const couponListProps = {
8038
8196
  code: makeStringProp(""),
8039
8197
  coupons: makeArrayProp(),
8040
8198
  currency: makeStringProp("\xA5"),
8041
8199
  showCount: truthProp,
8042
- emptyImage: makeStringProp(EMPTY_IMAGE),
8200
+ emptyImage: String,
8043
8201
  chosenCoupon: makeNumberProp(-1),
8044
8202
  enabledTitle: String,
8045
8203
  disabledTitle: String,
@@ -8054,8 +8212,8 @@
8054
8212
  exchangeButtonLoading: Boolean,
8055
8213
  exchangeButtonDisabled: Boolean
8056
8214
  };
8057
- var stdin_default$K = vue.defineComponent({
8058
- name: name$E,
8215
+ var stdin_default$J = vue.defineComponent({
8216
+ name: name$D,
8059
8217
  props: couponListProps,
8060
8218
  emits: ["change", "exchange", "update:code"],
8061
8219
  setup(props, {
@@ -8087,28 +8245,30 @@
8087
8245
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
8088
8246
  });
8089
8247
  };
8090
- const renderEmpty = () => vue.createVNode("div", {
8091
- "class": bem$D("empty")
8092
- }, [vue.createVNode("img", {
8093
- "src": props.emptyImage
8094
- }, null), vue.createVNode("p", null, [t$8("noCoupon")])]);
8248
+ const renderEmpty = () => vue.createVNode(Empty, {
8249
+ "image": props.emptyImage
8250
+ }, {
8251
+ default: () => [vue.createVNode("p", {
8252
+ "class": bem$C("empty-tip")
8253
+ }, [t$8("noCoupon")])]
8254
+ });
8095
8255
  const renderExchangeBar = () => {
8096
8256
  if (props.showExchangeBar) {
8097
8257
  return vue.createVNode("div", {
8098
8258
  "ref": barRef,
8099
- "class": bem$D("exchange-bar")
8259
+ "class": bem$C("exchange-bar")
8100
8260
  }, [vue.createVNode(Field, {
8101
8261
  "modelValue": currentCode.value,
8102
8262
  "onUpdate:modelValue": ($event) => currentCode.value = $event,
8103
8263
  "clearable": true,
8104
8264
  "border": false,
8105
- "class": bem$D("field"),
8265
+ "class": bem$C("field"),
8106
8266
  "placeholder": props.inputPlaceholder || t$8("placeholder"),
8107
8267
  "maxlength": "20"
8108
8268
  }, null), vue.createVNode(Button, {
8109
8269
  "plain": true,
8110
8270
  "type": "danger",
8111
- "class": bem$D("exchange"),
8271
+ "class": bem$C("exchange"),
8112
8272
  "text": props.exchangeButtonText || t$8("exchange"),
8113
8273
  "loading": props.exchangeButtonLoading,
8114
8274
  "disabled": buttonDisabled.value,
@@ -8128,7 +8288,7 @@
8128
8288
  default: () => {
8129
8289
  var _a;
8130
8290
  return [vue.createVNode("div", {
8131
- "class": bem$D("list", {
8291
+ "class": bem$C("list", {
8132
8292
  "with-bottom": props.showCloseButton
8133
8293
  }),
8134
8294
  "style": {
@@ -8157,7 +8317,7 @@
8157
8317
  default: () => {
8158
8318
  var _a;
8159
8319
  return [vue.createVNode("div", {
8160
- "class": bem$D("list", {
8320
+ "class": bem$C("list", {
8161
8321
  "with-bottom": props.showCloseButton
8162
8322
  }),
8163
8323
  "style": {
@@ -8184,29 +8344,29 @@
8184
8344
  });
8185
8345
  return () => vue.createVNode("div", {
8186
8346
  "ref": root,
8187
- "class": bem$D()
8347
+ "class": bem$C()
8188
8348
  }, [renderExchangeBar(), vue.createVNode(Tabs, {
8189
8349
  "active": activeTab.value,
8190
8350
  "onUpdate:active": ($event) => activeTab.value = $event,
8191
- "class": bem$D("tab")
8351
+ "class": bem$C("tab")
8192
8352
  }, {
8193
8353
  default: () => [renderCouponTab(), renderDisabledTab()]
8194
8354
  }), vue.createVNode("div", {
8195
- "class": bem$D("bottom")
8355
+ "class": bem$C("bottom")
8196
8356
  }, [vue.withDirectives(vue.createVNode(Button, {
8197
8357
  "round": true,
8198
8358
  "block": true,
8199
8359
  "type": "danger",
8200
- "class": bem$D("close"),
8360
+ "class": bem$C("close"),
8201
8361
  "text": props.closeButtonText || t$8("close"),
8202
8362
  "onClick": () => emit("change", -1)
8203
8363
  }, null), [[vue.vShow, props.showCloseButton]])])]);
8204
8364
  }
8205
8365
  });
8206
- const CouponList = withInstall(stdin_default$K);
8207
- const [name$D] = createNamespace("time-picker");
8208
- var stdin_default$J = vue.defineComponent({
8209
- name: name$D,
8366
+ const CouponList = withInstall(stdin_default$J);
8367
+ const [name$C] = createNamespace("time-picker");
8368
+ var stdin_default$I = vue.defineComponent({
8369
+ name: name$C,
8210
8370
  props: extend({}, sharedProps, {
8211
8371
  minHour: makeNumericProp(0),
8212
8372
  maxHour: makeNumericProp(23),
@@ -8313,9 +8473,9 @@
8313
8473
  }
8314
8474
  });
8315
8475
  const currentYear = new Date().getFullYear();
8316
- const [name$C] = createNamespace("date-picker");
8317
- var stdin_default$I = vue.defineComponent({
8318
- name: name$C,
8476
+ const [name$B] = createNamespace("date-picker");
8477
+ var stdin_default$H = vue.defineComponent({
8478
+ name: name$B,
8319
8479
  props: extend({}, sharedProps, {
8320
8480
  type: makeStringProp("datetime"),
8321
8481
  modelValue: Date,
@@ -8521,6 +8681,7 @@
8521
8681
  const onChange = () => {
8522
8682
  updateInnerValue();
8523
8683
  vue.nextTick(() => {
8684
+ updateInnerValue();
8524
8685
  vue.nextTick(() => emit("change", currentDate.value));
8525
8686
  });
8526
8687
  };
@@ -8530,8 +8691,7 @@
8530
8691
  });
8531
8692
  vue.watch(columns, updateColumnValue);
8532
8693
  vue.watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8533
- vue.watch(() => [props.filter, props.maxDate], updateInnerValue);
8534
- vue.watch(() => props.minDate, () => {
8694
+ vue.watch(() => [props.filter, props.minDate, props.maxDate], () => {
8535
8695
  vue.nextTick(updateInnerValue);
8536
8696
  });
8537
8697
  vue.watch(() => props.modelValue, (value) => {
@@ -8553,14 +8713,14 @@
8553
8713
  }, pick(props, pickerInheritKeys)), slots);
8554
8714
  }
8555
8715
  });
8556
- const [name$B, bem$C] = createNamespace("datetime-picker");
8557
- const timePickerPropKeys = Object.keys(stdin_default$J.props);
8558
- const datePickerPropKeys = Object.keys(stdin_default$I.props);
8559
- const datetimePickerProps = extend({}, stdin_default$J.props, stdin_default$I.props, {
8716
+ const [name$A, bem$B] = createNamespace("datetime-picker");
8717
+ const timePickerPropKeys = Object.keys(stdin_default$I.props);
8718
+ const datePickerPropKeys = Object.keys(stdin_default$H.props);
8719
+ const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
8560
8720
  modelValue: [String, Date]
8561
8721
  });
8562
- var stdin_default$H = vue.defineComponent({
8563
- name: name$B,
8722
+ var stdin_default$G = vue.defineComponent({
8723
+ name: name$A,
8564
8724
  props: datetimePickerProps,
8565
8725
  setup(props, {
8566
8726
  attrs,
@@ -8575,17 +8735,17 @@
8575
8735
  });
8576
8736
  return () => {
8577
8737
  const isTimePicker = props.type === "time";
8578
- const Component = isTimePicker ? stdin_default$J : stdin_default$I;
8738
+ const Component = isTimePicker ? stdin_default$I : stdin_default$H;
8579
8739
  const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
8580
8740
  return vue.createVNode(Component, vue.mergeProps({
8581
8741
  "ref": root,
8582
- "class": bem$C()
8742
+ "class": bem$B()
8583
8743
  }, inheritProps, attrs), slots);
8584
8744
  };
8585
8745
  }
8586
8746
  });
8587
- const DatetimePicker = withInstall(stdin_default$H);
8588
- const [name$A, bem$B, t$7] = createNamespace("dialog");
8747
+ const DatetimePicker = withInstall(stdin_default$G);
8748
+ const [name$z, bem$A, t$7] = createNamespace("dialog");
8589
8749
  const dialogProps = extend({}, popupSharedProps, {
8590
8750
  title: String,
8591
8751
  theme: String,
@@ -8606,8 +8766,8 @@
8606
8766
  closeOnClickOverlay: Boolean
8607
8767
  });
8608
8768
  const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
8609
- var stdin_default$G = vue.defineComponent({
8610
- name: name$A,
8769
+ var stdin_default$F = vue.defineComponent({
8770
+ name: name$z,
8611
8771
  props: dialogProps,
8612
8772
  emits: ["confirm", "cancel", "keydown", "update:show"],
8613
8773
  setup(props, {
@@ -8664,7 +8824,7 @@
8664
8824
  const title = slots.title ? slots.title() : props.title;
8665
8825
  if (title) {
8666
8826
  return vue.createVNode("div", {
8667
- "class": bem$B("header", {
8827
+ "class": bem$A("header", {
8668
8828
  isolated: !props.message && !slots.default
8669
8829
  })
8670
8830
  }, [title]);
@@ -8676,7 +8836,7 @@
8676
8836
  allowHtml,
8677
8837
  messageAlign
8678
8838
  } = props;
8679
- const classNames = bem$B("message", {
8839
+ const classNames = bem$A("message", {
8680
8840
  "has-title": hasTitle,
8681
8841
  [messageAlign]: messageAlign
8682
8842
  });
@@ -8694,7 +8854,7 @@
8694
8854
  const renderContent = () => {
8695
8855
  if (slots.default) {
8696
8856
  return vue.createVNode("div", {
8697
- "class": bem$B("content")
8857
+ "class": bem$A("content")
8698
8858
  }, [slots.default()]);
8699
8859
  }
8700
8860
  const {
@@ -8706,18 +8866,18 @@
8706
8866
  const hasTitle = !!(title || slots.title);
8707
8867
  return vue.createVNode("div", {
8708
8868
  "key": allowHtml ? 1 : 0,
8709
- "class": bem$B("content", {
8869
+ "class": bem$A("content", {
8710
8870
  isolated: !hasTitle
8711
8871
  })
8712
8872
  }, [renderMessage(hasTitle)]);
8713
8873
  }
8714
8874
  };
8715
8875
  const renderButtons = () => vue.createVNode("div", {
8716
- "class": [BORDER_TOP, bem$B("footer")]
8876
+ "class": [BORDER_TOP, bem$A("footer")]
8717
8877
  }, [props.showCancelButton && vue.createVNode(Button, {
8718
8878
  "size": "large",
8719
8879
  "text": props.cancelButtonText || t$7("cancel"),
8720
- "class": bem$B("cancel"),
8880
+ "class": bem$A("cancel"),
8721
8881
  "style": {
8722
8882
  color: props.cancelButtonColor
8723
8883
  },
@@ -8726,7 +8886,7 @@
8726
8886
  }, null), props.showConfirmButton && vue.createVNode(Button, {
8727
8887
  "size": "large",
8728
8888
  "text": props.confirmButtonText || t$7("confirm"),
8729
- "class": [bem$B("confirm"), {
8889
+ "class": [bem$A("confirm"), {
8730
8890
  [BORDER_LEFT]: props.showCancelButton
8731
8891
  }],
8732
8892
  "style": {
@@ -8736,19 +8896,19 @@
8736
8896
  "onClick": onConfirm
8737
8897
  }, null)]);
8738
8898
  const renderRoundButtons = () => vue.createVNode(ActionBar, {
8739
- "class": bem$B("footer")
8899
+ "class": bem$A("footer")
8740
8900
  }, {
8741
8901
  default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
8742
8902
  "type": "warning",
8743
8903
  "text": props.cancelButtonText || t$7("cancel"),
8744
- "class": bem$B("cancel"),
8904
+ "class": bem$A("cancel"),
8745
8905
  "color": props.cancelButtonColor,
8746
8906
  "loading": loading.cancel,
8747
8907
  "onClick": onCancel
8748
8908
  }, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
8749
8909
  "type": "danger",
8750
8910
  "text": props.confirmButtonText || t$7("confirm"),
8751
- "class": bem$B("confirm"),
8911
+ "class": bem$A("confirm"),
8752
8912
  "color": props.confirmButtonColor,
8753
8913
  "loading": loading.confirm,
8754
8914
  "onClick": onConfirm
@@ -8771,7 +8931,7 @@
8771
8931
  return vue.createVNode(Popup, vue.mergeProps({
8772
8932
  "ref": root,
8773
8933
  "role": "dialog",
8774
- "class": [bem$B([theme]), className],
8934
+ "class": [bem$A([theme]), className],
8775
8935
  "style": {
8776
8936
  width: addUnit(width2)
8777
8937
  },
@@ -8793,7 +8953,7 @@
8793
8953
  state,
8794
8954
  toggle
8795
8955
  } = usePopupState();
8796
- return () => vue.createVNode(stdin_default$G, vue.mergeProps(state, {
8956
+ return () => vue.createVNode(stdin_default$F, vue.mergeProps(state, {
8797
8957
  "onUpdate:show": toggle
8798
8958
  }), null);
8799
8959
  }
@@ -8858,19 +9018,19 @@
8858
9018
  Dialog.resetDefaultOptions = () => {
8859
9019
  Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8860
9020
  };
8861
- Dialog.Component = withInstall(stdin_default$G);
9021
+ Dialog.Component = withInstall(stdin_default$F);
8862
9022
  Dialog.install = (app) => {
8863
9023
  app.use(Dialog.Component);
8864
9024
  app.config.globalProperties.$dialog = Dialog;
8865
9025
  };
8866
- const [name$z, bem$A] = createNamespace("divider");
9026
+ const [name$y, bem$z] = createNamespace("divider");
8867
9027
  const dividerProps = {
8868
9028
  dashed: Boolean,
8869
9029
  hairline: truthProp,
8870
9030
  contentPosition: makeStringProp("center")
8871
9031
  };
8872
- var stdin_default$F = vue.defineComponent({
8873
- name: name$z,
9032
+ var stdin_default$E = vue.defineComponent({
9033
+ name: name$y,
8874
9034
  props: dividerProps,
8875
9035
  setup(props, {
8876
9036
  slots
@@ -8879,7 +9039,7 @@
8879
9039
  var _a;
8880
9040
  return vue.createVNode("div", {
8881
9041
  "role": "separator",
8882
- "class": bem$A({
9042
+ "class": bem$z({
8883
9043
  dashed: props.dashed,
8884
9044
  hairline: props.hairline,
8885
9045
  [`content-${props.contentPosition}`]: !!slots.default
@@ -8888,8 +9048,8 @@
8888
9048
  };
8889
9049
  }
8890
9050
  });
8891
- const Divider = withInstall(stdin_default$F);
8892
- const [name$y, bem$z] = createNamespace("dropdown-menu");
9051
+ const Divider = withInstall(stdin_default$E);
9052
+ const [name$x, bem$y] = createNamespace("dropdown-menu");
8893
9053
  const dropdownMenuProps = {
8894
9054
  overlay: truthProp,
8895
9055
  zIndex: numericProp,
@@ -8899,9 +9059,9 @@
8899
9059
  closeOnClickOutside: truthProp,
8900
9060
  closeOnClickOverlay: truthProp
8901
9061
  };
8902
- const DROPDOWN_KEY = Symbol(name$y);
8903
- var stdin_default$E = vue.defineComponent({
8904
- name: name$y,
9062
+ const DROPDOWN_KEY = Symbol(name$x);
9063
+ var stdin_default$D = vue.defineComponent({
9064
+ name: name$x,
8905
9065
  props: dropdownMenuProps,
8906
9066
  setup(props, {
8907
9067
  slots
@@ -8969,7 +9129,7 @@
8969
9129
  "id": `${id}-${index}`,
8970
9130
  "role": "button",
8971
9131
  "tabindex": disabled ? void 0 : 0,
8972
- "class": [bem$z("item", {
9132
+ "class": [bem$y("item", {
8973
9133
  disabled
8974
9134
  }), {
8975
9135
  [HAPTICS_FEEDBACK]: !disabled
@@ -8980,7 +9140,7 @@
8980
9140
  }
8981
9141
  }
8982
9142
  }, [vue.createVNode("span", {
8983
- "class": [bem$z("title", {
9143
+ "class": [bem$y("title", {
8984
9144
  down: showPopup === (props.direction === "down"),
8985
9145
  active: showPopup
8986
9146
  }), titleClass],
@@ -9004,18 +9164,18 @@
9004
9164
  var _a;
9005
9165
  return vue.createVNode("div", {
9006
9166
  "ref": root,
9007
- "class": bem$z()
9167
+ "class": bem$y()
9008
9168
  }, [vue.createVNode("div", {
9009
9169
  "ref": barRef,
9010
9170
  "style": barStyle.value,
9011
- "class": bem$z("bar", {
9171
+ "class": bem$y("bar", {
9012
9172
  opened: opened.value
9013
9173
  })
9014
9174
  }, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
9015
9175
  };
9016
9176
  }
9017
9177
  });
9018
- const [name$x, bem$y] = createNamespace("dropdown-item");
9178
+ const [name$w, bem$x] = createNamespace("dropdown-item");
9019
9179
  const dropdownItemProps = {
9020
9180
  title: String,
9021
9181
  options: makeArrayProp(),
@@ -9025,8 +9185,8 @@
9025
9185
  modelValue: unknownProp,
9026
9186
  titleClass: unknownProp
9027
9187
  };
9028
- var stdin_default$D = vue.defineComponent({
9029
- name: name$x,
9188
+ var stdin_default$C = vue.defineComponent({
9189
+ name: name$w,
9030
9190
  props: dropdownItemProps,
9031
9191
  emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
9032
9192
  setup(props, {
@@ -9093,7 +9253,7 @@
9093
9253
  const renderIcon = () => {
9094
9254
  if (active) {
9095
9255
  return vue.createVNode(Icon, {
9096
- "class": bem$y("icon"),
9256
+ "class": bem$x("icon"),
9097
9257
  "color": activeColor,
9098
9258
  "name": "success"
9099
9259
  }, null);
@@ -9104,7 +9264,7 @@
9104
9264
  "key": option.value,
9105
9265
  "icon": option.icon,
9106
9266
  "title": option.text,
9107
- "class": bem$y("option", {
9267
+ "class": bem$x("option", {
9108
9268
  active
9109
9269
  }),
9110
9270
  "style": {
@@ -9136,13 +9296,13 @@
9136
9296
  }
9137
9297
  return vue.withDirectives(vue.createVNode("div", {
9138
9298
  "style": style,
9139
- "class": bem$y([direction]),
9299
+ "class": bem$x([direction]),
9140
9300
  "onClick": onClickWrapper
9141
9301
  }, [vue.createVNode(Popup, {
9142
9302
  "show": state.showPopup,
9143
9303
  "onUpdate:show": ($event) => state.showPopup = $event,
9144
9304
  "role": "menu",
9145
- "class": bem$y("content"),
9305
+ "class": bem$x("content"),
9146
9306
  "overlay": overlay,
9147
9307
  "position": direction === "down" ? "top" : "bottom",
9148
9308
  "duration": state.transition ? duration : 0,
@@ -9180,147 +9340,8 @@
9180
9340
  };
9181
9341
  }
9182
9342
  });
9183
- const DropdownItem = withInstall(stdin_default$D);
9184
- const DropdownMenu = withInstall(stdin_default$E);
9185
- const prefix = "van-empty-network-";
9186
- const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
9187
- "stop-color": color,
9188
- "offset": `${offset2}%`,
9189
- "stop-opacity": opacity
9190
- }, null);
9191
- const Network = vue.createVNode("svg", {
9192
- "viewBox": "0 0 160 160"
9193
- }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
9194
- "id": `${prefix}1`,
9195
- "x1": "64%",
9196
- "y1": "100%",
9197
- "x2": "64%"
9198
- }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
9199
- "id": `${prefix}2`,
9200
- "x1": "50%",
9201
- "x2": "50%",
9202
- "y2": "84%"
9203
- }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
9204
- "id": `${prefix}3`,
9205
- "x1": "100%",
9206
- "x2": "100%",
9207
- "y2": "100%"
9208
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
9209
- "id": `${prefix}4`,
9210
- "cx": "50%",
9211
- "cy": "0%",
9212
- "fx": "50%",
9213
- "fy": "0%",
9214
- "r": "100%",
9215
- "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
9216
- }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
9217
- "fill": "none"
9218
- }, [vue.createVNode("g", {
9219
- "opacity": ".8"
9220
- }, [vue.createVNode("path", {
9221
- "d": "M36 131V53H16v20H2v58h34z",
9222
- "fill": `url(#${prefix}1)`
9223
- }, null), vue.createVNode("path", {
9224
- "d": "M123 15h22v14h9v77h-31V15z",
9225
- "fill": `url(#${prefix}1)`
9226
- }, null)]), vue.createVNode("path", {
9227
- "fill": `url(#${prefix}4)`,
9228
- "d": "M0 139h160v21H0z"
9229
- }, null), vue.createVNode("path", {
9230
- "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
9231
- "fill": `url(#${prefix}2)`
9232
- }, null), vue.createVNode("g", {
9233
- "opacity": ".6",
9234
- "stroke-linecap": "round",
9235
- "stroke-width": "7"
9236
- }, [vue.createVNode("path", {
9237
- "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
9238
- "stroke": `url(#${prefix}3)`
9239
- }, null), vue.createVNode("path", {
9240
- "d": "M53 36a34 34 0 0 0 0 48",
9241
- "stroke": `url(#${prefix}3)`
9242
- }, null), vue.createVNode("path", {
9243
- "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
9244
- "stroke": `url(#${prefix}3)`
9245
- }, null), vue.createVNode("path", {
9246
- "d": "M106 84a34 34 0 0 0 0-48",
9247
- "stroke": `url(#${prefix}3)`
9248
- }, null)]), vue.createVNode("g", {
9249
- "transform": "translate(31 105)"
9250
- }, [vue.createVNode("rect", {
9251
- "fill": "#EBEDF0",
9252
- "width": "98",
9253
- "height": "34",
9254
- "rx": "2"
9255
- }, null), vue.createVNode("rect", {
9256
- "fill": "#FFF",
9257
- "x": "9",
9258
- "y": "8",
9259
- "width": "80",
9260
- "height": "18",
9261
- "rx": "1.1"
9262
- }, null), vue.createVNode("rect", {
9263
- "fill": "#EBEDF0",
9264
- "x": "15",
9265
- "y": "12",
9266
- "width": "18",
9267
- "height": "6",
9268
- "rx": "1.1"
9269
- }, null)])])]);
9270
- const [name$w, bem$x] = createNamespace("empty");
9271
- const PRESET_IMAGES = ["error", "search", "default"];
9272
- const emptyProps = {
9273
- image: makeStringProp("default"),
9274
- imageSize: numericProp,
9275
- description: String
9276
- };
9277
- var stdin_default$C = vue.defineComponent({
9278
- name: name$w,
9279
- props: emptyProps,
9280
- setup(props, {
9281
- slots
9282
- }) {
9283
- const renderImage = () => {
9284
- if (slots.image) {
9285
- return slots.image();
9286
- }
9287
- let {
9288
- image
9289
- } = props;
9290
- if (image === "network") {
9291
- return Network;
9292
- }
9293
- if (PRESET_IMAGES.includes(image)) {
9294
- image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
9295
- }
9296
- return vue.createVNode("img", {
9297
- "src": image
9298
- }, null);
9299
- };
9300
- const renderDescription = () => {
9301
- const description = slots.description ? slots.description() : props.description;
9302
- if (description) {
9303
- return vue.createVNode("p", {
9304
- "class": bem$x("description")
9305
- }, [description]);
9306
- }
9307
- };
9308
- const renderBottom = () => {
9309
- if (slots.default) {
9310
- return vue.createVNode("div", {
9311
- "class": bem$x("bottom")
9312
- }, [slots.default()]);
9313
- }
9314
- };
9315
- return () => vue.createVNode("div", {
9316
- "class": bem$x()
9317
- }, [vue.createVNode("div", {
9318
- "class": bem$x("image"),
9319
- "style": getSizeStyle(props.imageSize)
9320
- }, [renderImage()]), renderDescription(), renderBottom()]);
9321
- }
9322
- });
9323
- const Empty = withInstall(stdin_default$C);
9343
+ const DropdownItem = withInstall(stdin_default$C);
9344
+ const DropdownMenu = withInstall(stdin_default$D);
9324
9345
  const [name$v, bem$w] = createNamespace("grid");
9325
9346
  const gridProps = {
9326
9347
  square: Boolean,
@@ -9974,6 +9995,7 @@
9974
9995
  children,
9975
9996
  linkChildren
9976
9997
  } = useChildren(INDEX_BAR_KEY);
9998
+ let selectActiveIndex;
9977
9999
  linkChildren({
9978
10000
  props
9979
10001
  });
@@ -10001,6 +10023,7 @@
10001
10023
  }
10002
10024
  return -1;
10003
10025
  };
10026
+ const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
10004
10027
  const onScroll = () => {
10005
10028
  if (isHidden(root)) {
10006
10029
  return;
@@ -10012,7 +10035,16 @@
10012
10035
  const scrollTop = getScrollTop(scrollParent.value);
10013
10036
  const scrollParentRect = useRect(scrollParent);
10014
10037
  const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
10015
- const active = getActiveAnchor(scrollTop, rects);
10038
+ let active = -1;
10039
+ if (selectActiveIndex) {
10040
+ const match = getMatchAnchor(selectActiveIndex);
10041
+ if (match) {
10042
+ const rect = match.getRect(scrollParent.value, scrollParentRect);
10043
+ active = getActiveAnchor(rect.top, rects);
10044
+ }
10045
+ } else {
10046
+ active = getActiveAnchor(scrollTop, rects);
10047
+ }
10016
10048
  activeAnchor.value = indexList[active];
10017
10049
  if (sticky) {
10018
10050
  children.forEach((item, index) => {
@@ -10031,7 +10063,7 @@
10031
10063
  if (index === active) {
10032
10064
  state.active = true;
10033
10065
  state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
10034
- } else if (index === active - 1) {
10066
+ } else if (index === active - 1 && selectActiveIndex === "") {
10035
10067
  const activeItemTop = rects[active].top - scrollTop;
10036
10068
  state.active = activeItemTop > 0;
10037
10069
  state.top = activeItemTop + scrollParentRect.top - rects[index].height;
@@ -10040,6 +10072,7 @@
10040
10072
  }
10041
10073
  });
10042
10074
  }
10075
+ selectActiveIndex = "";
10043
10076
  };
10044
10077
  const init = () => {
10045
10078
  vue.nextTick(onScroll);
@@ -10065,9 +10098,18 @@
10065
10098
  }, [index]);
10066
10099
  });
10067
10100
  const scrollTo = (index) => {
10068
- index = String(index);
10069
- const match = children.find((item) => String(item.index) === index);
10101
+ selectActiveIndex = String(index);
10102
+ const match = getMatchAnchor(selectActiveIndex);
10070
10103
  if (match) {
10104
+ const scrollTop = getScrollTop(scrollParent.value);
10105
+ const scrollParentRect = useRect(scrollParent);
10106
+ const {
10107
+ offsetHeight
10108
+ } = document.documentElement;
10109
+ if (scrollTop === offsetHeight - scrollParentRect.height) {
10110
+ onScroll();
10111
+ return;
10112
+ }
10071
10113
  match.$el.scrollIntoView();
10072
10114
  if (props.sticky && props.stickyOffsetTop) {
10073
10115
  setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
@@ -10401,10 +10443,10 @@
10401
10443
  "ref": navBarRef,
10402
10444
  "style": style,
10403
10445
  "class": [bem$p({
10404
- fixed,
10405
- "safe-area-inset-top": props.safeAreaInsetTop
10446
+ fixed
10406
10447
  }), {
10407
- [BORDER_BOTTOM]: border
10448
+ [BORDER_BOTTOM]: border,
10449
+ "van-safe-area-top": props.safeAreaInsetTop
10408
10450
  }]
10409
10451
  }, [vue.createVNode("div", {
10410
10452
  "class": bem$p("content")
@@ -10793,6 +10835,15 @@
10793
10835
  default: ""
10794
10836
  }
10795
10837
  };
10838
+ function shuffle(array) {
10839
+ for (let i = array.length - 1; i > 0; i--) {
10840
+ const j = Math.floor(Math.random() * (i + 1));
10841
+ const temp = array[i];
10842
+ array[i] = array[j];
10843
+ array[j] = temp;
10844
+ }
10845
+ return array;
10846
+ }
10796
10847
  var stdin_default$q = vue.defineComponent({
10797
10848
  name: name$l,
10798
10849
  props: numberKeyboardProps,
@@ -10807,7 +10858,7 @@
10807
10858
  text: i + 1
10808
10859
  }));
10809
10860
  if (props.randomKeyOrder) {
10810
- keys2.sort(() => Math.random() > 0.5 ? 1 : -1);
10861
+ shuffle(keys2);
10811
10862
  }
10812
10863
  return keys2;
10813
10864
  };
@@ -12519,33 +12570,53 @@
12519
12570
  }) {
12520
12571
  const touch = useTouch();
12521
12572
  const [itemRefs, setItemRefs] = useRefs();
12573
+ const groupRef = vue.ref();
12522
12574
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
12523
12575
  const list = vue.computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
12524
12576
  let ranges;
12577
+ let groupRefRect;
12578
+ let minRectTop = Number.MAX_SAFE_INTEGER;
12579
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
12525
12580
  const updateRanges = () => {
12581
+ groupRefRect = useRect(groupRef);
12526
12582
  const rects = itemRefs.value.map(useRect);
12527
12583
  ranges = [];
12528
12584
  rects.forEach((rect, index) => {
12585
+ minRectTop = Math.min(rect.top, minRectTop);
12586
+ maxRectTop = Math.max(rect.top, maxRectTop);
12529
12587
  if (props.allowHalf) {
12530
12588
  ranges.push({
12531
12589
  score: index + 0.5,
12532
- left: rect.left
12590
+ left: rect.left,
12591
+ top: rect.top,
12592
+ height: rect.height
12533
12593
  }, {
12534
12594
  score: index + 1,
12535
- left: rect.left + rect.width / 2
12595
+ left: rect.left + rect.width / 2,
12596
+ top: rect.top,
12597
+ height: rect.height
12536
12598
  });
12537
12599
  } else {
12538
12600
  ranges.push({
12539
12601
  score: index + 1,
12540
- left: rect.left
12602
+ left: rect.left,
12603
+ top: rect.top,
12604
+ height: rect.height
12541
12605
  });
12542
12606
  }
12543
12607
  });
12544
12608
  };
12545
- const getScoreByPosition = (x) => {
12609
+ const getScoreByPosition = (x, y) => {
12546
12610
  for (let i = ranges.length - 1; i > 0; i--) {
12547
- if (x > ranges[i].left) {
12548
- return ranges[i].score;
12611
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
12612
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
12613
+ return ranges[i].score;
12614
+ }
12615
+ } else {
12616
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
12617
+ if (x > ranges[i].left && ranges[i].top === curTop) {
12618
+ return ranges[i].score;
12619
+ }
12549
12620
  }
12550
12621
  }
12551
12622
  return props.allowHalf ? 0.5 : 1;
@@ -12570,10 +12641,11 @@
12570
12641
  touch.move(event);
12571
12642
  if (touch.isHorizontal()) {
12572
12643
  const {
12573
- clientX
12644
+ clientX,
12645
+ clientY
12574
12646
  } = event.touches[0];
12575
12647
  preventDefault(event);
12576
- select(getScoreByPosition(clientX));
12648
+ select(getScoreByPosition(clientX, clientY));
12577
12649
  }
12578
12650
  };
12579
12651
  const renderStar = (item, index) => {
@@ -12602,7 +12674,7 @@
12602
12674
  }
12603
12675
  const onClickItem = (event) => {
12604
12676
  updateRanges();
12605
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
12677
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
12606
12678
  };
12607
12679
  return vue.createVNode("div", {
12608
12680
  "key": index,
@@ -12640,6 +12712,7 @@
12640
12712
  };
12641
12713
  useCustomFieldValue(() => props.modelValue);
12642
12714
  return () => vue.createVNode("div", {
12715
+ "ref": groupRef,
12643
12716
  "role": "radiogroup",
12644
12717
  "class": bem$f({
12645
12718
  readonly: props.readonly,
@@ -12764,14 +12837,17 @@
12764
12837
  }
12765
12838
  });
12766
12839
  const Search = withInstall(stdin_default$j);
12767
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
12768
12840
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
12769
- function getIconURL(icon) {
12770
- if (PRESET_ICONS.includes(icon)) {
12771
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
12772
- }
12773
- return icon;
12774
- }
12841
+ const iconMap = {
12842
+ qq: "qq",
12843
+ link: "link-o",
12844
+ weibo: "weibo",
12845
+ qrcode: "qr",
12846
+ poster: "photo-o",
12847
+ wechat: "wechat",
12848
+ "weapp-qrcode": "miniprogram-o",
12849
+ "wechat-moments": "wechat-moments"
12850
+ };
12775
12851
  const [name$d, bem$d, t$2] = createNamespace("share-sheet");
12776
12852
  const shareSheetProps = extend({}, popupSharedProps, {
12777
12853
  title: String,
@@ -12809,6 +12885,19 @@
12809
12885
  }, [description])]);
12810
12886
  }
12811
12887
  };
12888
+ const renderIcon = (icon) => {
12889
+ if (iconMap[icon]) {
12890
+ return vue.createVNode("div", {
12891
+ "class": bem$d("icon", [icon])
12892
+ }, [vue.createVNode(Icon, {
12893
+ "name": iconMap[icon] || icon
12894
+ }, null)]);
12895
+ }
12896
+ return vue.createVNode("img", {
12897
+ "src": icon,
12898
+ "class": bem$d("image-icon")
12899
+ }, null);
12900
+ };
12812
12901
  const renderOption = (option, index) => {
12813
12902
  const {
12814
12903
  name: name2,
@@ -12821,10 +12910,7 @@
12821
12910
  "tabindex": 0,
12822
12911
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
12823
12912
  "onClick": () => onSelect(option, index)
12824
- }, [vue.createVNode("img", {
12825
- "src": getIconURL(icon),
12826
- "class": bem$d("icon")
12827
- }, null), name2 && vue.createVNode("span", {
12913
+ }, [renderIcon(icon), name2 && vue.createVNode("span", {
12828
12914
  "class": bem$d("name")
12829
12915
  }, [name2]), description && vue.createVNode("span", {
12830
12916
  "class": bem$d("option-description")
@@ -12982,9 +13068,11 @@
12982
13068
  };
12983
13069
  var stdin_default$f = vue.defineComponent({
12984
13070
  name: name$a,
13071
+ inheritAttrs: false,
12985
13072
  props: skeletonProps,
12986
13073
  setup(props, {
12987
- slots
13074
+ slots,
13075
+ attrs
12988
13076
  }) {
12989
13077
  const renderAvatar = () => {
12990
13078
  if (props.avatar) {
@@ -13027,12 +13115,12 @@
13027
13115
  if (!props.loading) {
13028
13116
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
13029
13117
  }
13030
- return vue.createVNode("div", {
13118
+ return vue.createVNode("div", vue.mergeProps({
13031
13119
  "class": bem$a({
13032
13120
  animate: props.animate,
13033
13121
  round: props.round
13034
13122
  })
13035
- }, [renderAvatar(), vue.createVNode("div", {
13123
+ }, attrs), [renderAvatar(), vue.createVNode("div", {
13036
13124
  "class": bem$a("content")
13037
13125
  }, [renderTitle(), renderRows()])]);
13038
13126
  };
@@ -13923,7 +14011,7 @@
13923
14011
  return vue.createVNode("div", {
13924
14012
  "ref": root,
13925
14013
  "class": bem$4(),
13926
- "onClick": getClickHandler("cell"),
14014
+ "onClick": getClickHandler("cell", lockClick2),
13927
14015
  "onTouchstart": onTouchStart,
13928
14016
  "onTouchmove": onTouchMove,
13929
14017
  "onTouchend": onTouchEnd,
@@ -14280,7 +14368,7 @@
14280
14368
  imageFit: String,
14281
14369
  lazyLoad: Boolean,
14282
14370
  deletable: Boolean,
14283
- previewSize: numericProp,
14371
+ previewSize: [Number, String, Array],
14284
14372
  beforeDelete: Function
14285
14373
  },
14286
14374
  emits: ["delete", "preview"],
@@ -14354,16 +14442,19 @@
14354
14442
  };
14355
14443
  const renderPreview = () => {
14356
14444
  const {
14357
- item
14445
+ item,
14446
+ lazyLoad,
14447
+ imageFit,
14448
+ previewSize
14358
14449
  } = props;
14359
14450
  if (isImageFile(item)) {
14360
14451
  return vue.createVNode(Image$1, {
14361
- "fit": props.imageFit,
14452
+ "fit": imageFit,
14362
14453
  "src": item.content || item.url,
14363
14454
  "class": bem("preview-image"),
14364
- "width": props.previewSize,
14365
- "height": props.previewSize,
14366
- "lazyLoad": props.lazyLoad,
14455
+ "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
14456
+ "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
14457
+ "lazyLoad": lazyLoad,
14367
14458
  "onClick": onPreview
14368
14459
  }, {
14369
14460
  default: renderCover
@@ -14403,7 +14494,7 @@
14403
14494
  modelValue: makeArrayProp(),
14404
14495
  beforeRead: Function,
14405
14496
  beforeDelete: Function,
14406
- previewSize: numericProp,
14497
+ previewSize: [Number, String, Array],
14407
14498
  previewImage: truthProp,
14408
14499
  previewOptions: Object,
14409
14500
  previewFullImage: truthProp,
@@ -15470,7 +15561,7 @@
15470
15561
  });
15471
15562
  }
15472
15563
  };
15473
- const version = "3.4.5";
15564
+ const version = "3.4.8";
15474
15565
  function install(app) {
15475
15566
  const components = [
15476
15567
  ActionBar,