vant 4.0.0-alpha.4 → 4.0.0-beta.0

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 (638) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +4 -4
  3. package/changelog.generated.md +250 -0
  4. package/es/action-bar/ActionBar.d.ts +4 -0
  5. package/es/action-bar/ActionBar.mjs +13 -2
  6. package/es/action-bar/index.d.ts +3 -0
  7. package/es/address-edit/AddressEdit.mjs +2 -2
  8. package/es/calendar/Calendar.mjs +9 -4
  9. package/es/calendar/types.d.ts +1 -0
  10. package/es/cell/Cell.d.ts +1 -1
  11. package/es/cell/index.d.ts +1 -1
  12. package/es/collapse-item/CollapseItem.d.ts +1 -1
  13. package/es/collapse-item/index.d.ts +1 -1
  14. package/es/date-picker/utils.d.ts +1 -1
  15. package/es/dialog/Dialog.d.ts +9 -1
  16. package/es/dialog/Dialog.mjs +6 -0
  17. package/es/dialog/function-call.d.ts +6 -184
  18. package/es/dialog/function-call.mjs +45 -45
  19. package/es/dialog/index.d.ts +130 -3
  20. package/es/dialog/index.mjs +16 -2
  21. package/es/dialog/types.d.ts +3 -7
  22. package/es/field/Field.d.ts +4 -2
  23. package/es/field/Field.mjs +7 -1
  24. package/es/field/index.d.ts +4 -2
  25. package/es/image-preview/function-call.d.ts +1 -134
  26. package/es/image-preview/function-call.mjs +3 -7
  27. package/es/image-preview/index.d.ts +129 -2
  28. package/es/image-preview/index.mjs +6 -2
  29. package/es/index.d.ts +1 -1
  30. package/es/index.mjs +1 -1
  31. package/es/locale/index.d.ts +1 -1
  32. package/es/notify/function-call.d.ts +4 -100
  33. package/es/notify/function-call.mjs +25 -29
  34. package/es/notify/index.d.ts +91 -2
  35. package/es/notify/index.mjs +14 -2
  36. package/es/notify/types.d.ts +0 -6
  37. package/es/popup/Popup.mjs +1 -1
  38. package/es/pull-refresh/PullRefresh.d.ts +2 -1
  39. package/es/pull-refresh/PullRefresh.mjs +5 -1
  40. package/es/pull-refresh/index.d.ts +2 -1
  41. package/es/submit-bar/SubmitBar.d.ts +4 -0
  42. package/es/submit-bar/SubmitBar.mjs +13 -2
  43. package/es/submit-bar/index.d.ts +3 -0
  44. package/es/switch/Switch.mjs +2 -1
  45. package/es/toast/function-call.d.ts +10 -18
  46. package/es/toast/function-call.mjs +22 -20
  47. package/es/toast/index.d.ts +76 -2
  48. package/es/toast/index.mjs +22 -2
  49. package/es/toast/types.d.ts +10 -7
  50. package/es/uploader/Uploader.d.ts +3 -3
  51. package/es/uploader/Uploader.mjs +3 -3
  52. package/es/uploader/index.d.ts +2 -2
  53. package/es/utils/basic.d.ts +3 -3
  54. package/es/utils/create.d.ts +1 -1
  55. package/lib/action-bar/ActionBar.d.ts +4 -0
  56. package/lib/action-bar/ActionBar.js +12 -1
  57. package/lib/action-bar/index.d.ts +3 -0
  58. package/lib/address-edit/AddressEdit.js +1 -1
  59. package/lib/calendar/Calendar.js +8 -3
  60. package/lib/calendar/types.d.ts +1 -0
  61. package/lib/cell/Cell.d.ts +1 -1
  62. package/lib/cell/index.d.ts +1 -1
  63. package/lib/collapse-item/CollapseItem.d.ts +1 -1
  64. package/lib/collapse-item/index.d.ts +1 -1
  65. package/lib/date-picker/utils.d.ts +1 -1
  66. package/lib/dialog/Dialog.d.ts +9 -1
  67. package/lib/dialog/Dialog.js +6 -0
  68. package/lib/dialog/function-call.d.ts +6 -184
  69. package/lib/dialog/function-call.js +42 -42
  70. package/lib/dialog/index.d.ts +130 -3
  71. package/lib/dialog/index.js +14 -3
  72. package/lib/dialog/types.d.ts +3 -7
  73. package/lib/field/Field.d.ts +4 -2
  74. package/lib/field/Field.js +7 -1
  75. package/lib/field/index.d.ts +4 -2
  76. package/lib/image-preview/function-call.d.ts +1 -134
  77. package/lib/image-preview/function-call.js +2 -6
  78. package/lib/image-preview/index.d.ts +129 -2
  79. package/lib/image-preview/index.js +10 -3
  80. package/lib/index.d.ts +1 -1
  81. package/lib/index.js +1 -1
  82. package/lib/locale/index.d.ts +1 -1
  83. package/lib/notify/function-call.d.ts +4 -100
  84. package/lib/notify/function-call.js +24 -28
  85. package/lib/notify/index.d.ts +91 -2
  86. package/lib/notify/index.js +13 -3
  87. package/lib/notify/types.d.ts +0 -6
  88. package/lib/popup/Popup.js +1 -1
  89. package/lib/pull-refresh/PullRefresh.d.ts +2 -1
  90. package/lib/pull-refresh/PullRefresh.js +5 -1
  91. package/lib/pull-refresh/index.d.ts +2 -1
  92. package/lib/submit-bar/SubmitBar.d.ts +4 -0
  93. package/lib/submit-bar/SubmitBar.js +12 -1
  94. package/lib/submit-bar/index.d.ts +3 -0
  95. package/lib/switch/Switch.js +2 -1
  96. package/lib/toast/function-call.d.ts +10 -18
  97. package/lib/toast/function-call.js +21 -19
  98. package/lib/toast/index.d.ts +76 -2
  99. package/lib/toast/index.js +17 -3
  100. package/lib/toast/types.d.ts +10 -7
  101. package/lib/uploader/Uploader.d.ts +3 -3
  102. package/lib/uploader/Uploader.js +2 -2
  103. package/lib/uploader/index.d.ts +2 -2
  104. package/lib/utils/basic.d.ts +3 -3
  105. package/lib/utils/create.d.ts +1 -1
  106. package/lib/vant.cjs.js +204 -160
  107. package/lib/vant.es.js +188 -162
  108. package/lib/vant.js +205 -161
  109. package/lib/vant.min.js +1 -1
  110. package/package.json +4 -4
  111. package/vetur/attributes.json +124 -108
  112. package/vetur/tags.json +41 -37
  113. package/vetur/web-types.json +635 -568
  114. package/es/action-bar/index.less +0 -16
  115. package/es/action-bar/style/less.d.ts +0 -1
  116. package/es/action-bar/style/less.mjs +0 -2
  117. package/es/action-bar-button/index.less +0 -38
  118. package/es/action-bar-button/style/less.d.ts +0 -1
  119. package/es/action-bar-button/style/less.mjs +0 -7
  120. package/es/action-bar-icon/index.less +0 -34
  121. package/es/action-bar-icon/style/less.d.ts +0 -1
  122. package/es/action-bar-icon/style/less.mjs +0 -5
  123. package/es/action-sheet/index.less +0 -131
  124. package/es/action-sheet/style/less.d.ts +0 -1
  125. package/es/action-sheet/style/less.mjs +0 -7
  126. package/es/address-edit/index.less +0 -39
  127. package/es/address-edit/style/less.d.ts +0 -1
  128. package/es/address-edit/style/less.mjs +0 -13
  129. package/es/address-list/index.less +0 -110
  130. package/es/address-list/style/less.d.ts +0 -1
  131. package/es/address-list/style/less.mjs +0 -11
  132. package/es/area/style/less.d.ts +0 -1
  133. package/es/area/style/less.mjs +0 -3
  134. package/es/badge/index.less +0 -72
  135. package/es/badge/style/less.d.ts +0 -1
  136. package/es/badge/style/less.mjs +0 -2
  137. package/es/button/index.less +0 -241
  138. package/es/button/style/less.d.ts +0 -1
  139. package/es/button/style/less.mjs +0 -5
  140. package/es/calendar/index.less +0 -217
  141. package/es/calendar/style/less.d.ts +0 -1
  142. package/es/calendar/style/less.mjs +0 -10
  143. package/es/card/index.less +0 -126
  144. package/es/card/style/less.d.ts +0 -1
  145. package/es/card/style/less.mjs +0 -6
  146. package/es/cascader/index.less +0 -92
  147. package/es/cascader/style/less.d.ts +0 -1
  148. package/es/cascader/style/less.mjs +0 -9
  149. package/es/cell/index.less +0 -119
  150. package/es/cell/style/less.d.ts +0 -1
  151. package/es/cell/style/less.mjs +0 -4
  152. package/es/cell-group/index.less +0 -32
  153. package/es/cell-group/style/less.d.ts +0 -1
  154. package/es/cell-group/style/less.mjs +0 -2
  155. package/es/checkbox/index.less +0 -96
  156. package/es/checkbox/style/less.d.ts +0 -1
  157. package/es/checkbox/style/less.mjs +0 -5
  158. package/es/checkbox-group/index.less +0 -6
  159. package/es/checkbox-group/style/less.d.ts +0 -1
  160. package/es/checkbox-group/style/less.mjs +0 -2
  161. package/es/circle/index.less +0 -49
  162. package/es/circle/style/less.d.ts +0 -1
  163. package/es/circle/style/less.mjs +0 -2
  164. package/es/col/index.less +0 -19
  165. package/es/col/style/less.d.ts +0 -1
  166. package/es/col/style/less.mjs +0 -3
  167. package/es/collapse/style/less.d.ts +0 -1
  168. package/es/collapse/style/less.mjs +0 -1
  169. package/es/collapse-item/index.less +0 -75
  170. package/es/collapse-item/style/less.d.ts +0 -1
  171. package/es/collapse-item/style/less.mjs +0 -5
  172. package/es/config-provider/style/less.d.ts +0 -1
  173. package/es/config-provider/style/less.mjs +0 -1
  174. package/es/contact-card/index.less +0 -47
  175. package/es/contact-card/style/less.d.ts +0 -1
  176. package/es/contact-card/style/less.mjs +0 -5
  177. package/es/contact-edit/index.less +0 -37
  178. package/es/contact-edit/style/less.d.ts +0 -1
  179. package/es/contact-edit/style/less.mjs +0 -9
  180. package/es/contact-list/index.less +0 -65
  181. package/es/contact-list/style/less.d.ts +0 -1
  182. package/es/contact-list/style/less.mjs +0 -11
  183. package/es/count-down/index.less +0 -11
  184. package/es/count-down/style/less.d.ts +0 -1
  185. package/es/count-down/style/less.mjs +0 -2
  186. package/es/coupon/index.less +0 -127
  187. package/es/coupon/style/less.d.ts +0 -1
  188. package/es/coupon/style/less.mjs +0 -6
  189. package/es/coupon-cell/index.less +0 -9
  190. package/es/coupon-cell/style/less.d.ts +0 -1
  191. package/es/coupon-cell/style/less.mjs +0 -5
  192. package/es/coupon-list/index.less +0 -86
  193. package/es/coupon-list/style/less.d.ts +0 -1
  194. package/es/coupon-list/style/less.mjs +0 -17
  195. package/es/date-picker/style/less.d.ts +0 -1
  196. package/es/date-picker/style/less.mjs +0 -3
  197. package/es/dialog/index.less +0 -140
  198. package/es/dialog/style/less.d.ts +0 -1
  199. package/es/dialog/style/less.mjs +0 -10
  200. package/es/divider/index.less +0 -73
  201. package/es/divider/style/less.d.ts +0 -1
  202. package/es/divider/style/less.mjs +0 -2
  203. package/es/dropdown-item/index.less +0 -41
  204. package/es/dropdown-item/style/less.d.ts +0 -1
  205. package/es/dropdown-item/style/less.mjs +0 -8
  206. package/es/dropdown-menu/index.less +0 -80
  207. package/es/dropdown-menu/style/less.d.ts +0 -1
  208. package/es/dropdown-menu/style/less.mjs +0 -2
  209. package/es/empty/index.less +0 -41
  210. package/es/empty/style/less.d.ts +0 -1
  211. package/es/empty/style/less.mjs +0 -2
  212. package/es/field/index.less +0 -196
  213. package/es/field/style/less.d.ts +0 -1
  214. package/es/field/style/less.mjs +0 -5
  215. package/es/form/style/less.d.ts +0 -1
  216. package/es/form/style/less.mjs +0 -1
  217. package/es/grid/index.less +0 -4
  218. package/es/grid/style/less.d.ts +0 -1
  219. package/es/grid/style/less.mjs +0 -2
  220. package/es/grid-item/index.less +0 -97
  221. package/es/grid-item/style/less.d.ts +0 -1
  222. package/es/grid-item/style/less.mjs +0 -5
  223. package/es/icon/index.less +0 -10
  224. package/es/icon/style/less.d.ts +0 -1
  225. package/es/icon/style/less.mjs +0 -3
  226. package/es/image/index.less +0 -55
  227. package/es/image/style/less.d.ts +0 -1
  228. package/es/image/style/less.mjs +0 -4
  229. package/es/image-preview/index.less +0 -110
  230. package/es/image-preview/style/less.d.ts +0 -1
  231. package/es/image-preview/style/less.mjs +0 -10
  232. package/es/index-anchor/index.less +0 -31
  233. package/es/index-anchor/style/less.d.ts +0 -1
  234. package/es/index-anchor/style/less.mjs +0 -3
  235. package/es/index-bar/index.less +0 -33
  236. package/es/index-bar/style/less.d.ts +0 -1
  237. package/es/index-bar/style/less.mjs +0 -2
  238. package/es/lazyload/style/less.d.ts +0 -1
  239. package/es/lazyload/style/less.mjs +0 -1
  240. package/es/list/index.less +0 -29
  241. package/es/list/style/less.d.ts +0 -1
  242. package/es/list/style/less.mjs +0 -3
  243. package/es/loading/index.less +0 -109
  244. package/es/loading/style/less.d.ts +0 -1
  245. package/es/loading/style/less.mjs +0 -2
  246. package/es/locale/style/less.d.ts +0 -1
  247. package/es/locale/style/less.mjs +0 -1
  248. package/es/nav-bar/index.less +0 -78
  249. package/es/nav-bar/style/less.d.ts +0 -1
  250. package/es/nav-bar/style/less.mjs +0 -4
  251. package/es/notice-bar/index.less +0 -70
  252. package/es/notice-bar/style/less.d.ts +0 -1
  253. package/es/notice-bar/style/less.mjs +0 -4
  254. package/es/notify/index.less +0 -42
  255. package/es/notify/style/less.d.ts +0 -1
  256. package/es/notify/style/less.mjs +0 -6
  257. package/es/number-keyboard/index.less +0 -159
  258. package/es/number-keyboard/style/less.d.ts +0 -1
  259. package/es/number-keyboard/style/less.mjs +0 -3
  260. package/es/overlay/index.less +0 -14
  261. package/es/overlay/style/less.d.ts +0 -1
  262. package/es/overlay/style/less.mjs +0 -2
  263. package/es/pagination/index.less +0 -89
  264. package/es/pagination/style/less.d.ts +0 -1
  265. package/es/pagination/style/less.mjs +0 -2
  266. package/es/password-input/index.less +0 -100
  267. package/es/password-input/style/less.d.ts +0 -1
  268. package/es/password-input/style/less.mjs +0 -2
  269. package/es/picker/index.less +0 -138
  270. package/es/picker/style/less.d.ts +0 -1
  271. package/es/picker/style/less.mjs +0 -3
  272. package/es/popover/index.less +0 -288
  273. package/es/popover/style/less.d.ts +0 -1
  274. package/es/popover/style/less.mjs +0 -6
  275. package/es/popup/index.less +0 -139
  276. package/es/popup/style/less.d.ts +0 -1
  277. package/es/popup/style/less.mjs +0 -5
  278. package/es/progress/index.less +0 -53
  279. package/es/progress/style/less.d.ts +0 -1
  280. package/es/progress/style/less.mjs +0 -2
  281. package/es/pull-refresh/index.less +0 -36
  282. package/es/pull-refresh/style/less.d.ts +0 -1
  283. package/es/pull-refresh/style/less.mjs +0 -3
  284. package/es/radio/index.less +0 -96
  285. package/es/radio/style/less.d.ts +0 -1
  286. package/es/radio/style/less.mjs +0 -6
  287. package/es/radio-group/index.less +0 -6
  288. package/es/radio-group/style/less.d.ts +0 -1
  289. package/es/radio-group/style/less.mjs +0 -2
  290. package/es/rate/index.less +0 -52
  291. package/es/rate/style/less.d.ts +0 -1
  292. package/es/rate/style/less.mjs +0 -4
  293. package/es/row/index.less +0 -32
  294. package/es/row/style/less.d.ts +0 -1
  295. package/es/row/style/less.mjs +0 -2
  296. package/es/search/index.less +0 -76
  297. package/es/search/style/less.d.ts +0 -1
  298. package/es/search/style/less.mjs +0 -6
  299. package/es/share-sheet/index.less +0 -152
  300. package/es/share-sheet/style/less.d.ts +0 -1
  301. package/es/share-sheet/style/less.mjs +0 -6
  302. package/es/sidebar/index.less +0 -9
  303. package/es/sidebar/style/less.d.ts +0 -1
  304. package/es/sidebar/style/less.mjs +0 -2
  305. package/es/sidebar-item/index.less +0 -72
  306. package/es/sidebar-item/style/less.d.ts +0 -1
  307. package/es/sidebar-item/style/less.mjs +0 -4
  308. package/es/skeleton/index.less +0 -73
  309. package/es/skeleton/style/less.d.ts +0 -1
  310. package/es/skeleton/style/less.mjs +0 -2
  311. package/es/slider/index.less +0 -104
  312. package/es/slider/style/less.d.ts +0 -1
  313. package/es/slider/style/less.mjs +0 -2
  314. package/es/step/index.less +0 -147
  315. package/es/step/style/less.d.ts +0 -1
  316. package/es/step/style/less.mjs +0 -5
  317. package/es/stepper/index.less +0 -129
  318. package/es/stepper/style/less.d.ts +0 -1
  319. package/es/stepper/style/less.mjs +0 -2
  320. package/es/steps/index.less +0 -23
  321. package/es/steps/style/less.d.ts +0 -1
  322. package/es/steps/style/less.mjs +0 -2
  323. package/es/sticky/index.less +0 -10
  324. package/es/sticky/style/less.d.ts +0 -1
  325. package/es/sticky/style/less.mjs +0 -2
  326. package/es/style/animation.less +0 -135
  327. package/es/style/base.less +0 -89
  328. package/es/style/css-variables.less +0 -90
  329. package/es/style/mixins/clearfix.less +0 -7
  330. package/es/style/mixins/ellipsis.less +0 -15
  331. package/es/style/mixins/hairline.less +0 -37
  332. package/es/style/normalize.less +0 -36
  333. package/es/submit-bar/index.less +0 -97
  334. package/es/submit-bar/style/less.d.ts +0 -1
  335. package/es/submit-bar/style/less.mjs +0 -6
  336. package/es/swipe/index.less +0 -65
  337. package/es/swipe/style/less.d.ts +0 -1
  338. package/es/swipe/style/less.mjs +0 -2
  339. package/es/swipe-cell/index.less +0 -27
  340. package/es/swipe-cell/style/less.d.ts +0 -1
  341. package/es/swipe-cell/style/less.mjs +0 -2
  342. package/es/swipe-item/index.less +0 -6
  343. package/es/swipe-item/style/less.d.ts +0 -1
  344. package/es/swipe-item/style/less.mjs +0 -3
  345. package/es/switch/index.less +0 -75
  346. package/es/switch/style/less.d.ts +0 -1
  347. package/es/switch/style/less.mjs +0 -3
  348. package/es/tab/index.less +0 -15
  349. package/es/tab/style/less.d.ts +0 -1
  350. package/es/tab/style/less.mjs +0 -7
  351. package/es/tabbar/index.less +0 -20
  352. package/es/tabbar/style/less.d.ts +0 -1
  353. package/es/tabbar/style/less.mjs +0 -2
  354. package/es/tabbar-item/index.less +0 -44
  355. package/es/tabbar-item/style/less.d.ts +0 -1
  356. package/es/tabbar-item/style/less.mjs +0 -5
  357. package/es/tabs/index.less +0 -170
  358. package/es/tabs/style/less.d.ts +0 -1
  359. package/es/tabs/style/less.mjs +0 -5
  360. package/es/tag/index.less +0 -115
  361. package/es/tag/style/less.d.ts +0 -1
  362. package/es/tag/style/less.mjs +0 -4
  363. package/es/time-picker/style/less.d.ts +0 -1
  364. package/es/time-picker/style/less.mjs +0 -3
  365. package/es/toast/index.less +0 -89
  366. package/es/toast/style/less.d.ts +0 -1
  367. package/es/toast/style/less.mjs +0 -7
  368. package/es/tree-select/index.less +0 -68
  369. package/es/tree-select/style/less.d.ts +0 -1
  370. package/es/tree-select/style/less.mjs +0 -6
  371. package/es/uploader/index.less +0 -191
  372. package/es/uploader/style/less.d.ts +0 -1
  373. package/es/uploader/style/less.mjs +0 -11
  374. package/lib/action-bar/index.less +0 -16
  375. package/lib/action-bar/style/less.d.ts +0 -1
  376. package/lib/action-bar/style/less.js +0 -2
  377. package/lib/action-bar-button/index.less +0 -38
  378. package/lib/action-bar-button/style/less.d.ts +0 -1
  379. package/lib/action-bar-button/style/less.js +0 -7
  380. package/lib/action-bar-icon/index.less +0 -34
  381. package/lib/action-bar-icon/style/less.d.ts +0 -1
  382. package/lib/action-bar-icon/style/less.js +0 -5
  383. package/lib/action-sheet/index.less +0 -131
  384. package/lib/action-sheet/style/less.d.ts +0 -1
  385. package/lib/action-sheet/style/less.js +0 -7
  386. package/lib/address-edit/index.less +0 -39
  387. package/lib/address-edit/style/less.d.ts +0 -1
  388. package/lib/address-edit/style/less.js +0 -13
  389. package/lib/address-list/index.less +0 -110
  390. package/lib/address-list/style/less.d.ts +0 -1
  391. package/lib/address-list/style/less.js +0 -11
  392. package/lib/area/style/less.d.ts +0 -1
  393. package/lib/area/style/less.js +0 -3
  394. package/lib/badge/index.less +0 -72
  395. package/lib/badge/style/less.d.ts +0 -1
  396. package/lib/badge/style/less.js +0 -2
  397. package/lib/button/index.less +0 -241
  398. package/lib/button/style/less.d.ts +0 -1
  399. package/lib/button/style/less.js +0 -5
  400. package/lib/calendar/index.less +0 -217
  401. package/lib/calendar/style/less.d.ts +0 -1
  402. package/lib/calendar/style/less.js +0 -10
  403. package/lib/card/index.less +0 -126
  404. package/lib/card/style/less.d.ts +0 -1
  405. package/lib/card/style/less.js +0 -6
  406. package/lib/cascader/index.less +0 -92
  407. package/lib/cascader/style/less.d.ts +0 -1
  408. package/lib/cascader/style/less.js +0 -9
  409. package/lib/cell/index.less +0 -119
  410. package/lib/cell/style/less.d.ts +0 -1
  411. package/lib/cell/style/less.js +0 -4
  412. package/lib/cell-group/index.less +0 -32
  413. package/lib/cell-group/style/less.d.ts +0 -1
  414. package/lib/cell-group/style/less.js +0 -2
  415. package/lib/checkbox/index.less +0 -96
  416. package/lib/checkbox/style/less.d.ts +0 -1
  417. package/lib/checkbox/style/less.js +0 -5
  418. package/lib/checkbox-group/index.less +0 -6
  419. package/lib/checkbox-group/style/less.d.ts +0 -1
  420. package/lib/checkbox-group/style/less.js +0 -2
  421. package/lib/circle/index.less +0 -49
  422. package/lib/circle/style/less.d.ts +0 -1
  423. package/lib/circle/style/less.js +0 -2
  424. package/lib/col/index.less +0 -19
  425. package/lib/col/style/less.d.ts +0 -1
  426. package/lib/col/style/less.js +0 -3
  427. package/lib/collapse/style/less.d.ts +0 -1
  428. package/lib/collapse/style/less.js +0 -1
  429. package/lib/collapse-item/index.less +0 -75
  430. package/lib/collapse-item/style/less.d.ts +0 -1
  431. package/lib/collapse-item/style/less.js +0 -5
  432. package/lib/config-provider/style/less.d.ts +0 -1
  433. package/lib/config-provider/style/less.js +0 -1
  434. package/lib/contact-card/index.less +0 -47
  435. package/lib/contact-card/style/less.d.ts +0 -1
  436. package/lib/contact-card/style/less.js +0 -5
  437. package/lib/contact-edit/index.less +0 -37
  438. package/lib/contact-edit/style/less.d.ts +0 -1
  439. package/lib/contact-edit/style/less.js +0 -9
  440. package/lib/contact-list/index.less +0 -65
  441. package/lib/contact-list/style/less.d.ts +0 -1
  442. package/lib/contact-list/style/less.js +0 -11
  443. package/lib/count-down/index.less +0 -11
  444. package/lib/count-down/style/less.d.ts +0 -1
  445. package/lib/count-down/style/less.js +0 -2
  446. package/lib/coupon/index.less +0 -127
  447. package/lib/coupon/style/less.d.ts +0 -1
  448. package/lib/coupon/style/less.js +0 -6
  449. package/lib/coupon-cell/index.less +0 -9
  450. package/lib/coupon-cell/style/less.d.ts +0 -1
  451. package/lib/coupon-cell/style/less.js +0 -5
  452. package/lib/coupon-list/index.less +0 -86
  453. package/lib/coupon-list/style/less.d.ts +0 -1
  454. package/lib/coupon-list/style/less.js +0 -17
  455. package/lib/date-picker/style/less.d.ts +0 -1
  456. package/lib/date-picker/style/less.js +0 -3
  457. package/lib/dialog/index.less +0 -140
  458. package/lib/dialog/style/less.d.ts +0 -1
  459. package/lib/dialog/style/less.js +0 -10
  460. package/lib/divider/index.less +0 -73
  461. package/lib/divider/style/less.d.ts +0 -1
  462. package/lib/divider/style/less.js +0 -2
  463. package/lib/dropdown-item/index.less +0 -41
  464. package/lib/dropdown-item/style/less.d.ts +0 -1
  465. package/lib/dropdown-item/style/less.js +0 -8
  466. package/lib/dropdown-menu/index.less +0 -80
  467. package/lib/dropdown-menu/style/less.d.ts +0 -1
  468. package/lib/dropdown-menu/style/less.js +0 -2
  469. package/lib/empty/index.less +0 -41
  470. package/lib/empty/style/less.d.ts +0 -1
  471. package/lib/empty/style/less.js +0 -2
  472. package/lib/field/index.less +0 -196
  473. package/lib/field/style/less.d.ts +0 -1
  474. package/lib/field/style/less.js +0 -5
  475. package/lib/form/style/less.d.ts +0 -1
  476. package/lib/form/style/less.js +0 -1
  477. package/lib/grid/index.less +0 -4
  478. package/lib/grid/style/less.d.ts +0 -1
  479. package/lib/grid/style/less.js +0 -2
  480. package/lib/grid-item/index.less +0 -97
  481. package/lib/grid-item/style/less.d.ts +0 -1
  482. package/lib/grid-item/style/less.js +0 -5
  483. package/lib/icon/index.less +0 -10
  484. package/lib/icon/style/less.d.ts +0 -1
  485. package/lib/icon/style/less.js +0 -3
  486. package/lib/image/index.less +0 -55
  487. package/lib/image/style/less.d.ts +0 -1
  488. package/lib/image/style/less.js +0 -4
  489. package/lib/image-preview/index.less +0 -110
  490. package/lib/image-preview/style/less.d.ts +0 -1
  491. package/lib/image-preview/style/less.js +0 -10
  492. package/lib/index-anchor/index.less +0 -31
  493. package/lib/index-anchor/style/less.d.ts +0 -1
  494. package/lib/index-anchor/style/less.js +0 -3
  495. package/lib/index-bar/index.less +0 -33
  496. package/lib/index-bar/style/less.d.ts +0 -1
  497. package/lib/index-bar/style/less.js +0 -2
  498. package/lib/index.less +0 -80
  499. package/lib/lazyload/style/less.d.ts +0 -1
  500. package/lib/lazyload/style/less.js +0 -1
  501. package/lib/list/index.less +0 -29
  502. package/lib/list/style/less.d.ts +0 -1
  503. package/lib/list/style/less.js +0 -3
  504. package/lib/loading/index.less +0 -109
  505. package/lib/loading/style/less.d.ts +0 -1
  506. package/lib/loading/style/less.js +0 -2
  507. package/lib/locale/style/less.d.ts +0 -1
  508. package/lib/locale/style/less.js +0 -1
  509. package/lib/nav-bar/index.less +0 -78
  510. package/lib/nav-bar/style/less.d.ts +0 -1
  511. package/lib/nav-bar/style/less.js +0 -4
  512. package/lib/notice-bar/index.less +0 -70
  513. package/lib/notice-bar/style/less.d.ts +0 -1
  514. package/lib/notice-bar/style/less.js +0 -4
  515. package/lib/notify/index.less +0 -42
  516. package/lib/notify/style/less.d.ts +0 -1
  517. package/lib/notify/style/less.js +0 -6
  518. package/lib/number-keyboard/index.less +0 -159
  519. package/lib/number-keyboard/style/less.d.ts +0 -1
  520. package/lib/number-keyboard/style/less.js +0 -3
  521. package/lib/overlay/index.less +0 -14
  522. package/lib/overlay/style/less.d.ts +0 -1
  523. package/lib/overlay/style/less.js +0 -2
  524. package/lib/pagination/index.less +0 -89
  525. package/lib/pagination/style/less.d.ts +0 -1
  526. package/lib/pagination/style/less.js +0 -2
  527. package/lib/password-input/index.less +0 -100
  528. package/lib/password-input/style/less.d.ts +0 -1
  529. package/lib/password-input/style/less.js +0 -2
  530. package/lib/picker/index.less +0 -138
  531. package/lib/picker/style/less.d.ts +0 -1
  532. package/lib/picker/style/less.js +0 -3
  533. package/lib/popover/index.less +0 -288
  534. package/lib/popover/style/less.d.ts +0 -1
  535. package/lib/popover/style/less.js +0 -6
  536. package/lib/popup/index.less +0 -139
  537. package/lib/popup/style/less.d.ts +0 -1
  538. package/lib/popup/style/less.js +0 -5
  539. package/lib/progress/index.less +0 -53
  540. package/lib/progress/style/less.d.ts +0 -1
  541. package/lib/progress/style/less.js +0 -2
  542. package/lib/pull-refresh/index.less +0 -36
  543. package/lib/pull-refresh/style/less.d.ts +0 -1
  544. package/lib/pull-refresh/style/less.js +0 -3
  545. package/lib/radio/index.less +0 -96
  546. package/lib/radio/style/less.d.ts +0 -1
  547. package/lib/radio/style/less.js +0 -6
  548. package/lib/radio-group/index.less +0 -6
  549. package/lib/radio-group/style/less.d.ts +0 -1
  550. package/lib/radio-group/style/less.js +0 -2
  551. package/lib/rate/index.less +0 -52
  552. package/lib/rate/style/less.d.ts +0 -1
  553. package/lib/rate/style/less.js +0 -4
  554. package/lib/row/index.less +0 -32
  555. package/lib/row/style/less.d.ts +0 -1
  556. package/lib/row/style/less.js +0 -2
  557. package/lib/search/index.less +0 -76
  558. package/lib/search/style/less.d.ts +0 -1
  559. package/lib/search/style/less.js +0 -6
  560. package/lib/share-sheet/index.less +0 -152
  561. package/lib/share-sheet/style/less.d.ts +0 -1
  562. package/lib/share-sheet/style/less.js +0 -6
  563. package/lib/sidebar/index.less +0 -9
  564. package/lib/sidebar/style/less.d.ts +0 -1
  565. package/lib/sidebar/style/less.js +0 -2
  566. package/lib/sidebar-item/index.less +0 -72
  567. package/lib/sidebar-item/style/less.d.ts +0 -1
  568. package/lib/sidebar-item/style/less.js +0 -4
  569. package/lib/skeleton/index.less +0 -73
  570. package/lib/skeleton/style/less.d.ts +0 -1
  571. package/lib/skeleton/style/less.js +0 -2
  572. package/lib/slider/index.less +0 -104
  573. package/lib/slider/style/less.d.ts +0 -1
  574. package/lib/slider/style/less.js +0 -2
  575. package/lib/ssr.js +0 -7
  576. package/lib/ssr.mjs +0 -1
  577. package/lib/step/index.less +0 -147
  578. package/lib/step/style/less.d.ts +0 -1
  579. package/lib/step/style/less.js +0 -5
  580. package/lib/stepper/index.less +0 -129
  581. package/lib/stepper/style/less.d.ts +0 -1
  582. package/lib/stepper/style/less.js +0 -2
  583. package/lib/steps/index.less +0 -23
  584. package/lib/steps/style/less.d.ts +0 -1
  585. package/lib/steps/style/less.js +0 -2
  586. package/lib/sticky/index.less +0 -10
  587. package/lib/sticky/style/less.d.ts +0 -1
  588. package/lib/sticky/style/less.js +0 -2
  589. package/lib/style/animation.less +0 -135
  590. package/lib/style/base.less +0 -89
  591. package/lib/style/css-variables.less +0 -90
  592. package/lib/style/mixins/clearfix.less +0 -7
  593. package/lib/style/mixins/ellipsis.less +0 -15
  594. package/lib/style/mixins/hairline.less +0 -37
  595. package/lib/style/normalize.less +0 -36
  596. package/lib/submit-bar/index.less +0 -97
  597. package/lib/submit-bar/style/less.d.ts +0 -1
  598. package/lib/submit-bar/style/less.js +0 -6
  599. package/lib/swipe/index.less +0 -65
  600. package/lib/swipe/style/less.d.ts +0 -1
  601. package/lib/swipe/style/less.js +0 -2
  602. package/lib/swipe-cell/index.less +0 -27
  603. package/lib/swipe-cell/style/less.d.ts +0 -1
  604. package/lib/swipe-cell/style/less.js +0 -2
  605. package/lib/swipe-item/index.less +0 -6
  606. package/lib/swipe-item/style/less.d.ts +0 -1
  607. package/lib/swipe-item/style/less.js +0 -3
  608. package/lib/switch/index.less +0 -75
  609. package/lib/switch/style/less.d.ts +0 -1
  610. package/lib/switch/style/less.js +0 -3
  611. package/lib/tab/index.less +0 -15
  612. package/lib/tab/style/less.d.ts +0 -1
  613. package/lib/tab/style/less.js +0 -7
  614. package/lib/tabbar/index.less +0 -20
  615. package/lib/tabbar/style/less.d.ts +0 -1
  616. package/lib/tabbar/style/less.js +0 -2
  617. package/lib/tabbar-item/index.less +0 -44
  618. package/lib/tabbar-item/style/less.d.ts +0 -1
  619. package/lib/tabbar-item/style/less.js +0 -5
  620. package/lib/tabs/index.less +0 -170
  621. package/lib/tabs/style/less.d.ts +0 -1
  622. package/lib/tabs/style/less.js +0 -5
  623. package/lib/tag/index.less +0 -115
  624. package/lib/tag/style/less.d.ts +0 -1
  625. package/lib/tag/style/less.js +0 -4
  626. package/lib/time-picker/style/less.d.ts +0 -1
  627. package/lib/time-picker/style/less.js +0 -3
  628. package/lib/toast/index.less +0 -89
  629. package/lib/toast/style/less.d.ts +0 -1
  630. package/lib/toast/style/less.js +0 -7
  631. package/lib/tree-select/index.less +0 -68
  632. package/lib/tree-select/style/less.d.ts +0 -1
  633. package/lib/tree-select/style/less.js +0 -6
  634. package/lib/uploader/index.less +0 -191
  635. package/lib/uploader/style/less.d.ts +0 -1
  636. package/lib/uploader/style/less.js +0 -11
  637. package/lib/vant.cjs.min.js +0 -1
  638. package/lib/vant.es.min.js +0 -14191
