vant 4.0.0-alpha.1 → 4.0.0-alpha.2

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 (531) hide show
  1. package/README.md +141 -0
  2. package/changelog.generated.md +39 -42
  3. package/es/address-edit/AddressEdit.d.ts +0 -17
  4. package/es/address-edit/AddressEdit.js +3 -24
  5. package/es/address-edit/index.d.ts +0 -12
  6. package/es/address-edit/types.d.ts +0 -1
  7. package/es/address-list/AddressListItem.d.ts +3 -2
  8. package/es/address-list/AddressListItem.js +1 -1
  9. package/es/badge/Badge.d.ts +4 -3
  10. package/es/badge/index.d.ts +2 -2
  11. package/es/calendar/Calendar.js +1 -1
  12. package/es/calendar/CalendarDay.js +4 -0
  13. package/es/calendar/index.css +1 -1
  14. package/es/calendar/index.less +2 -0
  15. package/es/calendar/types.d.ts +2 -1
  16. package/es/cascader/types.d.ts +2 -1
  17. package/es/checkbox/Checker.d.ts +2 -1
  18. package/es/collapse/Collapse.d.ts +7 -6
  19. package/es/collapse/index.d.ts +3 -3
  20. package/es/composables/use-touch.js +1 -1
  21. package/es/config-provider/ConfigProvider.d.ts +4 -3
  22. package/es/config-provider/index.d.ts +2 -2
  23. package/es/contact-list/ContactList.d.ts +3 -2
  24. package/es/coupon/Coupon.d.ts +2 -1
  25. package/es/coupon-list/CouponList.d.ts +3 -13
  26. package/es/coupon-list/CouponList.js +9 -7
  27. package/es/coupon-list/index.css +1 -1
  28. package/es/coupon-list/index.d.ts +2 -9
  29. package/es/coupon-list/index.less +4 -16
  30. package/es/coupon-list/style/index.js +1 -0
  31. package/es/coupon-list/style/less.js +1 -0
  32. package/es/dialog/index.css +1 -1
  33. package/es/dialog/types.d.ts +2 -2
  34. package/es/dropdown-item/types.d.ts +2 -1
  35. package/es/empty/Empty.d.ts +8 -7
  36. package/es/empty/Empty.js +2 -2
  37. package/es/empty/index.d.ts +2 -2
  38. package/es/field/Field.d.ts +4 -0
  39. package/es/field/Field.js +2 -0
  40. package/es/field/index.d.ts +2 -0
  41. package/es/form/Form.js +1 -0
  42. package/es/form/types.d.ts +1 -0
  43. package/es/icon/index.css +1 -1
  44. package/es/index-bar/IndexBar.d.ts +5 -4
  45. package/es/index-bar/index.d.ts +3 -3
  46. package/es/index-bar/types.d.ts +2 -1
  47. package/es/index.d.ts +1 -1
  48. package/es/index.js +1 -1
  49. package/es/locale/lang/bn-BD.d.ts +0 -2
  50. package/es/locale/lang/bn-BD.js +0 -2
  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/de-DE-formal.d.ts +0 -2
  54. package/es/locale/lang/de-DE-formal.js +0 -2
  55. package/es/locale/lang/de-DE.d.ts +0 -2
  56. package/es/locale/lang/de-DE.js +0 -2
  57. package/es/locale/lang/en-US.d.ts +0 -2
  58. package/es/locale/lang/en-US.js +0 -2
  59. package/es/locale/lang/es-ES.d.ts +0 -2
  60. package/es/locale/lang/es-ES.js +0 -2
  61. package/es/locale/lang/fr-FR.d.ts +0 -2
  62. package/es/locale/lang/fr-FR.js +0 -2
  63. package/es/locale/lang/hi-IN.d.ts +0 -2
  64. package/es/locale/lang/hi-IN.js +0 -2
  65. package/es/locale/lang/id-ID.d.ts +0 -2
  66. package/es/locale/lang/id-ID.js +0 -2
  67. package/es/locale/lang/is-IS.d.ts +62 -0
  68. package/es/locale/lang/is-IS.js +72 -0
  69. package/es/locale/lang/it-IT.d.ts +0 -2
  70. package/es/locale/lang/it-IT.js +0 -2
  71. package/es/locale/lang/ja-JP.d.ts +0 -2
  72. package/es/locale/lang/ja-JP.js +0 -2
  73. package/es/locale/lang/ko-KR.d.ts +0 -2
  74. package/es/locale/lang/ko-KR.js +0 -2
  75. package/es/locale/lang/la-LA.d.ts +0 -2
  76. package/es/locale/lang/la-LA.js +0 -2
  77. package/es/locale/lang/nb-NO.d.ts +0 -2
  78. package/es/locale/lang/nb-NO.js +0 -2
  79. package/es/locale/lang/pt-BR.d.ts +0 -2
  80. package/es/locale/lang/pt-BR.js +0 -2
  81. package/es/locale/lang/ro-RO.d.ts +0 -2
  82. package/es/locale/lang/ro-RO.js +0 -2
  83. package/es/locale/lang/ru-RU.d.ts +0 -2
  84. package/es/locale/lang/ru-RU.js +0 -2
  85. package/es/locale/lang/sv-SE.d.ts +62 -0
  86. package/es/locale/lang/sv-SE.js +64 -0
  87. package/es/locale/lang/th-TH.d.ts +0 -2
  88. package/es/locale/lang/th-TH.js +0 -2
  89. package/es/locale/lang/tr-TR.d.ts +0 -2
  90. package/es/locale/lang/tr-TR.js +0 -2
  91. package/es/locale/lang/uk-UA.d.ts +0 -2
  92. package/es/locale/lang/uk-UA.js +0 -2
  93. package/es/locale/lang/vi-VN.d.ts +0 -2
  94. package/es/locale/lang/vi-VN.js +0 -2
  95. package/es/locale/lang/zh-CN.d.ts +0 -2
  96. package/es/locale/lang/zh-CN.js +0 -2
  97. package/es/locale/lang/zh-HK.d.ts +0 -2
  98. package/es/locale/lang/zh-HK.js +0 -2
  99. package/es/locale/lang/zh-TW.d.ts +0 -2
  100. package/es/locale/lang/zh-TW.js +0 -2
  101. package/es/notify/types.d.ts +2 -1
  102. package/es/number-keyboard/NumberKeyboard.js +10 -1
  103. package/es/picker/Picker.d.ts +5 -4
  104. package/es/picker/index.d.ts +3 -3
  105. package/es/picker/types.d.ts +4 -3
  106. package/es/picker/utils.d.ts +4 -3
  107. package/es/popup/index.css +1 -1
  108. package/es/progress/Progress.d.ts +4 -3
  109. package/es/progress/index.d.ts +2 -2
  110. package/es/rate/Rate.js +32 -10
  111. package/es/search/Search.d.ts +3 -0
  112. package/es/search/index.d.ts +2 -0
  113. package/es/share-sheet/ShareSheet.js +25 -11
  114. package/es/share-sheet/index.css +1 -1
  115. package/es/share-sheet/index.less +45 -1
  116. package/es/skeleton/Skeleton.d.ts +5 -4
  117. package/es/skeleton/index.d.ts +3 -3
  118. package/es/slider/index.css +1 -1
  119. package/es/style/animation.css +1 -1
  120. package/es/style/base.css +1 -1
  121. package/es/swipe-cell/index.css +1 -1
  122. package/es/tabbar/Tabbar.d.ts +2 -2
  123. package/es/tabs/Tabs.d.ts +1 -1
  124. package/es/tabs/Tabs.js +1 -0
  125. package/es/tabs/types.d.ts +5 -4
  126. package/es/toast/types.d.ts +3 -2
  127. package/es/tree-select/TreeSelect.d.ts +7 -6
  128. package/es/tree-select/index.d.ts +3 -3
  129. package/es/uploader/Uploader.d.ts +4 -4
  130. package/es/uploader/Uploader.js +2 -2
  131. package/es/uploader/UploaderPreviewItem.d.ts +3 -3
  132. package/es/uploader/UploaderPreviewItem.js +9 -6
  133. package/es/uploader/index.d.ts +2 -2
  134. package/es/uploader/types.d.ts +5 -5
  135. package/es/utils/basic.d.ts +1 -0
  136. package/es/utils/format.d.ts +7 -6
  137. package/es/utils/format.js +6 -0
  138. package/es/utils/validate.d.ts +2 -1
  139. package/lib/action-bar/ActionBar.js +8 -13
  140. package/lib/action-bar/index.js +9 -16
  141. package/lib/action-bar-button/ActionBarButton.js +8 -13
  142. package/lib/action-bar-button/index.js +9 -16
  143. package/lib/action-bar-icon/ActionBarIcon.js +8 -13
  144. package/lib/action-bar-icon/index.js +9 -16
  145. package/lib/action-sheet/ActionSheet.js +8 -13
  146. package/lib/action-sheet/index.js +9 -16
  147. package/lib/address-edit/AddressEdit.d.ts +0 -17
  148. package/lib/address-edit/AddressEdit.js +12 -40
  149. package/lib/address-edit/AddressEditDetail.js +8 -13
  150. package/lib/address-edit/index.d.ts +0 -12
  151. package/lib/address-edit/index.js +9 -16
  152. package/lib/address-edit/types.d.ts +0 -1
  153. package/lib/address-edit/types.js +7 -12
  154. package/lib/address-list/AddressList.js +9 -16
  155. package/lib/address-list/AddressListItem.d.ts +3 -2
  156. package/lib/address-list/AddressListItem.js +8 -13
  157. package/lib/address-list/index.js +9 -16
  158. package/lib/area/Area.js +8 -13
  159. package/lib/area/index.js +9 -16
  160. package/lib/area/types.js +7 -12
  161. package/lib/area/utils.js +8 -13
  162. package/lib/badge/Badge.d.ts +4 -3
  163. package/lib/badge/Badge.js +8 -13
  164. package/lib/badge/index.d.ts +2 -2
  165. package/lib/badge/index.js +9 -16
  166. package/lib/button/Button.js +8 -13
  167. package/lib/button/index.js +9 -16
  168. package/lib/button/types.js +7 -12
  169. package/lib/calendar/Calendar.js +10 -17
  170. package/lib/calendar/CalendarDay.js +12 -13
  171. package/lib/calendar/CalendarHeader.js +8 -13
  172. package/lib/calendar/CalendarMonth.js +9 -16
  173. package/lib/calendar/index.css +1 -1
  174. package/lib/calendar/index.js +9 -16
  175. package/lib/calendar/index.less +2 -0
  176. package/lib/calendar/types.d.ts +2 -1
  177. package/lib/calendar/types.js +7 -12
  178. package/lib/calendar/utils.js +8 -13
  179. package/lib/card/Card.js +8 -13
  180. package/lib/card/index.js +9 -16
  181. package/lib/cascader/Cascader.js +8 -13
  182. package/lib/cascader/index.js +9 -16
  183. package/lib/cascader/types.d.ts +2 -1
  184. package/lib/cascader/types.js +7 -12
  185. package/lib/cell/Cell.js +8 -13
  186. package/lib/cell/index.js +9 -16
  187. package/lib/cell-group/CellGroup.js +8 -13
  188. package/lib/cell-group/index.js +9 -16
  189. package/lib/checkbox/Checkbox.js +9 -16
  190. package/lib/checkbox/Checker.d.ts +2 -1
  191. package/lib/checkbox/Checker.js +8 -13
  192. package/lib/checkbox/index.js +9 -16
  193. package/lib/checkbox/types.js +7 -12
  194. package/lib/checkbox-group/CheckboxGroup.js +8 -13
  195. package/lib/checkbox-group/index.js +9 -16
  196. package/lib/checkbox-group/types.js +7 -12
  197. package/lib/circle/Circle.js +8 -13
  198. package/lib/circle/index.js +9 -16
  199. package/lib/col/Col.js +8 -13
  200. package/lib/col/index.js +9 -16
  201. package/lib/collapse/Collapse.d.ts +7 -6
  202. package/lib/collapse/Collapse.js +8 -13
  203. package/lib/collapse/index.d.ts +3 -3
  204. package/lib/collapse/index.js +9 -16
  205. package/lib/collapse-item/CollapseItem.js +8 -13
  206. package/lib/collapse-item/index.js +9 -16
  207. package/lib/collapse-item/types.js +7 -12
  208. package/lib/composables/on-popup-reopen.js +8 -13
  209. package/lib/composables/use-expose.js +8 -13
  210. package/lib/composables/use-height.js +8 -13
  211. package/lib/composables/use-id.js +8 -13
  212. package/lib/composables/use-lazy-render.js +8 -13
  213. package/lib/composables/use-lock-scroll.js +8 -13
  214. package/lib/composables/use-placeholder.js +8 -13
  215. package/lib/composables/use-refs.js +8 -13
  216. package/lib/composables/use-route.js +8 -13
  217. package/lib/composables/use-tab-status.js +8 -13
  218. package/lib/composables/use-touch.js +9 -14
  219. package/lib/composables/use-visibility-change.js +8 -13
  220. package/lib/config-provider/ConfigProvider.d.ts +4 -3
  221. package/lib/config-provider/ConfigProvider.js +8 -13
  222. package/lib/config-provider/index.d.ts +2 -2
  223. package/lib/config-provider/index.js +9 -16
  224. package/lib/contact-card/ContactCard.js +8 -13
  225. package/lib/contact-card/index.js +9 -16
  226. package/lib/contact-edit/ContactEdit.js +8 -13
  227. package/lib/contact-edit/index.js +9 -16
  228. package/lib/contact-list/ContactList.d.ts +3 -2
  229. package/lib/contact-list/ContactList.js +8 -13
  230. package/lib/contact-list/index.js +9 -16
  231. package/lib/count-down/CountDown.js +8 -13
  232. package/lib/count-down/index.js +9 -16
  233. package/lib/count-down/types.js +7 -12
  234. package/lib/count-down/utils.js +8 -13
  235. package/lib/coupon/Coupon.d.ts +2 -1
  236. package/lib/coupon/Coupon.js +8 -13
  237. package/lib/coupon/index.js +9 -16
  238. package/lib/coupon/utils.js +8 -13
  239. package/lib/coupon-cell/CouponCell.js +8 -13
  240. package/lib/coupon-cell/index.js +9 -16
  241. package/lib/coupon-list/CouponList.d.ts +3 -13
  242. package/lib/coupon-list/CouponList.js +17 -20
  243. package/lib/coupon-list/index.css +1 -1
  244. package/lib/coupon-list/index.d.ts +2 -9
  245. package/lib/coupon-list/index.js +9 -16
  246. package/lib/coupon-list/index.less +4 -16
  247. package/lib/coupon-list/style/index.js +1 -0
  248. package/lib/coupon-list/style/less.js +1 -0
  249. package/lib/date-picker/DatePicker.js +8 -13
  250. package/lib/date-picker/index.js +9 -16
  251. package/lib/date-picker/utils.js +8 -13
  252. package/lib/dialog/Dialog.js +8 -13
  253. package/lib/dialog/function-call.js +9 -16
  254. package/lib/dialog/index.css +1 -1
  255. package/lib/dialog/index.js +8 -13
  256. package/lib/dialog/types.d.ts +2 -2
  257. package/lib/dialog/types.js +7 -12
  258. package/lib/divider/Divider.js +8 -13
  259. package/lib/divider/index.js +9 -16
  260. package/lib/dropdown-item/DropdownItem.js +8 -13
  261. package/lib/dropdown-item/index.js +9 -16
  262. package/lib/dropdown-item/types.d.ts +2 -1
  263. package/lib/dropdown-item/types.js +7 -12
  264. package/lib/dropdown-menu/DropdownMenu.js +8 -13
  265. package/lib/dropdown-menu/index.js +9 -16
  266. package/lib/dropdown-menu/types.js +7 -12
  267. package/lib/empty/Empty.d.ts +8 -7
  268. package/lib/empty/Empty.js +9 -14
  269. package/lib/empty/Network.js +8 -13
  270. package/lib/empty/index.d.ts +2 -2
  271. package/lib/empty/index.js +9 -16
  272. package/lib/field/Field.d.ts +4 -0
  273. package/lib/field/Field.js +10 -13
  274. package/lib/field/index.d.ts +2 -0
  275. package/lib/field/index.js +9 -16
  276. package/lib/field/types.js +7 -12
  277. package/lib/field/utils.js +8 -13
  278. package/lib/form/Form.js +9 -13
  279. package/lib/form/index.js +9 -16
  280. package/lib/form/types.d.ts +1 -0
  281. package/lib/form/types.js +7 -12
  282. package/lib/grid/Grid.js +8 -13
  283. package/lib/grid/index.js +9 -16
  284. package/lib/grid-item/GridItem.js +8 -13
  285. package/lib/grid-item/index.js +9 -16
  286. package/lib/icon/Icon.js +8 -13
  287. package/lib/icon/index.css +1 -1
  288. package/lib/icon/index.js +9 -16
  289. package/lib/image/Image.js +8 -13
  290. package/lib/image/index.js +9 -16
  291. package/lib/image-preview/ImagePreview.js +9 -16
  292. package/lib/image-preview/ImagePreviewItem.js +8 -13
  293. package/lib/image-preview/function-call.js +9 -16
  294. package/lib/image-preview/index.js +8 -13
  295. package/lib/image-preview/types.js +7 -12
  296. package/lib/index-anchor/IndexAnchor.js +8 -13
  297. package/lib/index-anchor/index.js +9 -16
  298. package/lib/index-bar/IndexBar.d.ts +5 -4
  299. package/lib/index-bar/IndexBar.js +8 -13
  300. package/lib/index-bar/index.d.ts +3 -3
  301. package/lib/index-bar/index.js +9 -16
  302. package/lib/index-bar/types.d.ts +2 -1
  303. package/lib/index-bar/types.js +7 -12
  304. package/lib/index.css +1 -1
  305. package/lib/index.d.ts +1 -1
  306. package/lib/index.js +97 -101
  307. package/lib/index.less +2 -2
  308. package/lib/lazyload/index.js +8 -13
  309. package/lib/lazyload/vue-lazyload/index.js +9 -16
  310. package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
  311. package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
  312. package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
  313. package/lib/lazyload/vue-lazyload/lazy.js +9 -16
  314. package/lib/lazyload/vue-lazyload/listener.js +8 -13
  315. package/lib/lazyload/vue-lazyload/util.js +8 -13
  316. package/lib/list/List.js +8 -13
  317. package/lib/list/index.js +9 -16
  318. package/lib/list/types.js +7 -12
  319. package/lib/loading/Loading.js +8 -13
  320. package/lib/loading/index.js +9 -16
  321. package/lib/locale/index.js +9 -16
  322. package/lib/locale/lang/bn-BD.d.ts +0 -2
  323. package/lib/locale/lang/bn-BD.js +8 -15
  324. package/lib/locale/lang/da-DK.d.ts +64 -0
  325. package/lib/locale/lang/da-DK.js +85 -0
  326. package/lib/locale/lang/de-DE-formal.d.ts +0 -2
  327. package/lib/locale/lang/de-DE-formal.js +8 -15
  328. package/lib/locale/lang/de-DE.d.ts +0 -2
  329. package/lib/locale/lang/de-DE.js +8 -15
  330. package/lib/locale/lang/en-US.d.ts +0 -2
  331. package/lib/locale/lang/en-US.js +8 -15
  332. package/lib/locale/lang/es-ES.d.ts +0 -2
  333. package/lib/locale/lang/es-ES.js +8 -15
  334. package/lib/locale/lang/fr-FR.d.ts +0 -2
  335. package/lib/locale/lang/fr-FR.js +8 -15
  336. package/lib/locale/lang/hi-IN.d.ts +0 -2
  337. package/lib/locale/lang/hi-IN.js +8 -15
  338. package/lib/locale/lang/id-ID.d.ts +0 -2
  339. package/lib/locale/lang/id-ID.js +8 -15
  340. package/lib/locale/lang/is-IS.d.ts +62 -0
  341. package/lib/locale/lang/is-IS.js +91 -0
  342. package/lib/locale/lang/it-IT.d.ts +0 -2
  343. package/lib/locale/lang/it-IT.js +8 -15
  344. package/lib/locale/lang/ja-JP.d.ts +0 -2
  345. package/lib/locale/lang/ja-JP.js +8 -15
  346. package/lib/locale/lang/ko-KR.d.ts +0 -2
  347. package/lib/locale/lang/ko-KR.js +8 -15
  348. package/lib/locale/lang/la-LA.d.ts +0 -2
  349. package/lib/locale/lang/la-LA.js +8 -15
  350. package/lib/locale/lang/nb-NO.d.ts +0 -2
  351. package/lib/locale/lang/nb-NO.js +8 -15
  352. package/lib/locale/lang/pt-BR.d.ts +0 -2
  353. package/lib/locale/lang/pt-BR.js +8 -15
  354. package/lib/locale/lang/ro-RO.d.ts +0 -2
  355. package/lib/locale/lang/ro-RO.js +8 -15
  356. package/lib/locale/lang/ru-RU.d.ts +0 -2
  357. package/lib/locale/lang/ru-RU.js +8 -15
  358. package/lib/locale/lang/sv-SE.d.ts +62 -0
  359. package/lib/locale/lang/sv-SE.js +83 -0
  360. package/lib/locale/lang/th-TH.d.ts +0 -2
  361. package/lib/locale/lang/th-TH.js +8 -15
  362. package/lib/locale/lang/tr-TR.d.ts +0 -2
  363. package/lib/locale/lang/tr-TR.js +8 -15
  364. package/lib/locale/lang/uk-UA.d.ts +0 -2
  365. package/lib/locale/lang/uk-UA.js +8 -15
  366. package/lib/locale/lang/vi-VN.d.ts +0 -2
  367. package/lib/locale/lang/vi-VN.js +8 -15
  368. package/lib/locale/lang/zh-CN.d.ts +0 -2
  369. package/lib/locale/lang/zh-CN.js +8 -15
  370. package/lib/locale/lang/zh-HK.d.ts +0 -2
  371. package/lib/locale/lang/zh-HK.js +8 -15
  372. package/lib/locale/lang/zh-TW.d.ts +0 -2
  373. package/lib/locale/lang/zh-TW.js +8 -15
  374. package/lib/nav-bar/NavBar.js +8 -13
  375. package/lib/nav-bar/index.js +9 -16
  376. package/lib/notice-bar/NoticeBar.js +8 -13
  377. package/lib/notice-bar/index.js +9 -16
  378. package/lib/notice-bar/types.js +7 -12
  379. package/lib/notify/Notify.js +8 -13
  380. package/lib/notify/function-call.js +9 -16
  381. package/lib/notify/index.js +8 -13
  382. package/lib/notify/types.d.ts +2 -1
  383. package/lib/notify/types.js +7 -12
  384. package/lib/number-keyboard/NumberKeyboard.js +19 -17
  385. package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
  386. package/lib/number-keyboard/index.js +9 -16
  387. package/lib/overlay/Overlay.js +8 -13
  388. package/lib/overlay/index.js +9 -16
  389. package/lib/pagination/Pagination.js +8 -13
  390. package/lib/pagination/index.js +9 -16
  391. package/lib/password-input/PasswordInput.js +8 -13
  392. package/lib/password-input/index.js +9 -16
  393. package/lib/picker/Picker.d.ts +5 -4
  394. package/lib/picker/Picker.js +9 -16
  395. package/lib/picker/PickerColumn.js +8 -13
  396. package/lib/picker/index.d.ts +3 -3
  397. package/lib/picker/index.js +9 -16
  398. package/lib/picker/types.d.ts +4 -3
  399. package/lib/picker/types.js +7 -12
  400. package/lib/picker/utils.d.ts +4 -3
  401. package/lib/picker/utils.js +8 -13
  402. package/lib/popover/Popover.js +8 -13
  403. package/lib/popover/index.js +9 -16
  404. package/lib/popover/types.js +7 -12
  405. package/lib/popup/Popup.js +8 -13
  406. package/lib/popup/index.css +1 -1
  407. package/lib/popup/index.js +9 -16
  408. package/lib/popup/shared.js +8 -13
  409. package/lib/popup/types.js +7 -12
  410. package/lib/progress/Progress.d.ts +4 -3
  411. package/lib/progress/Progress.js +8 -13
  412. package/lib/progress/index.d.ts +2 -2
  413. package/lib/progress/index.js +9 -16
  414. package/lib/progress/types.js +7 -12
  415. package/lib/pull-refresh/PullRefresh.js +8 -13
  416. package/lib/pull-refresh/index.js +9 -16
  417. package/lib/radio/Radio.js +9 -16
  418. package/lib/radio/index.js +9 -16
  419. package/lib/radio-group/RadioGroup.js +8 -13
  420. package/lib/radio-group/index.js +9 -16
  421. package/lib/rate/Rate.js +39 -22
  422. package/lib/rate/index.js +9 -16
  423. package/lib/row/Row.js +8 -13
  424. package/lib/row/index.js +9 -16
  425. package/lib/search/Search.d.ts +3 -0
  426. package/lib/search/Search.js +8 -13
  427. package/lib/search/index.d.ts +2 -0
  428. package/lib/search/index.js +9 -16
  429. package/lib/search/types.js +7 -12
  430. package/lib/share-sheet/ShareSheet.js +33 -24
  431. package/lib/share-sheet/index.css +1 -1
  432. package/lib/share-sheet/index.js +9 -16
  433. package/lib/share-sheet/index.less +45 -1
  434. package/lib/sidebar/Sidebar.js +8 -13
  435. package/lib/sidebar/index.js +9 -16
  436. package/lib/sidebar-item/SidebarItem.js +8 -13
  437. package/lib/sidebar-item/index.js +9 -16
  438. package/lib/skeleton/Skeleton.d.ts +5 -4
  439. package/lib/skeleton/Skeleton.js +8 -13
  440. package/lib/skeleton/index.d.ts +3 -3
  441. package/lib/skeleton/index.js +9 -16
  442. package/lib/slider/Slider.js +8 -13
  443. package/lib/slider/index.css +1 -1
  444. package/lib/slider/index.js +9 -16
  445. package/lib/step/Step.js +8 -13
  446. package/lib/step/index.js +9 -16
  447. package/lib/stepper/Stepper.js +8 -13
  448. package/lib/stepper/index.js +9 -16
  449. package/lib/steps/Steps.js +8 -13
  450. package/lib/steps/index.js +9 -16
  451. package/lib/sticky/Sticky.js +8 -13
  452. package/lib/sticky/index.js +9 -16
  453. package/lib/style/animation.css +1 -1
  454. package/lib/style/base.css +1 -1
  455. package/lib/submit-bar/SubmitBar.js +8 -13
  456. package/lib/submit-bar/index.js +9 -16
  457. package/lib/swipe/Swipe.js +8 -13
  458. package/lib/swipe/index.js +9 -16
  459. package/lib/swipe/types.js +7 -12
  460. package/lib/swipe-cell/SwipeCell.js +8 -13
  461. package/lib/swipe-cell/index.css +1 -1
  462. package/lib/swipe-cell/index.js +9 -16
  463. package/lib/swipe-cell/types.js +7 -12
  464. package/lib/swipe-item/SwipeItem.js +8 -13
  465. package/lib/swipe-item/index.js +9 -16
  466. package/lib/switch/Switch.js +8 -13
  467. package/lib/switch/index.js +9 -16
  468. package/lib/tab/Tab.js +8 -13
  469. package/lib/tab/index.js +9 -16
  470. package/lib/tabbar/Tabbar.d.ts +2 -2
  471. package/lib/tabbar/Tabbar.js +8 -13
  472. package/lib/tabbar/index.js +9 -16
  473. package/lib/tabbar-item/TabbarItem.js +8 -13
  474. package/lib/tabbar-item/index.js +9 -16
  475. package/lib/tabs/Tabs.d.ts +1 -1
  476. package/lib/tabs/Tabs.js +10 -16
  477. package/lib/tabs/TabsContent.js +8 -13
  478. package/lib/tabs/TabsTitle.js +8 -13
  479. package/lib/tabs/index.js +9 -16
  480. package/lib/tabs/types.d.ts +5 -4
  481. package/lib/tabs/types.js +7 -12
  482. package/lib/tabs/utils.js +8 -13
  483. package/lib/tag/Tag.js +8 -13
  484. package/lib/tag/index.js +9 -16
  485. package/lib/time-picker/TimePicker.js +8 -13
  486. package/lib/time-picker/index.js +9 -16
  487. package/lib/toast/Toast.js +8 -13
  488. package/lib/toast/function-call.js +9 -16
  489. package/lib/toast/index.js +8 -13
  490. package/lib/toast/lock-click.js +8 -13
  491. package/lib/toast/types.d.ts +3 -2
  492. package/lib/toast/types.js +7 -12
  493. package/lib/tree-select/TreeSelect.d.ts +7 -6
  494. package/lib/tree-select/TreeSelect.js +8 -13
  495. package/lib/tree-select/index.d.ts +3 -3
  496. package/lib/tree-select/index.js +9 -16
  497. package/lib/uploader/Uploader.d.ts +4 -4
  498. package/lib/uploader/Uploader.js +10 -17
  499. package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
  500. package/lib/uploader/UploaderPreviewItem.js +17 -19
  501. package/lib/uploader/index.d.ts +2 -2
  502. package/lib/uploader/index.js +9 -16
  503. package/lib/uploader/types.d.ts +5 -5
  504. package/lib/uploader/types.js +7 -12
  505. package/lib/uploader/utils.js +8 -13
  506. package/lib/utils/basic.d.ts +1 -0
  507. package/lib/utils/basic.js +8 -13
  508. package/lib/utils/constant.js +8 -13
  509. package/lib/utils/create.js +9 -16
  510. package/lib/utils/deep-assign.js +8 -13
  511. package/lib/utils/deep-clone.js +8 -13
  512. package/lib/utils/dom.js +8 -13
  513. package/lib/utils/format.d.ts +7 -6
  514. package/lib/utils/format.js +14 -13
  515. package/lib/utils/index.js +17 -21
  516. package/lib/utils/interceptor.js +8 -13
  517. package/lib/utils/mount-component.js +8 -13
  518. package/lib/utils/props.js +8 -13
  519. package/lib/utils/validate.d.ts +2 -1
  520. package/lib/utils/validate.js +8 -13
  521. package/lib/utils/with-install.js +8 -13
  522. package/lib/vant.cjs.js +297 -258
  523. package/lib/vant.cjs.min.js +1 -1
  524. package/lib/vant.es.js +297 -258
  525. package/lib/vant.es.min.js +297 -258
  526. package/lib/vant.js +297 -258
  527. package/lib/vant.min.js +1 -1
  528. package/package.json +3 -3
  529. package/vetur/attributes.json +564 -636
  530. package/vetur/tags.json +178 -178
  531. package/vetur/web-types.json +2595 -1760
