vant 3.4.2 → 4.0.0-alpha.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 (1159) hide show
  1. package/es/action-bar/index.css +1 -1
  2. package/es/action-bar/index.less +4 -6
  3. package/es/action-bar-button/index.css +1 -1
  4. package/es/action-bar-button/index.less +9 -11
  5. package/es/action-bar-icon/index.css +1 -1
  6. package/es/action-bar-icon/index.less +10 -12
  7. package/es/action-sheet/index.css +1 -1
  8. package/es/action-sheet/index.less +23 -24
  9. package/es/address-edit/AddressEdit.d.ts +6 -6
  10. package/es/address-edit/AddressEdit.js +29 -33
  11. package/es/address-edit/AddressEditDetail.d.ts +2 -2
  12. package/es/address-edit/AddressEditDetail.js +9 -17
  13. package/es/address-edit/index.css +1 -1
  14. package/es/address-edit/index.d.ts +6 -6
  15. package/es/address-edit/index.less +8 -15
  16. package/es/address-edit/types.d.ts +2 -4
  17. package/es/address-list/AddressList.d.ts +4 -4
  18. package/es/address-list/AddressList.js +5 -5
  19. package/es/address-list/AddressListItem.js +3 -3
  20. package/es/address-list/index.css +1 -1
  21. package/es/address-list/index.d.ts +4 -4
  22. package/es/address-list/index.less +20 -22
  23. package/es/area/Area.d.ts +13 -25
  24. package/es/area/Area.js +43 -206
  25. package/es/area/index.d.ts +11 -19
  26. package/es/area/types.d.ts +2 -17
  27. package/es/area/utils.d.ts +6 -0
  28. package/es/area/utils.js +85 -0
  29. package/es/badge/index.css +1 -1
  30. package/es/badge/index.less +15 -17
  31. package/es/button/index.css +1 -1
  32. package/es/button/index.less +55 -52
  33. package/es/calendar/Calendar.d.ts +6 -6
  34. package/es/calendar/Calendar.js +5 -5
  35. package/es/calendar/CalendarHeader.d.ts +2 -2
  36. package/es/calendar/CalendarHeader.js +2 -2
  37. package/es/calendar/CalendarMonth.d.ts +1 -2
  38. package/es/calendar/CalendarMonth.js +3 -3
  39. package/es/calendar/index.css +1 -1
  40. package/es/calendar/index.d.ts +6 -6
  41. package/es/calendar/index.less +40 -37
  42. package/es/card/Card.d.ts +2 -2
  43. package/es/card/Card.js +3 -3
  44. package/es/card/index.css +1 -1
  45. package/es/card/index.d.ts +2 -2
  46. package/es/card/index.less +23 -25
  47. package/es/cascader/Cascader.d.ts +2 -2
  48. package/es/cascader/Cascader.js +3 -3
  49. package/es/cascader/index.css +1 -1
  50. package/es/cascader/index.d.ts +2 -2
  51. package/es/cascader/index.less +17 -19
  52. package/es/cell/Cell.js +1 -4
  53. package/es/cell/index.css +1 -1
  54. package/es/cell/index.less +21 -27
  55. package/es/cell-group/index.css +1 -1
  56. package/es/cell-group/index.less +12 -13
  57. package/es/checkbox/index.css +1 -1
  58. package/es/checkbox/index.less +12 -14
  59. package/es/circle/index.css +1 -1
  60. package/es/circle/index.less +8 -10
  61. package/es/collapse-item/CollapseItem.d.ts +13 -0
  62. package/es/collapse-item/CollapseItem.js +3 -2
  63. package/es/collapse-item/index.css +1 -1
  64. package/es/collapse-item/index.d.ts +9 -0
  65. package/es/collapse-item/index.less +12 -12
  66. package/es/config-provider/ConfigProvider.d.ts +14 -0
  67. package/es/config-provider/ConfigProvider.js +9 -2
  68. package/es/config-provider/index.d.ts +10 -1
  69. package/es/contact-card/ContactCard.js +3 -3
  70. package/es/contact-card/index.css +1 -1
  71. package/es/contact-card/index.less +7 -9
  72. package/es/contact-edit/ContactEdit.d.ts +2 -2
  73. package/es/contact-edit/ContactEdit.js +3 -4
  74. package/es/contact-edit/index.css +1 -1
  75. package/es/contact-edit/index.d.ts +2 -2
  76. package/es/contact-edit/index.less +7 -9
  77. package/es/contact-list/ContactList.js +5 -5
  78. package/es/contact-list/index.css +1 -1
  79. package/es/contact-list/index.less +9 -11
  80. package/es/count-down/index.css +1 -1
  81. package/es/count-down/index.less +4 -6
  82. package/es/coupon/index.css +1 -1
  83. package/es/coupon/index.less +28 -31
  84. package/es/coupon-cell/index.css +1 -1
  85. package/es/coupon-cell/index.less +2 -4
  86. package/es/coupon-list/CouponList.js +2 -2
  87. package/es/coupon-list/index.css +1 -1
  88. package/es/coupon-list/index.less +15 -17
  89. package/es/date-picker/DatePicker.d.ts +168 -0
  90. package/es/date-picker/DatePicker.js +111 -0
  91. package/es/{datetime-picker/DatePicker.d.ts → date-picker/index.d.ts} +40 -28
  92. package/es/date-picker/index.js +8 -0
  93. package/es/{datetime-picker → date-picker}/style/index.d.ts +0 -0
  94. package/es/{datetime-picker → date-picker}/style/index.js +0 -0
  95. package/es/{datetime-picker → date-picker}/style/less.d.ts +0 -0
  96. package/es/{datetime-picker → date-picker}/style/less.js +0 -0
  97. package/es/{datetime-picker → date-picker}/utils.d.ts +15 -11
  98. package/es/date-picker/utils.js +40 -0
  99. package/es/dialog/Dialog.d.ts +2 -1
  100. package/es/dialog/Dialog.js +19 -3
  101. package/es/dialog/function-call.d.ts +2 -1
  102. package/es/dialog/index.css +1 -1
  103. package/es/dialog/index.less +22 -24
  104. package/es/divider/index.css +1 -1
  105. package/es/divider/index.less +10 -12
  106. package/es/dropdown-item/index.css +1 -1
  107. package/es/dropdown-item/index.less +2 -5
  108. package/es/dropdown-menu/index.css +1 -1
  109. package/es/dropdown-menu/index.less +14 -18
  110. package/es/empty/index.css +1 -1
  111. package/es/empty/index.less +9 -11
  112. package/es/field/Field.d.ts +4 -4
  113. package/es/field/Field.js +4 -4
  114. package/es/field/index.css +1 -1
  115. package/es/field/index.d.ts +4 -4
  116. package/es/field/index.less +20 -23
  117. package/es/field/utils.js +2 -1
  118. package/es/grid-item/index.css +1 -1
  119. package/es/grid-item/index.less +10 -13
  120. package/es/icon/index.css +1 -1
  121. package/es/icon/index.less +1 -0
  122. package/es/image/index.css +1 -1
  123. package/es/image/index.less +10 -12
  124. package/es/image-preview/index.css +1 -1
  125. package/es/image-preview/index.less +11 -14
  126. package/es/index-anchor/index.css +1 -1
  127. package/es/index-anchor/index.less +12 -14
  128. package/es/index-bar/IndexBar.d.ts +4 -4
  129. package/es/index-bar/IndexBar.js +3 -1
  130. package/es/index-bar/index.css +1 -1
  131. package/es/index-bar/index.d.ts +3 -3
  132. package/es/index-bar/index.less +7 -8
  133. package/es/index.d.ts +3 -2
  134. package/es/index.js +7 -4
  135. package/es/list/index.css +1 -1
  136. package/es/list/index.less +5 -7
  137. package/es/loading/index.css +1 -1
  138. package/es/loading/index.less +7 -10
  139. package/es/locale/lang/bn-BD.d.ts +64 -0
  140. package/es/locale/lang/bn-BD.js +74 -0
  141. package/es/locale/lang/de-DE-formal.d.ts +2 -11
  142. package/es/locale/lang/de-DE-formal.js +3 -12
  143. package/es/locale/lang/de-DE.d.ts +2 -11
  144. package/es/locale/lang/de-DE.js +3 -12
  145. package/es/locale/lang/en-US.d.ts +2 -11
  146. package/es/locale/lang/en-US.js +3 -12
  147. package/es/locale/lang/es-ES.d.ts +2 -11
  148. package/es/locale/lang/es-ES.js +3 -12
  149. package/es/locale/lang/fr-FR.d.ts +2 -11
  150. package/es/locale/lang/fr-FR.js +3 -12
  151. package/es/locale/lang/hi-IN.d.ts +64 -0
  152. package/es/locale/lang/hi-IN.js +74 -0
  153. package/es/locale/lang/id-ID.d.ts +64 -0
  154. package/es/locale/lang/id-ID.js +66 -0
  155. package/es/locale/lang/it-IT.d.ts +64 -0
  156. package/es/locale/lang/it-IT.js +74 -0
  157. package/es/locale/lang/ja-JP.d.ts +2 -12
  158. package/es/locale/lang/ja-JP.js +5 -15
  159. package/es/locale/lang/ko-KR.d.ts +64 -0
  160. package/es/locale/lang/ko-KR.js +74 -0
  161. package/es/locale/lang/nb-NO.d.ts +2 -11
  162. package/es/locale/lang/nb-NO.js +3 -12
  163. package/es/locale/lang/pt-BR.d.ts +2 -11
  164. package/es/locale/lang/pt-BR.js +3 -12
  165. package/es/locale/lang/ro-RO.d.ts +2 -11
  166. package/es/locale/lang/ro-RO.js +3 -12
  167. package/es/locale/lang/ru-RU.d.ts +2 -11
  168. package/es/locale/lang/ru-RU.js +3 -12
  169. package/es/locale/lang/th-TH.d.ts +2 -12
  170. package/es/locale/lang/th-TH.js +5 -15
  171. package/es/locale/lang/tr-TR.d.ts +2 -11
  172. package/es/locale/lang/tr-TR.js +2 -11
  173. package/es/locale/lang/uk-UA.d.ts +64 -0
  174. package/es/locale/lang/uk-UA.js +74 -0
  175. package/es/locale/lang/vi-VN.d.ts +64 -0
  176. package/es/locale/lang/vi-VN.js +74 -0
  177. package/es/locale/lang/zh-CN.d.ts +2 -12
  178. package/es/locale/lang/zh-CN.js +6 -16
  179. package/es/locale/lang/zh-HK.d.ts +2 -12
  180. package/es/locale/lang/zh-HK.js +6 -16
  181. package/es/locale/lang/zh-TW.d.ts +2 -12
  182. package/es/locale/lang/zh-TW.js +6 -16
  183. package/es/nav-bar/NavBar.d.ts +3 -3
  184. package/es/nav-bar/NavBar.js +3 -3
  185. package/es/nav-bar/index.css +1 -1
  186. package/es/nav-bar/index.d.ts +3 -3
  187. package/es/nav-bar/index.less +11 -14
  188. package/es/notice-bar/index.css +1 -1
  189. package/es/notice-bar/index.less +11 -13
  190. package/es/notify/index.css +1 -1
  191. package/es/notify/index.less +13 -15
  192. package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
  193. package/es/number-keyboard/index.css +1 -1
  194. package/es/number-keyboard/index.d.ts +1 -1
  195. package/es/number-keyboard/index.less +26 -23
  196. package/es/overlay/index.css +1 -1
  197. package/es/overlay/index.less +4 -6
  198. package/es/pagination/index.css +1 -1
  199. package/es/pagination/index.less +13 -15
  200. package/es/password-input/index.css +1 -1
  201. package/es/password-input/index.less +20 -22
  202. package/es/picker/Picker.d.ts +26 -28
  203. package/es/picker/Picker.js +91 -196
  204. package/es/picker/PickerColumn.d.ts +21 -30
  205. package/es/picker/PickerColumn.js +61 -111
  206. package/es/picker/index.css +1 -1
  207. package/es/picker/index.d.ts +19 -20
  208. package/es/picker/index.less +31 -20
  209. package/es/picker/types.d.ts +13 -19
  210. package/es/picker/utils.d.ts +10 -0
  211. package/es/picker/utils.js +73 -0
  212. package/es/popover/Popover.d.ts +1 -1
  213. package/es/popover/index.css +1 -1
  214. package/es/popover/index.d.ts +1 -1
  215. package/es/popover/index.less +21 -23
  216. package/es/popup/Popup.d.ts +4 -3
  217. package/es/popup/Popup.js +13 -5
  218. package/es/popup/index.css +1 -1
  219. package/es/popup/index.d.ts +4 -3
  220. package/es/popup/index.less +20 -23
  221. package/es/popup/types.d.ts +5 -2
  222. package/es/progress/index.css +1 -1
  223. package/es/progress/index.less +14 -18
  224. package/es/pull-refresh/index.css +1 -1
  225. package/es/pull-refresh/index.less +5 -7
  226. package/es/radio/index.css +1 -1
  227. package/es/radio/index.less +12 -14
  228. package/es/rate/index.css +1 -1
  229. package/es/rate/index.less +6 -8
  230. package/es/search/Search.d.ts +4 -4
  231. package/es/search/Search.js +7 -7
  232. package/es/search/index.css +1 -1
  233. package/es/search/index.d.ts +4 -4
  234. package/es/search/index.less +16 -18
  235. package/es/share-sheet/index.css +1 -1
  236. package/es/share-sheet/index.less +17 -19
  237. package/es/sidebar/index.css +1 -1
  238. package/es/sidebar/index.less +2 -4
  239. package/es/sidebar-item/index.css +1 -1
  240. package/es/sidebar-item/index.less +17 -19
  241. package/es/skeleton/index.css +1 -1
  242. package/es/skeleton/index.less +14 -16
  243. package/es/slider/Slider.d.ts +4 -4
  244. package/es/slider/Slider.js +4 -5
  245. package/es/slider/index.css +1 -1
  246. package/es/slider/index.d.ts +4 -4
  247. package/es/slider/index.less +20 -18
  248. package/es/step/index.css +1 -1
  249. package/es/step/index.less +15 -17
  250. package/es/stepper/Stepper.d.ts +1 -1
  251. package/es/stepper/index.css +1 -1
  252. package/es/stepper/index.d.ts +1 -1
  253. package/es/stepper/index.less +20 -25
  254. package/es/steps/Steps.d.ts +2 -2
  255. package/es/steps/Steps.js +2 -2
  256. package/es/steps/index.css +1 -1
  257. package/es/steps/index.d.ts +2 -2
  258. package/es/steps/index.less +3 -5
  259. package/es/sticky/index.css +1 -1
  260. package/es/sticky/index.less +2 -4
  261. package/es/style/animation.css +1 -1
  262. package/es/style/animation.less +18 -22
  263. package/es/style/base.css +1 -1
  264. package/es/style/base.less +12 -9
  265. package/es/style/css-variables.css +1 -1
  266. package/es/style/css-variables.less +76 -61
  267. package/es/style/mixins/hairline.less +0 -2
  268. package/es/style/normalize.css +1 -1
  269. package/es/style/normalize.less +1 -3
  270. package/es/submit-bar/index.css +1 -1
  271. package/es/submit-bar/index.less +27 -28
  272. package/es/swipe/index.css +1 -1
  273. package/es/swipe/index.less +11 -13
  274. package/es/switch/index.css +1 -1
  275. package/es/switch/index.less +24 -24
  276. package/es/tabbar/index.css +1 -1
  277. package/es/tabbar/index.less +5 -7
  278. package/es/tabbar-item/index.css +1 -1
  279. package/es/tabbar-item/index.less +9 -11
  280. package/es/tabs/Tabs.d.ts +2 -4
  281. package/es/tabs/Tabs.js +14 -27
  282. package/es/tabs/index.css +1 -1
  283. package/es/tabs/index.d.ts +2 -4
  284. package/es/tabs/index.less +17 -20
  285. package/es/tag/Tag.js +2 -2
  286. package/es/tag/index.css +1 -1
  287. package/es/tag/index.less +22 -26
  288. package/es/time-picker/TimePicker.d.ts +214 -0
  289. package/es/time-picker/TimePicker.js +71 -0
  290. package/{lib/datetime-picker/TimePicker.d.ts → es/time-picker/index.d.ts} +60 -20
  291. package/es/time-picker/index.js +8 -0
  292. package/{lib/datetime-picker → es/time-picker}/style/index.d.ts +0 -0
  293. package/es/time-picker/style/index.js +3 -0
  294. package/{lib/datetime-picker → es/time-picker}/style/less.d.ts +0 -0
  295. package/es/time-picker/style/less.js +3 -0
  296. package/es/toast/Toast.d.ts +3 -0
  297. package/es/toast/Toast.js +2 -1
  298. package/es/toast/index.css +1 -1
  299. package/es/toast/index.less +19 -21
  300. package/es/tree-select/TreeSelect.d.ts +3 -3
  301. package/es/tree-select/TreeSelect.js +5 -4
  302. package/es/tree-select/index.css +1 -1
  303. package/es/tree-select/index.d.ts +3 -3
  304. package/es/tree-select/index.less +12 -14
  305. package/es/uploader/Uploader.d.ts +4 -4
  306. package/es/uploader/Uploader.js +4 -4
  307. package/es/uploader/index.css +1 -1
  308. package/es/uploader/index.d.ts +4 -4
  309. package/es/uploader/index.less +31 -33
  310. package/es/uploader/types.d.ts +1 -3
  311. package/es/utils/basic.d.ts +1 -0
  312. package/es/utils/basic.js +2 -0
  313. package/es/utils/interceptor.d.ts +1 -1
  314. package/lib/action-bar/ActionBar.js +14 -13
  315. package/lib/action-bar/index.css +1 -1
  316. package/lib/action-bar/index.js +14 -8
  317. package/lib/action-bar/index.less +4 -6
  318. package/lib/action-bar-button/ActionBarButton.js +18 -17
  319. package/lib/action-bar-button/index.css +1 -1
  320. package/lib/action-bar-button/index.js +14 -8
  321. package/lib/action-bar-button/index.less +9 -11
  322. package/lib/action-bar-icon/ActionBarIcon.js +18 -17
  323. package/lib/action-bar-icon/index.css +1 -1
  324. package/lib/action-bar-icon/index.js +14 -8
  325. package/lib/action-bar-icon/index.less +10 -12
  326. package/lib/action-sheet/ActionSheet.js +17 -16
  327. package/lib/action-sheet/index.css +1 -1
  328. package/lib/action-sheet/index.js +14 -8
  329. package/lib/action-sheet/index.less +23 -24
  330. package/lib/address-edit/AddressEdit.d.ts +6 -6
  331. package/lib/address-edit/AddressEdit.js +54 -52
  332. package/lib/address-edit/AddressEditDetail.d.ts +2 -2
  333. package/lib/address-edit/AddressEditDetail.js +24 -31
  334. package/lib/address-edit/index.css +1 -1
  335. package/lib/address-edit/index.d.ts +6 -6
  336. package/lib/address-edit/index.js +14 -8
  337. package/lib/address-edit/index.less +8 -15
  338. package/lib/address-edit/types.d.ts +2 -4
  339. package/lib/address-edit/types.js +18 -1
  340. package/lib/address-list/AddressList.d.ts +4 -4
  341. package/lib/address-list/AddressList.js +23 -17
  342. package/lib/address-list/AddressListItem.js +20 -19
  343. package/lib/address-list/index.css +1 -1
  344. package/lib/address-list/index.d.ts +4 -4
  345. package/lib/address-list/index.js +14 -8
  346. package/lib/address-list/index.less +20 -22
  347. package/lib/area/Area.d.ts +13 -25
  348. package/lib/area/Area.js +58 -220
  349. package/lib/area/index.d.ts +11 -19
  350. package/lib/area/index.js +14 -8
  351. package/lib/area/types.d.ts +2 -17
  352. package/lib/area/types.js +18 -1
  353. package/lib/area/utils.d.ts +6 -0
  354. package/lib/area/utils.js +109 -0
  355. package/lib/badge/Badge.js +13 -12
  356. package/lib/badge/index.css +1 -1
  357. package/lib/badge/index.js +14 -8
  358. package/lib/badge/index.less +15 -17
  359. package/lib/button/Button.js +16 -15
  360. package/lib/button/index.css +1 -1
  361. package/lib/button/index.js +14 -8
  362. package/lib/button/index.less +55 -52
  363. package/lib/button/types.js +18 -1
  364. package/lib/calendar/Calendar.d.ts +6 -6
  365. package/lib/calendar/Calendar.js +29 -23
  366. package/lib/calendar/CalendarDay.js +14 -13
  367. package/lib/calendar/CalendarHeader.d.ts +2 -2
  368. package/lib/calendar/CalendarHeader.js +16 -15
  369. package/lib/calendar/CalendarMonth.d.ts +1 -2
  370. package/lib/calendar/CalendarMonth.js +23 -17
  371. package/lib/calendar/index.css +1 -1
  372. package/lib/calendar/index.d.ts +6 -6
  373. package/lib/calendar/index.js +14 -8
  374. package/lib/calendar/index.less +40 -37
  375. package/lib/calendar/types.js +18 -1
  376. package/lib/calendar/utils.js +11 -10
  377. package/lib/card/Card.d.ts +2 -2
  378. package/lib/card/Card.js +18 -17
  379. package/lib/card/index.css +1 -1
  380. package/lib/card/index.d.ts +2 -2
  381. package/lib/card/index.js +14 -8
  382. package/lib/card/index.less +23 -25
  383. package/lib/cascader/Cascader.d.ts +2 -2
  384. package/lib/cascader/Cascader.js +19 -18
  385. package/lib/cascader/index.css +1 -1
  386. package/lib/cascader/index.d.ts +2 -2
  387. package/lib/cascader/index.js +14 -8
  388. package/lib/cascader/index.less +17 -19
  389. package/lib/cascader/types.js +18 -1
  390. package/lib/cell/Cell.js +16 -18
  391. package/lib/cell/index.css +1 -1
  392. package/lib/cell/index.js +14 -8
  393. package/lib/cell/index.less +21 -27
  394. package/lib/cell-group/CellGroup.js +13 -12
  395. package/lib/cell-group/index.css +1 -1
  396. package/lib/cell-group/index.js +14 -8
  397. package/lib/cell-group/index.less +12 -13
  398. package/lib/checkbox/Checkbox.js +19 -13
  399. package/lib/checkbox/Checker.js +14 -13
  400. package/lib/checkbox/index.css +1 -1
  401. package/lib/checkbox/index.js +14 -8
  402. package/lib/checkbox/index.less +12 -14
  403. package/lib/checkbox/types.js +18 -1
  404. package/lib/checkbox-group/CheckboxGroup.js +15 -14
  405. package/lib/checkbox-group/index.js +14 -8
  406. package/lib/checkbox-group/types.js +18 -1
  407. package/lib/circle/Circle.js +14 -13
  408. package/lib/circle/index.css +1 -1
  409. package/lib/circle/index.js +14 -8
  410. package/lib/circle/index.less +8 -10
  411. package/lib/col/Col.js +15 -14
  412. package/lib/col/index.js +14 -8
  413. package/lib/collapse/Collapse.js +14 -13
  414. package/lib/collapse/index.js +14 -8
  415. package/lib/collapse-item/CollapseItem.d.ts +13 -0
  416. package/lib/collapse-item/CollapseItem.js +22 -20
  417. package/lib/collapse-item/index.css +1 -1
  418. package/lib/collapse-item/index.d.ts +9 -0
  419. package/lib/collapse-item/index.js +14 -8
  420. package/lib/collapse-item/index.less +12 -12
  421. package/lib/collapse-item/types.js +18 -1
  422. package/lib/composables/on-popup-reopen.js +11 -10
  423. package/lib/composables/use-expose.js +12 -11
  424. package/lib/composables/use-height.js +12 -11
  425. package/lib/composables/use-id.js +11 -10
  426. package/lib/composables/use-lazy-render.js +11 -10
  427. package/lib/composables/use-lock-scroll.js +14 -13
  428. package/lib/composables/use-placeholder.js +12 -11
  429. package/lib/composables/use-refs.js +11 -10
  430. package/lib/composables/use-route.js +11 -10
  431. package/lib/composables/use-tab-status.js +11 -10
  432. package/lib/composables/use-touch.js +11 -10
  433. package/lib/composables/use-visibility-change.js +13 -12
  434. package/lib/config-provider/ConfigProvider.d.ts +14 -0
  435. package/lib/config-provider/ConfigProvider.js +20 -12
  436. package/lib/config-provider/index.d.ts +10 -1
  437. package/lib/config-provider/index.js +14 -8
  438. package/lib/contact-card/ContactCard.js +17 -16
  439. package/lib/contact-card/index.css +1 -1
  440. package/lib/contact-card/index.js +14 -8
  441. package/lib/contact-card/index.less +7 -9
  442. package/lib/contact-edit/ContactEdit.d.ts +2 -2
  443. package/lib/contact-edit/ContactEdit.js +21 -21
  444. package/lib/contact-edit/index.css +1 -1
  445. package/lib/contact-edit/index.d.ts +2 -2
  446. package/lib/contact-edit/index.js +14 -8
  447. package/lib/contact-edit/index.less +7 -9
  448. package/lib/contact-list/ContactList.js +24 -23
  449. package/lib/contact-list/index.css +1 -1
  450. package/lib/contact-list/index.js +14 -8
  451. package/lib/contact-list/index.less +9 -11
  452. package/lib/count-down/CountDown.js +16 -15
  453. package/lib/count-down/index.css +1 -1
  454. package/lib/count-down/index.js +14 -8
  455. package/lib/count-down/index.less +4 -6
  456. package/lib/count-down/types.js +18 -1
  457. package/lib/count-down/utils.js +11 -10
  458. package/lib/coupon/Coupon.js +15 -14
  459. package/lib/coupon/index.css +1 -1
  460. package/lib/coupon/index.js +14 -8
  461. package/lib/coupon/index.less +28 -31
  462. package/lib/coupon/utils.js +11 -10
  463. package/lib/coupon-cell/CouponCell.js +14 -13
  464. package/lib/coupon-cell/index.css +1 -1
  465. package/lib/coupon-cell/index.js +14 -8
  466. package/lib/coupon-cell/index.less +2 -4
  467. package/lib/coupon-list/CouponList.js +22 -21
  468. package/lib/coupon-list/index.css +1 -1
  469. package/lib/coupon-list/index.js +14 -8
  470. package/lib/coupon-list/index.less +15 -17
  471. package/lib/date-picker/DatePicker.d.ts +168 -0
  472. package/lib/date-picker/DatePicker.js +135 -0
  473. package/lib/{datetime-picker/DatePicker.d.ts → date-picker/index.d.ts} +40 -28
  474. package/lib/date-picker/index.js +37 -0
  475. package/lib/date-picker/style/index.d.ts +1 -0
  476. package/lib/{datetime-picker → date-picker}/style/index.js +0 -0
  477. package/lib/date-picker/style/less.d.ts +1 -0
  478. package/lib/{datetime-picker → date-picker}/style/less.js +0 -0
  479. package/lib/{datetime-picker → date-picker}/utils.d.ts +15 -11
  480. package/lib/date-picker/utils.js +64 -0
  481. package/lib/dialog/Dialog.d.ts +2 -1
  482. package/lib/dialog/Dialog.js +35 -18
  483. package/lib/dialog/function-call.d.ts +2 -1
  484. package/lib/dialog/function-call.js +16 -10
  485. package/lib/dialog/index.css +1 -1
  486. package/lib/dialog/index.js +11 -10
  487. package/lib/dialog/index.less +22 -24
  488. package/lib/dialog/types.js +18 -1
  489. package/lib/divider/Divider.js +13 -12
  490. package/lib/divider/index.css +1 -1
  491. package/lib/divider/index.js +14 -8
  492. package/lib/divider/index.less +10 -12
  493. package/lib/dropdown-item/DropdownItem.js +19 -18
  494. package/lib/dropdown-item/index.css +1 -1
  495. package/lib/dropdown-item/index.js +14 -8
  496. package/lib/dropdown-item/index.less +2 -5
  497. package/lib/dropdown-item/types.js +18 -1
  498. package/lib/dropdown-menu/DropdownMenu.js +15 -14
  499. package/lib/dropdown-menu/index.css +1 -1
  500. package/lib/dropdown-menu/index.js +14 -8
  501. package/lib/dropdown-menu/index.less +14 -18
  502. package/lib/dropdown-menu/types.js +18 -1
  503. package/lib/empty/Empty.js +14 -13
  504. package/lib/empty/Network.js +11 -10
  505. package/lib/empty/index.css +1 -1
  506. package/lib/empty/index.js +14 -8
  507. package/lib/empty/index.less +9 -11
  508. package/lib/field/Field.d.ts +4 -4
  509. package/lib/field/Field.js +24 -23
  510. package/lib/field/index.css +1 -1
  511. package/lib/field/index.d.ts +4 -4
  512. package/lib/field/index.js +14 -8
  513. package/lib/field/index.less +20 -23
  514. package/lib/field/types.js +18 -1
  515. package/lib/field/utils.js +13 -11
  516. package/lib/form/Form.js +15 -14
  517. package/lib/form/index.js +14 -8
  518. package/lib/form/types.js +18 -1
  519. package/lib/grid/Grid.js +15 -14
  520. package/lib/grid/index.js +14 -8
  521. package/lib/grid-item/GridItem.js +18 -17
  522. package/lib/grid-item/index.css +1 -1
  523. package/lib/grid-item/index.js +14 -8
  524. package/lib/grid-item/index.less +10 -13
  525. package/lib/icon/Icon.js +15 -14
  526. package/lib/icon/index.css +1 -1
  527. package/lib/icon/index.js +14 -8
  528. package/lib/icon/index.less +1 -0
  529. package/lib/image/Image.js +14 -13
  530. package/lib/image/index.css +1 -1
  531. package/lib/image/index.js +14 -8
  532. package/lib/image/index.less +10 -12
  533. package/lib/image-preview/ImagePreview.js +21 -15
  534. package/lib/image-preview/ImagePreviewItem.js +17 -16
  535. package/lib/image-preview/function-call.js +16 -10
  536. package/lib/image-preview/index.css +1 -1
  537. package/lib/image-preview/index.js +11 -10
  538. package/lib/image-preview/index.less +11 -14
  539. package/lib/image-preview/types.js +18 -1
  540. package/lib/index-anchor/IndexAnchor.js +17 -16
  541. package/lib/index-anchor/index.css +1 -1
  542. package/lib/index-anchor/index.js +14 -8
  543. package/lib/index-anchor/index.less +12 -14
  544. package/lib/index-bar/IndexBar.d.ts +4 -4
  545. package/lib/index-bar/IndexBar.js +19 -16
  546. package/lib/index-bar/index.css +1 -1
  547. package/lib/index-bar/index.d.ts +3 -3
  548. package/lib/index-bar/index.js +14 -8
  549. package/lib/index-bar/index.less +7 -8
  550. package/lib/index-bar/types.js +18 -1
  551. package/lib/index.css +1 -1
  552. package/lib/index.d.ts +3 -2
  553. package/lib/index.js +186 -182
  554. package/lib/lazyload/index.js +11 -10
  555. package/lib/lazyload/vue-lazyload/index.js +16 -10
  556. package/lib/lazyload/vue-lazyload/lazy-component.js +12 -11
  557. package/lib/lazyload/vue-lazyload/lazy-container.js +11 -10
  558. package/lib/lazyload/vue-lazyload/lazy-image.js +13 -12
  559. package/lib/lazyload/vue-lazyload/lazy.js +17 -11
  560. package/lib/lazyload/vue-lazyload/listener.js +13 -12
  561. package/lib/lazyload/vue-lazyload/util.js +11 -10
  562. package/lib/list/List.js +17 -16
  563. package/lib/list/index.css +1 -1
  564. package/lib/list/index.js +14 -8
  565. package/lib/list/index.less +5 -7
  566. package/lib/list/types.js +18 -1
  567. package/lib/loading/Loading.js +13 -12
  568. package/lib/loading/index.css +1 -1
  569. package/lib/loading/index.js +14 -8
  570. package/lib/loading/index.less +7 -10
  571. package/lib/locale/index.js +15 -9
  572. package/lib/locale/lang/bn-BD.d.ts +64 -0
  573. package/lib/locale/lang/bn-BD.js +98 -0
  574. package/lib/locale/lang/de-DE-formal.d.ts +2 -11
  575. package/lib/locale/lang/de-DE-formal.js +22 -14
  576. package/lib/locale/lang/de-DE.d.ts +2 -11
  577. package/lib/locale/lang/de-DE.js +22 -14
  578. package/lib/locale/lang/en-US.d.ts +2 -11
  579. package/lib/locale/lang/en-US.js +22 -14
  580. package/lib/locale/lang/es-ES.d.ts +2 -11
  581. package/lib/locale/lang/es-ES.js +22 -14
  582. package/lib/locale/lang/fr-FR.d.ts +2 -11
  583. package/lib/locale/lang/fr-FR.js +22 -14
  584. package/lib/locale/lang/hi-IN.d.ts +64 -0
  585. package/lib/locale/lang/hi-IN.js +98 -0
  586. package/lib/locale/lang/id-ID.d.ts +64 -0
  587. package/lib/locale/lang/id-ID.js +90 -0
  588. package/lib/locale/lang/it-IT.d.ts +64 -0
  589. package/lib/locale/lang/it-IT.js +98 -0
  590. package/lib/locale/lang/ja-JP.d.ts +2 -12
  591. package/lib/locale/lang/ja-JP.js +24 -17
  592. package/lib/locale/lang/ko-KR.d.ts +64 -0
  593. package/lib/locale/lang/ko-KR.js +98 -0
  594. package/lib/locale/lang/nb-NO.d.ts +2 -11
  595. package/lib/locale/lang/nb-NO.js +22 -14
  596. package/lib/locale/lang/pt-BR.d.ts +2 -11
  597. package/lib/locale/lang/pt-BR.js +22 -14
  598. package/lib/locale/lang/ro-RO.d.ts +2 -11
  599. package/lib/locale/lang/ro-RO.js +22 -14
  600. package/lib/locale/lang/ru-RU.d.ts +2 -11
  601. package/lib/locale/lang/ru-RU.js +22 -14
  602. package/lib/locale/lang/th-TH.d.ts +2 -12
  603. package/lib/locale/lang/th-TH.js +24 -17
  604. package/lib/locale/lang/tr-TR.d.ts +2 -11
  605. package/lib/locale/lang/tr-TR.js +21 -13
  606. package/lib/locale/lang/uk-UA.d.ts +64 -0
  607. package/lib/locale/lang/uk-UA.js +98 -0
  608. package/lib/locale/lang/vi-VN.d.ts +64 -0
  609. package/lib/locale/lang/vi-VN.js +98 -0
  610. package/lib/locale/lang/zh-CN.d.ts +2 -12
  611. package/lib/locale/lang/zh-CN.js +25 -18
  612. package/lib/locale/lang/zh-HK.d.ts +2 -12
  613. package/lib/locale/lang/zh-HK.js +25 -18
  614. package/lib/locale/lang/zh-TW.d.ts +2 -12
  615. package/lib/locale/lang/zh-TW.js +25 -18
  616. package/lib/nav-bar/NavBar.d.ts +3 -3
  617. package/lib/nav-bar/NavBar.js +18 -17
  618. package/lib/nav-bar/index.css +1 -1
  619. package/lib/nav-bar/index.d.ts +3 -3
  620. package/lib/nav-bar/index.js +14 -8
  621. package/lib/nav-bar/index.less +11 -14
  622. package/lib/notice-bar/NoticeBar.js +17 -16
  623. package/lib/notice-bar/index.css +1 -1
  624. package/lib/notice-bar/index.js +14 -8
  625. package/lib/notice-bar/index.less +11 -13
  626. package/lib/notice-bar/types.js +18 -1
  627. package/lib/notify/Notify.js +15 -14
  628. package/lib/notify/function-call.js +16 -10
  629. package/lib/notify/index.css +1 -1
  630. package/lib/notify/index.js +11 -10
  631. package/lib/notify/index.less +13 -15
  632. package/lib/notify/types.js +18 -1
  633. package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
  634. package/lib/number-keyboard/NumberKeyboard.js +17 -11
  635. package/lib/number-keyboard/NumberKeyboardKey.js +15 -14
  636. package/lib/number-keyboard/index.css +1 -1
  637. package/lib/number-keyboard/index.d.ts +1 -1
  638. package/lib/number-keyboard/index.js +14 -8
  639. package/lib/number-keyboard/index.less +26 -23
  640. package/lib/overlay/Overlay.js +14 -13
  641. package/lib/overlay/index.css +1 -1
  642. package/lib/overlay/index.js +14 -8
  643. package/lib/overlay/index.less +4 -6
  644. package/lib/pagination/Pagination.js +13 -12
  645. package/lib/pagination/index.css +1 -1
  646. package/lib/pagination/index.js +14 -8
  647. package/lib/pagination/index.less +13 -15
  648. package/lib/password-input/PasswordInput.js +13 -12
  649. package/lib/password-input/index.css +1 -1
  650. package/lib/password-input/index.js +14 -8
  651. package/lib/password-input/index.less +20 -22
  652. package/lib/picker/Picker.d.ts +26 -28
  653. package/lib/picker/Picker.js +109 -208
  654. package/lib/picker/PickerColumn.d.ts +21 -30
  655. package/lib/picker/PickerColumn.js +76 -125
  656. package/lib/picker/index.css +1 -1
  657. package/lib/picker/index.d.ts +19 -20
  658. package/lib/picker/index.js +14 -8
  659. package/lib/picker/index.less +31 -20
  660. package/lib/picker/types.d.ts +13 -19
  661. package/lib/picker/types.js +18 -1
  662. package/lib/picker/utils.d.ts +10 -0
  663. package/lib/picker/utils.js +97 -0
  664. package/lib/popover/Popover.d.ts +1 -1
  665. package/lib/popover/Popover.js +17 -16
  666. package/lib/popover/index.css +1 -1
  667. package/lib/popover/index.d.ts +1 -1
  668. package/lib/popover/index.js +14 -8
  669. package/lib/popover/index.less +21 -23
  670. package/lib/popover/types.js +18 -1
  671. package/lib/popup/Popup.d.ts +4 -3
  672. package/lib/popup/Popup.js +33 -24
  673. package/lib/popup/index.css +1 -1
  674. package/lib/popup/index.d.ts +4 -3
  675. package/lib/popup/index.js +14 -8
  676. package/lib/popup/index.less +20 -23
  677. package/lib/popup/shared.js +11 -10
  678. package/lib/popup/types.d.ts +5 -2
  679. package/lib/popup/types.js +18 -1
  680. package/lib/progress/Progress.js +13 -12
  681. package/lib/progress/index.css +1 -1
  682. package/lib/progress/index.js +14 -8
  683. package/lib/progress/index.less +14 -18
  684. package/lib/progress/types.js +18 -1
  685. package/lib/pull-refresh/PullRefresh.js +16 -15
  686. package/lib/pull-refresh/index.css +1 -1
  687. package/lib/pull-refresh/index.js +14 -8
  688. package/lib/pull-refresh/index.less +5 -7
  689. package/lib/radio/Radio.js +18 -12
  690. package/lib/radio/index.css +1 -1
  691. package/lib/radio/index.js +14 -8
  692. package/lib/radio/index.less +12 -14
  693. package/lib/radio-group/RadioGroup.js +14 -13
  694. package/lib/radio-group/index.js +14 -8
  695. package/lib/rate/Rate.js +17 -16
  696. package/lib/rate/index.css +1 -1
  697. package/lib/rate/index.js +14 -8
  698. package/lib/rate/index.less +6 -8
  699. package/lib/row/Row.js +14 -13
  700. package/lib/row/index.js +14 -8
  701. package/lib/search/Search.d.ts +4 -4
  702. package/lib/search/Search.js +24 -23
  703. package/lib/search/index.css +1 -1
  704. package/lib/search/index.d.ts +4 -4
  705. package/lib/search/index.js +14 -8
  706. package/lib/search/index.less +16 -18
  707. package/lib/search/types.js +18 -1
  708. package/lib/share-sheet/ShareSheet.js +15 -14
  709. package/lib/share-sheet/index.css +1 -1
  710. package/lib/share-sheet/index.js +14 -8
  711. package/lib/share-sheet/index.less +17 -19
  712. package/lib/sidebar/Sidebar.js +14 -13
  713. package/lib/sidebar/index.css +1 -1
  714. package/lib/sidebar/index.js +14 -8
  715. package/lib/sidebar/index.less +2 -4
  716. package/lib/sidebar-item/SidebarItem.js +17 -16
  717. package/lib/sidebar-item/index.css +1 -1
  718. package/lib/sidebar-item/index.js +14 -8
  719. package/lib/sidebar-item/index.less +17 -19
  720. package/lib/skeleton/Skeleton.js +13 -12
  721. package/lib/skeleton/index.css +1 -1
  722. package/lib/skeleton/index.js +14 -8
  723. package/lib/skeleton/index.less +14 -16
  724. package/lib/slider/Slider.d.ts +4 -4
  725. package/lib/slider/Slider.js +20 -20
  726. package/lib/slider/index.css +1 -1
  727. package/lib/slider/index.d.ts +4 -4
  728. package/lib/slider/index.js +14 -8
  729. package/lib/slider/index.less +20 -18
  730. package/lib/step/Step.js +16 -15
  731. package/lib/step/index.css +1 -1
  732. package/lib/step/index.js +14 -8
  733. package/lib/step/index.less +15 -17
  734. package/lib/stepper/Stepper.d.ts +1 -1
  735. package/lib/stepper/Stepper.js +14 -13
  736. package/lib/stepper/index.css +1 -1
  737. package/lib/stepper/index.d.ts +1 -1
  738. package/lib/stepper/index.js +14 -8
  739. package/lib/stepper/index.less +20 -25
  740. package/lib/steps/Steps.d.ts +2 -2
  741. package/lib/steps/Steps.js +16 -15
  742. package/lib/steps/index.css +1 -1
  743. package/lib/steps/index.d.ts +2 -2
  744. package/lib/steps/index.js +14 -8
  745. package/lib/steps/index.less +3 -5
  746. package/lib/sticky/Sticky.js +15 -14
  747. package/lib/sticky/index.css +1 -1
  748. package/lib/sticky/index.js +14 -8
  749. package/lib/sticky/index.less +2 -4
  750. package/lib/style/animation.css +1 -1
  751. package/lib/style/animation.less +18 -22
  752. package/lib/style/base.css +1 -1
  753. package/lib/style/base.less +12 -9
  754. package/lib/style/css-variables.css +1 -1
  755. package/lib/style/css-variables.less +76 -61
  756. package/lib/style/mixins/hairline.less +0 -2
  757. package/lib/style/normalize.css +1 -1
  758. package/lib/style/normalize.less +1 -3
  759. package/lib/submit-bar/SubmitBar.js +15 -14
  760. package/lib/submit-bar/index.css +1 -1
  761. package/lib/submit-bar/index.js +14 -8
  762. package/lib/submit-bar/index.less +27 -28
  763. package/lib/swipe/Swipe.js +17 -16
  764. package/lib/swipe/index.css +1 -1
  765. package/lib/swipe/index.js +14 -8
  766. package/lib/swipe/index.less +11 -13
  767. package/lib/swipe/types.js +18 -1
  768. package/lib/swipe-cell/SwipeCell.js +16 -15
  769. package/lib/swipe-cell/index.js +14 -8
  770. package/lib/swipe-cell/types.js +18 -1
  771. package/lib/swipe-item/SwipeItem.js +16 -15
  772. package/lib/swipe-item/index.js +14 -8
  773. package/lib/switch/Switch.js +15 -14
  774. package/lib/switch/index.css +1 -1
  775. package/lib/switch/index.js +14 -8
  776. package/lib/switch/index.less +24 -24
  777. package/lib/tab/Tab.js +20 -19
  778. package/lib/tab/index.js +14 -8
  779. package/lib/tabbar/Tabbar.js +15 -14
  780. package/lib/tabbar/index.css +1 -1
  781. package/lib/tabbar/index.js +14 -8
  782. package/lib/tabbar/index.less +5 -7
  783. package/lib/tabbar-item/TabbarItem.js +18 -17
  784. package/lib/tabbar-item/index.css +1 -1
  785. package/lib/tabbar-item/index.js +14 -8
  786. package/lib/tabbar-item/index.less +9 -11
  787. package/lib/tabs/Tabs.d.ts +2 -4
  788. package/lib/tabs/Tabs.js +38 -45
  789. package/lib/tabs/TabsContent.js +14 -13
  790. package/lib/tabs/TabsTitle.js +14 -13
  791. package/lib/tabs/index.css +1 -1
  792. package/lib/tabs/index.d.ts +2 -4
  793. package/lib/tabs/index.js +14 -8
  794. package/lib/tabs/index.less +17 -20
  795. package/lib/tabs/types.js +18 -1
  796. package/lib/tabs/utils.js +12 -11
  797. package/lib/tag/Tag.js +15 -14
  798. package/lib/tag/index.css +1 -1
  799. package/lib/tag/index.js +14 -8
  800. package/lib/tag/index.less +22 -26
  801. package/lib/time-picker/TimePicker.d.ts +214 -0
  802. package/lib/time-picker/TimePicker.js +95 -0
  803. package/{es/datetime-picker/TimePicker.d.ts → lib/time-picker/index.d.ts} +60 -20
  804. package/lib/time-picker/index.js +37 -0
  805. package/lib/time-picker/style/index.d.ts +1 -0
  806. package/lib/time-picker/style/index.js +3 -0
  807. package/lib/time-picker/style/less.d.ts +1 -0
  808. package/lib/time-picker/style/less.js +3 -0
  809. package/lib/toast/Toast.d.ts +3 -0
  810. package/lib/toast/Toast.js +19 -17
  811. package/lib/toast/function-call.js +17 -11
  812. package/lib/toast/index.css +1 -1
  813. package/lib/toast/index.js +11 -10
  814. package/lib/toast/index.less +19 -21
  815. package/lib/toast/lock-click.js +19 -2
  816. package/lib/toast/types.js +18 -1
  817. package/lib/tree-select/TreeSelect.d.ts +3 -3
  818. package/lib/tree-select/TreeSelect.js +21 -19
  819. package/lib/tree-select/index.css +1 -1
  820. package/lib/tree-select/index.d.ts +3 -3
  821. package/lib/tree-select/index.js +14 -8
  822. package/lib/tree-select/index.less +12 -14
  823. package/lib/uploader/Uploader.d.ts +4 -4
  824. package/lib/uploader/Uploader.js +25 -19
  825. package/lib/uploader/UploaderPreviewItem.js +17 -16
  826. package/lib/uploader/index.css +1 -1
  827. package/lib/uploader/index.d.ts +4 -4
  828. package/lib/uploader/index.js +14 -8
  829. package/lib/uploader/index.less +31 -33
  830. package/lib/uploader/types.d.ts +1 -3
  831. package/lib/uploader/types.js +18 -1
  832. package/lib/uploader/utils.js +11 -10
  833. package/lib/utils/basic.d.ts +1 -0
  834. package/lib/utils/basic.js +21 -2
  835. package/lib/utils/constant.js +19 -2
  836. package/lib/utils/create.js +16 -10
  837. package/lib/utils/deep-assign.js +11 -10
  838. package/lib/utils/deep-clone.js +11 -10
  839. package/lib/utils/dom.js +13 -12
  840. package/lib/utils/format.js +13 -12
  841. package/lib/utils/index.js +18 -17
  842. package/lib/utils/interceptor.d.ts +1 -1
  843. package/lib/utils/interceptor.js +12 -11
  844. package/lib/utils/mount-component.js +13 -12
  845. package/lib/utils/props.js +19 -2
  846. package/lib/utils/validate.js +11 -10
  847. package/lib/utils/with-install.js +11 -10
  848. package/lib/vant.cjs.js +1244 -1656
  849. package/lib/vant.cjs.min.js +1 -1
  850. package/lib/vant.es.js +1244 -1657
  851. package/lib/vant.es.min.js +1244 -1657
  852. package/lib/vant.js +1247 -1658
  853. package/lib/vant.min.js +1 -1
  854. package/package.json +7 -7
  855. package/vetur/attributes.json +155 -95
  856. package/vetur/tags.json +49 -38
  857. package/vetur/web-types.json +450 -265
  858. package/es/action-bar/var.css +0 -0
  859. package/es/action-bar/var.less +0 -4
  860. package/es/action-bar-button/var.css +0 -0
  861. package/es/action-bar-button/var.less +0 -5
  862. package/es/action-bar-icon/var.css +0 -0
  863. package/es/action-bar-icon/var.less +0 -10
  864. package/es/action-sheet/var.css +0 -0
  865. package/es/action-sheet/var.less +0 -23
  866. package/es/address-edit/var.css +0 -0
  867. package/es/address-edit/var.less +0 -6
  868. package/es/address-list/var.css +0 -0
  869. package/es/address-list/var.less +0 -16
  870. package/es/badge/var.css +0 -0
  871. package/es/badge/var.less +0 -12
  872. package/es/button/var.css +0 -0
  873. package/es/button/var.less +0 -36
  874. package/es/calendar/var.css +0 -0
  875. package/es/calendar/var.less +0 -27
  876. package/es/card/var.css +0 -0
  877. package/es/card/var.less +0 -18
  878. package/es/cascader/var.css +0 -0
  879. package/es/cascader/var.less +0 -15
  880. package/es/cell/var.css +0 -0
  881. package/es/cell/var.less +0 -21
  882. package/es/cell-group/var.css +0 -0
  883. package/es/cell-group/var.less +0 -12
  884. package/es/checkbox/var.css +0 -0
  885. package/es/checkbox/var.less +0 -11
  886. package/es/circle/var.css +0 -0
  887. package/es/circle/var.less +0 -9
  888. package/es/collapse-item/var.css +0 -0
  889. package/es/collapse-item/var.less +0 -9
  890. package/es/contact-card/var.css +0 -0
  891. package/es/contact-card/var.less +0 -6
  892. package/es/contact-edit/var.css +0 -0
  893. package/es/contact-edit/var.less +0 -8
  894. package/es/contact-list/var.css +0 -0
  895. package/es/contact-list/var.less +0 -6
  896. package/es/count-down/var.css +0 -0
  897. package/es/count-down/var.less +0 -5
  898. package/es/coupon/var.css +0 -0
  899. package/es/coupon/var.less +0 -19
  900. package/es/coupon-cell/var.css +0 -0
  901. package/es/coupon-cell/var.less +0 -3
  902. package/es/coupon-list/var.css +0 -0
  903. package/es/coupon-list/var.less +0 -10
  904. package/es/datetime-picker/DatePicker.js +0 -250
  905. package/es/datetime-picker/DatetimePicker.d.ts +0 -7
  906. package/es/datetime-picker/DatetimePicker.js +0 -40
  907. package/es/datetime-picker/TimePicker.js +0 -117
  908. package/es/datetime-picker/index.d.ts +0 -12
  909. package/es/datetime-picker/index.js +0 -8
  910. package/es/datetime-picker/types.d.ts +0 -9
  911. package/es/datetime-picker/types.js +0 -0
  912. package/es/datetime-picker/utils.js +0 -63
  913. package/es/dialog/var.css +0 -0
  914. package/es/dialog/var.less +0 -21
  915. package/es/divider/var.css +0 -0
  916. package/es/divider/var.less +0 -10
  917. package/es/dropdown-item/var.css +0 -0
  918. package/es/dropdown-item/var.less +0 -3
  919. package/es/dropdown-menu/var.css +0 -0
  920. package/es/dropdown-menu/var.less +0 -13
  921. package/es/empty/var.css +0 -0
  922. package/es/empty/var.less +0 -10
  923. package/es/field/var.css +0 -0
  924. package/es/field/var.less +0 -21
  925. package/es/grid-item/var.css +0 -0
  926. package/es/grid-item/var.less +0 -8
  927. package/es/image/var.css +0 -0
  928. package/es/image/var.less +0 -9
  929. package/es/image-preview/var.css +0 -0
  930. package/es/image-preview/var.less +0 -11
  931. package/es/index-anchor/var.css +0 -0
  932. package/es/index-anchor/var.less +0 -11
  933. package/es/index-bar/var.css +0 -0
  934. package/es/index-bar/var.less +0 -6
  935. package/es/list/var.css +0 -0
  936. package/es/list/var.less +0 -6
  937. package/es/loading/var.css +0 -0
  938. package/es/loading/var.less +0 -7
  939. package/es/nav-bar/var.css +0 -0
  940. package/es/nav-bar/var.less +0 -10
  941. package/es/notice-bar/var.css +0 -0
  942. package/es/notice-bar/var.less +0 -11
  943. package/es/notify/var.css +0 -0
  944. package/es/notify/var.less +0 -10
  945. package/es/number-keyboard/var.css +0 -0
  946. package/es/number-keyboard/var.less +0 -17
  947. package/es/overlay/var.css +0 -0
  948. package/es/overlay/var.less +0 -4
  949. package/es/pagination/var.css +0 -0
  950. package/es/pagination/var.less +0 -11
  951. package/es/password-input/var.css +0 -0
  952. package/es/password-input/var.less +0 -17
  953. package/es/picker/var.css +0 -0
  954. package/es/picker/var.less +0 -22
  955. package/es/popover/var.css +0 -0
  956. package/es/popover/var.less +0 -15
  957. package/es/popup/var.css +0 -0
  958. package/es/popup/var.less +0 -9
  959. package/es/progress/var.css +0 -0
  960. package/es/progress/var.less +0 -11
  961. package/es/pull-refresh/var.css +0 -0
  962. package/es/pull-refresh/var.less +0 -6
  963. package/es/radio/var.css +0 -0
  964. package/es/radio/var.less +0 -11
  965. package/es/rate/var.css +0 -0
  966. package/es/rate/var.less +0 -7
  967. package/es/search/var.css +0 -0
  968. package/es/search/var.less +0 -13
  969. package/es/share-sheet/var.css +0 -0
  970. package/es/share-sheet/var.less +0 -18
  971. package/es/sidebar/var.css +0 -0
  972. package/es/sidebar/var.less +0 -3
  973. package/es/sidebar-item/var.css +0 -0
  974. package/es/sidebar-item/var.less +0 -15
  975. package/es/skeleton/var.css +0 -0
  976. package/es/skeleton/var.less +0 -9
  977. package/es/slider/var.css +0 -0
  978. package/es/slider/var.less +0 -11
  979. package/es/step/var.css +0 -0
  980. package/es/step/var.less +0 -13
  981. package/es/stepper/var.css +0 -0
  982. package/es/stepper/var.less +0 -15
  983. package/es/steps/var.css +0 -0
  984. package/es/steps/var.less +0 -3
  985. package/es/sticky/var.css +0 -0
  986. package/es/sticky/var.less +0 -3
  987. package/es/style/var.css +0 -0
  988. package/es/style/var.less +0 -74
  989. package/es/submit-bar/var.css +0 -0
  990. package/es/submit-bar/var.less +0 -22
  991. package/es/swipe/var.css +0 -0
  992. package/es/swipe/var.less +0 -8
  993. package/es/switch/var.css +0 -0
  994. package/es/switch/var.less +0 -14
  995. package/es/tabbar/var.css +0 -0
  996. package/es/tabbar/var.less +0 -5
  997. package/es/tabbar-item/var.css +0 -0
  998. package/es/tabbar-item/var.less +0 -9
  999. package/es/tabs/var.css +0 -0
  1000. package/es/tabs/var.less +0 -14
  1001. package/es/tag/var.css +0 -0
  1002. package/es/tag/var.less +0 -18
  1003. package/es/toast/var.css +0 -0
  1004. package/es/toast/var.less +0 -17
  1005. package/es/tree-select/var.css +0 -0
  1006. package/es/tree-select/var.less +0 -10
  1007. package/es/uploader/var.css +0 -0
  1008. package/es/uploader/var.less +0 -27
  1009. package/lib/action-bar/var.css +0 -0
  1010. package/lib/action-bar/var.less +0 -4
  1011. package/lib/action-bar-button/var.css +0 -0
  1012. package/lib/action-bar-button/var.less +0 -5
  1013. package/lib/action-bar-icon/var.css +0 -0
  1014. package/lib/action-bar-icon/var.less +0 -10
  1015. package/lib/action-sheet/var.css +0 -0
  1016. package/lib/action-sheet/var.less +0 -23
  1017. package/lib/address-edit/var.css +0 -0
  1018. package/lib/address-edit/var.less +0 -6
  1019. package/lib/address-list/var.css +0 -0
  1020. package/lib/address-list/var.less +0 -16
  1021. package/lib/badge/var.css +0 -0
  1022. package/lib/badge/var.less +0 -12
  1023. package/lib/button/var.css +0 -0
  1024. package/lib/button/var.less +0 -36
  1025. package/lib/calendar/var.css +0 -0
  1026. package/lib/calendar/var.less +0 -27
  1027. package/lib/card/var.css +0 -0
  1028. package/lib/card/var.less +0 -18
  1029. package/lib/cascader/var.css +0 -0
  1030. package/lib/cascader/var.less +0 -15
  1031. package/lib/cell/var.css +0 -0
  1032. package/lib/cell/var.less +0 -21
  1033. package/lib/cell-group/var.css +0 -0
  1034. package/lib/cell-group/var.less +0 -12
  1035. package/lib/checkbox/var.css +0 -0
  1036. package/lib/checkbox/var.less +0 -11
  1037. package/lib/circle/var.css +0 -0
  1038. package/lib/circle/var.less +0 -9
  1039. package/lib/collapse-item/var.css +0 -0
  1040. package/lib/collapse-item/var.less +0 -9
  1041. package/lib/contact-card/var.css +0 -0
  1042. package/lib/contact-card/var.less +0 -6
  1043. package/lib/contact-edit/var.css +0 -0
  1044. package/lib/contact-edit/var.less +0 -8
  1045. package/lib/contact-list/var.css +0 -0
  1046. package/lib/contact-list/var.less +0 -6
  1047. package/lib/count-down/var.css +0 -0
  1048. package/lib/count-down/var.less +0 -5
  1049. package/lib/coupon/var.css +0 -0
  1050. package/lib/coupon/var.less +0 -19
  1051. package/lib/coupon-cell/var.css +0 -0
  1052. package/lib/coupon-cell/var.less +0 -3
  1053. package/lib/coupon-list/var.css +0 -0
  1054. package/lib/coupon-list/var.less +0 -10
  1055. package/lib/datetime-picker/DatePicker.js +0 -273
  1056. package/lib/datetime-picker/DatetimePicker.d.ts +0 -7
  1057. package/lib/datetime-picker/DatetimePicker.js +0 -63
  1058. package/lib/datetime-picker/TimePicker.js +0 -140
  1059. package/lib/datetime-picker/index.d.ts +0 -12
  1060. package/lib/datetime-picker/index.js +0 -31
  1061. package/lib/datetime-picker/types.d.ts +0 -9
  1062. package/lib/datetime-picker/types.js +0 -3
  1063. package/lib/datetime-picker/utils.js +0 -86
  1064. package/lib/dialog/var.css +0 -0
  1065. package/lib/dialog/var.less +0 -21
  1066. package/lib/divider/var.css +0 -0
  1067. package/lib/divider/var.less +0 -10
  1068. package/lib/dropdown-item/var.css +0 -0
  1069. package/lib/dropdown-item/var.less +0 -3
  1070. package/lib/dropdown-menu/var.css +0 -0
  1071. package/lib/dropdown-menu/var.less +0 -13
  1072. package/lib/empty/var.css +0 -0
  1073. package/lib/empty/var.less +0 -10
  1074. package/lib/field/var.css +0 -0
  1075. package/lib/field/var.less +0 -21
  1076. package/lib/grid-item/var.css +0 -0
  1077. package/lib/grid-item/var.less +0 -8
  1078. package/lib/image/var.css +0 -0
  1079. package/lib/image/var.less +0 -9
  1080. package/lib/image-preview/var.css +0 -0
  1081. package/lib/image-preview/var.less +0 -11
  1082. package/lib/index-anchor/var.css +0 -0
  1083. package/lib/index-anchor/var.less +0 -11
  1084. package/lib/index-bar/var.css +0 -0
  1085. package/lib/index-bar/var.less +0 -6
  1086. package/lib/list/var.css +0 -0
  1087. package/lib/list/var.less +0 -6
  1088. package/lib/loading/var.css +0 -0
  1089. package/lib/loading/var.less +0 -7
  1090. package/lib/nav-bar/var.css +0 -0
  1091. package/lib/nav-bar/var.less +0 -10
  1092. package/lib/notice-bar/var.css +0 -0
  1093. package/lib/notice-bar/var.less +0 -11
  1094. package/lib/notify/var.css +0 -0
  1095. package/lib/notify/var.less +0 -10
  1096. package/lib/number-keyboard/var.css +0 -0
  1097. package/lib/number-keyboard/var.less +0 -17
  1098. package/lib/overlay/var.css +0 -0
  1099. package/lib/overlay/var.less +0 -4
  1100. package/lib/pagination/var.css +0 -0
  1101. package/lib/pagination/var.less +0 -11
  1102. package/lib/password-input/var.css +0 -0
  1103. package/lib/password-input/var.less +0 -17
  1104. package/lib/picker/var.css +0 -0
  1105. package/lib/picker/var.less +0 -22
  1106. package/lib/popover/var.css +0 -0
  1107. package/lib/popover/var.less +0 -15
  1108. package/lib/popup/var.css +0 -0
  1109. package/lib/popup/var.less +0 -9
  1110. package/lib/progress/var.css +0 -0
  1111. package/lib/progress/var.less +0 -11
  1112. package/lib/pull-refresh/var.css +0 -0
  1113. package/lib/pull-refresh/var.less +0 -6
  1114. package/lib/radio/var.css +0 -0
  1115. package/lib/radio/var.less +0 -11
  1116. package/lib/rate/var.css +0 -0
  1117. package/lib/rate/var.less +0 -7
  1118. package/lib/search/var.css +0 -0
  1119. package/lib/search/var.less +0 -13
  1120. package/lib/share-sheet/var.css +0 -0
  1121. package/lib/share-sheet/var.less +0 -18
  1122. package/lib/sidebar/var.css +0 -0
  1123. package/lib/sidebar/var.less +0 -3
  1124. package/lib/sidebar-item/var.css +0 -0
  1125. package/lib/sidebar-item/var.less +0 -15
  1126. package/lib/skeleton/var.css +0 -0
  1127. package/lib/skeleton/var.less +0 -9
  1128. package/lib/slider/var.css +0 -0
  1129. package/lib/slider/var.less +0 -11
  1130. package/lib/step/var.css +0 -0
  1131. package/lib/step/var.less +0 -13
  1132. package/lib/stepper/var.css +0 -0
  1133. package/lib/stepper/var.less +0 -15
  1134. package/lib/steps/var.css +0 -0
  1135. package/lib/steps/var.less +0 -3
  1136. package/lib/sticky/var.css +0 -0
  1137. package/lib/sticky/var.less +0 -3
  1138. package/lib/style/var.css +0 -0
  1139. package/lib/style/var.less +0 -74
  1140. package/lib/submit-bar/var.css +0 -0
  1141. package/lib/submit-bar/var.less +0 -22
  1142. package/lib/swipe/var.css +0 -0
  1143. package/lib/swipe/var.less +0 -8
  1144. package/lib/switch/var.css +0 -0
  1145. package/lib/switch/var.less +0 -14
  1146. package/lib/tabbar/var.css +0 -0
  1147. package/lib/tabbar/var.less +0 -5
  1148. package/lib/tabbar-item/var.css +0 -0
  1149. package/lib/tabbar-item/var.less +0 -9
  1150. package/lib/tabs/var.css +0 -0
  1151. package/lib/tabs/var.less +0 -14
  1152. package/lib/tag/var.css +0 -0
  1153. package/lib/tag/var.less +0 -18
  1154. package/lib/toast/var.css +0 -0
  1155. package/lib/toast/var.less +0 -17
  1156. package/lib/tree-select/var.css +0 -0
  1157. package/lib/tree-select/var.less +0 -10
  1158. package/lib/uploader/var.css +0 -0
  1159. package/lib/uploader/var.less +0 -27