package/lib/vant.js CHANGED
@@ -353,7 +353,7 @@
353
353
  }
354
354
  return { width, height };
355
355
  }
356
- var overflowScrollReg = /scroll|auto/i;
356
+ var overflowScrollReg = /scroll|auto|overlay/i;
357
357
  var defaultRoot = inBrowser ? window : void 0;
358
358
  function isElement$1(node) {
359
359
  const ELEMENT_NODE_TYPE = 1;
@@ -746,9 +746,30 @@
746
746
  };
747
747
  return options;
748
748
  }
749
+ const useHeight = (element) => {
750
+ const height2 = vue.ref();
751
+ const setHeight = () => {
752
+ height2.value = useRect(element).height;
753
+ };
754
+ vue.onMounted(() => {
755
+ vue.nextTick(setHeight);
756
+ setTimeout(setHeight, 100);
757
+ });
758
+ return height2;
759
+ };
760
+ function usePlaceholder(contentRef, bem2) {
761
+ const height2 = useHeight(contentRef);
762
+ return (renderContent) => vue.createVNode("div", {
763
+ "class": bem2("placeholder"),
764
+ "style": {
765
+ height: height2.value ? `${height2.value}px` : void 0
766
+ }
767
+ }, [renderContent()]);
768
+ }
749
769
  const [name$1t, bem$1p] = createNamespace("action-bar");
