vant 3.4.6 → 3.4.9

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 (475) hide show
  1. package/README.md +141 -0
  2. package/changelog.generated.md +44 -65
  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.js +1 -1
  8. package/es/calendar/CalendarDay.js +4 -0
  9. package/es/calendar/index.css +1 -1
  10. package/es/calendar/index.less +2 -0
  11. package/es/calendar/types.d.ts +2 -1
  12. package/es/calendar/var.less +1 -0
  13. package/es/cascader/types.d.ts +2 -1
  14. package/es/checkbox/Checker.d.ts +2 -1
  15. package/es/collapse/Collapse.d.ts +7 -6
  16. package/es/collapse/index.d.ts +3 -3
  17. package/es/composables/use-touch.js +1 -1
  18. package/es/config-provider/ConfigProvider.d.ts +4 -3
  19. package/es/config-provider/index.d.ts +2 -2
  20. package/es/contact-list/ContactList.d.ts +3 -2
  21. package/es/coupon/Coupon.d.ts +2 -1
  22. package/es/coupon-list/CouponList.d.ts +3 -13
  23. package/es/coupon-list/CouponList.js +9 -7
  24. package/es/coupon-list/index.css +1 -1
  25. package/es/coupon-list/index.d.ts +2 -9
  26. package/es/coupon-list/index.less +4 -16
  27. package/es/coupon-list/style/index.js +1 -0
  28. package/es/coupon-list/style/less.js +1 -0
  29. package/es/coupon-list/var.less +0 -1
  30. package/es/datetime-picker/DatePicker.js +2 -2
  31. package/es/dialog/index.css +1 -1
  32. package/es/dialog/types.d.ts +2 -2
  33. package/es/dropdown-item/types.d.ts +2 -1
  34. package/es/empty/Empty.d.ts +8 -7
  35. package/es/empty/Empty.js +12 -15
  36. package/es/empty/Images.d.ts +4 -0
  37. package/es/empty/Images.js +271 -0
  38. package/es/empty/index.d.ts +2 -2
  39. package/es/field/Field.d.ts +4 -0
  40. package/es/field/Field.js +8 -3
  41. package/es/field/index.d.ts +2 -0
  42. package/es/field/types.d.ts +1 -1
  43. package/es/form/Form.d.ts +13 -13
  44. package/es/form/Form.js +7 -3
  45. package/es/form/index.d.ts +9 -9
  46. package/es/form/types.d.ts +1 -0
  47. package/es/icon/index.css +1 -1
  48. package/es/index-bar/IndexBar.d.ts +5 -4
  49. package/es/index-bar/IndexBar.js +25 -4
  50. package/es/index-bar/index.d.ts +3 -3
  51. package/es/index-bar/types.d.ts +2 -1
  52. package/es/index.d.ts +1 -1
  53. package/es/index.js +1 -1
  54. package/es/loading/Loading.js +3 -1
  55. package/es/locale/lang/da-DK.d.ts +64 -0
  56. package/es/locale/lang/da-DK.js +66 -0
  57. package/es/locale/lang/is-IS.d.ts +64 -0
  58. package/es/locale/lang/is-IS.js +74 -0
  59. package/es/locale/lang/la-LA.d.ts +64 -0
  60. package/es/locale/lang/la-LA.js +66 -0
  61. package/es/locale/lang/sv-SE.d.ts +64 -0
  62. package/es/locale/lang/sv-SE.js +66 -0
  63. package/es/notify/types.d.ts +2 -1
  64. package/es/number-keyboard/NumberKeyboard.js +10 -1
  65. package/es/picker/types.d.ts +3 -2
  66. package/es/popup/index.css +1 -1
  67. package/es/progress/Progress.d.ts +4 -3
  68. package/es/progress/index.d.ts +2 -2
  69. package/es/rate/Rate.js +32 -10
  70. package/es/search/Search.d.ts +3 -0
  71. package/es/search/index.d.ts +2 -0
  72. package/es/share-sheet/ShareSheet.js +25 -11
  73. package/es/share-sheet/index.css +1 -1
  74. package/es/share-sheet/index.less +45 -1
  75. package/es/skeleton/Skeleton.d.ts +5 -4
  76. package/es/skeleton/index.d.ts +3 -3
  77. package/es/slider/index.css +1 -1
  78. package/es/style/animation.css +1 -1
  79. package/es/style/base.css +1 -1
  80. package/es/swipe-cell/index.css +1 -1
  81. package/es/tabbar/Tabbar.d.ts +2 -2
  82. package/es/tabs/Tabs.d.ts +1 -1
  83. package/es/tabs/Tabs.js +1 -0
  84. package/es/tabs/types.d.ts +5 -4
  85. package/es/toast/types.d.ts +3 -2
  86. package/es/tree-select/TreeSelect.d.ts +7 -6
  87. package/es/tree-select/index.d.ts +3 -3
  88. package/es/uploader/Uploader.d.ts +4 -4
  89. package/es/uploader/Uploader.js +3 -3
  90. package/es/uploader/UploaderPreviewItem.d.ts +3 -3
  91. package/es/uploader/UploaderPreviewItem.js +9 -6
  92. package/es/uploader/index.d.ts +2 -2
  93. package/es/uploader/types.d.ts +5 -5
  94. package/es/uploader/utils.d.ts +0 -1
  95. package/es/uploader/utils.js +2 -4
  96. package/es/utils/basic.d.ts +2 -0
  97. package/es/utils/basic.js +3 -1
  98. package/es/utils/format.d.ts +7 -6
  99. package/es/utils/format.js +6 -0
  100. package/es/utils/validate.d.ts +2 -1
  101. package/lib/action-bar/ActionBar.js +8 -13
  102. package/lib/action-bar/index.js +9 -16
  103. package/lib/action-bar-button/ActionBarButton.js +8 -13
  104. package/lib/action-bar-button/index.js +9 -16
  105. package/lib/action-bar-icon/ActionBarIcon.js +8 -13
  106. package/lib/action-bar-icon/index.js +9 -16
  107. package/lib/action-sheet/ActionSheet.js +8 -13
  108. package/lib/action-sheet/index.js +9 -16
  109. package/lib/address-edit/AddressEdit.js +9 -16
  110. package/lib/address-edit/AddressEditDetail.js +8 -13
  111. package/lib/address-edit/index.js +9 -16
  112. package/lib/address-edit/types.js +7 -12
  113. package/lib/address-list/AddressList.js +9 -16
  114. package/lib/address-list/AddressListItem.d.ts +3 -2
  115. package/lib/address-list/AddressListItem.js +8 -13
  116. package/lib/address-list/index.js +9 -16
  117. package/lib/area/Area.js +8 -13
  118. package/lib/area/index.js +9 -16
  119. package/lib/area/types.js +7 -12
  120. package/lib/badge/Badge.d.ts +4 -3
  121. package/lib/badge/Badge.js +8 -13
  122. package/lib/badge/index.d.ts +2 -2
  123. package/lib/badge/index.js +9 -16
  124. package/lib/button/Button.js +8 -13
  125. package/lib/button/index.js +9 -16
  126. package/lib/button/types.js +7 -12
  127. package/lib/calendar/Calendar.js +10 -17
  128. package/lib/calendar/CalendarDay.js +12 -13
  129. package/lib/calendar/CalendarHeader.js +8 -13
  130. package/lib/calendar/CalendarMonth.js +9 -16
  131. package/lib/calendar/index.css +1 -1
  132. package/lib/calendar/index.js +9 -16
  133. package/lib/calendar/index.less +2 -0
  134. package/lib/calendar/types.d.ts +2 -1
  135. package/lib/calendar/types.js +7 -12
  136. package/lib/calendar/utils.js +8 -13
  137. package/lib/calendar/var.less +1 -0
  138. package/lib/card/Card.js +8 -13
  139. package/lib/card/index.js +9 -16
  140. package/lib/cascader/Cascader.js +8 -13
  141. package/lib/cascader/index.js +9 -16
  142. package/lib/cascader/types.d.ts +2 -1
  143. package/lib/cascader/types.js +7 -12
  144. package/lib/cell/Cell.js +8 -13
  145. package/lib/cell/index.js +9 -16
  146. package/lib/cell-group/CellGroup.js +8 -13
  147. package/lib/cell-group/index.js +9 -16
  148. package/lib/checkbox/Checkbox.js +9 -16
  149. package/lib/checkbox/Checker.d.ts +2 -1
  150. package/lib/checkbox/Checker.js +8 -13
  151. package/lib/checkbox/index.js +9 -16
  152. package/lib/checkbox/types.js +7 -12
  153. package/lib/checkbox-group/CheckboxGroup.js +8 -13
  154. package/lib/checkbox-group/index.js +9 -16
  155. package/lib/checkbox-group/types.js +7 -12
  156. package/lib/circle/Circle.js +8 -13
  157. package/lib/circle/index.js +9 -16
  158. package/lib/col/Col.js +8 -13
  159. package/lib/col/index.js +9 -16
  160. package/lib/collapse/Collapse.d.ts +7 -6
  161. package/lib/collapse/Collapse.js +8 -13
  162. package/lib/collapse/index.d.ts +3 -3
  163. package/lib/collapse/index.js +9 -16
  164. package/lib/collapse-item/CollapseItem.js +8 -13
  165. package/lib/collapse-item/index.js +9 -16
  166. package/lib/collapse-item/types.js +7 -12
  167. package/lib/composables/on-popup-reopen.js +8 -13
  168. package/lib/composables/use-expose.js +8 -13
  169. package/lib/composables/use-height.js +8 -13
  170. package/lib/composables/use-id.js +8 -13
  171. package/lib/composables/use-lazy-render.js +8 -13
  172. package/lib/composables/use-lock-scroll.js +8 -13
  173. package/lib/composables/use-placeholder.js +8 -13
  174. package/lib/composables/use-refs.js +8 -13
  175. package/lib/composables/use-route.js +8 -13
  176. package/lib/composables/use-tab-status.js +8 -13
  177. package/lib/composables/use-touch.js +9 -14
  178. package/lib/composables/use-visibility-change.js +8 -13
  179. package/lib/config-provider/ConfigProvider.d.ts +4 -3
  180. package/lib/config-provider/ConfigProvider.js +8 -13
  181. package/lib/config-provider/index.d.ts +2 -2
  182. package/lib/config-provider/index.js +9 -16
  183. package/lib/contact-card/ContactCard.js +8 -13
  184. package/lib/contact-card/index.js +9 -16
  185. package/lib/contact-edit/ContactEdit.js +8 -13
  186. package/lib/contact-edit/index.js +9 -16
  187. package/lib/contact-list/ContactList.d.ts +3 -2
  188. package/lib/contact-list/ContactList.js +8 -13
  189. package/lib/contact-list/index.js +9 -16
  190. package/lib/count-down/CountDown.js +8 -13
  191. package/lib/count-down/index.js +9 -16
  192. package/lib/count-down/types.js +7 -12
  193. package/lib/count-down/utils.js +8 -13
  194. package/lib/coupon/Coupon.d.ts +2 -1
  195. package/lib/coupon/Coupon.js +8 -13
  196. package/lib/coupon/index.js +9 -16
  197. package/lib/coupon/utils.js +8 -13
  198. package/lib/coupon-cell/CouponCell.js +8 -13
  199. package/lib/coupon-cell/index.js +9 -16
  200. package/lib/coupon-list/CouponList.d.ts +3 -13
  201. package/lib/coupon-list/CouponList.js +17 -20
  202. package/lib/coupon-list/index.css +1 -1
  203. package/lib/coupon-list/index.d.ts +2 -9
  204. package/lib/coupon-list/index.js +9 -16
  205. package/lib/coupon-list/index.less +4 -16
  206. package/lib/coupon-list/style/index.js +1 -0
  207. package/lib/coupon-list/style/less.js +1 -0
  208. package/lib/coupon-list/var.less +0 -1
  209. package/lib/datetime-picker/DatePicker.js +10 -15
  210. package/lib/datetime-picker/DatetimePicker.js +9 -16
  211. package/lib/datetime-picker/TimePicker.js +8 -13
  212. package/lib/datetime-picker/index.js +9 -16
  213. package/lib/datetime-picker/types.js +7 -12
  214. package/lib/datetime-picker/utils.js +8 -13
  215. package/lib/dialog/Dialog.js +8 -13
  216. package/lib/dialog/function-call.js +9 -16
  217. package/lib/dialog/index.css +1 -1
  218. package/lib/dialog/index.js +8 -13
  219. package/lib/dialog/types.d.ts +2 -2
  220. package/lib/dialog/types.js +7 -12
  221. package/lib/divider/Divider.js +8 -13
  222. package/lib/divider/index.js +9 -16
  223. package/lib/dropdown-item/DropdownItem.js +8 -13
  224. package/lib/dropdown-item/index.js +9 -16
  225. package/lib/dropdown-item/types.d.ts +2 -1
  226. package/lib/dropdown-item/types.js +7 -12
  227. package/lib/dropdown-menu/DropdownMenu.js +8 -13
  228. package/lib/dropdown-menu/index.js +9 -16
  229. package/lib/dropdown-menu/types.js +7 -12
  230. package/lib/empty/Empty.d.ts +8 -7
  231. package/lib/empty/Empty.js +19 -27
  232. package/lib/empty/Images.d.ts +4 -0
  233. package/lib/empty/Images.js +290 -0
  234. package/lib/empty/index.d.ts +2 -2
  235. package/lib/empty/index.js +9 -16
  236. package/lib/field/Field.d.ts +4 -0
  237. package/lib/field/Field.js +15 -15
  238. package/lib/field/index.d.ts +2 -0
  239. package/lib/field/index.js +9 -16
  240. package/lib/field/types.d.ts +1 -1
  241. package/lib/field/types.js +7 -12
  242. package/lib/field/utils.js +8 -13
  243. package/lib/form/Form.d.ts +13 -13
  244. package/lib/form/Form.js +14 -15
  245. package/lib/form/index.d.ts +9 -9
  246. package/lib/form/index.js +9 -16
  247. package/lib/form/types.d.ts +1 -0
  248. package/lib/form/types.js +7 -12
  249. package/lib/grid/Grid.js +8 -13
  250. package/lib/grid/index.js +9 -16
  251. package/lib/grid-item/GridItem.js +8 -13
  252. package/lib/grid-item/index.js +9 -16
  253. package/lib/icon/Icon.js +8 -13
  254. package/lib/icon/index.css +1 -1
  255. package/lib/icon/index.js +9 -16
  256. package/lib/image/Image.js +8 -13
  257. package/lib/image/index.js +9 -16
  258. package/lib/image-preview/ImagePreview.js +9 -16
  259. package/lib/image-preview/ImagePreviewItem.js +8 -13
  260. package/lib/image-preview/function-call.js +9 -16
  261. package/lib/image-preview/index.js +8 -13
  262. package/lib/image-preview/types.js +7 -12
  263. package/lib/index-anchor/IndexAnchor.js +8 -13
  264. package/lib/index-anchor/index.js +9 -16
  265. package/lib/index-bar/IndexBar.d.ts +5 -4
  266. package/lib/index-bar/IndexBar.js +33 -17
  267. package/lib/index-bar/index.d.ts +3 -3
  268. package/lib/index-bar/index.js +9 -16
  269. package/lib/index-bar/types.d.ts +2 -1
  270. package/lib/index-bar/types.js +7 -12
  271. package/lib/index.css +1 -1
  272. package/lib/index.d.ts +1 -1
  273. package/lib/index.js +96 -100
  274. package/lib/index.less +2 -2
  275. package/lib/lazyload/index.js +8 -13
  276. package/lib/lazyload/vue-lazyload/index.js +9 -16
  277. package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
  278. package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
  279. package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
  280. package/lib/lazyload/vue-lazyload/lazy.js +9 -16
  281. package/lib/lazyload/vue-lazyload/listener.js +8 -13
  282. package/lib/lazyload/vue-lazyload/util.js +8 -13
  283. package/lib/list/List.js +8 -13
  284. package/lib/list/index.js +9 -16
  285. package/lib/list/types.js +7 -12
  286. package/lib/loading/Loading.js +11 -14
  287. package/lib/loading/index.js +9 -16
  288. package/lib/locale/index.js +9 -16
  289. package/lib/locale/lang/bn-BD.js +8 -13
  290. package/lib/locale/lang/da-DK.d.ts +64 -0
  291. package/lib/locale/lang/da-DK.js +85 -0
  292. package/lib/locale/lang/de-DE-formal.js +8 -13
  293. package/lib/locale/lang/de-DE.js +8 -13
  294. package/lib/locale/lang/en-US.js +8 -13
  295. package/lib/locale/lang/es-ES.js +8 -13
  296. package/lib/locale/lang/fr-FR.js +8 -13
  297. package/lib/locale/lang/hi-IN.js +8 -13
  298. package/lib/locale/lang/id-ID.js +8 -13
  299. package/lib/locale/lang/is-IS.d.ts +64 -0
  300. package/lib/locale/lang/is-IS.js +93 -0
  301. package/lib/locale/lang/it-IT.js +8 -13
  302. package/lib/locale/lang/ja-JP.js +8 -13
  303. package/lib/locale/lang/ko-KR.js +8 -13
  304. package/lib/locale/lang/la-LA.d.ts +64 -0
  305. package/lib/locale/lang/la-LA.js +85 -0
  306. package/lib/locale/lang/nb-NO.js +8 -13
  307. package/lib/locale/lang/pt-BR.js +8 -13
  308. package/lib/locale/lang/ro-RO.js +8 -13
  309. package/lib/locale/lang/ru-RU.js +8 -13
  310. package/lib/locale/lang/sv-SE.d.ts +64 -0
  311. package/lib/locale/lang/sv-SE.js +85 -0
  312. package/lib/locale/lang/th-TH.js +8 -13
  313. package/lib/locale/lang/tr-TR.js +8 -13
  314. package/lib/locale/lang/uk-UA.js +8 -13
  315. package/lib/locale/lang/vi-VN.js +8 -13
  316. package/lib/locale/lang/zh-CN.js +8 -13
  317. package/lib/locale/lang/zh-HK.js +8 -13
  318. package/lib/locale/lang/zh-TW.js +8 -13
  319. package/lib/nav-bar/NavBar.js +8 -13
  320. package/lib/nav-bar/index.js +9 -16
  321. package/lib/notice-bar/NoticeBar.js +8 -13
  322. package/lib/notice-bar/index.js +9 -16
  323. package/lib/notice-bar/types.js +7 -12
  324. package/lib/notify/Notify.js +8 -13
  325. package/lib/notify/function-call.js +9 -16
  326. package/lib/notify/index.js +8 -13
  327. package/lib/notify/types.d.ts +2 -1
  328. package/lib/notify/types.js +7 -12
  329. package/lib/number-keyboard/NumberKeyboard.js +19 -17
  330. package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
  331. package/lib/number-keyboard/index.js +9 -16
  332. package/lib/overlay/Overlay.js +8 -13
  333. package/lib/overlay/index.js +9 -16
  334. package/lib/pagination/Pagination.js +8 -13
  335. package/lib/pagination/index.js +9 -16
  336. package/lib/password-input/PasswordInput.js +8 -13
  337. package/lib/password-input/index.js +9 -16
  338. package/lib/picker/Picker.js +9 -16
  339. package/lib/picker/PickerColumn.js +8 -13
  340. package/lib/picker/index.js +9 -16
  341. package/lib/picker/types.d.ts +3 -2
  342. package/lib/picker/types.js +7 -12
  343. package/lib/popover/Popover.js +8 -13
  344. package/lib/popover/index.js +9 -16
  345. package/lib/popover/types.js +7 -12
  346. package/lib/popup/Popup.js +8 -13
  347. package/lib/popup/index.css +1 -1
  348. package/lib/popup/index.js +9 -16
  349. package/lib/popup/shared.js +8 -13
  350. package/lib/popup/types.js +7 -12
  351. package/lib/progress/Progress.d.ts +4 -3
  352. package/lib/progress/Progress.js +8 -13
  353. package/lib/progress/index.d.ts +2 -2
  354. package/lib/progress/index.js +9 -16
  355. package/lib/progress/types.js +7 -12
  356. package/lib/pull-refresh/PullRefresh.js +8 -13
  357. package/lib/pull-refresh/index.js +9 -16
  358. package/lib/radio/Radio.js +9 -16
  359. package/lib/radio/index.js +9 -16
  360. package/lib/radio-group/RadioGroup.js +8 -13
  361. package/lib/radio-group/index.js +9 -16
  362. package/lib/rate/Rate.js +39 -22
  363. package/lib/rate/index.js +9 -16
  364. package/lib/row/Row.js +8 -13
  365. package/lib/row/index.js +9 -16
  366. package/lib/search/Search.d.ts +3 -0
  367. package/lib/search/Search.js +8 -13
  368. package/lib/search/index.d.ts +2 -0
  369. package/lib/search/index.js +9 -16
  370. package/lib/search/types.js +7 -12
  371. package/lib/share-sheet/ShareSheet.js +33 -24
  372. package/lib/share-sheet/index.css +1 -1
  373. package/lib/share-sheet/index.js +9 -16
  374. package/lib/share-sheet/index.less +45 -1
  375. package/lib/sidebar/Sidebar.js +8 -13
  376. package/lib/sidebar/index.js +9 -16
  377. package/lib/sidebar-item/SidebarItem.js +8 -13
  378. package/lib/sidebar-item/index.js +9 -16
  379. package/lib/skeleton/Skeleton.d.ts +5 -4
  380. package/lib/skeleton/Skeleton.js +8 -13
  381. package/lib/skeleton/index.d.ts +3 -3
  382. package/lib/skeleton/index.js +9 -16
  383. package/lib/slider/Slider.js +8 -13
  384. package/lib/slider/index.css +1 -1
  385. package/lib/slider/index.js +9 -16
  386. package/lib/step/Step.js +8 -13
  387. package/lib/step/index.js +9 -16
  388. package/lib/stepper/Stepper.js +8 -13
  389. package/lib/stepper/index.js +9 -16
  390. package/lib/steps/Steps.js +8 -13
  391. package/lib/steps/index.js +9 -16
  392. package/lib/sticky/Sticky.js +8 -13
  393. package/lib/sticky/index.js +9 -16
  394. package/lib/style/animation.css +1 -1
  395. package/lib/style/base.css +1 -1
  396. package/lib/submit-bar/SubmitBar.js +8 -13
  397. package/lib/submit-bar/index.js +9 -16
  398. package/lib/swipe/Swipe.js +8 -13
  399. package/lib/swipe/index.js +9 -16
  400. package/lib/swipe/types.js +7 -12
  401. package/lib/swipe-cell/SwipeCell.js +8 -13
  402. package/lib/swipe-cell/index.css +1 -1
  403. package/lib/swipe-cell/index.js +9 -16
  404. package/lib/swipe-cell/types.js +7 -12
  405. package/lib/swipe-item/SwipeItem.js +8 -13
  406. package/lib/swipe-item/index.js +9 -16
  407. package/lib/switch/Switch.js +8 -13
  408. package/lib/switch/index.js +9 -16
  409. package/lib/tab/Tab.js +8 -13
  410. package/lib/tab/index.js +9 -16
  411. package/lib/tabbar/Tabbar.d.ts +2 -2
  412. package/lib/tabbar/Tabbar.js +8 -13
  413. package/lib/tabbar/index.js +9 -16
  414. package/lib/tabbar-item/TabbarItem.js +8 -13
  415. package/lib/tabbar-item/index.js +9 -16
  416. package/lib/tabs/Tabs.d.ts +1 -1
  417. package/lib/tabs/Tabs.js +10 -16
  418. package/lib/tabs/TabsContent.js +8 -13
  419. package/lib/tabs/TabsTitle.js +8 -13
  420. package/lib/tabs/index.js +9 -16
  421. package/lib/tabs/types.d.ts +5 -4
  422. package/lib/tabs/types.js +7 -12
  423. package/lib/tabs/utils.js +8 -13
  424. package/lib/tag/Tag.js +8 -13
  425. package/lib/tag/index.js +9 -16
  426. package/lib/toast/Toast.js +8 -13
  427. package/lib/toast/function-call.js +9 -16
  428. package/lib/toast/index.js +8 -13
  429. package/lib/toast/lock-click.js +8 -13
  430. package/lib/toast/types.d.ts +3 -2
  431. package/lib/toast/types.js +7 -12
  432. package/lib/tree-select/TreeSelect.d.ts +7 -6
  433. package/lib/tree-select/TreeSelect.js +8 -13
  434. package/lib/tree-select/index.d.ts +3 -3
  435. package/lib/tree-select/index.js +9 -16
  436. package/lib/uploader/Uploader.d.ts +4 -4
  437. package/lib/uploader/Uploader.js +11 -18
  438. package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
  439. package/lib/uploader/UploaderPreviewItem.js +17 -19
  440. package/lib/uploader/index.d.ts +2 -2
  441. package/lib/uploader/index.js +9 -16
  442. package/lib/uploader/types.d.ts +5 -5
  443. package/lib/uploader/types.js +7 -12
  444. package/lib/uploader/utils.d.ts +0 -1
  445. package/lib/uploader/utils.js +10 -17
  446. package/lib/utils/basic.d.ts +2 -0
  447. package/lib/utils/basic.js +11 -14
  448. package/lib/utils/constant.js +8 -13
  449. package/lib/utils/create.js +9 -16
  450. package/lib/utils/deep-assign.js +8 -13
  451. package/lib/utils/deep-clone.js +8 -13
  452. package/lib/utils/dom.js +8 -13
  453. package/lib/utils/format.d.ts +7 -6
  454. package/lib/utils/format.js +14 -13
  455. package/lib/utils/index.js +17 -21
  456. package/lib/utils/interceptor.js +8 -13
  457. package/lib/utils/mount-component.js +8 -13
  458. package/lib/utils/props.js +8 -13
  459. package/lib/utils/validate.d.ts +2 -1
  460. package/lib/utils/validate.js +8 -13
  461. package/lib/utils/with-install.js +8 -13
  462. package/lib/vant.cjs.js +530 -263
  463. package/lib/vant.cjs.min.js +1 -1
  464. package/lib/vant.es.js +530 -263
  465. package/lib/vant.es.min.js +530 -263
  466. package/lib/vant.js +530 -263
  467. package/lib/vant.min.js +1 -1
  468. package/package.json +3 -3
  469. package/vetur/attributes.json +423 -487
  470. package/vetur/tags.json +112 -110
  471. package/vetur/web-types.json +2200 -1345
  472. package/es/empty/Network.d.ts +0 -1
  473. package/es/empty/Network.js +0 -89
  474. package/lib/empty/Network.d.ts +0 -1
  475. package/lib/empty/Network.js +0 -113