package/lib/vant.js CHANGED
@@ -473,6 +473,12 @@
473
473
  }
474
474
  function getSizeStyle(originSize) {
475
475
  if (isDef(originSize)) {
476
+ if (Array.isArray(originSize)) {
477
+ return {
478
+ width: addUnit(originSize[0]),
479
+ height: addUnit(originSize[1])
480
+ };
481
+ }
476
482
  const size = addUnit(originSize);
477
483
  return {
478
484
  width: size,
@@ -634,10 +640,8 @@
634
640
  },
635
641
  vanAddressEdit: {
636
642
  area: "\u5730\u533A",
637
- postal: "\u90AE\u653F\u7F16\u7801",
638
643
  areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
639
644
  addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
640
- postalEmpty: "\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",
641
645
  addressDetail: "\u8BE6\u7EC6\u5730\u5740",
642
646
  defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
643
647
  },
@@ -1350,7 +1354,7 @@
1350
1354
  };
1351
1355
  const move = (event) => {
1352
1356
  const touch = event.touches[0];
1353
- deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
1357
+ deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
1354
1358
  deltaY.value = touch.clientY - startY.value;
1355
1359
  offsetX.value = Math.abs(deltaX.value);
1356
1360
  offsetY.value = Math.abs(deltaY.value);
@@ -2615,6 +2619,7 @@
2615
2619
  useExpose({
2616
2620
  submit,
2617
2621
  validate,
2622
+ getValues,
2618
2623
  scrollToField,
2619
2624
  resetValidation
2620
2625
  });
@@ -2733,6 +2738,7 @@
2733
2738
  placeholder: String,
2734
2739
  autocomplete: String,
2735
2740
  errorMessage: String,
2741
+ enterkeyhint: String,
2736
2742
  clearTrigger: makeStringProp("focus"),
2737
2743
  formatTrigger: makeStringProp("onChange"),
2738
2744
  error: {
@@ -3002,6 +3008,7 @@
3002
3008
  autofocus: props.autofocus,
3003
3009
  placeholder: props.placeholder,
3004
3010
  autocomplete: props.autocomplete,
3011
+ enterkeyhint: props.enterkeyhint,
3005
3012
  "aria-labelledby": props.label ? `${id}-label` : void 0,
3006
3013
  onBlur,
3007
3014
  onFocus,
@@ -3580,10 +3587,8 @@
3580
3587
  province: "",
3581
3588
  areaCode: "",
3582
3589
  isDefault: false,
3583
- postalCode: "",
3584
3590
  addressDetail: ""
3585
3591
  };
3586
- const isPostal = (value) => /^\d{6}$/.test(value);
3587
3592
  const addressEditProps = {
3588
3593
  areaList: Object,
3589
3594
  isSaving: Boolean,
@@ -3592,7 +3597,6 @@
3592
3597
  showArea: truthProp,
3593
3598
  showDetail: truthProp,
3594
3599
  showDelete: Boolean,
3595
- showPostal: Boolean,
3596
3600
  disableArea: Boolean,
3597
3601
  searchResult: Array,
3598
3602
  telMaxlength: numericProp,
@@ -3611,10 +3615,6 @@
3611
3615
  telValidator: {
3612
3616
  type: Function,
3613
3617
  default: isMobile
3614
- },
3615
- postalValidator: {
3616
- type: Function,
3617
- default: isPostal
3618
3618
  }
3619
3619
  };
3620
3620
  var stdin_default$1g = vue.defineComponent({
@@ -3657,8 +3657,7 @@
3657
3657
  const rules = vue.computed(() => {
3658
3658
  const {
3659
3659
  validator,
3660
- telValidator,
3661
- postalValidator
3660
+ telValidator
3662
3661
  } = props;
3663
3662
  const makeRule = (name2, emptyMessage) => ({
3664
3663
  validator: (value) => {
@@ -3681,11 +3680,7 @@
3681
3680
  message: t$h("telInvalid")
3682
3681
  }],
3683
3682
  areaCode: [makeRule("areaCode", t$h("areaEmpty"))],
3684
- addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))],
3685
- postalCode: [makeRule("addressDetail", t$h("postalEmpty")), {
3686
- validator: postalValidator,
3687
- message: t$h("postalEmpty")
3688
- }]
3683
+ addressDetail: [makeRule("addressDetail", t$h("addressEmpty"))]
3689
3684
  };
3690
3685
  });
3691
3686
  const onSave = () => emit("save", data);
@@ -3810,16 +3805,7 @@
3810
3805
  "onFocus": () => onFocus("addressDetail"),
3811
3806
  "onInput": onChangeDetail,
3812
3807
  "onSelectSearch": (event) => emit("selectSearch", event)
3813
- }, null), props.showPostal && vue.withDirectives(vue.createVNode(Field, {
3814
- "modelValue": data.postalCode,
3815
- "onUpdate:modelValue": ($event) => data.postalCode = $event,
3816
- "type": "tel",
3817
- "rules": rules.value.postalCode,
3818
- "label": t$h("postal"),
3819
- "maxlength": "6",
3820
- "placeholder": t$h("postal"),
3821
- "onFocus": () => onFocus("postalCode")
3822
- }, null), [[vue.vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
3808
+ }, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), vue.withDirectives(vue.createVNode("div", {
3823
3809
  "class": bem$15("buttons")
3824
3810
  }, [vue.createVNode(Button, {
3825
3811
  "block": true,
@@ -4378,6 +4364,7 @@
4378
4364
  slots
4379
4365
  }) {
4380
4366
  const style = vue.computed(() => {
4367
+ var _a;
4381
4368
  const {
4382
4369
  item,
4383
4370
  index,
@@ -4409,6 +4396,9 @@
4409
4396
  break;
4410
4397
  }
4411
4398
  }
4399
+ if (offset2 + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4400
+ style2.marginBottom = 0;
4401
+ }
4412
4402
  return style2;
4413
4403
  });
4414
4404
  const onClick = () => {
@@ -4916,8 +4906,8 @@
4916
4906
  }
4917
4907
  raf(() => {
4918
4908
  bodyHeight = Math.floor(useRect(bodyRef).height);
4919
- scrollToCurrentDate();
4920
4909
  });
4910
+ scrollToCurrentDate();
4921
4911
  };
4922
4912
  const reset = (date = getInitialDate()) => {
4923
4913
  currentDate.value = date;
@@ -6228,6 +6218,7 @@
6228
6218
  }
6229
6219
  };
6230
6220
  const renderNav = () => children.map((item, index) => vue.createVNode(stdin_default$12, vue.mergeProps({
6221
+ "key": item.id,
6231
6222
  "id": `${id}-${index}`,
6232
6223
  "ref": setTitleRefs(index),
6233
6224
  "type": props.type,
@@ -7817,14 +7808,152 @@
7817
7808
  }
7818
7809
  });
7819
7810
  const CouponCell = withInstall(stdin_default$K);
7820
- const [name$D, bem$C, t$8] = createNamespace("coupon-list");
7821
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
7811
+ const prefix = "van-empty-network-";
7812
+ const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
7813
+ "stop-color": color,
7814
+ "offset": `${offset2}%`,
7815
+ "stop-opacity": opacity
7816
+ }, null);
7817
+ const Network = vue.createVNode("svg", {
7818
+ "viewBox": "0 0 160 160"
7819
+ }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
7820
+ "id": `${prefix}1`,
7821
+ "x1": "64%",
7822
+ "y1": "100%",
7823
+ "x2": "64%"
7824
+ }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
7825
+ "id": `${prefix}2`,
7826
+ "x1": "50%",
7827
+ "x2": "50%",
7828
+ "y2": "84%"
7829
+ }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
7830
+ "id": `${prefix}3`,
7831
+ "x1": "100%",
7832
+ "x2": "100%",
7833
+ "y2": "100%"
7834
+ }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
7835
+ "id": `${prefix}4`,
7836
+ "cx": "50%",
7837
+ "cy": "0%",
7838
+ "fx": "50%",
7839
+ "fy": "0%",
7840
+ "r": "100%",
7841
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
7842
+ }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
7843
+ "fill": "none"
7844
+ }, [vue.createVNode("g", {
7845
+ "opacity": ".8"
7846
+ }, [vue.createVNode("path", {
7847
+ "d": "M36 131V53H16v20H2v58h34z",
7848
+ "fill": `url(#${prefix}1)`
7849
+ }, null), vue.createVNode("path", {
7850
+ "d": "M123 15h22v14h9v77h-31V15z",
7851
+ "fill": `url(#${prefix}1)`
7852
+ }, null)]), vue.createVNode("path", {
7853
+ "fill": `url(#${prefix}4)`,
7854
+ "d": "M0 139h160v21H0z"
7855
+ }, null), vue.createVNode("path", {
7856
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
7857
+ "fill": `url(#${prefix}2)`
7858
+ }, null), vue.createVNode("g", {
7859
+ "opacity": ".6",
7860
+ "stroke-linecap": "round",
7861
+ "stroke-width": "7"
7862
+ }, [vue.createVNode("path", {
7863
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
7864
+ "stroke": `url(#${prefix}3)`
7865
+ }, null), vue.createVNode("path", {
7866
+ "d": "M53 36a34 34 0 0 0 0 48",
7867
+ "stroke": `url(#${prefix}3)`
7868
+ }, null), vue.createVNode("path", {
7869
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
7870
+ "stroke": `url(#${prefix}3)`
7871
+ }, null), vue.createVNode("path", {
7872
+ "d": "M106 84a34 34 0 0 0 0-48",
7873
+ "stroke": `url(#${prefix}3)`
7874
+ }, null)]), vue.createVNode("g", {
7875
+ "transform": "translate(31 105)"
7876
+ }, [vue.createVNode("rect", {
7877
+ "fill": "#EBEDF0",
7878
+ "width": "98",
7879
+ "height": "34",
7880
+ "rx": "2"
7881
+ }, null), vue.createVNode("rect", {
7882
+ "fill": "#FFF",
7883
+ "x": "9",
7884
+ "y": "8",
7885
+ "width": "80",
7886
+ "height": "18",
7887
+ "rx": "1.1"
7888
+ }, null), vue.createVNode("rect", {
7889
+ "fill": "#EBEDF0",
7890
+ "x": "15",
7891
+ "y": "12",
7892
+ "width": "18",
7893
+ "height": "6",
7894
+ "rx": "1.1"
7895
+ }, null)])])]);
7896
+ const [name$D, bem$C] = createNamespace("empty");
7897
+ const PRESET_IMAGES = ["error", "search", "default"];
7898
+ const emptyProps = {
7899
+ image: makeStringProp("default"),
7900
+ imageSize: [Number, String, Array],
7901
+ description: String
7902
+ };
7903
+ var stdin_default$J = vue.defineComponent({
7904
+ name: name$D,
7905
+ props: emptyProps,
7906
+ setup(props, {
7907
+ slots
7908
+ }) {
7909
+ const renderImage = () => {
7910
+ if (slots.image) {
7911
+ return slots.image();
7912
+ }
7913
+ let {
7914
+ image
7915
+ } = props;
7916
+ if (image === "network") {
7917
+ return Network;
7918
+ }
7919
+ if (PRESET_IMAGES.includes(image)) {
7920
+ image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
7921
+ }
7922
+ return vue.createVNode("img", {
7923
+ "src": image
7924
+ }, null);
7925
+ };
7926
+ const renderDescription = () => {
7927
+ const description = slots.description ? slots.description() : props.description;
7928
+ if (description) {
7929
+ return vue.createVNode("p", {
7930
+ "class": bem$C("description")
7931
+ }, [description]);
7932
+ }
7933
+ };
7934
+ const renderBottom = () => {
7935
+ if (slots.default) {
7936
+ return vue.createVNode("div", {
7937
+ "class": bem$C("bottom")
7938
+ }, [slots.default()]);
7939
+ }
7940
+ };
7941
+ return () => vue.createVNode("div", {
7942
+ "class": bem$C()
7943
+ }, [vue.createVNode("div", {
7944
+ "class": bem$C("image"),
7945
+ "style": getSizeStyle(props.imageSize)
7946
+ }, [renderImage()]), renderDescription(), renderBottom()]);
7947
+ }
7948
+ });
7949
+ const Empty = withInstall(stdin_default$J);
7950
+ const [name$C, bem$B, t$8] = createNamespace("coupon-list");
7822
7951
  const couponListProps = {
7823
7952
  code: makeStringProp(""),
7824
7953
  coupons: makeArrayProp(),
7825
7954
  currency: makeStringProp("\xA5"),
7826
7955
  showCount: truthProp,
7827
- emptyImage: makeStringProp(EMPTY_IMAGE),
7956
+ emptyImage: String,
7828
7957
  chosenCoupon: makeNumberProp(-1),
7829
7958
  enabledTitle: String,
7830
7959
  disabledTitle: String,
@@ -7839,8 +7968,8 @@
7839
7968
  exchangeButtonLoading: Boolean,
7840
7969
  exchangeButtonDisabled: Boolean
7841
7970
  };