750
770
  const ACTION_BAR_KEY = Symbol(name$1t);
751
771
  const actionBarProps = {
772
+ placeholder: Boolean,
752
773
  safeAreaInsetBottom: truthProp
753
774
  };
754
775
  var stdin_default$1A = vue.defineComponent({
@@ -757,18 +778,27 @@
757
778
  setup(props, {
758
779
  slots
759
780
  }) {
781
+ const root = vue.ref();
782
+ const renderPlaceholder = usePlaceholder(root, bem$1p);
760
783
  const {
761
784
  linkChildren
762
785
  } = useChildren(ACTION_BAR_KEY);
763
786
  linkChildren();
764
- return () => {
787
+ const renderActionBar = () => {
765
788
  var _a;
766
789
  return vue.createVNode("div", {
790
+ "ref": root,
767
791
  "class": [bem$1p(), {
768
792
  "van-safe-area-bottom": props.safeAreaInsetBottom
769
793
  }]
770
794
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
771
795
  };
796
+ return () => {
797
+ if (props.placeholder) {
798
+ return renderPlaceholder(renderActionBar);
799
+ }
800
+ return renderActionBar();
801
+ };
772
802
  }
773
803
  });
774
804
  const ActionBar = withInstall(stdin_default$1A);
@@ -1661,7 +1691,7 @@
1661
1691
  }
1662
1692
  });
