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.cjs.js CHANGED
@@ -121,6 +121,12 @@ function addUnit(value) {
121
121
  }
122
122
  function getSizeStyle(originSize) {
123
123
  if (isDef(originSize)) {
124
+ if (Array.isArray(originSize)) {
125
+ return {
126
+ width: addUnit(originSize[0]),
127
+ height: addUnit(originSize[1])
128
+ };
129
+ }
124
130
  const size = addUnit(originSize);
125
131
  return {
126
132
  width: size,
@@ -989,7 +995,7 @@ function useTouch() {
989
995
  };
990
996
  const move = (event) => {
991
997
  const touch = event.touches[0];
992
- deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
998
+ deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
993
999
  deltaY.value = touch.clientY - startY.value;
994
1000
  offsetX.value = Math.abs(deltaX.value);
995
1001
  offsetY.value = Math.abs(deltaY.value);
@@ -1129,6 +1135,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
1129
1135
  iconPrefix: String,
1130
1136
  closeOnPopstate: Boolean,
1131
1137
  closeIconPosition: makeStringProp("top-right"),
1138
+ safeAreaInsetTop: Boolean,
1132
1139
  safeAreaInsetBottom: Boolean
1133
1140
  });
1134
1141
  const [name$1l, bem$1h] = createNamespace("popup");
@@ -1223,6 +1230,7 @@ var stdin_default$1s = vue.defineComponent({
1223
1230
  const {
1224
1231
  round,
1225
1232
  position,
1233
+ safeAreaInsetTop,
1226
1234
  safeAreaInsetBottom
1227
1235
  } = props;
1228
1236
  return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
@@ -1232,6 +1240,7 @@ var stdin_default$1s = vue.defineComponent({
1232
1240
  round,
1233
1241
  [position]: position
1234
1242
  }), {
1243
+ "van-safe-area-top": safeAreaInsetTop,
1235
1244
  "van-safe-area-bottom": safeAreaInsetBottom
1236
1245
  }],
1237
1246
  "onKeydown": onKeydown
@@ -2442,6 +2451,7 @@ var stdin_default$1m = vue.defineComponent({
2442
2451
  useExpose({
2443
2452
  submit,
2444
2453
  validate,
2454
+ getValues,
2445
2455
  scrollToField,
2446
2456
  resetValidation
2447
2457
  });
@@ -2560,6 +2570,7 @@ const fieldSharedProps = {
2560
2570
  placeholder: String,
2561
2571
  autocomplete: String,
2562
2572
  errorMessage: String,
2573
+ enterkeyhint: String,
2563
2574
  clearTrigger: makeStringProp("focus"),
2564
2575
  formatTrigger: makeStringProp("onChange"),
2565
2576
  error: {
@@ -2829,6 +2840,7 @@ var stdin_default$1l = vue.defineComponent({
2829
2840
  autofocus: props.autofocus,
2830
2841
  placeholder: props.placeholder,
2831
2842
  autocomplete: props.autocomplete,
2843
+ enterkeyhint: props.enterkeyhint,
2832
2844
  "aria-labelledby": props.label ? `${id}-label` : void 0,
2833
2845
  onBlur,
2834
2846
  onFocus,
@@ -3092,6 +3104,7 @@ var stdin_default$1k = vue.defineComponent({
3092
3104
  } = props;
3093
3105
  if (isDef(message) && message !== "") {
3094
3106
  return type === "html" ? vue.createVNode("div", {
3107
+ "key": 0,
3095
3108
  "class": bem$19("text"),
3096
3109
  "innerHTML": String(message)
3097
3110
  }, null) : vue.createVNode("div", {
@@ -4240,6 +4253,7 @@ var stdin_default$1a = vue.defineComponent({
4240
4253
  slots
4241
4254
  }) {
4242
4255
  const style = vue.computed(() => {
4256
+ var _a;
4243
4257
  const {
4244
4258
  item,
4245
4259
  index,
@@ -4271,6 +4285,9 @@ var stdin_default$1a = vue.defineComponent({
4271
4285
  break;
4272
4286
  }
4273
4287
  }
4288
+ if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4289
+ style2.marginBottom = 0;
4290
+ }
4274
4291
  return style2;
4275
4292
  });
4276
4293
  const onClick = () => {
@@ -4615,6 +4632,7 @@ const calendarProps = {
4615
4632
  showRangePrompt: truthProp,
4616
4633
  confirmDisabledText: String,
4617
4634
  closeOnClickOverlay: truthProp,
4635
+ safeAreaInsetTop: Boolean,
4618
4636
  safeAreaInsetBottom: truthProp,
4619
4637
  minDate: {
4620
4638
  type: Date,
@@ -4777,8 +4795,8 @@ var stdin_default$17 = vue.defineComponent({
4777
4795
  }
4778
4796
  use.raf(() => {
4779
4797
  bodyHeight = Math.floor(use.useRect(bodyRef).height);
4780
- scrollToCurrentDate();
4781
4798
  });
4799
+ scrollToCurrentDate();
4782
4800
  };
4783
4801
  const reset = (date = getInitialDate()) => {
4784
4802
  currentDate.value = date;
@@ -4963,6 +4981,7 @@ var stdin_default$17 = vue.defineComponent({
4963
4981
  "closeable": props.showTitle || props.showSubtitle,
4964
4982
  "teleport": props.teleport,
4965
4983
  "closeOnPopstate": props.closeOnPopstate,
4984
+ "safeAreaInsetTop": props.safeAreaInsetTop,
4966
4985
  "closeOnClickOverlay": props.closeOnClickOverlay,
4967
4986
  "onUpdate:show": updateShow
4968
4987
  }, {
@@ -6091,6 +6110,7 @@ var stdin_default$10 = vue.defineComponent({
6091
6110
  }
6092
6111
  };
6093
6112
  const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$13, vue.mergeProps({
6113
+ "key": item.id,
6094
6114
  "id": `${id}-${index}`,
6095
6115
  "ref": setTitleRefs(index),
6096
6116
  "type": props.type,
@@ -7681,14 +7701,152 @@ var stdin_default$L = vue.defineComponent({
7681
7701
  }
7682
7702
  });
7683
7703
  const CouponCell = withInstall(stdin_default$L);
7684
- const [name$E, bem$D, t$8] = createNamespace("coupon-list");
7685
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
7704
+ const prefix = "van-empty-network-";
7705
+ const renderStop = (color, offset, opacity) => vue.createVNode("stop", {
7706
+ "stop-color": color,
7707
+ "offset": `${offset}%`,
7708
+ "stop-opacity": opacity
7709
+ }, null);
7710
+ const Network = vue.createVNode("svg", {
7711
+ "viewBox": "0 0 160 160"
7712
+ }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
7713
+ "id": `${prefix}1`,
7714
+ "x1": "64%",
7715
+ "y1": "100%",
7716
+ "x2": "64%"
7717
+ }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
7718
+ "id": `${prefix}2`,
7719
+ "x1": "50%",
7720
+ "x2": "50%",
7721
+ "y2": "84%"
7722
+ }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
7723
+ "id": `${prefix}3`,
7724
+ "x1": "100%",
7725
+ "x2": "100%",
7726
+ "y2": "100%"
7727
+ }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
7728
+ "id": `${prefix}4`,
7729
+ "cx": "50%",
7730
+ "cy": "0%",
7731
+ "fx": "50%",
7732
+ "fy": "0%",
7733
+ "r": "100%",
7734
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
7735
+ }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
7736
+ "fill": "none"
7737
+ }, [vue.createVNode("g", {
7738
+ "opacity": ".8"
7739
+ }, [vue.createVNode("path", {
7740
+ "d": "M36 131V53H16v20H2v58h34z",
7741
+ "fill": `url(#${prefix}1)`
7742
+ }, null), vue.createVNode("path", {
7743
+ "d": "M123 15h22v14h9v77h-31V15z",
7744
+ "fill": `url(#${prefix}1)`
7745
+ }, null)]), vue.createVNode("path", {
7746
+ "fill": `url(#${prefix}4)`,
7747
+ "d": "M0 139h160v21H0z"
7748
+ }, null), vue.createVNode("path", {
7749
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
7750
+ "fill": `url(#${prefix}2)`
7751
+ }, null), vue.createVNode("g", {
7752
+ "opacity": ".6",
7753
+ "stroke-linecap": "round",
7754
+ "stroke-width": "7"
7755
+ }, [vue.createVNode("path", {
7756
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
7757
+ "stroke": `url(#${prefix}3)`
7758
+ }, null), vue.createVNode("path", {
7759
+ "d": "M53 36a34 34 0 0 0 0 48",
7760
+ "stroke": `url(#${prefix}3)`
7761
+ }, null), vue.createVNode("path", {
7762
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
7763
+ "stroke": `url(#${prefix}3)`
7764
+ }, null), vue.createVNode("path", {
7765
+ "d": "M106 84a34 34 0 0 0 0-48",
7766
+ "stroke": `url(#${prefix}3)`
7767
+ }, null)]), vue.createVNode("g", {
7768
+ "transform": "translate(31 105)"
7769
+ }, [vue.createVNode("rect", {
7770
+ "fill": "#EBEDF0",
7771
+ "width": "98",
7772
+ "height": "34",
7773
+ "rx": "2"
7774
+ }, null), vue.createVNode("rect", {
7775
+ "fill": "#FFF",
7776
+ "x": "9",
7777
+ "y": "8",
7778
+ "width": "80",
7779
+ "height": "18",
7780
+ "rx": "1.1"
7781
+ }, null), vue.createVNode("rect", {
7782
+ "fill": "#EBEDF0",
7783
+ "x": "15",
7784
+ "y": "12",
7785
+ "width": "18",
7786
+ "height": "6",
7787
+ "rx": "1.1"
7788
+ }, null)])])]);
7789
+ const [name$E, bem$D] = createNamespace("empty");
7790
+ const PRESET_IMAGES = ["error", "search", "default"];
7791
+ const emptyProps = {
7792
+ image: makeStringProp("default"),
7793
+ imageSize: [Number, String, Array],
7794
+ description: String
7795
+ };
7796
+ var stdin_default$K = vue.defineComponent({
7797
+ name: name$E,
7798
+ props: emptyProps,
7799
+ setup(props, {
7800
+ slots
7801
+ }) {
7802
+ const renderImage = () => {
7803
+ if (slots.image) {
7804
+ return slots.image();
7805
+ }
7806
+ let {
7807
+ image
7808
+ } = props;
7809
+ if (image === "network") {
7810
+ return Network;
7811
+ }
7812
+ if (PRESET_IMAGES.includes(image)) {
7813
+ image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
7814
+ }
7815
+ return vue.createVNode("img", {
7816
+ "src": image
7817
+ }, null);
7818
+ };
7819
+ const renderDescription = () => {
7820
+ const description = slots.description ? slots.description() : props.description;
7821
+ if (description) {
7822
+ return vue.createVNode("p", {
7823
+ "class": bem$D("description")
7824
+ }, [description]);
7825
+ }
7826
+ };
7827
+ const renderBottom = () => {
7828
+ if (slots.default) {
7829
+ return vue.createVNode("div", {
7830
+ "class": bem$D("bottom")
7831
+ }, [slots.default()]);
7832
+ }
7833
+ };
7834
+ return () => vue.createVNode("div", {
7835
+ "class": bem$D()
7836
+ }, [vue.createVNode("div", {
7837
+ "class": bem$D("image"),
7838
+ "style": getSizeStyle(props.imageSize)
7839
+ }, [renderImage()]), renderDescription(), renderBottom()]);
7840
+ }
7841
+ });
7842
+ const Empty = withInstall(stdin_default$K);
7843
+ const [name$D, bem$C, t$8] = createNamespace("coupon-list");
7686
7844
  const couponListProps = {
7687
7845
  code: makeStringProp(""),
7688
7846
  coupons: makeArrayProp(),
7689
7847
  currency: makeStringProp("\xA5"),
7690
7848
  showCount: truthProp,
7691
- emptyImage: makeStringProp(EMPTY_IMAGE),
7849
+ emptyImage: String,
7692
7850
  chosenCoupon: makeNumberProp(-1),
7693
7851
  enabledTitle: String,
7694
7852
  disabledTitle: String,
@@ -7703,8 +7861,8 @@ const couponListProps = {
7703
7861
  exchangeButtonLoading: Boolean,
7704
7862
  exchangeButtonDisabled: Boolean
7705
7863
  };
7706
- var stdin_default$K = vue.defineComponent({
7707
- name: name$E,
7864
+ var stdin_default$J = vue.defineComponent({
7865
+ name: name$D,
7708
7866
  props: couponListProps,
7709
7867
  emits: ["change", "exchange", "update:code"],
7710
7868
  setup(props, {
@@ -7736,28 +7894,30 @@ var stdin_default$K = vue.defineComponent({
7736
7894
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
7737
7895
  });
7738
7896
  };
7739
- const renderEmpty = () => vue.createVNode("div", {
7740
- "class": bem$D("empty")
7741
- }, [vue.createVNode("img", {
7742
- "src": props.emptyImage
7743
- }, null), vue.createVNode("p", null, [t$8("noCoupon")])]);
7897
+ const renderEmpty = () => vue.createVNode(Empty, {
7898
+ "image": props.emptyImage
7899
+ }, {
7900
+ default: () => [vue.createVNode("p", {
7901
+ "class": bem$C("empty-tip")
7902
+ }, [t$8("noCoupon")])]
7903
+ });
7744
7904
  const renderExchangeBar = () => {
7745
7905
  if (props.showExchangeBar) {
7746
7906
  return vue.createVNode("div", {
7747
7907
  "ref": barRef,
7748
- "class": bem$D("exchange-bar")
7908
+ "class": bem$C("exchange-bar")
7749
7909
  }, [vue.createVNode(Field, {
7750
7910
  "modelValue": currentCode.value,
7751
7911
  "onUpdate:modelValue": ($event) => currentCode.value = $event,
7752
7912
  "clearable": true,
7753
7913
  "border": false,
7754
- "class": bem$D("field"),
7914
+ "class": bem$C("field"),
7755
7915
  "placeholder": props.inputPlaceholder || t$8("placeholder"),
7756
7916
  "maxlength": "20"
7757
7917
  }, null), vue.createVNode(Button, {
7758
7918
  "plain": true,
7759
7919
  "type": "danger",
7760
- "class": bem$D("exchange"),
7920
+ "class": bem$C("exchange"),
7761
7921
  "text": props.exchangeButtonText || t$8("exchange"),
7762
7922
  "loading": props.exchangeButtonLoading,
7763
7923
  "disabled": buttonDisabled.value,
@@ -7777,7 +7937,7 @@ var stdin_default$K = vue.defineComponent({
7777
7937
  default: () => {
7778
7938
  var _a;
7779
7939
  return [vue.createVNode("div", {
7780
- "class": bem$D("list", {
7940
+ "class": bem$C("list", {
7781
7941
  "with-bottom": props.showCloseButton
7782
7942
  }),
7783
7943
  "style": {
@@ -7806,7 +7966,7 @@ var stdin_default$K = vue.defineComponent({
7806
7966
  default: () => {
7807
7967
  var _a;
7808
7968
  return [vue.createVNode("div", {
7809
- "class": bem$D("list", {
7969
+ "class": bem$C("list", {
7810
7970
  "with-bottom": props.showCloseButton
7811
7971
  }),
7812
7972
  "style": {
@@ -7833,29 +7993,29 @@ var stdin_default$K = vue.defineComponent({
7833
7993
  });
7834
7994
  return () => vue.createVNode("div", {
7835
7995
  "ref": root,
7836
- "class": bem$D()
7996
+ "class": bem$C()
7837
7997
  }, [renderExchangeBar(), vue.createVNode(Tabs, {
7838
7998
  "active": activeTab.value,
7839
7999
  "onUpdate:active": ($event) => activeTab.value = $event,
7840
- "class": bem$D("tab")
8000
+ "class": bem$C("tab")
7841
8001
  }, {
7842
8002
  default: () => [renderCouponTab(), renderDisabledTab()]
7843
8003
  }), vue.createVNode("div", {
7844
- "class": bem$D("bottom")
8004
+ "class": bem$C("bottom")
7845
8005
  }, [vue.withDirectives(vue.createVNode(Button, {
7846
8006
  "round": true,
7847
8007
  "block": true,
7848
8008
  "type": "danger",
7849
- "class": bem$D("close"),
8009
+ "class": bem$C("close"),
7850
8010
  "text": props.closeButtonText || t$8("close"),
7851
8011
  "onClick": () => emit("change", -1)
7852
8012
  }, null), [[vue.vShow, props.showCloseButton]])])]);
7853
8013
  }
7854
8014
  });
7855
- const CouponList = withInstall(stdin_default$K);
7856
- const [name$D] = createNamespace("time-picker");
7857
- var stdin_default$J = vue.defineComponent({
7858
- name: name$D,
8015
+ const CouponList = withInstall(stdin_default$J);
8016
+ const [name$C] = createNamespace("time-picker");
8017
+ var stdin_default$I = vue.defineComponent({
8018
+ name: name$C,
7859
8019
  props: extend({}, sharedProps, {
7860
8020
  minHour: makeNumericProp(0),
7861
8021
  maxHour: makeNumericProp(23),
@@ -7962,9 +8122,9 @@ var stdin_default$J = vue.defineComponent({
7962
8122
  }
7963
8123
  });
7964
8124
  const currentYear = new Date().getFullYear();
7965
- const [name$C] = createNamespace("date-picker");
7966
- var stdin_default$I = vue.defineComponent({
7967
- name: name$C,
8125
+ const [name$B] = createNamespace("date-picker");
8126
+ var stdin_default$H = vue.defineComponent({
8127
+ name: name$B,
7968
8128
  props: extend({}, sharedProps, {
7969
8129
  type: makeStringProp("datetime"),
7970
8130
  modelValue: Date,
@@ -8170,6 +8330,7 @@ var stdin_default$I = vue.defineComponent({
8170
8330
  const onChange = () => {
8171
8331
  updateInnerValue();
8172
8332
  vue.nextTick(() => {
8333
+ updateInnerValue();
8173
8334
  vue.nextTick(() => emit("change", currentDate.value));
8174
8335
  });
8175
8336
  };
@@ -8179,8 +8340,7 @@ var stdin_default$I = vue.defineComponent({
8179
8340
  });
8180
8341
  vue.watch(columns, updateColumnValue);
8181
8342
  vue.watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8182
- vue.watch(() => [props.filter, props.maxDate], updateInnerValue);
8183
- vue.watch(() => props.minDate, () => {
8343
+ vue.watch(() => [props.filter, props.minDate, props.maxDate], () => {
8184
8344
  vue.nextTick(updateInnerValue);
8185
8345
  });
8186
8346
  vue.watch(() => props.modelValue, (value) => {
@@ -8202,14 +8362,14 @@ var stdin_default$I = vue.defineComponent({
8202
8362
  }, pick(props, pickerInheritKeys)), slots);
8203
8363
  }
8204
8364
  });
8205
- const [name$B, bem$C] = createNamespace("datetime-picker");
8206
- const timePickerPropKeys = Object.keys(stdin_default$J.props);
8207
- const datePickerPropKeys = Object.keys(stdin_default$I.props);
8208
- const datetimePickerProps = extend({}, stdin_default$J.props, stdin_default$I.props, {
8365
+ const [name$A, bem$B] = createNamespace("datetime-picker");
8366
+ const timePickerPropKeys = Object.keys(stdin_default$I.props);
8367
+ const datePickerPropKeys = Object.keys(stdin_default$H.props);
8368
+ const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
8209
8369
  modelValue: [String, Date]
8210
8370
  });
8211
- var stdin_default$H = vue.defineComponent({
8212
- name: name$B,
8371
+ var stdin_default$G = vue.defineComponent({
8372
+ name: name$A,
8213
8373
  props: datetimePickerProps,
8214
8374
  setup(props, {
8215
8375
  attrs,
@@ -8224,17 +8384,17 @@ var stdin_default$H = vue.defineComponent({
8224
8384
  });
8225
8385
  return () => {
8226
8386
  const isTimePicker = props.type === "time";
8227
- const Component = isTimePicker ? stdin_default$J : stdin_default$I;
8387
+ const Component = isTimePicker ? stdin_default$I : stdin_default$H;
8228
8388
  const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
8229
8389
  return vue.createVNode(Component, vue.mergeProps({
8230
8390
  "ref": root,
8231
- "class": bem$C()
8391
+ "class": bem$B()
8232
8392
  }, inheritProps, attrs), slots);
8233
8393
  };
8234
8394
  }
8235
8395
  });
8236
- const DatetimePicker = withInstall(stdin_default$H);
8237
- const [name$A, bem$B, t$7] = createNamespace("dialog");
8396
+ const DatetimePicker = withInstall(stdin_default$G);
8397
+ const [name$z, bem$A, t$7] = createNamespace("dialog");
8238
8398
  const dialogProps = extend({}, popupSharedProps, {
8239
8399
  title: String,
8240
8400
  theme: String,
@@ -8255,8 +8415,8 @@ const dialogProps = extend({}, popupSharedProps, {
8255
8415
  closeOnClickOverlay: Boolean
8256
8416
  });
8257
8417
  const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
8258
- var stdin_default$G = vue.defineComponent({
8259
- name: name$A,
8418
+ var stdin_default$F = vue.defineComponent({
8419
+ name: name$z,
8260
8420
  props: dialogProps,
8261
8421
  emits: ["confirm", "cancel", "keydown", "update:show"],
8262
8422
  setup(props, {
@@ -8313,7 +8473,7 @@ var stdin_default$G = vue.defineComponent({
8313
8473
  const title = slots.title ? slots.title() : props.title;
8314
8474
  if (title) {
8315
8475
  return vue.createVNode("div", {
8316
- "class": bem$B("header", {
8476
+ "class": bem$A("header", {
8317
8477
  isolated: !props.message && !slots.default
8318
8478
  })
8319
8479
  }, [title]);
@@ -8325,7 +8485,7 @@ var stdin_default$G = vue.defineComponent({
8325
8485
  allowHtml,
8326
8486
  messageAlign
8327
8487
  } = props;
8328
- const classNames = bem$B("message", {
8488
+ const classNames = bem$A("message", {
8329
8489
  "has-title": hasTitle,
8330
8490
  [messageAlign]: messageAlign
8331
8491
  });
@@ -8343,7 +8503,7 @@ var stdin_default$G = vue.defineComponent({
8343
8503
  const renderContent = () => {
8344
8504
  if (slots.default) {
8345
8505
  return vue.createVNode("div", {
8346
- "class": bem$B("content")
8506
+ "class": bem$A("content")
8347
8507
  }, [slots.default()]);
8348
8508
  }
8349
8509
  const {
@@ -8355,18 +8515,18 @@ var stdin_default$G = vue.defineComponent({
8355
8515
  const hasTitle = !!(title || slots.title);
8356
8516
  return vue.createVNode("div", {
8357
8517
  "key": allowHtml ? 1 : 0,
8358
- "class": bem$B("content", {
8518
+ "class": bem$A("content", {
8359
8519
  isolated: !hasTitle
8360
8520
  })
8361
8521
  }, [renderMessage(hasTitle)]);
8362
8522
  }
8363
8523
  };
8364
8524
  const renderButtons = () => vue.createVNode("div", {
8365
- "class": [BORDER_TOP, bem$B("footer")]
8525
+ "class": [BORDER_TOP, bem$A("footer")]
8366
8526
  }, [props.showCancelButton && vue.createVNode(Button, {
8367
8527
  "size": "large",
8368
8528
  "text": props.cancelButtonText || t$7("cancel"),
8369
- "class": bem$B("cancel"),
8529
+ "class": bem$A("cancel"),
8370
8530
  "style": {
8371
8531
  color: props.cancelButtonColor
8372
8532
  },
@@ -8375,7 +8535,7 @@ var stdin_default$G = vue.defineComponent({
8375
8535
  }, null), props.showConfirmButton && vue.createVNode(Button, {
8376
8536
  "size": "large",
8377
8537
  "text": props.confirmButtonText || t$7("confirm"),
8378
- "class": [bem$B("confirm"), {
8538
+ "class": [bem$A("confirm"), {
8379
8539
  [BORDER_LEFT]: props.showCancelButton
8380
8540
  }],
8381
8541
  "style": {
@@ -8385,19 +8545,19 @@ var stdin_default$G = vue.defineComponent({
8385
8545
  "onClick": onConfirm
8386
8546
  }, null)]);
8387
8547
  const renderRoundButtons = () => vue.createVNode(ActionBar, {
8388
- "class": bem$B("footer")
8548
+ "class": bem$A("footer")
8389
8549
  }, {
8390
8550
  default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
8391
8551
  "type": "warning",
8392
8552
  "text": props.cancelButtonText || t$7("cancel"),
8393
- "class": bem$B("cancel"),
8553
+ "class": bem$A("cancel"),
8394
8554
  "color": props.cancelButtonColor,
8395
8555
  "loading": loading.cancel,
8396
8556
  "onClick": onCancel
8397
8557
  }, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
8398
8558
  "type": "danger",
8399
8559
  "text": props.confirmButtonText || t$7("confirm"),
8400
- "class": bem$B("confirm"),
8560
+ "class": bem$A("confirm"),
8401
8561
  "color": props.confirmButtonColor,
8402
8562
  "loading": loading.confirm,
8403
8563
  "onClick": onConfirm
@@ -8420,7 +8580,7 @@ var stdin_default$G = vue.defineComponent({
8420
8580
  return vue.createVNode(Popup, vue.mergeProps({
8421
8581
  "ref": root,
8422
8582
  "role": "dialog",
8423
- "class": [bem$B([theme]), className],
8583
+ "class": [bem$A([theme]), className],
8424
8584
  "style": {
8425
8585
  width: addUnit(width)
8426
8586
  },
@@ -8442,7 +8602,7 @@ function initInstance$2() {
8442
8602
  state,
8443
8603
  toggle
8444
8604
  } = usePopupState();
8445
- return () => vue.createVNode(stdin_default$G, vue.mergeProps(state, {
8605
+ return () => vue.createVNode(stdin_default$F, vue.mergeProps(state, {
8446
8606
  "onUpdate:show": toggle
8447
8607
  }), null);
8448
8608
  }
@@ -8507,19 +8667,19 @@ Dialog.setDefaultOptions = (options) => {
8507
8667
  Dialog.resetDefaultOptions = () => {
8508
8668
  Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8509
8669
  };
8510
- Dialog.Component = withInstall(stdin_default$G);
8670
+ Dialog.Component = withInstall(stdin_default$F);
8511
8671
  Dialog.install = (app) => {
8512
8672
  app.use(Dialog.Component);
8513
8673
  app.config.globalProperties.$dialog = Dialog;
8514
8674
  };
8515
- const [name$z, bem$A] = createNamespace("divider");
8675
+ const [name$y, bem$z] = createNamespace("divider");
8516
8676
  const dividerProps = {
8517
8677
  dashed: Boolean,
8518
8678
  hairline: truthProp,
8519
8679
  contentPosition: makeStringProp("center")
8520
8680
  };
8521
- var stdin_default$F = vue.defineComponent({
8522
- name: name$z,
8681
+ var stdin_default$E = vue.defineComponent({
8682
+ name: name$y,
8523
8683
  props: dividerProps,
8524
8684
  setup(props, {
8525
8685
  slots
@@ -8528,7 +8688,7 @@ var stdin_default$F = vue.defineComponent({
8528
8688
  var _a;
8529
8689
  return vue.createVNode("div", {
8530
8690
  "role": "separator",
8531
- "class": bem$A({
8691
+ "class": bem$z({
8532
8692
  dashed: props.dashed,
8533
8693
  hairline: props.hairline,
8534
8694
  [`content-${props.contentPosition}`]: !!slots.default
@@ -8537,8 +8697,8 @@ var stdin_default$F = vue.defineComponent({
8537
8697
  };
8538
8698
  }
8539
8699
  });
8540
- const Divider = withInstall(stdin_default$F);
8541
- const [name$y, bem$z] = createNamespace("dropdown-menu");
8700
+ const Divider = withInstall(stdin_default$E);
8701
+ const [name$x, bem$y] = createNamespace("dropdown-menu");
8542
8702
  const dropdownMenuProps = {
8543
8703
  overlay: truthProp,
8544
8704
  zIndex: numericProp,
@@ -8548,9 +8708,9 @@ const dropdownMenuProps = {
8548
8708
  closeOnClickOutside: truthProp,
8549
8709
  closeOnClickOverlay: truthProp
8550
8710
  };
8551
- const DROPDOWN_KEY = Symbol(name$y);
8552
- var stdin_default$E = vue.defineComponent({
8553
- name: name$y,
8711
+ const DROPDOWN_KEY = Symbol(name$x);
8712
+ var stdin_default$D = vue.defineComponent({
8713
+ name: name$x,
8554
8714
  props: dropdownMenuProps,
8555
8715
  setup(props, {
8556
8716
  slots
@@ -8618,7 +8778,7 @@ var stdin_default$E = vue.defineComponent({
8618
8778
  "id": `${id}-${index}`,
8619
8779
  "role": "button",
8620
8780
  "tabindex": disabled ? void 0 : 0,
8621
- "class": [bem$z("item", {
8781
+ "class": [bem$y("item", {
8622
8782
  disabled
8623
8783
  }), {
8624
8784
  [HAPTICS_FEEDBACK]: !disabled
@@ -8629,7 +8789,7 @@ var stdin_default$E = vue.defineComponent({
8629
8789
  }
8630
8790
  }
8631
8791
  }, [vue.createVNode("span", {
8632
- "class": [bem$z("title", {
8792
+ "class": [bem$y("title", {
8633
8793
  down: showPopup === (props.direction === "down"),
8634
8794
  active: showPopup
8635
8795
  }), titleClass],
@@ -8653,18 +8813,18 @@ var stdin_default$E = vue.defineComponent({
8653
8813
  var _a;
8654
8814
  return vue.createVNode("div", {
8655
8815
  "ref": root,
8656
- "class": bem$z()
8816
+ "class": bem$y()
8657
8817
  }, [vue.createVNode("div", {
8658
8818
  "ref": barRef,
8659
8819
  "style": barStyle.value,
8660
- "class": bem$z("bar", {
8820
+ "class": bem$y("bar", {
8661
8821
  opened: opened.value
8662
8822
  })
8663
8823
  }, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
8664
8824
  };
8665
8825
  }
8666
8826
  });
8667
- const [name$x, bem$y] = createNamespace("dropdown-item");
8827
+ const [name$w, bem$x] = createNamespace("dropdown-item");
8668
8828
  const dropdownItemProps = {
8669
8829
  title: String,
8670
8830
  options: makeArrayProp(),
@@ -8674,8 +8834,8 @@ const dropdownItemProps = {
8674
8834
  modelValue: unknownProp,
8675
8835
  titleClass: unknownProp
8676
8836
  };
8677
- var stdin_default$D = vue.defineComponent({
8678
- name: name$x,
8837
+ var stdin_default$C = vue.defineComponent({
8838
+ name: name$w,
8679
8839
  props: dropdownItemProps,
8680
8840
  emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
8681
8841
  setup(props, {
@@ -8742,7 +8902,7 @@ var stdin_default$D = vue.defineComponent({
8742
8902
  const renderIcon = () => {
8743
8903
  if (active) {
8744
8904
  return vue.createVNode(Icon, {
8745
- "class": bem$y("icon"),
8905
+ "class": bem$x("icon"),
8746
8906
  "color": activeColor,
8747
8907
  "name": "success"
8748
8908
  }, null);
@@ -8753,7 +8913,7 @@ var stdin_default$D = vue.defineComponent({
8753
8913
  "key": option.value,
8754
8914
  "icon": option.icon,
8755
8915
  "title": option.text,
8756
- "class": bem$y("option", {
8916
+ "class": bem$x("option", {
8757
8917
  active
8758
8918
  }),
8759
8919
  "style": {
@@ -8785,13 +8945,13 @@ var stdin_default$D = vue.defineComponent({
8785
8945
  }
8786
8946
  return vue.withDirectives(vue.createVNode("div", {
8787
8947
  "style": style,
8788
- "class": bem$y([direction]),
8948
+ "class": bem$x([direction]),
8789
8949
  "onClick": onClickWrapper
8790
8950
  }, [vue.createVNode(Popup, {
8791
8951
  "show": state.showPopup,
8792
8952
  "onUpdate:show": ($event) => state.showPopup = $event,
8793
8953
  "role": "menu",
8794
- "class": bem$y("content"),
8954
+ "class": bem$x("content"),
8795
8955
  "overlay": overlay,
8796
8956
  "position": direction === "down" ? "top" : "bottom",
8797
8957
  "duration": state.transition ? duration : 0,
@@ -8829,147 +8989,8 @@ var stdin_default$D = vue.defineComponent({
8829
8989
  };
8830
8990
  }
8831
8991
  });
8832
- const DropdownItem = withInstall(stdin_default$D);
8833
- const DropdownMenu = withInstall(stdin_default$E);
8834
- const prefix = "van-empty-network-";
8835
- const renderStop = (color, offset, opacity) => vue.createVNode("stop", {
8836
- "stop-color": color,
8837
- "offset": `${offset}%`,
8838
- "stop-opacity": opacity
8839
- }, null);
8840
- const Network = vue.createVNode("svg", {
8841
- "viewBox": "0 0 160 160"
8842
- }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
8843
- "id": `${prefix}1`,
8844
- "x1": "64%",
8845
- "y1": "100%",
8846
- "x2": "64%"
8847
- }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
8848
- "id": `${prefix}2`,
8849
- "x1": "50%",
8850
- "x2": "50%",
8851
- "y2": "84%"
8852
- }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
8853
- "id": `${prefix}3`,
8854
- "x1": "100%",
8855
- "x2": "100%",
8856
- "y2": "100%"
8857
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
8858
- "id": `${prefix}4`,
8859
- "cx": "50%",
8860
- "cy": "0%",
8861
- "fx": "50%",
8862
- "fy": "0%",
8863
- "r": "100%",
8864
- "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
8865
- }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
8866
- "fill": "none"
8867
- }, [vue.createVNode("g", {
8868
- "opacity": ".8"
8869
- }, [vue.createVNode("path", {
8870
- "d": "M36 131V53H16v20H2v58h34z",
8871
- "fill": `url(#${prefix}1)`
8872
- }, null), vue.createVNode("path", {
8873
- "d": "M123 15h22v14h9v77h-31V15z",
8874
- "fill": `url(#${prefix}1)`
8875
- }, null)]), vue.createVNode("path", {
8876
- "fill": `url(#${prefix}4)`,
8877
- "d": "M0 139h160v21H0z"
8878
- }, null), vue.createVNode("path", {
8879
- "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
8880
- "fill": `url(#${prefix}2)`
8881
- }, null), vue.createVNode("g", {
8882
- "opacity": ".6",
8883
- "stroke-linecap": "round",
8884
- "stroke-width": "7"
8885
- }, [vue.createVNode("path", {
8886
- "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
8887
- "stroke": `url(#${prefix}3)`
8888
- }, null), vue.createVNode("path", {
8889
- "d": "M53 36a34 34 0 0 0 0 48",
8890
- "stroke": `url(#${prefix}3)`
8891
- }, null), vue.createVNode("path", {
8892
- "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
8893
- "stroke": `url(#${prefix}3)`
8894
- }, null), vue.createVNode("path", {
8895
- "d": "M106 84a34 34 0 0 0 0-48",
8896
- "stroke": `url(#${prefix}3)`
8897
- }, null)]), vue.createVNode("g", {
8898
- "transform": "translate(31 105)"
8899
- }, [vue.createVNode("rect", {
8900
- "fill": "#EBEDF0",
8901
- "width": "98",
8902
- "height": "34",
8903
- "rx": "2"
8904
- }, null), vue.createVNode("rect", {
8905
- "fill": "#FFF",
8906
- "x": "9",
8907
- "y": "8",
8908
- "width": "80",
8909
- "height": "18",
8910
- "rx": "1.1"
8911
- }, null), vue.createVNode("rect", {
8912
- "fill": "#EBEDF0",
8913
- "x": "15",
8914
- "y": "12",
8915
- "width": "18",
8916
- "height": "6",
8917
- "rx": "1.1"
8918
- }, null)])])]);
8919
- const [name$w, bem$x] = createNamespace("empty");
8920
- const PRESET_IMAGES = ["error", "search", "default"];
8921
- const emptyProps = {
8922
- image: makeStringProp("default"),
8923
- imageSize: numericProp,
8924
- description: String
8925
- };
8926
- var stdin_default$C = vue.defineComponent({
8927
- name: name$w,
8928
- props: emptyProps,
8929
- setup(props, {
8930
- slots
8931
- }) {
8932
- const renderImage = () => {
8933
- if (slots.image) {
8934
- return slots.image();
8935
- }
8936
- let {
8937
- image
8938
- } = props;
8939
- if (image === "network") {
8940
- return Network;
8941
- }
8942
- if (PRESET_IMAGES.includes(image)) {
8943
- image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
8944
- }
8945
- return vue.createVNode("img", {
8946
- "src": image
8947
- }, null);
8948
- };
8949
- const renderDescription = () => {
8950
- const description = slots.description ? slots.description() : props.description;
8951
- if (description) {
8952
- return vue.createVNode("p", {
8953
- "class": bem$x("description")
8954
- }, [description]);
8955
- }
8956
- };
8957
- const renderBottom = () => {
8958
- if (slots.default) {
8959
- return vue.createVNode("div", {
8960
- "class": bem$x("bottom")
8961
- }, [slots.default()]);
8962
- }
8963
- };
8964
- return () => vue.createVNode("div", {
8965
- "class": bem$x()
8966
- }, [vue.createVNode("div", {
8967
- "class": bem$x("image"),
8968
- "style": getSizeStyle(props.imageSize)
8969
- }, [renderImage()]), renderDescription(), renderBottom()]);
8970
- }
8971
- });
8972
- const Empty = withInstall(stdin_default$C);
8992
+ const DropdownItem = withInstall(stdin_default$C);
8993
+ const DropdownMenu = withInstall(stdin_default$D);
8973
8994
  const [name$v, bem$w] = createNamespace("grid");
8974
8995
  const gridProps = {
8975
8996
  square: Boolean,
@@ -9623,6 +9644,7 @@ var stdin_default$x = vue.defineComponent({
9623
9644
  children,
9624
9645
  linkChildren
9625
9646
  } = use.useChildren(INDEX_BAR_KEY);
9647
+ let selectActiveIndex;
9626
9648
  linkChildren({
9627
9649
  props
9628
9650
  });
@@ -9650,6 +9672,7 @@ var stdin_default$x = vue.defineComponent({
9650
9672
  }
9651
9673
  return -1;
9652
9674
  };
9675
+ const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
9653
9676
  const onScroll = () => {
9654
9677
  if (isHidden(root)) {
9655
9678
  return;
@@ -9661,7 +9684,16 @@ var stdin_default$x = vue.defineComponent({
9661
9684
  const scrollTop = getScrollTop(scrollParent.value);
9662
9685
  const scrollParentRect = use.useRect(scrollParent);
9663
9686
  const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
9664
- const active = getActiveAnchor(scrollTop, rects);
9687
+ let active = -1;
9688
+ if (selectActiveIndex) {
9689
+ const match = getMatchAnchor(selectActiveIndex);
9690
+ if (match) {
9691
+ const rect = match.getRect(scrollParent.value, scrollParentRect);
9692
+ active = getActiveAnchor(rect.top, rects);
9693
+ }
9694
+ } else {
9695
+ active = getActiveAnchor(scrollTop, rects);
9696
+ }
9665
9697
  activeAnchor.value = indexList[active];
9666
9698
  if (sticky) {
9667
9699
  children.forEach((item, index) => {
@@ -9680,7 +9712,7 @@ var stdin_default$x = vue.defineComponent({
9680
9712
  if (index === active) {
9681
9713
  state.active = true;
9682
9714
  state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
9683
- } else if (index === active - 1) {
9715
+ } else if (index === active - 1 && selectActiveIndex === "") {
9684
9716
  const activeItemTop = rects[active].top - scrollTop;
9685
9717
  state.active = activeItemTop > 0;
9686
9718
  state.top = activeItemTop + scrollParentRect.top - rects[index].height;
@@ -9689,6 +9721,7 @@ var stdin_default$x = vue.defineComponent({
9689
9721
  }
9690
9722
  });
9691
9723
  }
9724
+ selectActiveIndex = "";
9692
9725
  };
9693
9726
  const init = () => {
9694
9727
  vue.nextTick(onScroll);
@@ -9714,9 +9747,18 @@ var stdin_default$x = vue.defineComponent({
9714
9747
  }, [index]);
9715
9748
  });
9716
9749
  const scrollTo = (index) => {
9717
- index = String(index);
9718
- const match = children.find((item) => String(item.index) === index);
9750
+ selectActiveIndex = String(index);
9751
+ const match = getMatchAnchor(selectActiveIndex);
9719
9752
  if (match) {
9753
+ const scrollTop = getScrollTop(scrollParent.value);
9754
+ const scrollParentRect = use.useRect(scrollParent);
9755
+ const {
9756
+ offsetHeight
9757
+ } = document.documentElement;
9758
+ if (scrollTop === offsetHeight - scrollParentRect.height) {
9759
+ onScroll();
9760
+ return;
9761
+ }
9720
9762
  match.$el.scrollIntoView();
9721
9763
  if (props.sticky && props.stickyOffsetTop) {
9722
9764
  setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
@@ -10050,10 +10092,10 @@ var stdin_default$u = vue.defineComponent({
10050
10092
  "ref": navBarRef,
10051
10093
  "style": style,
10052
10094
  "class": [bem$p({
10053
- fixed,
10054
- "safe-area-inset-top": props.safeAreaInsetTop
10095
+ fixed
10055
10096
  }), {
10056
- [BORDER_BOTTOM]: border
10097
+ [BORDER_BOTTOM]: border,
10098
+ "van-safe-area-top": props.safeAreaInsetTop
10057
10099
  }]
10058
10100
  }, [vue.createVNode("div", {
10059
10101
  "class": bem$p("content")
@@ -10442,6 +10484,15 @@ const numberKeyboardProps = {
10442
10484
  default: ""
10443
10485
  }
10444
10486
  };
10487
+ function shuffle(array) {
10488
+ for (let i = array.length - 1; i > 0; i--) {
10489
+ const j = Math.floor(Math.random() * (i + 1));
10490
+ const temp = array[i];
10491
+ array[i] = array[j];
10492
+ array[j] = temp;
10493
+ }
10494
+ return array;
10495
+ }
10445
10496
  var stdin_default$q = vue.defineComponent({
10446
10497
  name: name$l,
10447
10498
  props: numberKeyboardProps,
@@ -10456,7 +10507,7 @@ var stdin_default$q = vue.defineComponent({
10456
10507
  text: i + 1
10457
10508
  }));
10458
10509
  if (props.randomKeyOrder) {
10459
- keys2.sort(() => Math.random() > 0.5 ? 1 : -1);
10510
+ shuffle(keys2);
10460
10511
  }
10461
10512
  return keys2;
10462
10513
  };
@@ -11311,33 +11362,53 @@ var stdin_default$k = vue.defineComponent({
11311
11362
  }) {
11312
11363
  const touch = useTouch();
11313
11364
  const [itemRefs, setItemRefs] = useRefs();
11365
+ const groupRef = vue.ref();
11314
11366
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
11315
11367
  const list = vue.computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
11316
11368
  let ranges;
11369
+ let groupRefRect;
11370
+ let minRectTop = Number.MAX_SAFE_INTEGER;
11371
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
11317
11372
  const updateRanges = () => {
11373
+ groupRefRect = use.useRect(groupRef);
11318
11374
  const rects = itemRefs.value.map(use.useRect);
11319
11375
  ranges = [];
11320
11376
  rects.forEach((rect, index) => {
11377
+ minRectTop = Math.min(rect.top, minRectTop);
11378
+ maxRectTop = Math.max(rect.top, maxRectTop);
11321
11379
  if (props.allowHalf) {
11322
11380
  ranges.push({
11323
11381
  score: index + 0.5,
11324
- left: rect.left
11382
+ left: rect.left,
11383
+ top: rect.top,
11384
+ height: rect.height
11325
11385
  }, {
11326
11386
  score: index + 1,
11327
- left: rect.left + rect.width / 2
11387
+ left: rect.left + rect.width / 2,
11388
+ top: rect.top,
11389
+ height: rect.height
11328
11390
  });
11329
11391
  } else {
11330
11392
  ranges.push({
11331
11393
  score: index + 1,
11332
- left: rect.left
11394
+ left: rect.left,
11395
+ top: rect.top,
11396
+ height: rect.height
11333
11397
  });
11334
11398
  }
11335
11399
  });
11336
11400
  };
11337
- const getScoreByPosition = (x) => {
11401
+ const getScoreByPosition = (x, y) => {
11338
11402
  for (let i = ranges.length - 1; i > 0; i--) {
11339
- if (x > ranges[i].left) {
11340
- return ranges[i].score;
11403
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
11404
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
11405
+ return ranges[i].score;
11406
+ }
11407
+ } else {
11408
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
11409
+ if (x > ranges[i].left && ranges[i].top === curTop) {
11410
+ return ranges[i].score;
11411
+ }
11341
11412
  }
11342
11413
  }
11343
11414
  return props.allowHalf ? 0.5 : 1;
@@ -11362,10 +11433,11 @@ var stdin_default$k = vue.defineComponent({
11362
11433
  touch.move(event);
11363
11434
  if (touch.isHorizontal()) {
11364
11435
  const {
11365
- clientX
11436
+ clientX,
11437
+ clientY
11366
11438
  } = event.touches[0];
11367
11439
  preventDefault(event);
11368
- select(getScoreByPosition(clientX));
11440
+ select(getScoreByPosition(clientX, clientY));
11369
11441
  }
11370
11442
  };
11371
11443
  const renderStar = (item, index) => {
@@ -11394,7 +11466,7 @@ var stdin_default$k = vue.defineComponent({
11394
11466
  }
11395
11467
  const onClickItem = (event) => {
11396
11468
  updateRanges();
11397
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
11469
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
11398
11470
  };
11399
11471
  return vue.createVNode("div", {
11400
11472
  "key": index,
@@ -11432,6 +11504,7 @@ var stdin_default$k = vue.defineComponent({
11432
11504
  };
11433
11505
  use.useCustomFieldValue(() => props.modelValue);
11434
11506
  return () => vue.createVNode("div", {
11507
+ "ref": groupRef,
11435
11508
  "role": "radiogroup",
11436
11509
  "class": bem$f({
11437
11510
  readonly: props.readonly,
@@ -11556,14 +11629,17 @@ var stdin_default$j = vue.defineComponent({
11556
11629
  }
11557
11630
  });
11558
11631
  const Search = withInstall(stdin_default$j);
11559
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
11560
11632
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
11561
- function getIconURL(icon) {
11562
- if (PRESET_ICONS.includes(icon)) {
11563
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
11564
- }
11565
- return icon;
11566
- }
11633
+ const iconMap = {
11634
+ qq: "qq",
11635
+ link: "link-o",
11636
+ weibo: "weibo",
11637
+ qrcode: "qr",
11638
+ poster: "photo-o",
11639
+ wechat: "wechat",
11640
+ "weapp-qrcode": "miniprogram-o",
11641
+ "wechat-moments": "wechat-moments"
11642
+ };
11567
11643
  const [name$d, bem$d, t$2] = createNamespace("share-sheet");
11568
11644
  const shareSheetProps = extend({}, popupSharedProps, {
11569
11645
  title: String,
@@ -11601,6 +11677,19 @@ var stdin_default$i = vue.defineComponent({
11601
11677
  }, [description])]);
11602
11678
  }
11603
11679
  };
11680
+ const renderIcon = (icon) => {
11681
+ if (iconMap[icon]) {
11682
+ return vue.createVNode("div", {
11683
+ "class": bem$d("icon", [icon])
11684
+ }, [vue.createVNode(Icon, {
11685
+ "name": iconMap[icon] || icon
11686
+ }, null)]);
11687
+ }
11688
+ return vue.createVNode("img", {
11689
+ "src": icon,
11690
+ "class": bem$d("image-icon")
11691
+ }, null);
11692
+ };
11604
11693
  const renderOption = (option, index) => {
11605
11694
  const {
11606
11695
  name: name2,
@@ -11613,10 +11702,7 @@ var stdin_default$i = vue.defineComponent({
11613
11702
  "tabindex": 0,
11614
11703
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
11615
11704
  "onClick": () => onSelect(option, index)
11616
- }, [vue.createVNode("img", {
11617
- "src": getIconURL(icon),
11618
- "class": bem$d("icon")
11619
- }, null), name2 && vue.createVNode("span", {
11705
+ }, [renderIcon(icon), name2 && vue.createVNode("span", {
11620
11706
  "class": bem$d("name")
11621
11707
  }, [name2]), description && vue.createVNode("span", {
11622
11708
  "class": bem$d("option-description")
@@ -11774,9 +11860,11 @@ const skeletonProps = {
11774
11860
  };
11775
11861
  var stdin_default$f = vue.defineComponent({
11776
11862
  name: name$a,
11863
+ inheritAttrs: false,
11777
11864
  props: skeletonProps,
11778
11865
  setup(props, {
11779
- slots
11866
+ slots,
11867
+ attrs
11780
11868
  }) {
11781
11869
  const renderAvatar = () => {
11782
11870
  if (props.avatar) {
@@ -11819,12 +11907,12 @@ var stdin_default$f = vue.defineComponent({
11819
11907
  if (!props.loading) {
11820
11908
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
11821
11909
  }
11822
- return vue.createVNode("div", {
11910
+ return vue.createVNode("div", vue.mergeProps({
11823
11911
  "class": bem$a({
11824
11912
  animate: props.animate,
11825
11913
  round: props.round
11826
11914
  })
11827
- }, [renderAvatar(), vue.createVNode("div", {
11915
+ }, attrs), [renderAvatar(), vue.createVNode("div", {
11828
11916
  "class": bem$a("content")
11829
11917
  }, [renderTitle(), renderRows()])]);
11830
11918
  };
@@ -12715,7 +12803,7 @@ var stdin_default$9 = vue.defineComponent({
12715
12803
  return vue.createVNode("div", {
12716
12804
  "ref": root,
12717
12805
  "class": bem$4(),
12718
- "onClick": getClickHandler("cell"),
12806
+ "onClick": getClickHandler("cell", lockClick2),
12719
12807
  "onTouchstart": onTouchStart,
12720
12808
  "onTouchmove": onTouchMove,
12721
12809
  "onTouchend": onTouchEnd,
@@ -13072,7 +13160,7 @@ var stdin_default$5 = vue.defineComponent({
13072
13160
  imageFit: String,
13073
13161
  lazyLoad: Boolean,
13074
13162
  deletable: Boolean,
13075
- previewSize: numericProp,
13163
+ previewSize: [Number, String, Array],
13076
13164
  beforeDelete: Function
13077
13165
  },
13078
13166
  emits: ["delete", "preview"],
@@ -13146,16 +13234,19 @@ var stdin_default$5 = vue.defineComponent({
13146
13234
  };
13147
13235
  const renderPreview = () => {
13148
13236
  const {
13149
- item
13237
+ item,
13238
+ lazyLoad,
13239
+ imageFit,
13240
+ previewSize
13150
13241
  } = props;
13151
13242
  if (isImageFile(item)) {
13152
13243
  return vue.createVNode(Image$1, {
13153
- "fit": props.imageFit,
13244
+ "fit": imageFit,
13154
13245
  "src": item.content || item.url,
13155
13246
  "class": bem("preview-image"),
13156
- "width": props.previewSize,
13157
- "height": props.previewSize,
13158
- "lazyLoad": props.lazyLoad,
13247
+ "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
13248
+ "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
13249
+ "lazyLoad": lazyLoad,
13159
13250
  "onClick": onPreview
13160
13251
  }, {
13161
13252
  default: renderCover
@@ -13195,7 +13286,7 @@ const uploaderProps = {
13195
13286
  modelValue: makeArrayProp(),
13196
13287
  beforeRead: Function,
13197
13288
  beforeDelete: Function,
13198
- previewSize: numericProp,
13289
+ previewSize: [Number, String, Array],
13199
13290
  previewImage: truthProp,
13200
13291
  previewOptions: Object,
13201
13292
  previewFullImage: truthProp,
@@ -14262,7 +14353,7 @@ const Lazyload = {
14262
14353
  });
14263
14354
  }
14264
14355
  };
14265
- const version = "3.4.5";
14356
+ const version = "3.4.8";
14266
14357
  function install(app) {
14267
14358
  const components = [
14268
14359
  ActionBar,