@@ -1,6 +1,7 @@
1
1
  import { type PropType } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  export declare type CouponInfo = {
3
- id: string | number;
4
+ id: Numeric;
4
5
  name: string;
5
6
  endAt: number;
6
7
  value: number;
@@ -17,10 +17,7 @@ declare const couponListProps: {
17
17
  type: BooleanConstructor;
18
18
  default: true;
19
19
  };
20
- emptyImage: {
21
- type: import("vue").PropType<string>;
22
- default: string;
23
- };
20
+ emptyImage: StringConstructor;
24
21
  chosenCoupon: {
25
22
  type: NumberConstructor;
26
23
  default: number;
@@ -71,10 +68,7 @@ declare const _default: import("vue").DefineComponent<{
71
68
  type: BooleanConstructor;
72
69
  default: true;
73
70
  };
74
- emptyImage: {
75
- type: import("vue").PropType<string>;
76
- default: string;
77
- };
71
+ emptyImage: StringConstructor;
78
72
  chosenCoupon: {
79
73
  type: NumberConstructor;
80
74
  default: number;
@@ -123,10 +117,7 @@ declare const _default: import("vue").DefineComponent<{
123
117
  type: BooleanConstructor;
124
118
  default: true;
125
119
  };
126
- emptyImage: {
127
- type: import("vue").PropType<string>;
128
- default: string;
129
- };
120
+ emptyImage: StringConstructor;
130
121
  chosenCoupon: {
131
122
  type: NumberConstructor;
132
123
  default: number;
@@ -168,7 +159,6 @@ declare const _default: import("vue").DefineComponent<{
168
159
  coupons: CouponInfo[];
169
160
  chosenCoupon: number;
170
161
  showCount: boolean;
171
- emptyImage: string;
172
162
  disabledCoupons: CouponInfo[];
173
163
  showExchangeBar: boolean;
174
164
  showCloseButton: boolean;
@@ -4,18 +4,18 @@ import { truthProp, windowHeight, makeArrayProp, makeStringProp, makeNumberProp,
4
4
  import { useRefs } from "../composables/use-refs";
5
5
  import { Tab } from "../tab";
6
6
  import { Tabs } from "../tabs";
7
+ import { Empty } from "../empty";
7
8
  import { Field } from "../field";
8
9
  import { Button } from "../button";
9
10
  import { Coupon } from "../coupon";
10
11
  import { useRect } from "@vant/use";
11
12
  const [name, bem, t] = createNamespace("coupon-list");
12
- const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
13
13
  const couponListProps = {
14
14
  code: makeStringProp(""),
15
15
  coupons: makeArrayProp(),
16
16
  currency: makeStringProp("\xA5"),
17
17
  showCount: truthProp,
18
- emptyImage: makeStringProp(EMPTY_IMAGE),
18
+ emptyImage: String,
19
19
  chosenCoupon: makeNumberProp(-1),
20
20
  enabledTitle: String,
21
21
  disabledTitle: String,
@@ -63,11 +63,13 @@ var stdin_default = defineComponent({
63
63
  return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
64
64
  });
65
65
  };
66
- const renderEmpty = () => _createVNode("div", {
67
- "class": bem("empty")
68
- }, [_createVNode("img", {
69
- "src": props.emptyImage
70
- }, null), _createVNode("p", null, [t("noCoupon")])]);
66
+ const renderEmpty = () => _createVNode(Empty, {
67
+ "image": props.emptyImage
68
+ }, {
69
+ default: () => [_createVNode("p", {
70
+ "class": bem("empty-tip")
71
+ }, [t("noCoupon")])]
72
+ });
71
73
  const renderExchangeBar = () => {
72
74
  if (props.showExchangeBar) {
73
75
  return _createVNode("div", {
@@ -1 +1 @@
1
- :root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-image-size: 200px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
1
+ :root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}
@@ -15,10 +15,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
15
15
  type: BooleanConstructor;
16
16
  default: true;
17
17
  };
18
- emptyImage: {
19
- type: import("vue").PropType<string>;
20
- default: string;
21
- };
18
+ emptyImage: StringConstructor;
22
19
  chosenCoupon: {
23
20
  type: NumberConstructor;
24
21
  default: number;
@@ -67,10 +64,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
67
64
  type: BooleanConstructor;
68
65
  default: true;
69
66
  };
70
- emptyImage: {
71
- type: import("vue").PropType<string>;
72
- default: string;
73
- };
67
+ emptyImage: StringConstructor;
74
68
  chosenCoupon: {
75
69
  type: NumberConstructor;
76
70
  default: number;
@@ -112,7 +106,6 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
112
106
  coupons: import("..").CouponInfo[];
113
107
  chosenCoupon: number;
114
108
  showCount: boolean;
115
- emptyImage: string;
116
109
  disabledCoupons: import("..").CouponInfo[];
117
110
  showExchangeBar: boolean;
118
111
  showCloseButton: boolean;
@@ -5,7 +5,6 @@
5
5
  --van-coupon-list-field-padding: @coupon-list-field-padding;
6
6
  --van-coupon-list-exchange-button-height: @coupon-list-exchange-button-height;
7
7
  --van-coupon-list-close-button-height: @coupon-list-close-button-height;
8
- --van-coupon-list-empty-image-size: @coupon-list-empty-image-size;
9
8
  --van-coupon-list-empty-tip-color: @coupon-list-empty-tip-color;
10
9
  --van-coupon-list-empty-tip-font-size: @coupon-list-empty-tip-font-size;
11
10
  --van-coupon-list-empty-tip-line-height: @coupon-list-empty-tip-line-height;
@@ -81,20 +80,9 @@
81
80
  height: var(--van-coupon-list-close-button-height);
82
81
  }
83
82
 
84
- &__empty {
85
- padding-top: 60px;
86
- text-align: center;
87
-
88
- p {
89
- margin: var(--van-padding-md) 0;
90
- color: var(--van-coupon-list-empty-tip-color);
91
- font-size: var(--van-coupon-list-empty-tip-font-size);
92
- line-height: var(--van-coupon-list-empty-tip-line-height);
93
- }
94
-
95
- img {
96
- width: var(--van-coupon-list-empty-image-size);
97
- height: var(--van-coupon-list-empty-image-size);
98
- }
83
+ &__empty-tip {
84
+ color: var(--van-coupon-list-empty-tip-color);
85
+ font-size: var(--van-coupon-list-empty-tip-font-size);
86
+ line-height: var(--van-coupon-list-empty-tip-line-height);
99
87
  }
100
88
  }
@@ -13,4 +13,5 @@ import "../../swipe/index.css";
13
13
  import "../../swipe-item/index.css";
14
14
  import "../../tabs/index.css";
15
15
  import "../../tab/index.css";
16
+ import "../../empty/index.css";
16
17
  import "../index.css";
@@ -13,4 +13,5 @@ import "../../swipe/index.less";
13
13
  import "../../swipe-item/index.less";
14
14
  import "../../tabs/index.less";
15
15
  import "../../tab/index.less";
16
+ import "../../empty/index.less";
16
17
  import "../index.less";
@@ -4,7 +4,6 @@
4
4
  @coupon-list-field-padding: 5px 0 5px var(--van-padding-md);
5
5
  @coupon-list-exchange-button-height: 32px;
6
6
  @coupon-list-close-button-height: 40px;
7
- @coupon-list-empty-image-size: 200px;
8
7
  @coupon-list-empty-tip-color: var(--van-text-color-2);
9
8
  @coupon-list-empty-tip-font-size: var(--van-font-size-md);
10
9
  @coupon-list-empty-tip-line-height: var(--van-line-height-md);
@@ -213,6 +213,7 @@ var stdin_default = defineComponent({
213
213
  const onChange = () => {
214
214
  updateInnerValue();
215
215
  nextTick(() => {
216
+ updateInnerValue();
216
217
  nextTick(() => emit("change", currentDate.value));
217
218
  });
218
219
  };
@@ -222,8 +223,7 @@ var stdin_default = defineComponent({
222
223
  });
223
224
  watch(columns, updateColumnValue);
224
225
  watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
225
- watch(() => [props.filter, props.maxDate], updateInnerValue);
226
- watch(() => props.minDate, () => {
226
+ watch(() => [props.filter, props.minDate, props.maxDate], () => {
227
227
  nextTick(updateInnerValue);
228
228
  });
229
229
  watch(() => props.modelValue, (value) => {
@@ -1 +1 @@
1
- :root{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-animation-duration-base);--van-dialog-border-radius: 16px;--van-dialog-background-color: var(--van-background-color-light);--van-dialog-header-font-weight: var(--van-font-weight-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-danger-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background-color);border-radius:var(--van-dialog-border-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate(-50%,-50%) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate(-50%,-50%) scale(.9);opacity:0}
1
+ :root{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-animation-duration-base);--van-dialog-border-radius: 16px;--van-dialog-background-color: var(--van-background-color-light);--van-dialog-header-font-weight: var(--van-font-weight-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-danger-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background-color);border-radius:var(--van-dialog-border-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
@@ -1,13 +1,13 @@
1
1
  import { Dialog } from './function-call';
2
2
  import type { CSSProperties, TeleportProps } from 'vue';
3
- import type { Interceptor } from '../utils';
3
+ import type { Interceptor, Numeric } from '../utils';
4
4
  export declare type DialogTheme = 'default' | 'round-button';
5
5
  export declare type DialogAction = 'confirm' | 'cancel';
6
6
  export declare type DialogMessage = string | (() => JSX.Element);
7
7
  export declare type DialogMessageAlign = 'left' | 'center' | 'right';
8
8
  export declare type DialogOptions = {
9
9
  title?: string;
10
- width?: string | number;
10
+ width?: Numeric;
11
11
  theme?: DialogTheme;
12
12
  message?: DialogMessage;
13
13
  overlay?: boolean;
@@ -1,9 +1,10 @@
1
1
  import type { DropdownItemProps } from './DropdownItem';
2
2
  import type { VNode, ComponentPublicInstance } from 'vue';
3
+ import type { Numeric } from '../utils';
3
4
  export declare type DropdownItemOption = {
4
5
  text: string;
5
6
  icon?: string;
6
- value: number | string;
7
+ value: Numeric;
7
8
  };
8
9
  export declare type DropdownItemExpose = {
9
10
  toggle: (show?: boolean, options?: {
@@ -1,26 +1,27 @@
1
- import { type ExtractPropTypes } from 'vue';
1
+ import { PropType, type ExtractPropTypes } from 'vue';
2
+ import { Numeric } from '../utils';
2
3
  declare const emptyProps: {
3
4
  image: {
4
- type: import("vue").PropType<string>;
5
+ type: PropType<string>;
5
6
  default: string;
6
7
  };
7
- imageSize: (NumberConstructor | StringConstructor)[];
8
+ imageSize: PropType<Numeric | [Numeric, Numeric]>;
8
9
  description: StringConstructor;
9
10
  };
10
11
  export declare type EmptyProps = ExtractPropTypes<typeof emptyProps>;
11
12
  declare const _default: import("vue").DefineComponent<{
12
13
  image: {
13
- type: import("vue").PropType<string>;
14
+ type: PropType<string>;
14
15
  default: string;
15
16
  };
16
- imageSize: (NumberConstructor | StringConstructor)[];
17
+ imageSize: PropType<Numeric | [Numeric, Numeric]>;
17
18
  description: StringConstructor;
18
19
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
19
20
  image: {
20
- type: import("vue").PropType<string>;
21
+ type: PropType<string>;
21
22
  default: string;
22
23
  };
23
- imageSize: (NumberConstructor | StringConstructor)[];
24
+ imageSize: PropType<Numeric | [Numeric, Numeric]>;
24
25
  description: StringConstructor;
25
26
  }>>, {
26
27
  image: string;
package/es/empty/Empty.js CHANGED
@@ -1,12 +1,17 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
- import { numericProp, getSizeStyle, makeStringProp, createNamespace } from "../utils";
4
- import { Network } from "./Network";
3
+ import { getSizeStyle, makeStringProp, createNamespace } from "../utils";
4
+ import { renderError, renderSearch, renderNetwork, renderMaterial } from "./Images";
5
5
  const [name, bem] = createNamespace("empty");
6
- const PRESET_IMAGES = ["error", "search", "default"];
6
+ const PRESET_IMAGES = {
7
+ error: renderError,
8
+ search: renderSearch,
9
+ network: renderNetwork,
10
+ default: renderMaterial
11
+ };
7
12
  const emptyProps = {
8
13
  image: makeStringProp("default"),
9
- imageSize: numericProp,
14
+ imageSize: [Number, String, Array],
10
15
  description: String
11
16
  };
12
17
  var stdin_default = defineComponent({
@@ -16,20 +21,12 @@ var stdin_default = defineComponent({
16
21
  slots
17
22
  }) {
18
23
  const renderImage = () => {
24
+ var _a;
19
25
  if (slots.image) {
20
26
  return slots.image();
21
27
  }
22
- let {
23
- image
24
- } = props;
25
- if (image === "network") {
26
- return Network;
27
- }
28
- if (PRESET_IMAGES.includes(image)) {
29
- image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
30
- }
31
- return _createVNode("img", {
32
- "src": image
28
+ return ((_a = PRESET_IMAGES[props.image]) == null ? void 0 : _a.call(PRESET_IMAGES)) || _createVNode("img", {
29
+ "src": props.image
33
30
  }, null);
34
31
  };
35
32
  const renderDescription = () => {
@@ -0,0 +1,4 @@
1
+ export declare const renderNetwork: () => JSX.Element;
2
+ export declare const renderMaterial: () => JSX.Element;
3
+ export declare const renderError: () => JSX.Element;
4
+ export declare const renderSearch: () => JSX.Element;
@@ -0,0 +1,271 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ const getId = (num) => `van-empty-${num}`;
3
+ const useId = (num) => `url(#${getId(num)})`;
4
+ const renderStop = (color, offset, opacity) => _createVNode("stop", {
5
+ "stop-color": color,
6
+ "offset": `${offset}%`,
7
+ "stop-opacity": opacity
8
+ }, null);
9
+ const renderStops = (fromColor, toColor) => [renderStop(fromColor, 0), renderStop(toColor, 100)];
10
+ const renderShadow = (id) => [_createVNode("defs", null, [_createVNode("radialGradient", {
11
+ "id": getId(id),
12
+ "cx": "50%",
13
+ "cy": "54%",
14
+ "fx": "50%",
15
+ "fy": "54%",
16
+ "r": "297%",
17
+ "gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)"
18
+ }, [renderStop("#EBEDF0", 0), renderStop("#F2F3F5", 100, 0.3)])]), _createVNode("ellipse", {
19
+ "fill": useId(id),
20
+ "opacity": ".8",
21
+ "cx": "80",
22
+ "cy": "140",
23
+ "rx": "46",
24
+ "ry": "8"
25
+ }, null)];
26
+ const renderBuilding = () => [_createVNode("defs", null, [_createVNode("linearGradient", {
27
+ "id": getId("a"),
28
+ "x1": "64%",
29
+ "y1": "100%",
30
+ "x2": "64%"
31
+ }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)])]), _createVNode("g", {
32
+ "opacity": ".8"
33
+ }, [_createVNode("path", {
34
+ "d": "M36 131V53H16v20H2v58h34z",
35
+ "fill": useId("a")
36
+ }, null), _createVNode("path", {
37
+ "d": "M123 15h22v14h9v77h-31V15z",
38
+ "fill": useId("a")
39
+ }, null)])];
40
+ const renderCloud = () => [_createVNode("defs", null, [_createVNode("linearGradient", {
41
+ "id": getId("b"),
42
+ "x1": "64%",
43
+ "y1": "97%",
44
+ "x2": "64%",
45
+ "y2": "0%"
46
+ }, [renderStop("#F2F3F5", 0, 0.3), renderStop("#F2F3F5", 100)])]), _createVNode("g", {
47
+ "opacity": ".8"
48
+ }, [_createVNode("path", {
49
+ "d": "M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",
50
+ "fill": useId("b")
51
+ }, null), _createVNode("path", {
52
+ "d": "M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",
53
+ "fill": useId("b")
54
+ }, null)])];
55
+ const renderNetwork = () => _createVNode("svg", {
56
+ "viewBox": "0 0 160 160"
57
+ }, [_createVNode("defs", null, [_createVNode("linearGradient", {
58
+ "id": getId(1),
59
+ "x1": "64%",
60
+ "y1": "100%",
61
+ "x2": "64%"
62
+ }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), _createVNode("linearGradient", {
63
+ "id": getId(2),
64
+ "x1": "50%",
65
+ "x2": "50%",
66
+ "y2": "84%"
67
+ }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), _createVNode("linearGradient", {
68
+ "id": getId(3),
69
+ "x1": "100%",
70
+ "x2": "100%",
71
+ "y2": "100%"
72
+ }, [renderStops("#EAEDF0", "#DCDEE0")]), _createVNode("radialGradient", {
73
+ "id": getId(4),
74
+ "cx": "50%",
75
+ "cy": "0%",
76
+ "fx": "50%",
77
+ "fy": "0%",
78
+ "r": "100%",
79
+ "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
80
+ }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), _createVNode("g", {
81
+ "fill": "none"
82
+ }, [renderBuilding(), _createVNode("path", {
83
+ "fill": useId(4),
84
+ "d": "M0 139h160v21H0z"
85
+ }, null), _createVNode("path", {
86
+ "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
87
+ "fill": useId(2)
88
+ }, null), _createVNode("g", {
89
+ "opacity": ".6",
90
+ "stroke-linecap": "round",
91
+ "stroke-width": "7"
92
+ }, [_createVNode("path", {
93
+ "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
94
+ "stroke": useId(3)
95
+ }, null), _createVNode("path", {
96
+ "d": "M53 36a34 34 0 0 0 0 48",
97
+ "stroke": useId(3)
98
+ }, null), _createVNode("path", {
99
+ "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
100
+ "stroke": useId(3)
101
+ }, null), _createVNode("path", {
102
+ "d": "M106 84a34 34 0 0 0 0-48",
103
+ "stroke": useId(3)
104
+ }, null)]), _createVNode("g", {
105
+ "transform": "translate(31 105)"
106
+ }, [_createVNode("rect", {
107
+ "fill": "#EBEDF0",
108
+ "width": "98",
109
+ "height": "34",
110
+ "rx": "2"
111
+ }, null), _createVNode("rect", {
112
+ "fill": "#FFF",
113
+ "x": "9",
114
+ "y": "8",
115
+ "width": "80",
116
+ "height": "18",
117
+ "rx": "1.1"
118
+ }, null), _createVNode("rect", {
119
+ "fill": "#EBEDF0",
120
+ "x": "15",
121
+ "y": "12",
122
+ "width": "18",
123
+ "height": "6",
124
+ "rx": "1.1"
125
+ }, null)])])]);
126
+ const renderMaterial = () => _createVNode("svg", {
127
+ "viewBox": "0 0 160 160"
128
+ }, [_createVNode("defs", null, [_createVNode("linearGradient", {
129
+ "x1": "50%",
130
+ "x2": "50%",
131
+ "y2": "100%",
132
+ "id": getId(5)
133
+ }, [renderStops("#F2F3F5", "#DCDEE0")]), _createVNode("linearGradient", {
134
+ "x1": "95%",
135
+ "y1": "48%",
136
+ "x2": "5.5%",
137
+ "y2": "51%",
138
+ "id": getId(6)
139
+ }, [renderStops("#EAEDF1", "#DCDEE0")]), _createVNode("linearGradient", {
140
+ "y1": "45%",
141
+ "x2": "100%",
142
+ "y2": "54%",
143
+ "id": getId(7)
144
+ }, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), _createVNode("g", {
145
+ "transform": "translate(36 50)",
146
+ "fill": "none"
147
+ }, [_createVNode("g", {
148
+ "transform": "translate(8)"
149
+ }, [_createVNode("rect", {
150
+ "fill": "#EBEDF0",
151
+ "opacity": ".6",
152
+ "x": "38",
153
+ "y": "13",
154
+ "width": "36",
155
+ "height": "53",
156
+ "rx": "2"
157
+ }, null), _createVNode("rect", {
158
+ "fill": useId(5),
159
+ "width": "64",
160
+ "height": "66",
161
+ "rx": "2"
162
+ }, null), _createVNode("rect", {
163
+ "fill": "#FFF",
164
+ "x": "6",
165
+ "y": "6",
166
+ "width": "52",
167
+ "height": "55",
168
+ "rx": "1"
169
+ }, null), _createVNode("g", {
170
+ "transform": "translate(15 17)",
171
+ "fill": useId(6)
172
+ }, [_createVNode("rect", {
173
+ "width": "34",
174
+ "height": "6",
175
+ "rx": "1"
176
+ }, null), _createVNode("path", {
177
+ "d": "M0 14h34v6H0z"
178
+ }, null), _createVNode("rect", {
179
+ "y": "28",
180
+ "width": "34",
181
+ "height": "6",
182
+ "rx": "1"
183
+ }, null)])]), _createVNode("rect", {
184
+ "fill": useId(7),
185
+ "y": "61",
186
+ "width": "88",
187
+ "height": "28",
188
+ "rx": "1"
189
+ }, null), _createVNode("rect", {
190
+ "fill": "#F7F8FA",
191
+ "x": "29",
192
+ "y": "72",
193
+ "width": "30",
194
+ "height": "6",
195
+ "rx": "1"
196
+ }, null)])]);
197
+ const renderError = () => _createVNode("svg", {
198
+ "viewBox": "0 0 160 160"
199
+ }, [_createVNode("defs", null, [_createVNode("linearGradient", {
200
+ "x1": "50%",
201
+ "x2": "50%",
202
+ "y2": "100%",
203
+ "id": getId(8)
204
+ }, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), renderShadow("c"), _createVNode("path", {
205
+ "d": "m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",
206
+ "fill": useId(8)
207
+ }, null)]);
208
+ const renderSearch = () => _createVNode("svg", {
209
+ "viewBox": "0 0 160 160"
210
+ }, [_createVNode("defs", null, [_createVNode("linearGradient", {
211
+ "x1": "50%",
212
+ "y1": "100%",
213
+ "x2": "50%",
214
+ "id": getId(9)
215
+ }, [renderStops("#EEE", "#D8D8D8")]), _createVNode("linearGradient", {
216
+ "x1": "100%",
217
+ "y1": "50%",
218
+ "y2": "50%",
219
+ "id": getId(10)
220
+ }, [renderStops("#F2F3F5", "#DCDEE0")]), _createVNode("linearGradient", {
221
+ "x1": "50%",
222
+ "x2": "50%",
223
+ "y2": "100%",
224
+ "id": getId(11)
225
+ }, [renderStops("#F2F3F5", "#DCDEE0")]), _createVNode("linearGradient", {
226
+ "x1": "50%",
227
+ "x2": "50%",
228
+ "y2": "100%",
229
+ "id": getId(12)
230
+ }, [renderStops("#FFF", "#F7F8FA")])]), renderBuilding(), renderCloud(), renderShadow("d"), _createVNode("g", {
231
+ "transform": "rotate(-45 113 -4)",
232
+ "fill": "none"
233
+ }, [_createVNode("rect", {
234
+ "fill": useId(9),
235
+ "x": "24",
236
+ "y": "52.8",
237
+ "width": "5.8",
238
+ "height": "19",
239
+ "rx": "1"
240
+ }, null), _createVNode("rect", {
241
+ "fill": useId(10),
242
+ "x": "22.1",
243
+ "y": "67.3",
244
+ "width": "9.9",
245
+ "height": "28",
246
+ "rx": "1"
247
+ }, null), _createVNode("circle", {
248
+ "stroke": useId(11),
249
+ "stroke-width": "8",
250
+ "cx": "27",
251
+ "cy": "27",
252
+ "r": "27"
253
+ }, null), _createVNode("circle", {
254
+ "fill": useId(12),
255
+ "cx": "27",
256
+ "cy": "27",
257
+ "r": "16"
258
+ }, null), _createVNode("path", {
259
+ "d": "M37 7c-8 0-15 5-16 12",
260
+ "stroke": useId(11),
261
+ "stroke-width": "3",
262
+ "opacity": ".5",
263
+ "stroke-linecap": "round",
264
+ "transform": "rotate(45 29 13)"
265
+ }, null)])]);
266
+ export {
267
+ renderError,
268
+ renderMaterial,
269
+ renderNetwork,
270
+ renderSearch
271
+ };
@@ -3,14 +3,14 @@ export declare const Empty: import("../utils").WithInstall<import("vue").DefineC
3
3
  type: import("vue").PropType<string>;
4
4
  default: string;
5
5
  };
6
- imageSize: (NumberConstructor | StringConstructor)[];
6
+ imageSize: import("vue").PropType<import("../utils").Numeric | [import("../utils").Numeric, import("../utils").Numeric]>;
7
7
  description: StringConstructor;
8
8
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  image: {
10
10
  type: import("vue").PropType<string>;
11
11
  default: string;
12
12
  };
13
- imageSize: (NumberConstructor | StringConstructor)[];
13
+ imageSize: import("vue").PropType<import("../utils").Numeric | [import("../utils").Numeric, import("../utils").Numeric]>;
14
14
  description: StringConstructor;
15
15
  }>>, {
16
16
  image: string;