1663
1693
  vue.onDeactivated(() => {
1664
- if (props.show) {
1694
+ if (props.show && props.teleport) {
1665
1695
  close();
1666
1696
  shouldReopen = true;
1667
1697
  }
@@ -2783,7 +2813,7 @@
2783
2813
  var stdin_default$1k = vue.defineComponent({
2784
2814
  name: name$1d,
2785
2815
  props: fieldProps,
2786
- emits: ["blur", "focus", "clear", "keypress", "clickInput", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
2816
+ emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
2787
2817
  setup(props, {
2788
2818
  emit,
2789
2819
  slots
@@ -2857,18 +2887,24 @@
2857
2887
  state.status = "unvalidated";
2858
2888
  state.validateMessage = "";
2859
2889
  };
2890
+ const endValidate = () => emit("endValidate", {
2891
+ status: state.status
2892
+ });
2860
2893
  const validate = (rules = props.rules) => new Promise((resolve) => {
2861
2894
  resetValidation();
2862
2895
  if (rules) {
2896
+ emit("startValidate");
2863
2897
  runRules(rules).then(() => {
2864
2898
  if (state.status === "failed") {
2865
2899
  resolve({
2866
2900
  name: props.name,
2867
2901
  message: state.validateMessage
2868
2902
  });
2903
+ endValidate();
2869
2904
  } else {
2870
2905
  state.status = "passed";
2871
2906
  resolve();
2907
+ endValidate();
2872
2908
  }
2873
2909
  });
2874
2910
  } else {
@@ -3163,38 +3199,6 @@
3163
3199
  }
3164
3200
  });
3165
3201
  const Field = withInstall(stdin_default$1k);
3166
- function usePopupState() {
3167
- const state = vue.reactive({
3168
- show: false
3169
- });
3170
- const toggle = (show) => {
3171
- state.show = show;
3172
- };
3173
- const open = (props) => {
3174
- extend(state, props, { transitionAppear: true });
3175
- toggle(true);
3176
- };
3177
- const close = () => toggle(false);
3178
- useExpose({ open, close, toggle });
3179
- return {
3180
- open,
3181
- close,
3182
- state,
3183
- toggle
3184
- };
3185
- }
3186
- function mountComponent(RootComponent) {
3187
- const app = vue.createApp(RootComponent);
3188
- const root = document.createElement("div");
3189
- document.body.appendChild(root);
3190
- return {
3191
- instance: app.mount(root),
3192
- unmount() {
3193
- app.unmount();
3194
- document.body.removeChild(root);
3195
- }
3196
- };
3197
- }
3198
3202
  let lockCount = 0;
3199
3203
  function lockClick(lock) {
3200
3204
  if (lock) {
@@ -3318,6 +3322,38 @@
3318
3322
  });
3319
3323
  }
3320
3324
  });
3325
+ function usePopupState() {
3326
+ const state = vue.reactive({
3327
+ show: false
3328
+ });
3329
+ const toggle = (show) => {
3330
+ state.show = show;
3331
+ };
3332
+ const open = (props) => {
3333
+ extend(state, props, { transitionAppear: true });
3334
+ toggle(true);
3335
+ };
3336
+ const close = () => toggle(false);
3337
+ useExpose({ open, close, toggle });
3338
+ return {
3339
+ open,
3340
+ close,
3341
+ state,
3342
+ toggle
3343
+ };
3344
+ }
3345
+ function mountComponent(RootComponent) {
3346
+ const app = vue.createApp(RootComponent);
3347
+ const root = document.createElement("div");
3348
+ document.body.appendChild(root);
3349
+ return {
3350
+ instance: app.mount(root),
3351
+ unmount() {
3352
+ app.unmount();
3353
+ document.body.removeChild(root);
3354
+ }
3355
+ };
3356
+ }
3321
3357
  const defaultOptions$1 = {
3322
3358
  icon: "",
3323
3359
  type: "text",
@@ -3341,7 +3377,7 @@
3341
3377
  };
3342
3378
  let queue = [];
3343
3379
  let allowMultiple = false;
3344
- let currentOptions = extend({}, defaultOptions$1);
3380
+ let currentOptions$2 = extend({}, defaultOptions$1);
3345
3381
  const defaultOptionsMap = /* @__PURE__ */ new Map();
3346
3382
  function parseOptions$1(message) {
3347
3383
  if (isObject(message)) {
@@ -3383,7 +3419,7 @@
3383
3419
  vue.getCurrentInstance().render = render;
3384
3420
  return {
3385
3421
  open,
3386
- clear: close,
3422
+ close,
3387
3423
  message
3388
3424
  };
3389
3425
  }
@@ -3397,59 +3433,55 @@
3397
3433
  }
3398
3434
  return queue[queue.length - 1];
3399
3435
  }
3400
- function Toast(options = {}) {
3436
+ function showToast(options = {}) {
3401
3437
  if (!inBrowser$1) {
3402
3438
  return {};
3403
3439
  }
3404
3440
  const toast = getInstance();
3405
3441
  const parsedOptions = parseOptions$1(options);
3406
- toast.open(extend({}, currentOptions, defaultOptionsMap.get(parsedOptions.type || currentOptions.type), parsedOptions));
3442
+ toast.open(extend({}, currentOptions$2, defaultOptionsMap.get(parsedOptions.type || currentOptions$2.type), parsedOptions));
3407
3443
  return toast;
3408
3444
  }
3409
- const createMethod = (type) => (options) => Toast(extend({
3445
+ const createMethod = (type) => (options) => showToast(extend({
3410
3446
  type
3411
3447
  }, parseOptions$1(options)));
3412
- Toast.loading = createMethod("loading");
3413
- Toast.success = createMethod("success");
3414
- Toast.fail = createMethod("fail");
3415
- Toast.clear = (all) => {
3448
+ const showLoadingToast = createMethod("loading");
3449
+ const showSuccessToast = createMethod("success");
3450
+ const showFailToast = createMethod("fail");
3451
+ const closeToast = (all) => {
3416
3452
  var _a;
3417
3453
  if (queue.length) {
3418
3454
  if (all) {
3419
3455
  queue.forEach((toast) => {
3420
- toast.clear();
3456
+ toast.close();
3421
3457
  });
3422
3458
  queue = [];
3423
3459
  } else if (!allowMultiple) {
3424
- queue[0].clear();
3460
+ queue[0].close();
3425
3461
  } else {
3426
- (_a = queue.shift()) == null ? void 0 : _a.clear();
3462
+ (_a = queue.shift()) == null ? void 0 : _a.close();
3427
3463
  }
3428
3464
  }
3429
3465
  };
3430
- function setDefaultOptions(type, options) {
3466
+ function setToastDefaultOptions(type, options) {
3431
3467
  if (typeof type === "string") {
3432
3468
  defaultOptionsMap.set(type, options);
3433
3469
  } else {
3434
- extend(currentOptions, type);
3470
+ extend(currentOptions$2, type);
3435
3471
  }
3436
3472
  }
3437
- Toast.setDefaultOptions = setDefaultOptions;
3438
- Toast.resetDefaultOptions = (type) => {
3473
+ const resetToastDefaultOptions = (type) => {
3439
3474
  if (typeof type === "string") {
3440
3475
  defaultOptionsMap.delete(type);
3441
3476
  } else {
3442
- currentOptions = extend({}, defaultOptions$1);
3477
+ currentOptions$2 = extend({}, defaultOptions$1);
3443
3478
  defaultOptionsMap.clear();
3444
3479
  }
3445
3480
  };
3446
- Toast.allowMultiple = (value = true) => {
3481
+ const allowMultipleToast = (value = true) => {
3447
3482
  allowMultiple = value;
3448
3483
  };
3449
- Toast.install = (app) => {
3450
- app.use(withInstall(stdin_default$1j));
3451
- app.config.globalProperties.$toast = Toast;
3452
- };
3484
+ const Toast = withInstall(stdin_default$1j);
3453
3485
  const [name$1b, bem$17] = createNamespace("switch");
3454
3486
  const switchProps = {
3455
3487
  size: numericProp,
@@ -3497,6 +3529,7 @@
3497
3529
  };
3498
3530
  useCustomFieldValue(() => props.modelValue);
3499
3531
  return () => {
3532
+ var _a;
3500
3533
  const {
3501
3534
  size,
3502
3535
  loading,
@@ -3522,7 +3555,7 @@
3522
3555
  "onClick": onClick
3523
3556
  }, [vue.createVNode("div", {
3524
3557
  "class": bem$17("node")
3525
- }, [renderLoading()])]);
3558
+ }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
3526
3559
  };
3527
3560
  }
3528
3561
  });
@@ -3716,7 +3749,7 @@
3716
3749
  selectedOptions
3717
3750
  }) => {
3718
3751
  if (selectedValues.some((value) => value === AREA_EMPTY_CODE)) {
3719
- Toast(t$h("areaEmpty"));
3752
+ showToast(t$h("areaEmpty"));
3720
3753
  } else {
3721
3754
  showAreaPopup.value = false;
3722
3755
  assignAreaText(selectedOptions);
@@ -4355,17 +4388,6 @@
4355
4388
  });
4356
4389
  return filter ? filter(type, options) : options;
4357
4390
  };
4358
- const useHeight = (element) => {
4359
- const height2 = vue.ref();
4360
- const setHeight = () => {
4361
- height2.value = useRect(element).height;
4362
- };
4363
- vue.onMounted(() => {
4364
- vue.nextTick(setHeight);
4365
- setTimeout(setHeight, 100);
4366
- });
4367
- return height2;
4368
- };
4369
4391
  const [name$12] = createNamespace("calendar-day");
4370
4392
  var stdin_default$19 = vue.defineComponent({
4371
4393
  name: name$12,
@@ -4837,6 +4859,9 @@
4837
4859
  const months = vue.computed(() => {
4838
4860
  const months2 = [];
4839
4861
  const cursor = new Date(props.minDate);
4862
+ if (props.lazyRender && !props.show && props.poppable) {
4863
+ return months2;
4864
+ }
4840
4865
  cursor.setDate(1);
4841
4866
  do {
4842
4867
  months2.push(new Date(cursor));
@@ -4855,6 +4880,7 @@
4855
4880
  }
4856
4881
  return !currentDate.value;
4857
4882
  });
4883
+ const getSelectedDate = () => currentDate.value;
4858
4884
  const onScroll = () => {
4859
4885
  const top2 = getScrollTop(bodyRef.value);
4860
4886
  const bottom2 = top2 + bodyHeight;
@@ -4939,7 +4965,7 @@
4939
4965
  } = props;
4940
4966
  if (maxRange && calcDateNum(date) > maxRange) {
4941
4967
  if (showRangePrompt) {
4942
- Toast(rangePrompt || t$f("rangePrompt", maxRange));
4968
+ showToast(rangePrompt || t$f("rangePrompt", maxRange));
4943
4969
  }
4944
4970
  emit("overRange");
4945
4971
  return false;
@@ -5025,7 +5051,7 @@
5025
5051
  const [unselectedDate] = dates.splice(selectedIndex, 1);
5026
5052
  emit("unselect", cloneDate(unselectedDate));
5027
5053
  } else if (props.maxRange && dates.length >= props.maxRange) {
5028
- Toast(props.rangePrompt || t$f("rangePrompt", props.maxRange));
5054
+ showToast(props.rangePrompt || t$f("rangePrompt", props.maxRange));
5029
5055
  } else {
5030
5056
  select([...dates, date]);
5031
5057
  }
@@ -5097,7 +5123,8 @@
5097
5123
  });
5098
5124
  useExpose({
5099
5125
  reset,
5100
- scrollToDate
5126
+ scrollToDate,
5127
+ getSelectedDate
5101
5128
  });
5102
5129
  onMountedOrActivated(init);
5103
5130
  return () => {
@@ -8433,8 +8460,10 @@
8433
8460
  showCancelButton: Boolean,
8434
8461
  cancelButtonText: String,
8435
8462
  cancelButtonColor: String,
8463
+ cancelButtonDisabled: Boolean,
8436
8464
  confirmButtonText: String,
8437
8465
  confirmButtonColor: String,
8466
+ confirmButtonDisabled: Boolean,
8438
8467
  showConfirmButton: truthProp,
8439
8468
  closeOnClickOverlay: Boolean
8440
8469
  });
@@ -8555,6 +8584,7 @@
8555
8584
  color: props.cancelButtonColor
8556
8585
  },
8557
8586
  "loading": loading.cancel,
8587
+ "disabled": props.cancelButtonDisabled,
8558
8588
  "onClick": onCancel
8559
8589
  }, null), props.showConfirmButton && vue.createVNode(Button, {
8560
8590
  "size": "large",
@@ -8566,6 +8596,7 @@
8566
8596
  color: props.confirmButtonColor
8567
8597
  },
8568
8598
  "loading": loading.confirm,
8599
+ "disabled": props.confirmButtonDisabled,
8569
8600
  "onClick": onConfirm
8570
8601
  }, null)]);
