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
@@ -118,6 +118,12 @@ function addUnit(value) {
118
118
  }
119
119
  function getSizeStyle(originSize) {
120
120
  if (isDef(originSize)) {
121
+ if (Array.isArray(originSize)) {
122
+ return {
123
+ width: addUnit(originSize[0]),
124
+ height: addUnit(originSize[1])
125
+ };
126
+ }
121
127
  const size = addUnit(originSize);
122
128
  return {
123
129
  width: size,
@@ -986,7 +992,7 @@ function useTouch() {
986
992
  };
987
993
  const move = (event) => {
988
994
  const touch = event.touches[0];
989
- deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
995
+ deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
990
996
  deltaY.value = touch.clientY - startY.value;
991
997
  offsetX.value = Math.abs(deltaX.value);
992
998
  offsetY.value = Math.abs(deltaY.value);
@@ -1126,6 +1132,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
1126
1132
  iconPrefix: String,
1127
1133
  closeOnPopstate: Boolean,
1128
1134
  closeIconPosition: makeStringProp("top-right"),
1135
+ safeAreaInsetTop: Boolean,
1129
1136
  safeAreaInsetBottom: Boolean
1130
1137
  });
1131
1138
  const [name$1l, bem$1h] = createNamespace("popup");
@@ -1220,6 +1227,7 @@ var stdin_default$1s = defineComponent({
1220
1227
  const {
1221
1228
  round,
1222
1229
  position,
1230
+ safeAreaInsetTop,
1223
1231
  safeAreaInsetBottom
1224
1232
  } = props;
1225
1233
  return withDirectives(createVNode("div", mergeProps({
@@ -1229,6 +1237,7 @@ var stdin_default$1s = defineComponent({
1229
1237
  round,
1230
1238
  [position]: position
1231
1239
  }), {
1240
+ "van-safe-area-top": safeAreaInsetTop,
1232
1241
  "van-safe-area-bottom": safeAreaInsetBottom
1233
1242
  }],
1234
1243
  "onKeydown": onKeydown
@@ -2439,6 +2448,7 @@ var stdin_default$1m = defineComponent({
2439
2448
  useExpose({
2440
2449
  submit,
2441
2450
  validate,
2451
+ getValues,
2442
2452
  scrollToField,
2443
2453
  resetValidation
2444
2454
  });
@@ -2557,6 +2567,7 @@ const fieldSharedProps = {
2557
2567
  placeholder: String,
2558
2568
  autocomplete: String,
2559
2569
  errorMessage: String,
2570
+ enterkeyhint: String,
2560
2571
  clearTrigger: makeStringProp("focus"),
2561
2572
  formatTrigger: makeStringProp("onChange"),
2562
2573
  error: {
@@ -2826,6 +2837,7 @@ var stdin_default$1l = defineComponent({
2826
2837
  autofocus: props.autofocus,
2827
2838
  placeholder: props.placeholder,
2828
2839
  autocomplete: props.autocomplete,
2840
+ enterkeyhint: props.enterkeyhint,
2829
2841
  "aria-labelledby": props.label ? `${id}-label` : void 0,
2830
2842
  onBlur,
2831
2843
  onFocus,
@@ -3089,6 +3101,7 @@ var stdin_default$1k = defineComponent({
3089
3101
  } = props;
3090
3102
  if (isDef(message) && message !== "") {
3091
3103
  return type === "html" ? createVNode("div", {
3104
+ "key": 0,
3092
3105
  "class": bem$19("text"),
3093
3106
  "innerHTML": String(message)
3094
3107
  }, null) : createVNode("div", {
@@ -4237,6 +4250,7 @@ var stdin_default$1a = defineComponent({
4237
4250
  slots
4238
4251
  }) {
4239
4252
  const style = computed(() => {
4253
+ var _a;
4240
4254
  const {
4241
4255
  item,
4242
4256
  index,
@@ -4268,6 +4282,9 @@ var stdin_default$1a = defineComponent({
4268
4282
  break;
4269
4283
  }
4270
4284
  }
4285
+ if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4286
+ style2.marginBottom = 0;
4287
+ }
4271
4288
  return style2;
4272
4289
  });
4273
4290
  const onClick = () => {
@@ -4612,6 +4629,7 @@ const calendarProps = {
4612
4629
  showRangePrompt: truthProp,
4613
4630
  confirmDisabledText: String,
4614
4631
  closeOnClickOverlay: truthProp,
4632
+ safeAreaInsetTop: Boolean,
4615
4633
  safeAreaInsetBottom: truthProp,
4616
4634
  minDate: {
4617
4635
  type: Date,
@@ -4774,8 +4792,8 @@ var stdin_default$17 = defineComponent({
4774
4792
  }
4775
4793
  raf(() => {
4776
4794
  bodyHeight = Math.floor(useRect(bodyRef).height);
4777
- scrollToCurrentDate();
4778
4795
  });
4796
+ scrollToCurrentDate();
4779
4797
  };
4780
4798
  const reset = (date = getInitialDate()) => {
4781
4799
  currentDate.value = date;
@@ -4960,6 +4978,7 @@ var stdin_default$17 = defineComponent({
4960
4978
  "closeable": props.showTitle || props.showSubtitle,
4961
4979
  "teleport": props.teleport,
4962
4980
  "closeOnPopstate": props.closeOnPopstate,
4981
+ "safeAreaInsetTop": props.safeAreaInsetTop,
4963
4982
  "closeOnClickOverlay": props.closeOnClickOverlay,
4964
4983
  "onUpdate:show": updateShow
4965
4984
  }, {
@@ -6088,6 +6107,7 @@ var stdin_default$10 = defineComponent({
6088
6107
  }
6089
6108
  };
6090
6109
  const renderNav = () => children.map((item, index) => createVNode(stdin_default$13, mergeProps({
6110
+ "key": item.id,
6091
6111
  "id": `${id}-${index}`,
6092
6112
  "ref": setTitleRefs(index),
6093
6113
  "type": props.type,
@@ -7678,14 +7698,152 @@ var stdin_default$L = defineComponent({
7678
7698
  }
7679
7699
  });
7680
7700
  const CouponCell = withInstall(stdin_default$L);
7681
- const [name$E, bem$D, t$8] = createNamespace("coupon-list");
7682
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
7701
+ const prefix = "van-empty-network-";
7702
+ const renderStop = (color, offset, opacity) => createVNode("stop", {
7703
+ "stop-color": color,
7704
+ "offset": `${offset}%`,
7705
+ "stop-opacity": opacity
7706
+ }, null);
7707
+ const Network = createVNode("svg", {
7708
+ "viewBox": "0 0 160 160"
7709
+ }, [createVNode("defs", null, [createVNode("linearGradient", {
7710
+ "id": `${prefix}1`,
7711
+ "x1": "64%",
7712
+ "y1": "100%",
7713
+ "x2": "64%"
7714
+ }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
7715
+ "id": `${prefix}2`,
7716
+ "x1": "50%",
7717
+ "x2": "50%",
7718
+ "y2": "84%"
7719
+ }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
7720
+ "id": `${prefix}3`,
7721
+ "x1": "100%",
7722
+ "x2": "100%",
7723
+ "y2": "100%"
7724
+ }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
7725
+ "id": `${prefix}4`,
7726
+ "cx": "50%",
7727
+ "cy": "0%",
7728
+ "fx": "50%",
7729
+ "fy": "0%",
7730
+ "r": "100%",
7731
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
7732
+ }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
7733
+ "fill": "none"
7734
+ }, [createVNode("g", {
7735
+ "opacity": ".8"
7736
+ }, [createVNode("path", {
7737
+ "d": "M36 131V53H16v20H2v58h34z",
7738
+ "fill": `url(#${prefix}1)`
7739
+ }, null), createVNode("path", {
7740
+ "d": "M123 15h22v14h9v77h-31V15z",
7741
+ "fill": `url(#${prefix}1)`
7742
+ }, null)]), createVNode("path", {
7743
+ "fill": `url(#${prefix}4)`,
7744
+ "d": "M0 139h160v21H0z"
7745
+ }, null), createVNode("path", {
7746
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
7747
+ "fill": `url(#${prefix}2)`
7748
+ }, null), createVNode("g", {
7749
+ "opacity": ".6",
7750
+ "stroke-linecap": "round",
7751
+ "stroke-width": "7"
7752
+ }, [createVNode("path", {
7753
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
7754
+ "stroke": `url(#${prefix}3)`
7755
+ }, null), createVNode("path", {
7756
+ "d": "M53 36a34 34 0 0 0 0 48",
7757
+ "stroke": `url(#${prefix}3)`
7758
+ }, null), createVNode("path", {
7759
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
7760
+ "stroke": `url(#${prefix}3)`
7761
+ }, null), createVNode("path", {
7762
+ "d": "M106 84a34 34 0 0 0 0-48",
7763
+ "stroke": `url(#${prefix}3)`
7764
+ }, null)]), createVNode("g", {
7765
+ "transform": "translate(31 105)"
7766
+ }, [createVNode("rect", {
7767
+ "fill": "#EBEDF0",
7768
+ "width": "98",
7769
+ "height": "34",
7770
+ "rx": "2"
7771
+ }, null), createVNode("rect", {
7772
+ "fill": "#FFF",
7773
+ "x": "9",
7774
+ "y": "8",
7775
+ "width": "80",
7776
+ "height": "18",
7777
+ "rx": "1.1"
7778
+ }, null), createVNode("rect", {
7779
+ "fill": "#EBEDF0",
7780
+ "x": "15",
7781
+ "y": "12",
7782
+ "width": "18",
7783
+ "height": "6",
7784
+ "rx": "1.1"
7785
+ }, null)])])]);
7786
+ const [name$E, bem$D] = createNamespace("empty");
7787
+ const PRESET_IMAGES = ["error", "search", "default"];
7788
+ const emptyProps = {
7789
+ image: makeStringProp("default"),
7790
+ imageSize: [Number, String, Array],
7791
+ description: String
7792
+ };
7793
+ var stdin_default$K = defineComponent({
7794
+ name: name$E,
7795
+ props: emptyProps,
7796
+ setup(props, {
7797
+ slots
7798
+ }) {
7799
+ const renderImage = () => {
7800
+ if (slots.image) {
7801
+ return slots.image();
7802
+ }
7803
+ let {
7804
+ image
7805
+ } = props;
7806
+ if (image === "network") {
7807
+ return Network;
7808
+ }
7809
+ if (PRESET_IMAGES.includes(image)) {
7810
+ image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
7811
+ }
7812
+ return createVNode("img", {
7813
+ "src": image
7814
+ }, null);
7815
+ };
7816
+ const renderDescription = () => {
7817
+ const description = slots.description ? slots.description() : props.description;
7818
+ if (description) {
7819
+ return createVNode("p", {
7820
+ "class": bem$D("description")
7821
+ }, [description]);
7822
+ }
7823
+ };
7824
+ const renderBottom = () => {
7825
+ if (slots.default) {
7826
+ return createVNode("div", {
7827
+ "class": bem$D("bottom")
7828
+ }, [slots.default()]);
7829
+ }
7830
+ };
7831
+ return () => createVNode("div", {
7832
+ "class": bem$D()
7833
+ }, [createVNode("div", {
7834
+ "class": bem$D("image"),
7835
+ "style": getSizeStyle(props.imageSize)
7836
+ }, [renderImage()]), renderDescription(), renderBottom()]);
7837
+ }
7838
+ });
7839
+ const Empty = withInstall(stdin_default$K);
7840
+ const [name$D, bem$C, t$8] = createNamespace("coupon-list");
7683
7841
  const couponListProps = {
7684
7842
  code: makeStringProp(""),
7685
7843
  coupons: makeArrayProp(),
7686
7844
  currency: makeStringProp("\xA5"),
7687
7845
  showCount: truthProp,
7688
- emptyImage: makeStringProp(EMPTY_IMAGE),
7846
+ emptyImage: String,
7689
7847
  chosenCoupon: makeNumberProp(-1),
7690
7848
  enabledTitle: String,
7691
7849
  disabledTitle: String,
@@ -7700,8 +7858,8 @@ const couponListProps = {
7700
7858
  exchangeButtonLoading: Boolean,
7701
7859
  exchangeButtonDisabled: Boolean
7702
7860
  };
7703
- var stdin_default$K = defineComponent({
7704
- name: name$E,
7861
+ var stdin_default$J = defineComponent({
7862
+ name: name$D,
7705
7863
  props: couponListProps,
7706
7864
  emits: ["change", "exchange", "update:code"],
7707
7865
  setup(props, {
@@ -7733,28 +7891,30 @@ var stdin_default$K = defineComponent({
7733
7891
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
7734
7892
  });
7735
7893
  };
7736
- const renderEmpty = () => createVNode("div", {
7737
- "class": bem$D("empty")
7738
- }, [createVNode("img", {
7739
- "src": props.emptyImage
7740
- }, null), createVNode("p", null, [t$8("noCoupon")])]);
7894
+ const renderEmpty = () => createVNode(Empty, {
7895
+ "image": props.emptyImage
7896
+ }, {
7897
+ default: () => [createVNode("p", {
7898
+ "class": bem$C("empty-tip")
7899
+ }, [t$8("noCoupon")])]
7900
+ });
7741
7901
  const renderExchangeBar = () => {
7742
7902
  if (props.showExchangeBar) {
7743
7903
  return createVNode("div", {
7744
7904
  "ref": barRef,
7745
- "class": bem$D("exchange-bar")
7905
+ "class": bem$C("exchange-bar")
7746
7906
  }, [createVNode(Field, {
7747
7907
  "modelValue": currentCode.value,
7748
7908
  "onUpdate:modelValue": ($event) => currentCode.value = $event,
7749
7909
  "clearable": true,
7750
7910
  "border": false,
7751
- "class": bem$D("field"),
7911
+ "class": bem$C("field"),
7752
7912
  "placeholder": props.inputPlaceholder || t$8("placeholder"),
7753
7913
  "maxlength": "20"
7754
7914
  }, null), createVNode(Button, {
7755
7915
  "plain": true,
7756
7916
  "type": "danger",
7757
- "class": bem$D("exchange"),
7917
+ "class": bem$C("exchange"),
7758
7918
  "text": props.exchangeButtonText || t$8("exchange"),
7759
7919
  "loading": props.exchangeButtonLoading,
7760
7920
  "disabled": buttonDisabled.value,
@@ -7774,7 +7934,7 @@ var stdin_default$K = defineComponent({
7774
7934
  default: () => {
7775
7935
  var _a;
7776
7936
  return [createVNode("div", {
7777
- "class": bem$D("list", {
7937
+ "class": bem$C("list", {
7778
7938
  "with-bottom": props.showCloseButton
7779
7939
  }),
7780
7940
  "style": {
@@ -7803,7 +7963,7 @@ var stdin_default$K = defineComponent({
7803
7963
  default: () => {
7804
7964
  var _a;
7805
7965
  return [createVNode("div", {
7806
- "class": bem$D("list", {
7966
+ "class": bem$C("list", {
7807
7967
  "with-bottom": props.showCloseButton
7808
7968
  }),
7809
7969
  "style": {
@@ -7830,29 +7990,29 @@ var stdin_default$K = defineComponent({
7830
7990
  });
7831
7991
  return () => createVNode("div", {
7832
7992
  "ref": root,
7833
- "class": bem$D()
7993
+ "class": bem$C()
7834
7994
  }, [renderExchangeBar(), createVNode(Tabs, {
7835
7995
  "active": activeTab.value,
7836
7996
  "onUpdate:active": ($event) => activeTab.value = $event,
7837
- "class": bem$D("tab")
7997
+ "class": bem$C("tab")
7838
7998
  }, {
7839
7999
  default: () => [renderCouponTab(), renderDisabledTab()]
7840
8000
  }), createVNode("div", {
7841
- "class": bem$D("bottom")
8001
+ "class": bem$C("bottom")
7842
8002
  }, [withDirectives(createVNode(Button, {
7843
8003
  "round": true,
7844
8004
  "block": true,
7845
8005
  "type": "danger",
7846
- "class": bem$D("close"),
8006
+ "class": bem$C("close"),
7847
8007
  "text": props.closeButtonText || t$8("close"),
7848
8008
  "onClick": () => emit("change", -1)
7849
8009
  }, null), [[vShow, props.showCloseButton]])])]);
7850
8010
  }
7851
8011
  });
7852
- const CouponList = withInstall(stdin_default$K);
7853
- const [name$D] = createNamespace("time-picker");
7854
- var stdin_default$J = defineComponent({
7855
- name: name$D,
8012
+ const CouponList = withInstall(stdin_default$J);
8013
+ const [name$C] = createNamespace("time-picker");
8014
+ var stdin_default$I = defineComponent({
8015
+ name: name$C,
7856
8016
  props: extend({}, sharedProps, {
7857
8017
  minHour: makeNumericProp(0),
7858
8018
  maxHour: makeNumericProp(23),
@@ -7959,9 +8119,9 @@ var stdin_default$J = defineComponent({
7959
8119
  }
7960
8120
  });
7961
8121
  const currentYear = new Date().getFullYear();
7962
- const [name$C] = createNamespace("date-picker");
7963
- var stdin_default$I = defineComponent({
7964
- name: name$C,
8122
+ const [name$B] = createNamespace("date-picker");
8123
+ var stdin_default$H = defineComponent({
8124
+ name: name$B,
7965
8125
  props: extend({}, sharedProps, {
7966
8126
  type: makeStringProp("datetime"),
7967
8127
  modelValue: Date,
@@ -8167,6 +8327,7 @@ var stdin_default$I = defineComponent({
8167
8327
  const onChange = () => {
8168
8328
  updateInnerValue();
8169
8329
  nextTick(() => {
8330
+ updateInnerValue();
8170
8331
  nextTick(() => emit("change", currentDate.value));
8171
8332
  });
8172
8333
  };
@@ -8176,8 +8337,7 @@ var stdin_default$I = defineComponent({
8176
8337
  });
8177
8338
  watch(columns, updateColumnValue);
8178
8339
  watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
8179
- watch(() => [props.filter, props.maxDate], updateInnerValue);
8180
- watch(() => props.minDate, () => {
8340
+ watch(() => [props.filter, props.minDate, props.maxDate], () => {
8181
8341
  nextTick(updateInnerValue);
8182
8342
  });
8183
8343
  watch(() => props.modelValue, (value) => {
@@ -8199,14 +8359,14 @@ var stdin_default$I = defineComponent({
8199
8359
  }, pick(props, pickerInheritKeys)), slots);
8200
8360
  }
8201
8361
  });
8202
- const [name$B, bem$C] = createNamespace("datetime-picker");
8203
- const timePickerPropKeys = Object.keys(stdin_default$J.props);
8204
- const datePickerPropKeys = Object.keys(stdin_default$I.props);
8205
- const datetimePickerProps = extend({}, stdin_default$J.props, stdin_default$I.props, {
8362
+ const [name$A, bem$B] = createNamespace("datetime-picker");
8363
+ const timePickerPropKeys = Object.keys(stdin_default$I.props);
8364
+ const datePickerPropKeys = Object.keys(stdin_default$H.props);
8365
+ const datetimePickerProps = extend({}, stdin_default$I.props, stdin_default$H.props, {
8206
8366
  modelValue: [String, Date]
8207
8367
  });
8208
- var stdin_default$H = defineComponent({
8209
- name: name$B,
8368
+ var stdin_default$G = defineComponent({
8369
+ name: name$A,
8210
8370
  props: datetimePickerProps,
8211
8371
  setup(props, {
8212
8372
  attrs,
@@ -8221,17 +8381,17 @@ var stdin_default$H = defineComponent({
8221
8381
  });
8222
8382
  return () => {
8223
8383
  const isTimePicker = props.type === "time";
8224
- const Component = isTimePicker ? stdin_default$J : stdin_default$I;
8384
+ const Component = isTimePicker ? stdin_default$I : stdin_default$H;
8225
8385
  const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
8226
8386
  return createVNode(Component, mergeProps({
8227
8387
  "ref": root,
8228
- "class": bem$C()
8388
+ "class": bem$B()
8229
8389
  }, inheritProps, attrs), slots);
8230
8390
  };
8231
8391
  }
8232
8392
  });
8233
- const DatetimePicker = withInstall(stdin_default$H);
8234
- const [name$A, bem$B, t$7] = createNamespace("dialog");
8393
+ const DatetimePicker = withInstall(stdin_default$G);
8394
+ const [name$z, bem$A, t$7] = createNamespace("dialog");
8235
8395
  const dialogProps = extend({}, popupSharedProps, {
8236
8396
  title: String,
8237
8397
  theme: String,
@@ -8252,8 +8412,8 @@ const dialogProps = extend({}, popupSharedProps, {
8252
8412
  closeOnClickOverlay: Boolean
8253
8413
  });
8254
8414
  const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
8255
- var stdin_default$G = defineComponent({
8256
- name: name$A,
8415
+ var stdin_default$F = defineComponent({
8416
+ name: name$z,
8257
8417
  props: dialogProps,
8258
8418
  emits: ["confirm", "cancel", "keydown", "update:show"],
8259
8419
  setup(props, {
@@ -8310,7 +8470,7 @@ var stdin_default$G = defineComponent({
8310
8470
  const title = slots.title ? slots.title() : props.title;
8311
8471
  if (title) {
8312
8472
  return createVNode("div", {
8313
- "class": bem$B("header", {
8473
+ "class": bem$A("header", {
8314
8474
  isolated: !props.message && !slots.default
8315
8475
  })
8316
8476
  }, [title]);
@@ -8322,7 +8482,7 @@ var stdin_default$G = defineComponent({
8322
8482
  allowHtml,
8323
8483
  messageAlign
8324
8484
  } = props;
8325
- const classNames = bem$B("message", {
8485
+ const classNames = bem$A("message", {
8326
8486
  "has-title": hasTitle,
8327
8487
  [messageAlign]: messageAlign
8328
8488
  });
@@ -8340,7 +8500,7 @@ var stdin_default$G = defineComponent({
8340
8500
  const renderContent = () => {
8341
8501
  if (slots.default) {
8342
8502
  return createVNode("div", {
8343
- "class": bem$B("content")
8503
+ "class": bem$A("content")
8344
8504
  }, [slots.default()]);
8345
8505
  }
8346
8506
  const {
@@ -8352,18 +8512,18 @@ var stdin_default$G = defineComponent({
8352
8512
  const hasTitle = !!(title || slots.title);
8353
8513
  return createVNode("div", {
8354
8514
  "key": allowHtml ? 1 : 0,
8355
- "class": bem$B("content", {
8515
+ "class": bem$A("content", {
8356
8516
  isolated: !hasTitle
8357
8517
  })
8358
8518
  }, [renderMessage(hasTitle)]);
8359
8519
  }
8360
8520
  };
8361
8521
  const renderButtons = () => createVNode("div", {
8362
- "class": [BORDER_TOP, bem$B("footer")]
8522
+ "class": [BORDER_TOP, bem$A("footer")]
8363
8523
  }, [props.showCancelButton && createVNode(Button, {
8364
8524
  "size": "large",
8365
8525
  "text": props.cancelButtonText || t$7("cancel"),
8366
- "class": bem$B("cancel"),
8526
+ "class": bem$A("cancel"),
8367
8527
  "style": {
8368
8528
  color: props.cancelButtonColor
8369
8529
  },
@@ -8372,7 +8532,7 @@ var stdin_default$G = defineComponent({
8372
8532
  }, null), props.showConfirmButton && createVNode(Button, {
8373
8533
  "size": "large",
8374
8534
  "text": props.confirmButtonText || t$7("confirm"),
8375
- "class": [bem$B("confirm"), {
8535
+ "class": [bem$A("confirm"), {
8376
8536
  [BORDER_LEFT]: props.showCancelButton
8377
8537
  }],
8378
8538
  "style": {
@@ -8382,19 +8542,19 @@ var stdin_default$G = defineComponent({
8382
8542
  "onClick": onConfirm
8383
8543
  }, null)]);
8384
8544
  const renderRoundButtons = () => createVNode(ActionBar, {
8385
- "class": bem$B("footer")
8545
+ "class": bem$A("footer")
8386
8546
  }, {
8387
8547
  default: () => [props.showCancelButton && createVNode(ActionBarButton, {
8388
8548
  "type": "warning",
8389
8549
  "text": props.cancelButtonText || t$7("cancel"),
8390
- "class": bem$B("cancel"),
8550
+ "class": bem$A("cancel"),
8391
8551
  "color": props.cancelButtonColor,
8392
8552
  "loading": loading.cancel,
8393
8553
  "onClick": onCancel
8394
8554
  }, null), props.showConfirmButton && createVNode(ActionBarButton, {
8395
8555
  "type": "danger",
8396
8556
  "text": props.confirmButtonText || t$7("confirm"),
8397
- "class": bem$B("confirm"),
8557
+ "class": bem$A("confirm"),
8398
8558
  "color": props.confirmButtonColor,
8399
8559
  "loading": loading.confirm,
8400
8560
  "onClick": onConfirm
@@ -8417,7 +8577,7 @@ var stdin_default$G = defineComponent({
8417
8577
  return createVNode(Popup, mergeProps({
8418
8578
  "ref": root,
8419
8579
  "role": "dialog",
8420
- "class": [bem$B([theme]), className],
8580
+ "class": [bem$A([theme]), className],
8421
8581
  "style": {
8422
8582
  width: addUnit(width)
8423
8583
  },
@@ -8439,7 +8599,7 @@ function initInstance$2() {
8439
8599
  state,
8440
8600
  toggle
8441
8601
  } = usePopupState();
8442
- return () => createVNode(stdin_default$G, mergeProps(state, {
8602
+ return () => createVNode(stdin_default$F, mergeProps(state, {
8443
8603
  "onUpdate:show": toggle
8444
8604
  }), null);
8445
8605
  }
@@ -8504,19 +8664,19 @@ Dialog.setDefaultOptions = (options) => {
8504
8664
  Dialog.resetDefaultOptions = () => {
8505
8665
  Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8506
8666
  };
8507
- Dialog.Component = withInstall(stdin_default$G);
8667
+ Dialog.Component = withInstall(stdin_default$F);
8508
8668
  Dialog.install = (app) => {
8509
8669
  app.use(Dialog.Component);
8510
8670
  app.config.globalProperties.$dialog = Dialog;
8511
8671
  };
8512
- const [name$z, bem$A] = createNamespace("divider");
8672
+ const [name$y, bem$z] = createNamespace("divider");
8513
8673
  const dividerProps = {
8514
8674
  dashed: Boolean,
8515
8675
  hairline: truthProp,
8516
8676
  contentPosition: makeStringProp("center")
8517
8677
  };
8518
- var stdin_default$F = defineComponent({
8519
- name: name$z,
8678
+ var stdin_default$E = defineComponent({
8679
+ name: name$y,
8520
8680
  props: dividerProps,
8521
8681
  setup(props, {
8522
8682
  slots
@@ -8525,7 +8685,7 @@ var stdin_default$F = defineComponent({
8525
8685
  var _a;
8526
8686
  return createVNode("div", {
8527
8687
  "role": "separator",
8528
- "class": bem$A({
8688
+ "class": bem$z({
8529
8689
  dashed: props.dashed,
8530
8690
  hairline: props.hairline,
8531
8691
  [`content-${props.contentPosition}`]: !!slots.default
@@ -8534,8 +8694,8 @@ var stdin_default$F = defineComponent({
8534
8694
  };
8535
8695
  }
8536
8696
  });
8537
- const Divider = withInstall(stdin_default$F);
8538
- const [name$y, bem$z] = createNamespace("dropdown-menu");
8697
+ const Divider = withInstall(stdin_default$E);
8698
+ const [name$x, bem$y] = createNamespace("dropdown-menu");
8539
8699
  const dropdownMenuProps = {
8540
8700
  overlay: truthProp,
8541
8701
  zIndex: numericProp,
@@ -8545,9 +8705,9 @@ const dropdownMenuProps = {
8545
8705
  closeOnClickOutside: truthProp,
8546
8706
  closeOnClickOverlay: truthProp
8547
8707
  };
8548
- const DROPDOWN_KEY = Symbol(name$y);
8549
- var stdin_default$E = defineComponent({
8550
- name: name$y,
8708
+ const DROPDOWN_KEY = Symbol(name$x);
8709
+ var stdin_default$D = defineComponent({
8710
+ name: name$x,
8551
8711
  props: dropdownMenuProps,
8552
8712
  setup(props, {
8553
8713
  slots
@@ -8615,7 +8775,7 @@ var stdin_default$E = defineComponent({
8615
8775
  "id": `${id}-${index}`,
8616
8776
  "role": "button",
8617
8777
  "tabindex": disabled ? void 0 : 0,
8618
- "class": [bem$z("item", {
8778
+ "class": [bem$y("item", {
8619
8779
  disabled
8620
8780
  }), {
8621
8781
  [HAPTICS_FEEDBACK]: !disabled
@@ -8626,7 +8786,7 @@ var stdin_default$E = defineComponent({
8626
8786
  }
8627
8787
  }
8628
8788
  }, [createVNode("span", {
8629
- "class": [bem$z("title", {
8789
+ "class": [bem$y("title", {
8630
8790
  down: showPopup === (props.direction === "down"),
8631
8791
  active: showPopup
8632
8792
  }), titleClass],
@@ -8650,18 +8810,18 @@ var stdin_default$E = defineComponent({
8650
8810
  var _a;
8651
8811
  return createVNode("div", {
8652
8812
  "ref": root,
8653
- "class": bem$z()
8813
+ "class": bem$y()
8654
8814
  }, [createVNode("div", {
8655
8815
  "ref": barRef,
8656
8816
  "style": barStyle.value,
8657
- "class": bem$z("bar", {
8817
+ "class": bem$y("bar", {
8658
8818
  opened: opened.value
8659
8819
  })
8660
8820
  }, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
8661
8821
  };
8662
8822
  }
8663
8823
  });
8664
- const [name$x, bem$y] = createNamespace("dropdown-item");
8824
+ const [name$w, bem$x] = createNamespace("dropdown-item");
8665
8825
  const dropdownItemProps = {
8666
8826
  title: String,
8667
8827
  options: makeArrayProp(),
@@ -8671,8 +8831,8 @@ const dropdownItemProps = {
8671
8831
  modelValue: unknownProp,
8672
8832
  titleClass: unknownProp
8673
8833
  };
8674
- var stdin_default$D = defineComponent({
8675
- name: name$x,
8834
+ var stdin_default$C = defineComponent({
8835
+ name: name$w,
8676
8836
  props: dropdownItemProps,
8677
8837
  emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
8678
8838
  setup(props, {
@@ -8739,7 +8899,7 @@ var stdin_default$D = defineComponent({
8739
8899
  const renderIcon = () => {
8740
8900
  if (active) {
8741
8901
  return createVNode(Icon, {
8742
- "class": bem$y("icon"),
8902
+ "class": bem$x("icon"),
8743
8903
  "color": activeColor,
8744
8904
  "name": "success"
8745
8905
  }, null);
@@ -8750,7 +8910,7 @@ var stdin_default$D = defineComponent({
8750
8910
  "key": option.value,
8751
8911
  "icon": option.icon,
8752
8912
  "title": option.text,
8753
- "class": bem$y("option", {
8913
+ "class": bem$x("option", {
8754
8914
  active
8755
8915
  }),
8756
8916
  "style": {
@@ -8782,13 +8942,13 @@ var stdin_default$D = defineComponent({
8782
8942
  }
8783
8943
  return withDirectives(createVNode("div", {
8784
8944
  "style": style,
8785
- "class": bem$y([direction]),
8945
+ "class": bem$x([direction]),
8786
8946
  "onClick": onClickWrapper
8787
8947
  }, [createVNode(Popup, {
8788
8948
  "show": state.showPopup,
8789
8949
  "onUpdate:show": ($event) => state.showPopup = $event,
8790
8950
  "role": "menu",
8791
- "class": bem$y("content"),
8951
+ "class": bem$x("content"),
8792
8952
  "overlay": overlay,
8793
8953
  "position": direction === "down" ? "top" : "bottom",
8794
8954
  "duration": state.transition ? duration : 0,
@@ -8826,147 +8986,8 @@ var stdin_default$D = defineComponent({
8826
8986
  };
8827
8987
  }
8828
8988
  });
8829
- const DropdownItem = withInstall(stdin_default$D);
8830
- const DropdownMenu = withInstall(stdin_default$E);
8831
- const prefix = "van-empty-network-";
8832
- const renderStop = (color, offset, opacity) => createVNode("stop", {
8833
- "stop-color": color,
8834
- "offset": `${offset}%`,
8835
- "stop-opacity": opacity
8836
- }, null);
8837
- const Network = createVNode("svg", {
8838
- "viewBox": "0 0 160 160"
8839
- }, [createVNode("defs", null, [createVNode("linearGradient", {
8840
- "id": `${prefix}1`,
8841
- "x1": "64%",
8842
- "y1": "100%",
8843
- "x2": "64%"
8844
- }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
8845
- "id": `${prefix}2`,
8846
- "x1": "50%",
8847
- "x2": "50%",
8848
- "y2": "84%"
8849
- }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
8850
- "id": `${prefix}3`,
8851
- "x1": "100%",
8852
- "x2": "100%",
8853
- "y2": "100%"
8854
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), createVNode("radialGradient", {
8855
- "id": `${prefix}4`,
8856
- "cx": "50%",
8857
- "cy": "0%",
8858
- "fx": "50%",
8859
- "fy": "0%",
8860
- "r": "100%",
8861
- "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
8862
- }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
8863
- "fill": "none"
8864
- }, [createVNode("g", {
8865
- "opacity": ".8"
8866
- }, [createVNode("path", {
8867
- "d": "M36 131V53H16v20H2v58h34z",
8868
- "fill": `url(#${prefix}1)`
8869
- }, null), createVNode("path", {
8870
- "d": "M123 15h22v14h9v77h-31V15z",
8871
- "fill": `url(#${prefix}1)`
8872
- }, null)]), createVNode("path", {
8873
- "fill": `url(#${prefix}4)`,
8874
- "d": "M0 139h160v21H0z"
8875
- }, null), createVNode("path", {
8876
- "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
8877
- "fill": `url(#${prefix}2)`
8878
- }, null), createVNode("g", {
8879
- "opacity": ".6",
8880
- "stroke-linecap": "round",
8881
- "stroke-width": "7"
8882
- }, [createVNode("path", {
8883
- "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
8884
- "stroke": `url(#${prefix}3)`
8885
- }, null), createVNode("path", {
8886
- "d": "M53 36a34 34 0 0 0 0 48",
8887
- "stroke": `url(#${prefix}3)`
8888
- }, null), createVNode("path", {
8889
- "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
8890
- "stroke": `url(#${prefix}3)`
8891
- }, null), createVNode("path", {
8892
- "d": "M106 84a34 34 0 0 0 0-48",
8893
- "stroke": `url(#${prefix}3)`
8894
- }, null)]), createVNode("g", {
8895
- "transform": "translate(31 105)"
8896
- }, [createVNode("rect", {
8897
- "fill": "#EBEDF0",
8898
- "width": "98",
8899
- "height": "34",
8900
- "rx": "2"
8901
- }, null), createVNode("rect", {
8902
- "fill": "#FFF",
8903
- "x": "9",
8904
- "y": "8",
8905
- "width": "80",
8906
- "height": "18",
8907
- "rx": "1.1"
8908
- }, null), createVNode("rect", {
8909
- "fill": "#EBEDF0",
8910
- "x": "15",
8911
- "y": "12",
8912
- "width": "18",
8913
- "height": "6",
8914
- "rx": "1.1"
8915
- }, null)])])]);
8916
- const [name$w, bem$x] = createNamespace("empty");
8917
- const PRESET_IMAGES = ["error", "search", "default"];
8918
- const emptyProps = {
8919
- image: makeStringProp("default"),
8920
- imageSize: numericProp,
8921
- description: String
8922
- };
8923
- var stdin_default$C = defineComponent({
8924
- name: name$w,
8925
- props: emptyProps,
8926
- setup(props, {
8927
- slots
8928
- }) {
8929
- const renderImage = () => {
8930
- if (slots.image) {
8931
- return slots.image();
8932
- }
8933
- let {
8934
- image
8935
- } = props;
8936
- if (image === "network") {
8937
- return Network;
8938
- }
8939
- if (PRESET_IMAGES.includes(image)) {
8940
- image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
8941
- }
8942
- return createVNode("img", {
8943
- "src": image
8944
- }, null);
8945
- };
8946
- const renderDescription = () => {
8947
- const description = slots.description ? slots.description() : props.description;
8948
- if (description) {
8949
- return createVNode("p", {
8950
- "class": bem$x("description")
8951
- }, [description]);
8952
- }
8953
- };
8954
- const renderBottom = () => {
8955
- if (slots.default) {
8956
- return createVNode("div", {
8957
- "class": bem$x("bottom")
8958
- }, [slots.default()]);
8959
- }
8960
- };
8961
- return () => createVNode("div", {
8962
- "class": bem$x()
8963
- }, [createVNode("div", {
8964
- "class": bem$x("image"),
8965
- "style": getSizeStyle(props.imageSize)
8966
- }, [renderImage()]), renderDescription(), renderBottom()]);
8967
- }
8968
- });
8969
- const Empty = withInstall(stdin_default$C);
8989
+ const DropdownItem = withInstall(stdin_default$C);
8990
+ const DropdownMenu = withInstall(stdin_default$D);
8970
8991
  const [name$v, bem$w] = createNamespace("grid");
8971
8992
  const gridProps = {
8972
8993
  square: Boolean,
@@ -9620,6 +9641,7 @@ var stdin_default$x = defineComponent({
9620
9641
  children,
9621
9642
  linkChildren
9622
9643
  } = useChildren(INDEX_BAR_KEY);
9644
+ let selectActiveIndex;
9623
9645
  linkChildren({
9624
9646
  props
9625
9647
  });
@@ -9647,6 +9669,7 @@ var stdin_default$x = defineComponent({
9647
9669
  }
9648
9670
  return -1;
9649
9671
  };
9672
+ const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
9650
9673
  const onScroll = () => {
9651
9674
  if (isHidden(root)) {
9652
9675
  return;
@@ -9658,7 +9681,16 @@ var stdin_default$x = defineComponent({
9658
9681
  const scrollTop = getScrollTop(scrollParent.value);
9659
9682
  const scrollParentRect = useRect(scrollParent);
9660
9683
  const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
9661
- const active = getActiveAnchor(scrollTop, rects);
9684
+ let active = -1;
9685
+ if (selectActiveIndex) {
9686
+ const match = getMatchAnchor(selectActiveIndex);
9687
+ if (match) {
9688
+ const rect = match.getRect(scrollParent.value, scrollParentRect);
9689
+ active = getActiveAnchor(rect.top, rects);
9690
+ }
9691
+ } else {
9692
+ active = getActiveAnchor(scrollTop, rects);
9693
+ }
9662
9694
  activeAnchor.value = indexList[active];
9663
9695
  if (sticky) {
9664
9696
  children.forEach((item, index) => {
@@ -9677,7 +9709,7 @@ var stdin_default$x = defineComponent({
9677
9709
  if (index === active) {
9678
9710
  state.active = true;
9679
9711
  state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
9680
- } else if (index === active - 1) {
9712
+ } else if (index === active - 1 && selectActiveIndex === "") {
9681
9713
  const activeItemTop = rects[active].top - scrollTop;
9682
9714
  state.active = activeItemTop > 0;
9683
9715
  state.top = activeItemTop + scrollParentRect.top - rects[index].height;
@@ -9686,6 +9718,7 @@ var stdin_default$x = defineComponent({
9686
9718
  }
9687
9719
  });
9688
9720
  }
9721
+ selectActiveIndex = "";
9689
9722
  };
9690
9723
  const init = () => {
9691
9724
  nextTick(onScroll);
@@ -9711,9 +9744,18 @@ var stdin_default$x = defineComponent({
9711
9744
  }, [index]);
9712
9745
  });
9713
9746
  const scrollTo = (index) => {
9714
- index = String(index);
9715
- const match = children.find((item) => String(item.index) === index);
9747
+ selectActiveIndex = String(index);
9748
+ const match = getMatchAnchor(selectActiveIndex);
9716
9749
  if (match) {
9750
+ const scrollTop = getScrollTop(scrollParent.value);
9751
+ const scrollParentRect = useRect(scrollParent);
9752
+ const {
9753
+ offsetHeight
9754
+ } = document.documentElement;
9755
+ if (scrollTop === offsetHeight - scrollParentRect.height) {
9756
+ onScroll();
9757
+ return;
9758
+ }
9717
9759
  match.$el.scrollIntoView();
9718
9760
  if (props.sticky && props.stickyOffsetTop) {
9719
9761
  setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
@@ -10047,10 +10089,10 @@ var stdin_default$u = defineComponent({
10047
10089
  "ref": navBarRef,
10048
10090
  "style": style,
10049
10091
  "class": [bem$p({
10050
- fixed,
10051
- "safe-area-inset-top": props.safeAreaInsetTop
10092
+ fixed
10052
10093
  }), {
10053
- [BORDER_BOTTOM]: border
10094
+ [BORDER_BOTTOM]: border,
10095
+ "van-safe-area-top": props.safeAreaInsetTop
10054
10096
  }]
10055
10097
  }, [createVNode("div", {
10056
10098
  "class": bem$p("content")
@@ -10439,6 +10481,15 @@ const numberKeyboardProps = {
10439
10481
  default: ""
10440
10482
  }
10441
10483
  };
10484
+ function shuffle(array) {
10485
+ for (let i = array.length - 1; i > 0; i--) {
10486
+ const j = Math.floor(Math.random() * (i + 1));
10487
+ const temp = array[i];
10488
+ array[i] = array[j];
10489
+ array[j] = temp;
10490
+ }
10491
+ return array;
10492
+ }
10442
10493
  var stdin_default$q = defineComponent({
10443
10494
  name: name$l,
10444
10495
  props: numberKeyboardProps,
@@ -10453,7 +10504,7 @@ var stdin_default$q = defineComponent({
10453
10504
  text: i + 1
10454
10505
  }));
10455
10506
  if (props.randomKeyOrder) {
10456
- keys2.sort(() => Math.random() > 0.5 ? 1 : -1);
10507
+ shuffle(keys2);
10457
10508
  }
10458
10509
  return keys2;
10459
10510
  };
@@ -11308,33 +11359,53 @@ var stdin_default$k = defineComponent({
11308
11359
  }) {
11309
11360
  const touch = useTouch();
11310
11361
  const [itemRefs, setItemRefs] = useRefs();
11362
+ const groupRef = ref();
11311
11363
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
11312
11364
  const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
11313
11365
  let ranges;
11366
+ let groupRefRect;
11367
+ let minRectTop = Number.MAX_SAFE_INTEGER;
11368
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
11314
11369
  const updateRanges = () => {
11370
+ groupRefRect = useRect(groupRef);
11315
11371
  const rects = itemRefs.value.map(useRect);
11316
11372
  ranges = [];
11317
11373
  rects.forEach((rect, index) => {
11374
+ minRectTop = Math.min(rect.top, minRectTop);
11375
+ maxRectTop = Math.max(rect.top, maxRectTop);
11318
11376
  if (props.allowHalf) {
11319
11377
  ranges.push({
11320
11378
  score: index + 0.5,
11321
- left: rect.left
11379
+ left: rect.left,
11380
+ top: rect.top,
11381
+ height: rect.height
11322
11382
  }, {
11323
11383
  score: index + 1,
11324
- left: rect.left + rect.width / 2
11384
+ left: rect.left + rect.width / 2,
11385
+ top: rect.top,
11386
+ height: rect.height
11325
11387
  });
11326
11388
  } else {
11327
11389
  ranges.push({
11328
11390
  score: index + 1,
11329
- left: rect.left
11391
+ left: rect.left,
11392
+ top: rect.top,
11393
+ height: rect.height
11330
11394
  });
11331
11395
  }
11332
11396
  });
11333
11397
  };
11334
- const getScoreByPosition = (x) => {
11398
+ const getScoreByPosition = (x, y) => {
11335
11399
  for (let i = ranges.length - 1; i > 0; i--) {
11336
- if (x > ranges[i].left) {
11337
- return ranges[i].score;
11400
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
11401
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
11402
+ return ranges[i].score;
11403
+ }
11404
+ } else {
11405
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
11406
+ if (x > ranges[i].left && ranges[i].top === curTop) {
11407
+ return ranges[i].score;
11408
+ }
11338
11409
  }
11339
11410
  }
11340
11411
  return props.allowHalf ? 0.5 : 1;
@@ -11359,10 +11430,11 @@ var stdin_default$k = defineComponent({
11359
11430
  touch.move(event);
11360
11431
  if (touch.isHorizontal()) {
11361
11432
  const {
11362
- clientX
11433
+ clientX,
11434
+ clientY
11363
11435
  } = event.touches[0];
11364
11436
  preventDefault(event);
11365
- select(getScoreByPosition(clientX));
11437
+ select(getScoreByPosition(clientX, clientY));
11366
11438
  }
11367
11439
  };
11368
11440
  const renderStar = (item, index) => {
@@ -11391,7 +11463,7 @@ var stdin_default$k = defineComponent({
11391
11463
  }
11392
11464
  const onClickItem = (event) => {
11393
11465
  updateRanges();
11394
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
11466
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
11395
11467
  };
11396
11468
  return createVNode("div", {
11397
11469
  "key": index,
@@ -11429,6 +11501,7 @@ var stdin_default$k = defineComponent({
11429
11501
  };
11430
11502
  useCustomFieldValue(() => props.modelValue);
11431
11503
  return () => createVNode("div", {
11504
+ "ref": groupRef,
11432
11505
  "role": "radiogroup",
11433
11506
  "class": bem$f({
11434
11507
  readonly: props.readonly,
@@ -11553,14 +11626,17 @@ var stdin_default$j = defineComponent({
11553
11626
  }
11554
11627
  });
11555
11628
  const Search = withInstall(stdin_default$j);
11556
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
11557
11629
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
11558
- function getIconURL(icon) {
11559
- if (PRESET_ICONS.includes(icon)) {
11560
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
11561
- }
11562
- return icon;
11563
- }
11630
+ const iconMap = {
11631
+ qq: "qq",
11632
+ link: "link-o",
11633
+ weibo: "weibo",
11634
+ qrcode: "qr",
11635
+ poster: "photo-o",
11636
+ wechat: "wechat",
11637
+ "weapp-qrcode": "miniprogram-o",
11638
+ "wechat-moments": "wechat-moments"
11639
+ };
11564
11640
  const [name$d, bem$d, t$2] = createNamespace("share-sheet");
11565
11641
  const shareSheetProps = extend({}, popupSharedProps, {
11566
11642
  title: String,
@@ -11598,6 +11674,19 @@ var stdin_default$i = defineComponent({
11598
11674
  }, [description])]);
11599
11675
  }
11600
11676
  };
11677
+ const renderIcon = (icon) => {
11678
+ if (iconMap[icon]) {
11679
+ return createVNode("div", {
11680
+ "class": bem$d("icon", [icon])
11681
+ }, [createVNode(Icon, {
11682
+ "name": iconMap[icon] || icon
11683
+ }, null)]);
11684
+ }
11685
+ return createVNode("img", {
11686
+ "src": icon,
11687
+ "class": bem$d("image-icon")
11688
+ }, null);
11689
+ };
11601
11690
  const renderOption = (option, index) => {
11602
11691
  const {
11603
11692
  name: name2,
@@ -11610,10 +11699,7 @@ var stdin_default$i = defineComponent({
11610
11699
  "tabindex": 0,
11611
11700
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
11612
11701
  "onClick": () => onSelect(option, index)
11613
- }, [createVNode("img", {
11614
- "src": getIconURL(icon),
11615
- "class": bem$d("icon")
11616
- }, null), name2 && createVNode("span", {
11702
+ }, [renderIcon(icon), name2 && createVNode("span", {
11617
11703
  "class": bem$d("name")
11618
11704
  }, [name2]), description && createVNode("span", {
11619
11705
  "class": bem$d("option-description")
@@ -11771,9 +11857,11 @@ const skeletonProps = {
11771
11857
  };
11772
11858
  var stdin_default$f = defineComponent({
11773
11859
  name: name$a,
11860
+ inheritAttrs: false,
11774
11861
  props: skeletonProps,
11775
11862
  setup(props, {
11776
- slots
11863
+ slots,
11864
+ attrs
11777
11865
  }) {
11778
11866
  const renderAvatar = () => {
11779
11867
  if (props.avatar) {
@@ -11816,12 +11904,12 @@ var stdin_default$f = defineComponent({
11816
11904
  if (!props.loading) {
11817
11905
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
11818
11906
  }
11819
- return createVNode("div", {
11907
+ return createVNode("div", mergeProps({
11820
11908
  "class": bem$a({
11821
11909
  animate: props.animate,
11822
11910
  round: props.round
11823
11911
  })
11824
- }, [renderAvatar(), createVNode("div", {
11912
+ }, attrs), [renderAvatar(), createVNode("div", {
11825
11913
  "class": bem$a("content")
11826
11914
  }, [renderTitle(), renderRows()])]);
11827
11915
  };
@@ -12712,7 +12800,7 @@ var stdin_default$9 = defineComponent({
12712
12800
  return createVNode("div", {
12713
12801
  "ref": root,
12714
12802
  "class": bem$4(),
12715
- "onClick": getClickHandler("cell"),
12803
+ "onClick": getClickHandler("cell", lockClick2),
12716
12804
  "onTouchstart": onTouchStart,
12717
12805
  "onTouchmove": onTouchMove,
12718
12806
  "onTouchend": onTouchEnd,
@@ -13069,7 +13157,7 @@ var stdin_default$5 = defineComponent({
13069
13157
  imageFit: String,
13070
13158
  lazyLoad: Boolean,
13071
13159
  deletable: Boolean,
13072
- previewSize: numericProp,
13160
+ previewSize: [Number, String, Array],
13073
13161
  beforeDelete: Function
13074
13162
  },
13075
13163
  emits: ["delete", "preview"],
@@ -13143,16 +13231,19 @@ var stdin_default$5 = defineComponent({
13143
13231
  };
13144
13232
  const renderPreview = () => {
13145
13233
  const {
13146
- item
13234
+ item,
13235
+ lazyLoad,
13236
+ imageFit,
13237
+ previewSize
13147
13238
  } = props;
13148
13239
  if (isImageFile(item)) {
13149
13240
  return createVNode(Image$1, {
13150
- "fit": props.imageFit,
13241
+ "fit": imageFit,
13151
13242
  "src": item.content || item.url,
13152
13243
  "class": bem("preview-image"),
13153
- "width": props.previewSize,
13154
- "height": props.previewSize,
13155
- "lazyLoad": props.lazyLoad,
13244
+ "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
13245
+ "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
13246
+ "lazyLoad": lazyLoad,
13156
13247
  "onClick": onPreview
13157
13248
  }, {
13158
13249
  default: renderCover
@@ -13192,7 +13283,7 @@ const uploaderProps = {
13192
13283
  modelValue: makeArrayProp(),
13193
13284
  beforeRead: Function,
13194
13285
  beforeDelete: Function,
13195
- previewSize: numericProp,
13286
+ previewSize: [Number, String, Array],
13196
13287
  previewImage: truthProp,
13197
13288
  previewOptions: Object,
13198
13289
  previewFullImage: truthProp,
@@ -14259,7 +14350,7 @@ const Lazyload = {
14259
14350
  });
14260
14351
  }
14261
14352
  };
14262
- const version = "3.4.5";
14353
+ const version = "3.4.8";
14263
14354
  function install(app) {
14264
14355
  const components = [
14265
14356
  ActionBar,