@@ -5,7 +5,7 @@ declare const areaProps: {
5
5
  loading: BooleanConstructor;
6
6
  readonly: BooleanConstructor;
7
7
  allowHtml: BooleanConstructor;
8
- itemHeight: {
8
+ optionHeight: {
9
9
  type: (NumberConstructor | StringConstructor)[];
10
10
  default: number;
11
11
  };
@@ -17,14 +17,14 @@ declare const areaProps: {
17
17
  type: (NumberConstructor | StringConstructor)[];
18
18
  default: number;
19
19
  };
20
- visibleItemCount: {
20
+ visibleOptionNum: {
21
21
  type: (NumberConstructor | StringConstructor)[];
22
22
  default: number;
23
23
  };
24
24
  cancelButtonText: StringConstructor;
25
25
  confirmButtonText: StringConstructor;
26
26
  } & {
27
- value: StringConstructor;
27
+ modelValue: StringConstructor;
28
28
  columnsNum: {
29
29
  type: (NumberConstructor | StringConstructor)[];
30
30
  default: number;
@@ -37,10 +37,6 @@ declare const areaProps: {
37
37
  type: PropType<AreaList>;
38
38
  default: () => {};
39
39
  };
40
- isOverseaCode: {
41
- type: PropType<(code: string) => boolean>;
42
- default: (code: string) => boolean;
43
- };
44
40
  };
45
41
  export declare type AreaProps = ExtractPropTypes<typeof areaProps>;
46
42
  declare const _default: import("vue").DefineComponent<{
@@ -48,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
48
44
  loading: BooleanConstructor;
49
45
  readonly: BooleanConstructor;
50
46
  allowHtml: BooleanConstructor;
51
- itemHeight: {
47
+ optionHeight: {
52
48
  type: (NumberConstructor | StringConstructor)[];
53
49
  default: number;
54
50
  };
@@ -60,14 +56,14 @@ declare const _default: import("vue").DefineComponent<{
60
56
  type: (NumberConstructor | StringConstructor)[];
61
57
  default: number;
62
58
  };
63
- visibleItemCount: {
59
+ visibleOptionNum: {
64
60
  type: (NumberConstructor | StringConstructor)[];
65
61
  default: number;
66
62
  };
67
63
  cancelButtonText: StringConstructor;
68
64
  confirmButtonText: StringConstructor;
69
65
  } & {
70
- value: StringConstructor;
66
+ modelValue: StringConstructor;
71
67
  columnsNum: {
72
68
  type: (NumberConstructor | StringConstructor)[];
73
69
  default: number;
@@ -80,16 +76,12 @@ declare const _default: import("vue").DefineComponent<{
80
76
  type: PropType<AreaList>;
81
77
  default: () => {};
82
78
  };
83
- isOverseaCode: {
84
- type: PropType<(code: string) => boolean>;
85
- default: (code: string) => boolean;
86
- };
87
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "cancel" | "confirm")[], "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
79
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
88
80
  title: StringConstructor;
89
81
  loading: BooleanConstructor;
90
82
  readonly: BooleanConstructor;
91
83
  allowHtml: BooleanConstructor;
92
- itemHeight: {
84
+ optionHeight: {
93
85
  type: (NumberConstructor | StringConstructor)[];
94
86
  default: number;
95
87
  };
@@ -101,14 +93,14 @@ declare const _default: import("vue").DefineComponent<{
101
93
  type: (NumberConstructor | StringConstructor)[];
102
94
  default: number;
103
95
  };
104
- visibleItemCount: {
96
+ visibleOptionNum: {
105
97
  type: (NumberConstructor | StringConstructor)[];
106
98
  default: number;
107
99
  };
108
100
  cancelButtonText: StringConstructor;
109
101
  confirmButtonText: StringConstructor;
110
102
  } & {
111
- value: StringConstructor;
103
+ modelValue: StringConstructor;
112
104
  columnsNum: {
113
105
  type: (NumberConstructor | StringConstructor)[];
114
106
  default: number;
@@ -121,25 +113,21 @@ declare const _default: import("vue").DefineComponent<{
121
113
  type: PropType<AreaList>;
122
114
  default: () => {};
123
115
  };
124
- isOverseaCode: {
125
- type: PropType<(code: string) => boolean>;
126
- default: (code: string) => boolean;
127
- };
128
116
  }>> & {
129
117
  onChange?: ((...args: any[]) => any) | undefined;
118
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
130
119
  onCancel?: ((...args: any[]) => any) | undefined;
131
120
  onConfirm?: ((...args: any[]) => any) | undefined;
132
121
  }, {
133
122
  readonly: boolean;
134
123
  loading: boolean;
135
124
  allowHtml: boolean;
136
- itemHeight: string | number;
125
+ optionHeight: string | number;
137
126
  showToolbar: boolean;
138
127
  swipeDuration: string | number;
139
- visibleItemCount: string | number;
128
+ visibleOptionNum: string | number;
140
129
  columnsNum: string | number;
141
130
  columnsPlaceholder: string[];
142
131
  areaList: AreaList;
143
- isOverseaCode: (code: string) => boolean;
144
132
  }>;
145
133
  export default _default;
package/lib/area/Area.js CHANGED
@@ -1,262 +1,100 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
6
  var __export = (target, all) => {
9
- __markAsModule(target);
10
7
  for (var name2 in all)
11
8
  __defProp(target, name2, { get: all[name2], enumerable: true });
12
9
  };
13
- var __reExport = (target, module2, desc) => {
10
+ var __reExport = (target, module2, copyDefault, desc) => {
14
11
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
12
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
13
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
14
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
15
  }
19
16
  return target;
20
17
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
- };
24
- __export(exports, {
18
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
19
+ return (module2, temp) => {
20
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
21
+ };
22
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
23
+ var stdin_exports = {};
24
+ __export(stdin_exports, {
25
25
  default: () => stdin_default
26
26
  });
27
- var import_vue = __toModule(require("vue"));
28
- var import_vue2 = __toModule(require("vue"));
29
- var import_deep_clone = __toModule(require("../utils/deep-clone"));
30
- var import_utils = __toModule(require("../utils"));
31
- var import_Picker = __toModule(require("../picker/Picker"));
32
- var import_use_expose = __toModule(require("../composables/use-expose"));
33
- var import_picker = __toModule(require("../picker"));
27
+ var import_vue = require("vue");
28
+ var import_vue2 = require("vue");
29
+ var import_utils = require("../utils");
30
+ var import_Picker = require("../picker/Picker");
31
+ var import_utils2 = require("./utils");
32
+ var import_use_expose = require("../composables/use-expose");
33
+ var import_picker = require("../picker");
34
34
  const [name, bem] = (0, import_utils.createNamespace)("area");
35
- const EMPTY_CODE = "000000";
36
- const INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
37
- const INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
38
- const isOverseaCode = (code) => code[0] === "9";
39
35
  const areaProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps, {
40
- value: String,
36
+ modelValue: String,
41
37
  columnsNum: (0, import_utils.makeNumericProp)(3),
42
38
  columnsPlaceholder: (0, import_utils.makeArrayProp)(),
43
39
  areaList: {
44
40
  type: Object,
45
41
  default: () => ({})
46
- },
47
- isOverseaCode: {
48
- type: Function,
49
- default: isOverseaCode
50
42
  }
51
43
  });
52
44
  var stdin_default = (0, import_vue2.defineComponent)({
53
45
  name,
54
46
  props: areaProps,
55
- emits: ["change", "confirm", "cancel"],
47
+ emits: ["change", "confirm", "cancel", "update:modelValue"],
56
48
  setup(props, {
57
49
  emit,
58
50
  slots
59
51
  }) {
60
- const pickerRef = (0, import_vue2.ref)();
61
- const state = (0, import_vue2.reactive)({
62
- code: props.value,
63
- columns: [{
64
- values: []
65
- }, {
66
- values: []
67
- }, {
68
- values: []
69
- }]
70
- });
71
- const areaList = (0, import_vue2.computed)(() => {
72
- const {
73
- areaList: areaList2
74
- } = props;
75
- return {
76
- province: areaList2.province_list || {},
77
- city: areaList2.city_list || {},
78
- county: areaList2.county_list || {}
79
- };
80
- });
81
- const placeholderMap = (0, import_vue2.computed)(() => {
82
- const {
83
- columnsPlaceholder
84
- } = props;
85
- return {
86
- province: columnsPlaceholder[0] || "",
87
- city: columnsPlaceholder[1] || "",
88
- county: columnsPlaceholder[2] || ""
89
- };
90
- });
91
- const getDefaultCode = () => {
92
- if (props.columnsPlaceholder.length) {
93
- return EMPTY_CODE;
94
- }
95
- const {
96
- county,
97
- city
98
- } = areaList.value;
99
- const countyCodes = Object.keys(county);
100
- if (countyCodes[0]) {
101
- return countyCodes[0];
102
- }
103
- const cityCodes = Object.keys(city);
104
- if (cityCodes[0]) {
105
- return cityCodes[0];
106
- }
107
- return "";
108
- };
109
- const getColumnValues = (type, code) => {
110
- let column = [];
111
- if (type !== "province" && !code) {
112
- return column;
113
- }
114
- const list = areaList.value[type];
115
- column = Object.keys(list).map((listCode) => ({
116
- code: listCode,
117
- name: list[listCode]
118
- }));
119
- if (code) {
120
- if (type === "city" && props.isOverseaCode(code)) {
121
- code = "9";
122
- }
123
- column = column.filter((item) => item.code.indexOf(code) === 0);
124
- }
125
- if (placeholderMap.value[type] && column.length) {
126
- let codeFill = "";
127
- if (type === "city") {
128
- codeFill = EMPTY_CODE.slice(2, 4);
129
- } else if (type === "county") {
130
- codeFill = EMPTY_CODE.slice(4, 6);
131
- }
132
- column.unshift({
133
- code: code + codeFill,
134
- name: placeholderMap.value[type]
135
- });
136
- }
137
- return column;
138
- };
139
- const getIndex = (type, code) => {
140
- let compareNum = code.length;
141
- if (type === "province") {
142
- compareNum = props.isOverseaCode(code) ? 1 : 2;
143
- }
144
- if (type === "city") {
145
- compareNum = 4;
146
- }
147
- code = code.slice(0, compareNum);
148
- const list = getColumnValues(type, compareNum > 2 ? code.slice(0, compareNum - 2) : "");
149
- for (let i = 0; i < list.length; i++) {
150
- if (list[i].code.slice(0, compareNum) === code) {
151
- return i;
152
- }
153
- }
154
- return 0;
155
- };
156
- const setValues = () => {
157
- const picker = pickerRef.value;
158
- if (!picker) {
159
- return;
160
- }
161
- let code = state.code || getDefaultCode();
162
- const province = getColumnValues("province");
163
- const city = getColumnValues("city", code.slice(0, 2));
164
- picker.setColumnValues(0, province);
165
- picker.setColumnValues(1, city);
166
- if (city.length && code.slice(2, 4) === "00" && !props.isOverseaCode(code)) {
167
- [{
168
- code
169
- }] = city;
170
- }
171
- picker.setColumnValues(2, getColumnValues("county", code.slice(0, 4)));
172
- picker.setIndexes([getIndex("province", code), getIndex("city", code), getIndex("county", code)]);
173
- };
174
- const parseValues = (values) => values.map((value, index) => {
175
- if (value) {
176
- value = (0, import_deep_clone.deepClone)(value);
177
- if (!value.code || value.name === props.columnsPlaceholder[index]) {
178
- value.code = "";
179
- value.name = "";
180
- }
52
+ const codes = (0, import_vue2.ref)([]);
53
+ const picker = (0, import_vue2.ref)();
54
+ const columns = (0, import_vue2.computed)(() => (0, import_utils2.formatDataForCascade)(props));
55
+ const onChange = (...args) => emit("change", ...args);
56
+ const onCancel = (...args) => emit("cancel", ...args);
57
+ const onConfirm = (...args) => emit("confirm", ...args);
58
+ (0, import_vue2.watch)(codes, (newCodes) => {
59
+ const lastCode = newCodes.length ? newCodes[newCodes.length - 1] : "";
60
+ if (lastCode && lastCode !== props.modelValue) {
61
+ emit("update:modelValue", lastCode);
181
62
  }
182
- return value;
63
+ }, {
64
+ deep: true
183
65
  });
184
- const getValues = () => {
185
- if (pickerRef.value) {
186
- const values = pickerRef.value.getValues().filter(Boolean);
187
- return parseValues(values);
188
- }
189
- return [];
190
- };
191
- const getArea = () => {
192
- const values = getValues();
193
- const area = {
194
- code: "",
195
- country: "",
196
- province: "",
197
- city: "",
198
- county: ""
199
- };
200
- if (!values.length) {
201
- return area;
202
- }
203
- const names = values.map((item) => item.name);
204
- const validValues = values.filter((value) => value.code);
205
- area.code = validValues.length ? validValues[validValues.length - 1].code : "";
206
- if (props.isOverseaCode(area.code)) {
207
- area.country = names[1] || "";
208
- area.province = names[2] || "";
66
+ (0, import_vue2.watch)(() => props.modelValue, (newCode) => {
67
+ if (newCode) {
68
+ const lastCode = codes.value.length ? codes.value[codes.value.length - 1] : "";
69
+ if (newCode !== lastCode) {
70
+ codes.value = [`${newCode.slice(0, 2)}0000`, `${newCode.slice(0, 4)}00`, newCode].slice(0, +props.columnsNum);
71
+ }
209
72
  } else {
210
- area.province = names[0] || "";
211
- area.city = names[1] || "";
212
- area.county = names[2] || "";
73
+ codes.value = [];
213
74
  }
214
- return area;
215
- };
216
- const reset = (newCode = "") => {
217
- state.code = newCode;
218
- setValues();
219
- };
220
- const onChange = (values, index) => {
221
- state.code = values[index].code;
222
- setValues();
223
- if (pickerRef.value) {
224
- const parsedValues = parseValues(pickerRef.value.getValues());
225
- emit("change", parsedValues, index);
226
- }
227
- };
228
- const onConfirm = (values, index) => {
229
- setValues();
230
- emit("confirm", parseValues(values), index);
231
- };
232
- const onCancel = (...args) => emit("cancel", ...args);
233
- (0, import_vue2.onMounted)(setValues);
234
- (0, import_vue2.watch)(() => props.value, (value) => {
235
- state.code = value;
236
- setValues();
75
+ }, {
76
+ immediate: true
237
77
  });
238
- (0, import_vue2.watch)(() => props.areaList, setValues, {
239
- deep: true
240
- });
241
- (0, import_vue2.watch)(() => props.columnsNum, () => (0, import_vue2.nextTick)(setValues));
242
78
  (0, import_use_expose.useExpose)({
243
- reset,
244
- getArea,
245
- getValues
79
+ confirm: () => {
80
+ var _a;
81
+ return (_a = picker.value) == null ? void 0 : _a.confirm();
82
+ },
83
+ getSelectedOptions: () => {
84
+ var _a;
85
+ return ((_a = picker.value) == null ? void 0 : _a.getSelectedOptions()) || [];
86
+ }
246
87
  });
247
- return () => {
248
- const columns = state.columns.slice(0, +props.columnsNum);
249
- return (0, import_vue.createVNode)(import_picker.Picker, (0, import_vue.mergeProps)({
250
- "ref": pickerRef,
251
- "class": bem(),
252
- "columns": columns,
253
- "columnsFieldNames": {
254
- text: "name"
255
- },
256
- "onChange": onChange,
257
- "onCancel": onCancel,
258
- "onConfirm": onConfirm
259
- }, (0, import_utils.pick)(props, INHERIT_PROPS)), (0, import_utils.pick)(slots, INHERIT_SLOTS));
260
- };
88
+ return () => (0, import_vue.createVNode)(import_picker.Picker, (0, import_vue.mergeProps)({
89
+ "ref": picker,
90
+ "modelValue": codes.value,
91
+ "onUpdate:modelValue": ($event) => codes.value = $event,
92
+ "class": bem(),
93
+ "columns": columns.value,
94
+ "onChange": onChange,
95
+ "onCancel": onCancel,
96
+ "onConfirm": onConfirm
97
+ }, (0, import_utils.pick)(props, import_utils2.INHERIT_PROPS)), (0, import_utils.pick)(slots, import_utils2.INHERIT_SLOTS));
261
98
  }
262
99
  });
100
+ module.exports = __toCommonJS(stdin_exports);
@@ -3,7 +3,7 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
3
3
  loading: BooleanConstructor;
4
4
  readonly: BooleanConstructor;
5
5
  allowHtml: BooleanConstructor;
6
- itemHeight: {
6
+ optionHeight: {
7
7
  type: (NumberConstructor | StringConstructor)[];
8
8
  default: number;
9
9
  };
@@ -15,14 +15,14 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
15
15
  type: (NumberConstructor | StringConstructor)[];
16
16
  default: number;
17
17
  };
18
- visibleItemCount: {
18
+ visibleOptionNum: {
19
19
  type: (NumberConstructor | StringConstructor)[];
20
20
  default: number;
21
21
  };
22
22
  cancelButtonText: StringConstructor;
23
23
  confirmButtonText: StringConstructor;
24
24
  } & {
25
- value: StringConstructor;
25
+ modelValue: StringConstructor;
26
26
  columnsNum: {
27
27
  type: (NumberConstructor | StringConstructor)[];
28
28
  default: number;
@@ -35,16 +35,12 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
35
35
  type: import("vue").PropType<import("./types").AreaList>;
36
36
  default: () => {};
37
37
  };
38
- isOverseaCode: {
39
- type: import("vue").PropType<(code: string) => boolean>;
40
- default: (code: string) => boolean;
41
- };
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "cancel" | "confirm")[], "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
39
  title: StringConstructor;
44
40
  loading: BooleanConstructor;
45
41
  readonly: BooleanConstructor;
46
42
  allowHtml: BooleanConstructor;
47
- itemHeight: {
43
+ optionHeight: {
48
44
  type: (NumberConstructor | StringConstructor)[];
49
45
  default: number;
50
46
  };
@@ -56,14 +52,14 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
56
52
  type: (NumberConstructor | StringConstructor)[];
57
53
  default: number;
58
54
  };
59
- visibleItemCount: {
55
+ visibleOptionNum: {
60
56
  type: (NumberConstructor | StringConstructor)[];
61
57
  default: number;
62
58
  };
63
59
  cancelButtonText: StringConstructor;
64
60
  confirmButtonText: StringConstructor;
65
61
  } & {
66
- value: StringConstructor;
62
+ modelValue: StringConstructor;
67
63
  columnsNum: {
68
64
  type: (NumberConstructor | StringConstructor)[];
69
65
  default: number;
@@ -76,30 +72,26 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
76
72
  type: import("vue").PropType<import("./types").AreaList>;
77
73
  default: () => {};
78
74
  };
79
- isOverseaCode: {
80
- type: import("vue").PropType<(code: string) => boolean>;
81
- default: (code: string) => boolean;
82
- };
83
75
  }>> & {
84
76
  onChange?: ((...args: any[]) => any) | undefined;
77
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
85
78
  onCancel?: ((...args: any[]) => any) | undefined;
86
79
  onConfirm?: ((...args: any[]) => any) | undefined;
87
80
  }, {
88
81
  readonly: boolean;
89
82
  loading: boolean;
90
83
  allowHtml: boolean;
91
- itemHeight: string | number;
84
+ optionHeight: string | number;
92
85
  showToolbar: boolean;
93
86
  swipeDuration: string | number;
94
- visibleItemCount: string | number;
87
+ visibleOptionNum: string | number;
95
88
  columnsNum: string | number;
96
89
  columnsPlaceholder: string[];
97
90
  areaList: import("./types").AreaList;
98
- isOverseaCode: (code: string) => boolean;
99
91
  }>>;
100
92
  export default Area;
101
93
  export type { AreaProps } from './Area';
102
- export type { AreaList, AreaInstance, AreaColumnOption } from './types';
94
+ export type { AreaList, AreaInstance } from './types';
103
95
  declare module 'vue' {
104
96
  interface GlobalComponents {
105
97
  VanArea: typeof Area;
package/lib/area/index.js CHANGED
@@ -6,26 +6,32 @@ var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
8
  var __export = (target, all) => {
9
- __markAsModule(target);
10
9
  for (var name in all)
11
10
  __defProp(target, name, { get: all[name], enumerable: true });
12
11
  };
13
- var __reExport = (target, module2, desc) => {
12
+ var __reExport = (target, module2, copyDefault, desc) => {
14
13
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
14
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
16
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
17
  }
19
18
  return target;
20
19
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
22
  };
24
- __export(exports, {
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var stdin_exports = {};
29
+ __export(stdin_exports, {
25
30
  Area: () => Area,
26
31
  default: () => stdin_default
27
32
  });
28
- var import_utils = __toModule(require("../utils"));
29
- var import_Area = __toModule(require("./Area"));
33
+ var import_utils = require("../utils");
34
+ var import_Area = __toESM(require("./Area"));
30
35
  const Area = (0, import_utils.withInstall)(import_Area.default);
31
36
  var stdin_default = Area;
37
+ module.exports = __toCommonJS(stdin_exports);
@@ -1,24 +1,9 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
+ import { PickerExpose } from '../picker/types';
2
3
  import type { AreaProps } from './Area';
3
4
  export declare type AreaList = {
4
5
  city_list: Record<string, string>;
5
6
  county_list: Record<string, string>;
6
7
  province_list: Record<string, string>;
7
8
  };
8
- export declare type AreaColumnOption = {
9
- name: string;
10
- code: string;
11
- };
12
- export declare type AreaColumnType = 'province' | 'county' | 'city';
13
- export declare type AreaExpose = {
14
- reset: (newCode?: string) => void;
15
- getArea: () => {
16
- code: string;
17
- country: string;
18
- province: string;
19
- city: string;
20
- county: string;
21
- };
22
- getValues: () => AreaColumnOption[];
23
- };
24
- export declare type AreaInstance = ComponentPublicInstance<AreaProps, AreaExpose>;
9
+ export declare type AreaInstance = ComponentPublicInstance<AreaProps, PickerExpose>;
package/lib/area/types.js CHANGED
@@ -1,3 +1,20 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2
5
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
3
- __markAsModule(exports);
6
+ var __reExport = (target, module2, copyDefault, desc) => {
7
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
8
+ for (let key of __getOwnPropNames(module2))
9
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
10
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ }
12
+ return target;
13
+ };
14
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
15
+ return (module2, temp) => {
16
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
17
+ };
18
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var stdin_exports = {};
20
+ module.exports = __toCommonJS(stdin_exports);
@@ -0,0 +1,6 @@
1
+ import type { AreaProps } from '.';
2
+ import type { PickerOption } from '../picker';
3
+ export declare const AREA_EMPTY_CODE = "000000";
4
+ export declare const INHERIT_SLOTS: readonly ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
5
+ export declare const INHERIT_PROPS: readonly ["title", "loading", "readonly", "optionHeight", "swipeDuration", "visibleOptionNum", "cancelButtonText", "confirmButtonText"];
6
+ export declare function formatDataForCascade({ areaList, columnsNum, columnsPlaceholder: placeholder, }: AreaProps): PickerOption[];