8571
8602
  const renderRoundButtons = () => vue.createVNode(ActionBar, {
@@ -8577,6 +8608,7 @@
8577
8608
  "class": bem$A("cancel"),
8578
8609
  "color": props.cancelButtonColor,
8579
8610
  "loading": loading.cancel,
8611
+ "disabled": props.cancelButtonDisabled,
8580
8612
  "onClick": onCancel
8581
8613
  }, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
8582
8614
  "type": "danger",
@@ -8584,6 +8616,7 @@
8584
8616
  "class": bem$A("confirm"),
8585
8617
  "color": props.confirmButtonColor,
8586
8618
  "loading": loading.confirm,
8619
+ "disabled": props.confirmButtonDisabled,
8587
8620
  "onClick": onConfirm
8588
8621
  }, null)]
8589
8622
  });
@@ -8619,6 +8652,34 @@
8619
8652
  }
8620
8653
  });
8621
8654
  let instance$2;
8655
+ const DEFAULT_OPTIONS$1 = {
8656
+ title: "",
8657
+ width: "",
8658
+ theme: null,
8659
+ message: "",
8660
+ overlay: true,
8661
+ callback: null,
8662
+ teleport: "body",
8663
+ className: "",
8664
+ allowHtml: false,
8665
+ lockScroll: true,
8666
+ transition: void 0,
8667
+ beforeClose: null,
8668
+ overlayClass: "",
8669
+ overlayStyle: void 0,
8670
+ messageAlign: "",
8671
+ cancelButtonText: "",
8672
+ cancelButtonColor: null,
8673
+ cancelButtonDisabled: false,
8674
+ confirmButtonText: "",
8675
+ confirmButtonColor: null,
8676
+ confirmButtonDisabled: false,
8677
+ showConfirmButton: true,
8678
+ showCancelButton: false,
8679
+ closeOnPopstate: true,
8680
+ closeOnClickOverlay: false
8681
+ };
8682
+ let currentOptions$1 = extend({}, DEFAULT_OPTIONS$1);
8622
8683
  function initInstance$2() {
8623
8684
  const Wrapper = {
8624
8685
  setup() {
@@ -8635,7 +8696,7 @@
8635
8696
  instance: instance$2
8636
8697
  } = mountComponent(Wrapper));
8637
8698
  }