7842
- var stdin_default$J = vue.defineComponent({
7843
- name: name$D,
7971
+ var stdin_default$I = vue.defineComponent({
7972
+ name: name$C,
7844
7973
  props: couponListProps,
7845
7974
  emits: ["change", "exchange", "update:code"],
7846
7975
  setup(props, {
@@ -7872,28 +8001,30 @@
7872
8001
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
7873
8002
  });
7874
8003
  };
7875
- const renderEmpty = () => vue.createVNode("div", {
7876
- "class": bem$C("empty")
7877
- }, [vue.createVNode("img", {
7878
- "src": props.emptyImage
7879
- }, null), vue.createVNode("p", null, [t$8("noCoupon")])]);
8004
+ const renderEmpty = () => vue.createVNode(Empty, {
8005
+ "image": props.emptyImage
8006
+ }, {
8007
+ default: () => [vue.createVNode("p", {
8008
+ "class": bem$B("empty-tip")
8009
+ }, [t$8("noCoupon")])]
8010
+ });
7880
8011
  const renderExchangeBar = () => {
7881
8012
  if (props.showExchangeBar) {
7882
8013
  return vue.createVNode("div", {
7883
8014
  "ref": barRef,
7884
- "class": bem$C("exchange-bar")
8015
+ "class": bem$B("exchange-bar")
7885
8016
  }, [vue.createVNode(Field, {
7886
8017
  "modelValue": currentCode.value,
7887
8018
  "onUpdate:modelValue": ($event) => currentCode.value = $event,
7888
8019
  "clearable": true,
7889
8020
  "border": false,
7890
- "class": bem$C("field"),
8021
+ "class": bem$B("field"),
7891
8022
  "placeholder": props.inputPlaceholder || t$8("placeholder"),
7892
8023
  "maxlength": "20"
7893
8024
  }, null), vue.createVNode(Button, {
7894
8025
  "plain": true,
7895
8026
  "type": "primary",
7896
- "class": bem$C("exchange"),
8027
+ "class": bem$B("exchange"),
7897
8028
  "text": props.exchangeButtonText || t$8("exchange"),
7898
8029
  "loading": props.exchangeButtonLoading,
7899
8030
  "disabled": buttonDisabled.value,
@@ -7913,7 +8044,7 @@
7913
8044
  default: () => {
7914
8045
  var _a;
7915
8046
  return [vue.createVNode("div", {
7916
- "class": bem$C("list", {
8047
+ "class": bem$B("list", {
7917
8048
  "with-bottom": props.showCloseButton
7918
8049
  }),
7919
8050
  "style": {
@@ -7942,7 +8073,7 @@
7942
8073
  default: () => {
7943
8074
  var _a;
7944
8075
  return [vue.createVNode("div", {
7945
- "class": bem$C("list", {
8076
+ "class": bem$B("list", {
7946
8077
  "with-bottom": props.showCloseButton
7947
8078
  }),
7948
8079
  "style": {
@@ -7969,28 +8100,28 @@
7969
8100
  });
7970
8101
  return () => vue.createVNode("div", {
7971
8102
  "ref": root,
7972
- "class": bem$C()
8103
+ "class": bem$B()
7973
8104
  }, [renderExchangeBar(), vue.createVNode(Tabs, {
7974
8105
  "active": activeTab.value,
7975
8106
  "onUpdate:active": ($event) => activeTab.value = $event,
7976
- "class": bem$C("tab")
8107
+ "class": bem$B("tab")
7977
8108
  }, {
7978
8109
  default: () => [renderCouponTab(), renderDisabledTab()]
7979
8110
  }), vue.createVNode("div", {
7980
- "class": bem$C("bottom")
8111
+ "class": bem$B("bottom")
7981
8112
  }, [vue.withDirectives(vue.createVNode(Button, {
7982
8113
  "round": true,
7983
8114
  "block": true,
7984
8115
  "type": "primary",
7985
- "class": bem$C("close"),
8116
+ "class": bem$B("close"),
7986
8117
  "text": props.closeButtonText || t$8("close"),
7987
8118
  "onClick": () => emit("change", -1)
7988
8119
  }, null), [[vue.vShow, props.showCloseButton]])])]);
7989
8120
  }
7990
8121
  });
7991
- const CouponList = withInstall(stdin_default$J);
8122
+ const CouponList = withInstall(stdin_default$I);
7992
8123
  const currentYear = new Date().getFullYear();
7993
- const [name$C] = createNamespace("date-picker");
8124
+ const [name$B] = createNamespace("date-picker");
7994
8125
  const datePickerProps = extend({}, sharedProps, {
7995
8126
  columnsType: {
7996
8127
  type: Array,
@@ -8007,8 +8138,8 @@
8007
8138
  validator: isDate
8008
8139
  }
8009
8140
  });
8010
- var stdin_default$I = vue.defineComponent({
8011
- name: name$C,
8141
+ var stdin_default$H = vue.defineComponent({
8142
+ name: name$B,
8012
8143
  props: datePickerProps,
8013
8144
  emits: ["confirm", "cancel", "change", "update:modelValue"],
8014
8145
  setup(props, {
@@ -8092,8 +8223,8 @@
8092
8223
  }, pick(props, pickerInheritKeys)), slots);
8093
8224
  }
8094
8225
  });
8095
- const DatePicker = withInstall(stdin_default$I);
8096
- const [name$B, bem$B, t$7] = createNamespace("dialog");
8226
+ const DatePicker = withInstall(stdin_default$H);
8227
+ const [name$A, bem$A, t$7] = createNamespace("dialog");
8097
8228
  const dialogProps = extend({}, popupSharedProps, {
8098
8229
  title: String,
8099
8230
  theme: String,
@@ -8114,8 +8245,8 @@
8114
8245
  closeOnClickOverlay: Boolean
8115
8246
  });
8116
8247
  const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
8117
- var stdin_default$H = vue.defineComponent({
8118
- name: name$B,
8248
+ var stdin_default$G = vue.defineComponent({
8249
+ name: name$A,
8119
8250
  props: dialogProps,
8120
8251
  emits: ["confirm", "cancel", "keydown", "update:show"],
8121
8252
  setup(props, {
@@ -8172,7 +8303,7 @@
8172
8303
  const title = slots.title ? slots.title() : props.title;
8173
8304
  if (title) {
8174
8305
  return vue.createVNode("div", {
8175
- "class": bem$B("header", {
8306
+ "class": bem$A("header", {
8176
8307
  isolated: !props.message && !slots.default
8177
8308
  })
8178
8309
  }, [title]);
@@ -8184,7 +8315,7 @@
8184
8315
  allowHtml,
8185
8316
  messageAlign
8186
8317
  } = props;
8187
- const classNames = bem$B("message", {
8318
+ const classNames = bem$A("message", {
8188
8319
  "has-title": hasTitle,
8189
8320
  [messageAlign]: messageAlign
8190
8321
  });
@@ -8202,7 +8333,7 @@
8202
8333
  const renderContent = () => {
8203
8334
  if (slots.default) {
8204
8335
  return vue.createVNode("div", {
8205
- "class": bem$B("content")
8336
+ "class": bem$A("content")
8206
8337
  }, [slots.default()]);
8207
8338
  }
8208
8339
  const {
@@ -8214,18 +8345,18 @@
8214
8345
  const hasTitle = !!(title || slots.title);
8215
8346
  return vue.createVNode("div", {
8216
8347
  "key": allowHtml ? 1 : 0,
8217
- "class": bem$B("content", {
8348
+ "class": bem$A("content", {
8218
8349
  isolated: !hasTitle
8219
8350
  })
8220
8351
  }, [renderMessage(hasTitle)]);
8221
8352
  }
8222
8353
  };
8223
8354
  const renderButtons = () => vue.createVNode("div", {
8224
- "class": [BORDER_TOP, bem$B("footer")]
8355
+ "class": [BORDER_TOP, bem$A("footer")]
8225
8356
  }, [props.showCancelButton && vue.createVNode(Button, {
8226
8357
  "size": "large",
8227
8358
  "text": props.cancelButtonText || t$7("cancel"),
8228
- "class": bem$B("cancel"),
8359
+ "class": bem$A("cancel"),
8229
8360
  "style": {
8230
8361
  color: props.cancelButtonColor
8231
8362
  },
@@ -8234,7 +8365,7 @@
8234
8365
  }, null), props.showConfirmButton && vue.createVNode(Button, {
8235
8366
  "size": "large",
8236
8367
  "text": props.confirmButtonText || t$7("confirm"),
8237
- "class": [bem$B("confirm"), {
8368
+ "class": [bem$A("confirm"), {
8238
8369
  [BORDER_LEFT]: props.showCancelButton
8239
8370
  }],
8240
8371
  "style": {
@@ -8244,19 +8375,19 @@
8244
8375
  "onClick": onConfirm
8245
8376
  }, null)]);
8246
8377
  const renderRoundButtons = () => vue.createVNode(ActionBar, {
8247
- "class": bem$B("footer")
8378
+ "class": bem$A("footer")
8248
8379
  }, {
8249
8380
  default: () => [props.showCancelButton && vue.createVNode(ActionBarButton, {
8250
8381
  "type": "warning",
8251
8382
  "text": props.cancelButtonText || t$7("cancel"),
8252
- "class": bem$B("cancel"),
8383
+ "class": bem$A("cancel"),
8253
8384
  "color": props.cancelButtonColor,
8254
8385
  "loading": loading.cancel,
8255
8386
  "onClick": onCancel
8256
8387
  }, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
8257
8388
  "type": "danger",
8258
8389
  "text": props.confirmButtonText || t$7("confirm"),
8259
- "class": bem$B("confirm"),
8390
+ "class": bem$A("confirm"),
8260
8391
  "color": props.confirmButtonColor,
8261
8392
  "loading": loading.confirm,
8262
8393
  "onClick": onConfirm
@@ -8279,7 +8410,7 @@
8279
8410
  return vue.createVNode(Popup, vue.mergeProps({
8280
8411
  "ref": root,
8281
8412
  "role": "dialog",
8282
- "class": [bem$B([theme]), className],
8413
+ "class": [bem$A([theme]), className],
8283
8414
  "style": {
8284
8415
  width: addUnit(width2)
8285
8416
  },
@@ -8301,7 +8432,7 @@
8301
8432
  state,
8302
8433
  toggle
8303
8434
  } = usePopupState();
8304
- return () => vue.createVNode(stdin_default$H, vue.mergeProps(state, {
8435
+ return () => vue.createVNode(stdin_default$G, vue.mergeProps(state, {
8305
8436
  "onUpdate:show": toggle
8306
8437
  }), null);
8307
8438
  }
@@ -8366,19 +8497,19 @@
8366
8497
  Dialog.resetDefaultOptions = () => {
8367
8498
  Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8368
8499
  };
8369
- Dialog.Component = withInstall(stdin_default$H);
8500
+ Dialog.Component = withInstall(stdin_default$G);
8370
8501
  Dialog.install = (app) => {
8371
8502
  app.use(Dialog.Component);
8372
8503
  app.config.globalProperties.$dialog = Dialog;
8373
8504
  };
8374
- const [name$A, bem$A] = createNamespace("divider");
8505
+ const [name$z, bem$z] = createNamespace("divider");
8375
8506
  const dividerProps = {
8376
8507
  dashed: Boolean,
8377
8508
  hairline: truthProp,
8378
8509
  contentPosition: makeStringProp("center")
8379
8510
  };
8380
- var stdin_default$G = vue.defineComponent({
8381
- name: name$A,
8511
+ var stdin_default$F = vue.defineComponent({
8512
+ name: name$z,
8382
8513
  props: dividerProps,
8383
8514
  setup(props, {
8384
8515
  slots
@@ -8387,7 +8518,7 @@
8387
8518
  var _a;
8388
8519
  return vue.createVNode("div", {
8389
8520
  "role": "separator",
8390
- "class": bem$A({
8521
+ "class": bem$z({
8391
8522
  dashed: props.dashed,
8392
8523
  hairline: props.hairline,
8393
8524
  [`content-${props.contentPosition}`]: !!slots.default
@@ -8396,8 +8527,8 @@
8396
8527
  };
8397
8528
  }
8398
8529
  });
8399
- const Divider = withInstall(stdin_default$G);
8400
- const [name$z, bem$z] = createNamespace("dropdown-menu");
8530
+ const Divider = withInstall(stdin_default$F);
8531
+ const [name$y, bem$y] = createNamespace("dropdown-menu");
8401
8532
  const dropdownMenuProps = {
8402
8533
  overlay: truthProp,
8403
8534
  zIndex: numericProp,
@@ -8407,9 +8538,9 @@
8407
8538
  closeOnClickOutside: truthProp,
8408
8539
  closeOnClickOverlay: truthProp
8409
8540
  };
8410
- const DROPDOWN_KEY = Symbol(name$z);
8411
- var stdin_default$F = vue.defineComponent({
8412
- name: name$z,
8541
+ const DROPDOWN_KEY = Symbol(name$y);
8542
+ var stdin_default$E = vue.defineComponent({
8543
+ name: name$y,
8413
8544
  props: dropdownMenuProps,
8414
8545
  setup(props, {
8415
8546
  slots
@@ -8477,7 +8608,7 @@
8477
8608
  "id": `${id}-${index}`,
8478
8609
  "role": "button",
8479
8610
  "tabindex": disabled ? void 0 : 0,
8480
- "class": [bem$z("item", {
8611
+ "class": [bem$y("item", {
8481
8612
  disabled
8482
8613
  }), {
8483
8614
  [HAPTICS_FEEDBACK]: !disabled
@@ -8488,7 +8619,7 @@
8488
8619
  }
8489
8620
  }
8490
8621
  }, [vue.createVNode("span", {
8491
- "class": [bem$z("title", {
8622
+ "class": [bem$y("title", {
8492
8623
  down: showPopup === (props.direction === "down"),
8493
8624
  active: showPopup
8494
8625
  }), titleClass],
@@ -8512,18 +8643,18 @@
8512
8643
  var _a;
8513
8644
  return vue.createVNode("div", {
8514
8645
  "ref": root,
8515
- "class": bem$z()
8646
+ "class": bem$y()
8516
8647
  }, [vue.createVNode("div", {
8517
8648
  "ref": barRef,
8518
8649
  "style": barStyle.value,
8519
- "class": bem$z("bar", {
8650
+ "class": bem$y("bar", {
8520
8651
  opened: opened.value
8521
8652
  })
8522
8653
  }, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
8523
8654
  };
8524
8655
  }
8525
8656
  });
8526
- const [name$y, bem$y] = createNamespace("dropdown-item");
8657
+ const [name$x, bem$x] = createNamespace("dropdown-item");
8527
8658
  const dropdownItemProps = {
8528
8659
  title: String,
8529
8660
  options: makeArrayProp(),
@@ -8533,8 +8664,8 @@
8533
8664
  modelValue: unknownProp,
8534
8665
  titleClass: unknownProp
8535
8666
  };
8536
- var stdin_default$E = vue.defineComponent({
8537
- name: name$y,
8667
+ var stdin_default$D = vue.defineComponent({
8668
+ name: name$x,
8538
8669
  props: dropdownItemProps,
8539
8670
  emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
8540
8671
  setup(props, {
@@ -8601,7 +8732,7 @@
8601
8732
  const renderIcon = () => {
8602
8733
  if (active) {
8603
8734
  return vue.createVNode(Icon, {
8604
- "class": bem$y("icon"),
8735
+ "class": bem$x("icon"),
8605
8736
  "color": activeColor,
8606
8737
  "name": "success"
8607
8738
  }, null);
@@ -8612,7 +8743,7 @@
8612
8743
  "key": option.value,
8613
8744
  "icon": option.icon,
8614
8745
  "title": option.text,
8615
- "class": bem$y("option", {
8746
+ "class": bem$x("option", {
8616
8747
  active
8617
8748
  }),
8618
8749
  "style": {
@@ -8644,13 +8775,13 @@
8644
8775
  }
8645
8776
  return vue.withDirectives(vue.createVNode("div", {
8646
8777
  "style": style,
8647
- "class": bem$y([direction]),
8778
+ "class": bem$x([direction]),
8648
8779
  "onClick": onClickWrapper
8649
8780
  }, [vue.createVNode(Popup, {
8650
8781
  "show": state.showPopup,
8651
8782
  "onUpdate:show": ($event) => state.showPopup = $event,
8652
8783
  "role": "menu",
8653
- "class": bem$y("content"),
8784
+ "class": bem$x("content"),
8654
8785
  "overlay": overlay,
8655
8786
  "position": direction === "down" ? "top" : "bottom",
8656
8787
  "duration": state.transition ? duration : 0,
@@ -8688,147 +8819,8 @@
8688
8819
  };
8689
8820
  }
8690
8821
  });
8691
- const DropdownItem = withInstall(stdin_default$E);
8692
- const DropdownMenu = withInstall(stdin_default$F);
8693
- const prefix = "van-empty-network-";
8694
- const renderStop = (color, offset2, opacity) => vue.createVNode("stop", {
8695
- "stop-color": color,
8696
- "offset": `${offset2}%`,
8697
- "stop-opacity": opacity
8698
- }, null);
8699
- const Network = vue.createVNode("svg", {
8700
- "viewBox": "0 0 160 160"
8701
- }, [vue.createVNode("defs", null, [vue.createVNode("linearGradient", {
8702
- "id": `${prefix}1`,
8703
- "x1": "64%",
8704
- "y1": "100%",
8705
- "x2": "64%"
8706
- }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), vue.createVNode("linearGradient", {
8707
- "id": `${prefix}2`,
8708
- "x1": "50%",
8709
- "x2": "50%",
8710
- "y2": "84%"
8711
- }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), vue.createVNode("linearGradient", {
8712
- "id": `${prefix}3`,
8713
- "x1": "100%",
8714
- "x2": "100%",
8715
- "y2": "100%"
8716
- }, [renderStop("#EAEDF0", 0), renderStop("#DCDEE0", 100)]), vue.createVNode("radialGradient", {
8717
- "id": `${prefix}4`,
8718
- "cx": "50%",
8719
- "cy": "0%",
8720
- "fx": "50%",
8721
- "fy": "0%",
8722
- "r": "100%",
8723
- "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
8724
- }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), vue.createVNode("g", {
8725
- "fill": "none"
8726
- }, [vue.createVNode("g", {
8727
- "opacity": ".8"
8728
- }, [vue.createVNode("path", {
8729
- "d": "M36 131V53H16v20H2v58h34z",
8730
- "fill": `url(#${prefix}1)`
8731
- }, null), vue.createVNode("path", {
8732
- "d": "M123 15h22v14h9v77h-31V15z",
8733
- "fill": `url(#${prefix}1)`
8734
- }, null)]), vue.createVNode("path", {
8735
- "fill": `url(#${prefix}4)`,
8736
- "d": "M0 139h160v21H0z"
8737
- }, null), vue.createVNode("path", {
8738
- "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
8739
- "fill": `url(#${prefix}2)`
8740
- }, null), vue.createVNode("g", {
8741
- "opacity": ".6",
8742
- "stroke-linecap": "round",
8743
- "stroke-width": "7"
8744
- }, [vue.createVNode("path", {
8745
- "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
8746
- "stroke": `url(#${prefix}3)`
8747
- }, null), vue.createVNode("path", {
8748
- "d": "M53 36a34 34 0 0 0 0 48",
8749
- "stroke": `url(#${prefix}3)`
8750
- }, null), vue.createVNode("path", {
8751
- "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
8752
- "stroke": `url(#${prefix}3)`
8753
- }, null), vue.createVNode("path", {
8754
- "d": "M106 84a34 34 0 0 0 0-48",
8755
- "stroke": `url(#${prefix}3)`
8756
- }, null)]), vue.createVNode("g", {
8757
- "transform": "translate(31 105)"
8758
- }, [vue.createVNode("rect", {
8759
- "fill": "#EBEDF0",
8760
- "width": "98",
8761
- "height": "34",
8762
- "rx": "2"
8763
- }, null), vue.createVNode("rect", {
8764
- "fill": "#FFF",
8765
- "x": "9",
8766
- "y": "8",
8767
- "width": "80",
8768
- "height": "18",
8769
- "rx": "1.1"
8770
- }, null), vue.createVNode("rect", {
8771
- "fill": "#EBEDF0",
8772
- "x": "15",
8773
- "y": "12",
8774
- "width": "18",
8775
- "height": "6",
8776
- "rx": "1.1"
8777
- }, null)])])]);
8778
- const [name$x, bem$x] = createNamespace("empty");
8779
- const PRESET_IMAGES = ["error", "search", "default"];
8780
- const emptyProps = {
8781
- image: makeStringProp("default"),
8782
- imageSize: numericProp,
8783
- description: String
8784
- };
8785
- var stdin_default$D = vue.defineComponent({
8786
- name: name$x,
8787
- props: emptyProps,
8788
- setup(props, {
8789
- slots
8790
- }) {
8791
- const renderImage = () => {
8792
- if (slots.image) {
8793
- return slots.image();
8794
- }
8795
- let {
8796
- image
8797
- } = props;
8798
- if (image === "network") {
8799
- return Network;
8800
- }
8801
- if (PRESET_IMAGES.includes(image)) {
8802
- image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
8803
- }
8804
- return vue.createVNode("img", {
8805
- "src": image
8806
- }, null);
8807
- };
8808
- const renderDescription = () => {
8809
- const description = slots.description ? slots.description() : props.description;
8810
- if (description) {
8811
- return vue.createVNode("p", {
8812
- "class": bem$x("description")
8813
- }, [description]);
8814
- }
8815
- };
8816
- const renderBottom = () => {
8817
- if (slots.default) {
8818
- return vue.createVNode("div", {
8819
- "class": bem$x("bottom")
8820
- }, [slots.default()]);
8821
- }
8822
- };
8823
- return () => vue.createVNode("div", {
8824
- "class": bem$x()
8825
- }, [vue.createVNode("div", {
8826
- "class": bem$x("image"),
8827
- "style": getSizeStyle(props.imageSize)
8828
- }, [renderImage()]), renderDescription(), renderBottom()]);
8829
- }
8830
- });
8831
- const Empty = withInstall(stdin_default$D);
8822
+ const DropdownItem = withInstall(stdin_default$D);
8823
+ const DropdownMenu = withInstall(stdin_default$E);
8832
8824
  const [name$w, bem$w] = createNamespace("grid");
8833
8825
  const gridProps = {
8834
8826
  square: Boolean,
@@ -10322,6 +10314,15 @@
10322
10314
  default: ""
10323
10315
  }
10324
10316
  };
10317
+ function shuffle(array) {
10318
+ for (let i = array.length - 1; i > 0; i--) {
10319
+ const j = Math.floor(Math.random() * (i + 1));
10320
+ const temp = array[i];
10321
+ array[i] = array[j];
10322
+ array[j] = temp;
10323
+ }
10324
+ return array;
10325
+ }
10325
10326
  var stdin_default$r = vue.defineComponent({
10326
10327
  name: name$m,
10327
10328
  props: numberKeyboardProps,
@@ -10336,7 +10337,7 @@
10336
10337
  text: i + 1
10337
10338
  }));
10338
10339
  if (props.randomKeyOrder) {
10339
- keys2.sort(() => Math.random() > 0.5 ? 1 : -1);
10340
+ shuffle(keys2);
10340
10341
  }
10341
10342
  return keys2;
10342
10343
  };
@@ -12048,33 +12049,53 @@
12048
12049
  }) {
12049
12050
  const touch = useTouch();
12050
12051
  const [itemRefs, setItemRefs] = useRefs();
12052
+ const groupRef = vue.ref();
12051
12053
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
12052
12054
  const list = vue.computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
12053
12055
  let ranges;
12056
+ let groupRefRect;
12057
+ let minRectTop = Number.MAX_SAFE_INTEGER;
12058
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
12054
12059
  const updateRanges = () => {
12060
+ groupRefRect = useRect(groupRef);
12055
12061
  const rects = itemRefs.value.map(useRect);
12056
12062
  ranges = [];
12057
12063
  rects.forEach((rect, index) => {
12064
+ minRectTop = Math.min(rect.top, minRectTop);
12065
+ maxRectTop = Math.max(rect.top, maxRectTop);
12058
12066
  if (props.allowHalf) {
12059
12067
  ranges.push({
12060
12068
  score: index + 0.5,
12061
- left: rect.left
12069
+ left: rect.left,
12070
+ top: rect.top,
12071
+ height: rect.height
12062
12072
  }, {
12063
12073
  score: index + 1,
12064
- left: rect.left + rect.width / 2
12074
+ left: rect.left + rect.width / 2,
12075
+ top: rect.top,
12076
+ height: rect.height
12065
12077
  });
12066
12078
  } else {
12067
12079
  ranges.push({
12068
12080
  score: index + 1,
12069
- left: rect.left
12081
+ left: rect.left,
12082
+ top: rect.top,
12083
+ height: rect.height
12070
12084
  });
12071
12085
  }
12072
12086
  });
12073
12087
  };
12074
- const getScoreByPosition = (x) => {
12088
+ const getScoreByPosition = (x, y) => {
12075
12089
  for (let i = ranges.length - 1; i > 0; i--) {
12076
- if (x > ranges[i].left) {
12077
- return ranges[i].score;
12090
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
12091
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
12092
+ return ranges[i].score;
12093
+ }
12094
+ } else {
12095
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
12096
+ if (x > ranges[i].left && ranges[i].top === curTop) {
12097
+ return ranges[i].score;
12098
+ }
12078
12099
  }
12079
12100
  }
12080
12101
  return props.allowHalf ? 0.5 : 1;
@@ -12099,10 +12120,11 @@
12099
12120
  touch.move(event);
12100
12121
  if (touch.isHorizontal()) {
12101
12122
  const {
12102
- clientX
12123
+ clientX,
12124
+ clientY
12103
12125
  } = event.touches[0];
12104
12126
  preventDefault(event);
12105
- select(getScoreByPosition(clientX));
12127
+ select(getScoreByPosition(clientX, clientY));
12106
12128
  }
12107
12129
  };
12108
12130
  const renderStar = (item, index) => {
@@ -12131,7 +12153,7 @@
12131
12153
  }
12132
12154
  const onClickItem = (event) => {
12133
12155
  updateRanges();
12134
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
12156
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
12135
12157
  };
12136
12158
  return vue.createVNode("div", {
12137
12159
  "key": index,
@@ -12169,6 +12191,7 @@
12169
12191
  };
12170
12192
  useCustomFieldValue(() => props.modelValue);
12171
12193
  return () => vue.createVNode("div", {
12194
+ "ref": groupRef,
12172
12195
  "role": "radiogroup",
12173
12196
  "class": bem$f({
12174
12197
  readonly: props.readonly,
@@ -12293,14 +12316,17 @@
12293
12316
  }
12294
12317
  });
12295
12318
  const Search = withInstall(stdin_default$k);
12296
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
12297
12319
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
12298
- function getIconURL(icon) {
12299
- if (PRESET_ICONS.includes(icon)) {
12300
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
12301
- }
12302
- return icon;
12303
- }
12320
+ const iconMap = {
12321
+ qq: "qq",
12322
+ link: "link-o",
12323
+ weibo: "weibo",
12324
+ qrcode: "qr",
12325
+ poster: "photo-o",
12326
+ wechat: "wechat",
12327
+ "weapp-qrcode": "miniprogram-o",
12328
+ "wechat-moments": "wechat-moments"
12329
+ };
12304
12330
  const [name$e, bem$d, t$2] = createNamespace("share-sheet");
12305
12331
  const shareSheetProps = extend({}, popupSharedProps, {
12306
12332
  title: String,
@@ -12338,6 +12364,19 @@
12338
12364
  }, [description])]);
12339
12365
  }
12340
12366
  };
12367
+ const renderIcon = (icon) => {
12368
+ if (iconMap[icon]) {
12369
+ return vue.createVNode("div", {
12370
+ "class": bem$d("icon", [icon])
12371
+ }, [vue.createVNode(Icon, {
12372
+ "name": iconMap[icon] || icon
12373
+ }, null)]);
12374
+ }
12375
+ return vue.createVNode("img", {
12376
+ "src": icon,
12377
+ "class": bem$d("image-icon")
12378
+ }, null);
12379
+ };
12341
12380
  const renderOption = (option, index) => {
12342
12381
  const {
12343
12382
  name: name2,
@@ -12350,10 +12389,7 @@
12350
12389
  "tabindex": 0,
12351
12390
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
12352
12391
  "onClick": () => onSelect(option, index)
12353
- }, [vue.createVNode("img", {
12354
- "src": getIconURL(icon),
12355
- "class": bem$d("icon")
12356
- }, null), name2 && vue.createVNode("span", {
12392
+ }, [renderIcon(icon), name2 && vue.createVNode("span", {
12357
12393
  "class": bem$d("name")
12358
12394
  }, [name2]), description && vue.createVNode("span", {
12359
12395
  "class": bem$d("option-description")
@@ -13874,7 +13910,7 @@
13874
13910
  imageFit: String,
13875
13911
  lazyLoad: Boolean,
13876
13912
  deletable: Boolean,
13877
- previewSize: numericProp,
13913
+ previewSize: [Number, String, Array],
13878
13914
  beforeDelete: Function
13879
13915
  },
13880
13916
  emits: ["delete", "preview"],
@@ -13948,16 +13984,19 @@
13948
13984
  };
13949
13985
  const renderPreview = () => {
13950
13986
  const {
13951
- item
13987
+ item,
13988
+ lazyLoad,
13989
+ imageFit,
13990
+ previewSize
13952
13991
  } = props;
13953
13992
  if (isImageFile(item)) {
13954
13993
  return vue.createVNode(Image$1, {
13955
- "fit": props.imageFit,
13994
+ "fit": imageFit,
13956
13995
  "src": item.content || item.url,
13957
13996
  "class": bem("preview-image"),
13958
- "width": props.previewSize,
13959
- "height": props.previewSize,
13960
- "lazyLoad": props.lazyLoad,
13997
+ "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
13998
+ "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
13999
+ "lazyLoad": lazyLoad,
13961
14000
  "onClick": onPreview
13962
14001
  }, {
13963
14002
  default: renderCover
@@ -13997,7 +14036,7 @@
13997
14036
  modelValue: makeArrayProp(),
13998
14037
  beforeRead: Function,
13999
14038
  beforeDelete: Function,
14000
- previewSize: numericProp,
14039
+ previewSize: [Number, String, Array],
14001
14040
  previewImage: truthProp,
14002
14041
  previewOptions: Object,
14003
14042
  previewFullImage: truthProp,
@@ -15064,7 +15103,7 @@
15064
15103
  });
15065
15104
  }
15066
15105
  };
15067
- const version = "4.0.0-alpha.1";
15106
+ const version = "4.0.0-alpha.2";
15068
15107
  function install(app) {
15069
15108
  const components = [
15070
15109
  ActionBar,