8638
- function Dialog(options) {
8699
+ function showDialog(options) {
8639
8700
  if (!inBrowser$1) {
8640
8701
  return Promise.resolve();
8641
8702
  }
@@ -8643,59 +8704,28 @@
8643
8704
  if (!instance$2) {
8644
8705
  initInstance$2();
8645
8706
  }
8646
- instance$2.open(extend({}, Dialog.currentOptions, options, {
8707
+ instance$2.open(extend({}, currentOptions$1, options, {
8647
8708
  callback: (action) => {
8648
8709
  (action === "confirm" ? resolve : reject)(action);
8649
8710
  }
8650
8711
  }));
8651
8712
  });
8652
8713
  }
8653
- Dialog.defaultOptions = {
8654
- title: "",
8655
- width: "",
8656
- theme: null,
8657
- message: "",
8658
- overlay: true,
8659
- callback: null,
8660
- teleport: "body",
8661
- className: "",
8662
- allowHtml: false,
8663
- lockScroll: true,
8664
- transition: void 0,
8665
- beforeClose: null,
8666
- overlayClass: "",
8667
- overlayStyle: void 0,
8668
- messageAlign: "",
8669
- cancelButtonText: "",
8670
- cancelButtonColor: null,
8671
- confirmButtonText: "",
8672
- confirmButtonColor: null,
8673
- showConfirmButton: true,
8674
- showCancelButton: false,
8675
- closeOnPopstate: true,
8676
- closeOnClickOverlay: false
8714
+ const setDialogDefaultOptions = (options) => {
8715
+ extend(currentOptions$1, options);
8716
+ };
8717
+ const resetDialogDefaultOptions = () => {
8718
+ currentOptions$1 = extend({}, DEFAULT_OPTIONS$1);
8677
8719
  };
8678
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8679
- Dialog.alert = Dialog;
8680
- Dialog.confirm = (options) => Dialog(extend({
8720
+ const showConfirmDialog = (options) => showDialog(extend({
8681
8721
  showCancelButton: true
8682
8722
  }, options));
8683
- Dialog.close = () => {
8723
+ const closeDialog = () => {
8684
8724
  if (instance$2) {
8685
8725
  instance$2.toggle(false);
8686
8726
  }
8687
8727
  };
8688
- Dialog.setDefaultOptions = (options) => {
8689
- extend(Dialog.currentOptions, options);
8690
- };
8691
- Dialog.resetDefaultOptions = () => {
8692
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8693
- };
8694
- Dialog.Component = withInstall(stdin_default$G);
8695
- Dialog.install = (app) => {
8696
- app.use(Dialog.Component);
8697
- app.config.globalProperties.$dialog = Dialog;
8698
- };
8728
+ const Dialog = withInstall(stdin_default$G);
8699
8729
  const [name$z, bem$z] = createNamespace("divider");
8700
8730
  const dividerProps = {
8701
8731
  dashed: Boolean,
@@ -9616,7 +9646,7 @@
9616
9646
  }
9617
9647
  }));
9618
9648
  }
9619
- const ImagePreview = (options, startPosition = 0) => {
9649
+ const showImagePreview = (options, startPosition = 0) => {
9620
9650
  if (!inBrowser$1) {
9621
9651
  return;
9622
9652
  }
@@ -9630,10 +9660,7 @@
9630
9660
  instance$1.open(extend({}, defaultConfig, options));
9631
9661
  return instance$1;
9632
9662
  };
9633
- ImagePreview.Component = withInstall(stdin_default$z);
9634
- ImagePreview.install = (app) => {
9635
- app.use(ImagePreview.Component);
9636
- };
9663
+ const ImagePreview = withInstall(stdin_default$z);
9637
9664
  function genAlphabet() {
9638
9665
  const charCodeOfA = "A".charCodeAt(0);
9639
9666
  const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
@@ -10050,15 +10077,6 @@
10050
10077
  }
10051
10078
  });
10052
10079
  const List = withInstall(stdin_default$w);
10053
- function usePlaceholder(contentRef, bem2) {
10054
- const height2 = useHeight(contentRef);
10055
- return (renderContent) => vue.createVNode("div", {
10056
- "class": bem2("placeholder"),
10057
- "style": {
10058
- height: height2.value ? `${height2.value}px` : void 0
10059
- }
10060
- }, [renderContent()]);
10061
- }
10062
10080
  const [name$q, bem$p] = createNamespace("nav-bar");
10063
10081
  const navBarProps = {
10064
10082
  title: String,
@@ -10354,21 +10372,6 @@
10354
10372
  }
10355
10373
  }));
10356
10374
  }
10357
- function Notify(options) {
10358
- if (!inBrowser$1) {
10359
- return;
10360
- }
10361
- if (!instance) {
10362
- initInstance();
10363
- }
10364
- options = extend({}, Notify.currentOptions, parseOptions(options));
10365
- instance.open(options);
10366
- clearTimeout(timer);
10367
- if (options.duration > 0) {
10368
- timer = window.setTimeout(Notify.clear, options.duration);
10369
- }
10370
- return instance;
10371
- }
10372
10375
  const getDefaultOptions = () => ({
10373
10376
  type: "danger",
10374
10377
  color: void 0,
@@ -10382,23 +10385,32 @@
10382
10385
  lockScroll: false,
10383
10386
  background: void 0
10384
10387
  });
10385
- Notify.clear = () => {
10388
+ let currentOptions = getDefaultOptions();
10389
+ const closeNotify = () => {
10386
10390
  if (instance) {
10387
10391
  instance.toggle(false);
10388
10392
  }
10389
10393
  };
10390
- Notify.currentOptions = getDefaultOptions();
10391
- Notify.setDefaultOptions = (options) => {
10392
- extend(Notify.currentOptions, options);
10393
- };
10394
- Notify.resetDefaultOptions = () => {
10395
- Notify.currentOptions = getDefaultOptions();
10396
- };
10397
- Notify.Component = withInstall(stdin_default$t);
10398
- Notify.install = (app) => {
10399
- app.use(Notify.Component);
10400
- app.config.globalProperties.$notify = Notify;
10394
+ function showNotify(options) {
10395
+ if (!inBrowser$1) {
10396
+ return;
10397
+ }
10398
+ if (!instance) {
10399
+ initInstance();
10400
+ }
10401
+ options = extend({}, currentOptions, parseOptions(options));
10402
+ instance.open(options);
10403
+ clearTimeout(timer);
10404
+ if (options.duration > 0) {
10405
+ timer = window.setTimeout(closeNotify, options.duration);
10406
+ }
10407
+ return instance;
10408
+ }
10409
+ const setNotifyDefaultOptions = (options) => extend(currentOptions, options);
10410
+ const resetNotifyDefaultOptions = () => {
10411
+ currentOptions = getDefaultOptions();
10401
10412
  };
10413
+ const Notify = withInstall(stdin_default$t);
10402
10414
  const [name$n, bem$m] = createNamespace("key");
10403
10415
  const CollapseIcon = vue.createVNode("svg", {
10404
10416
  "class": bem$m("collapse-icon"),
@@ -12070,7 +12082,7 @@
12070
12082
  var stdin_default$m = vue.defineComponent({
12071
12083
  name: name$h,
12072
12084
  props: pullRefreshProps,
12073
- emits: ["refresh", "update:modelValue"],
12085
+ emits: ["change", "refresh", "update:modelValue"],
12074
12086
  setup(props, {
12075
12087
  emit,
12076
12088
  slots
@@ -12115,6 +12127,10 @@
12115
12127
  } else {
12116
12128
  state.status = "loosing";
12117
12129
  }
12130
+ emit("change", {
12131
+ status: state.status,
12132
+ distance
12133
+ });
12118
12134
  };
12119
12135
  const getStatusText = () => {
12120
12136
  const {
@@ -13498,6 +13514,7 @@
13498
13514
  buttonType: makeStringProp("danger"),
13499
13515
  buttonColor: String,
13500
13516
  suffixLabel: String,
13517
+ placeholder: Boolean,
13501
13518
  decimalLength: makeNumericProp(2),
13502
13519
  safeAreaInsetBottom: truthProp
13503
13520
  };
@@ -13509,6 +13526,8 @@
13509
13526
  emit,
13510
13527
  slots
13511
13528
  }) {
13529
+ const root = vue.ref();
13530
+ const renderPlaceholder = usePlaceholder(root, bem$5);
13512
13531
  const renderText = () => {
13513
13532
  const {
13514
13533
  price,
@@ -13568,9 +13587,10 @@
13568
13587
  "onClick": onClickButton
13569
13588
  }, null);
13570
13589
  };
13571
- return () => {
13590
+ const renderSubmitBar = () => {
13572
13591
  var _a, _b;
13573
13592
  return vue.createVNode("div", {
13593
+ "ref": root,
13574
13594
  "class": [bem$5(), {
13575
13595
  "van-safe-area-bottom": props.safeAreaInsetBottom
13576
13596
  }]
@@ -13578,6 +13598,12 @@
13578
13598
  "class": bem$5("bar")
13579
13599
  }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
13580
13600
  };
13601
+ return () => {
13602
+ if (props.placeholder) {
13603
+ return renderPlaceholder(renderSubmitBar);
13604
+ }
13605
+ return renderSubmitBar();
13606
+ };
13581
13607
  }
13582
13608
  });
13583
13609
  const SubmitBar = withInstall(stdin_default$b);
@@ -14390,13 +14416,13 @@
14390
14416
  if (props.previewFullImage) {
14391
14417
  const imageFiles = props.modelValue.filter(isImageFile);
14392
14418
  const images = imageFiles.map((item2) => {
14393
- if (item2.file && !item2.url) {
14419
+ if (item2.file && !item2.url && item2.status !== "failed") {
14394
14420
  item2.url = URL.createObjectURL(item2.file);
14395
14421
  urls.push(item2.url);
14396
14422
  }
14397
14423
  return item2.url;
14398
14424
  }).filter(Boolean);
14399
- imagePreview = ImagePreview(extend({
14425
+ imagePreview = showImagePreview(extend({
14400
14426
  images,
14401
14427
  startPosition: imageFiles.indexOf(item),
14402
14428
  onClose: onClosePreview
@@ -15334,7 +15360,7 @@
15334
15360
  });
15335
15361
  }
15336
15362
  };
15337
- const version = "4.0.0-alpha.4";
15363
+ const version = "4.0.0-beta.0";
15338
15364
  function install(app) {
15339
15365
  const components = [
15340
15366
  ActionBar,
@@ -15523,8 +15549,26 @@
15523
15549
  exports2.Toast = Toast;
15524
15550
  exports2.TreeSelect = TreeSelect;
15525
15551
  exports2.Uploader = Uploader;
15552
+ exports2.allowMultipleToast = allowMultipleToast;
15553
+ exports2.closeDialog = closeDialog;
15554
+ exports2.closeNotify = closeNotify;
15555
+ exports2.closeToast = closeToast;
15526
15556
  exports2["default"] = stdin_default;
15527
15557
  exports2.install = install;
15558
+ exports2.resetDialogDefaultOptions = resetDialogDefaultOptions;
15559
+ exports2.resetNotifyDefaultOptions = resetNotifyDefaultOptions;
15560
+ exports2.resetToastDefaultOptions = resetToastDefaultOptions;
15561
+ exports2.setDialogDefaultOptions = setDialogDefaultOptions;
15562
+ exports2.setNotifyDefaultOptions = setNotifyDefaultOptions;
15563
+ exports2.setToastDefaultOptions = setToastDefaultOptions;
15564
+ exports2.showConfirmDialog = showConfirmDialog;
15565
+ exports2.showDialog = showDialog;
15566
+ exports2.showFailToast = showFailToast;
15567
+ exports2.showImagePreview = showImagePreview;
15568
+ exports2.showLoadingToast = showLoadingToast;
15569
+ exports2.showNotify = showNotify;
15570
+ exports2.showSuccessToast = showSuccessToast;
15571
+ exports2.showToast = showToast;
15528
15572
  exports2.version = version;
15529
15573
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
15530
15574
  });