vant 3.2.5 → 3.2.6

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 (375) hide show
  1. package/es/action-bar/index.css +1 -1
  2. package/es/action-bar/index.less +1 -1
  3. package/es/action-bar-icon/ActionBarIcon.js +2 -2
  4. package/es/action-bar-icon/index.css +1 -1
  5. package/es/action-bar-icon/index.less +1 -1
  6. package/es/action-sheet/ActionSheet.d.ts +15 -9
  7. package/es/action-sheet/ActionSheet.js +7 -15
  8. package/es/action-sheet/index.css +1 -1
  9. package/es/action-sheet/index.d.ts +10 -3
  10. package/es/action-sheet/index.less +2 -2
  11. package/es/address-edit/AddressEdit.d.ts +1 -2
  12. package/es/address-edit/AddressEdit.js +3 -8
  13. package/es/address-edit/AddressEditDetail.js +5 -6
  14. package/es/address-edit/index.css +1 -1
  15. package/es/address-edit/index.d.ts +1 -2
  16. package/es/address-edit/index.less +2 -2
  17. package/es/address-edit/style/index.js +0 -3
  18. package/es/address-edit/style/less.js +0 -3
  19. package/es/address-list/AddressList.js +2 -6
  20. package/es/badge/index.css +1 -1
  21. package/es/badge/index.less +4 -2
  22. package/es/calendar/Calendar.js +11 -8
  23. package/es/calendar/index.css +1 -1
  24. package/es/calendar/index.less +3 -3
  25. package/es/card/index.css +1 -1
  26. package/es/card/index.less +1 -1
  27. package/es/cascader/Cascader.d.ts +25 -14
  28. package/es/cascader/Cascader.js +49 -46
  29. package/es/cascader/index.d.ts +8 -6
  30. package/es/cascader/types.d.ts +18 -0
  31. package/es/cascader/types.js +1 -0
  32. package/es/cell/index.css +1 -1
  33. package/es/cell/index.less +1 -1
  34. package/es/cell-group/index.css +1 -1
  35. package/es/cell-group/index.less +1 -1
  36. package/es/checkbox/Checker.js +1 -8
  37. package/es/checkbox/index.d.ts +1 -1
  38. package/es/checkbox/types.d.ts +3 -0
  39. package/es/checkbox-group/index.d.ts +1 -1
  40. package/es/checkbox-group/types.d.ts +2 -1
  41. package/es/collapse-item/index.css +1 -1
  42. package/es/collapse-item/index.less +1 -1
  43. package/es/contact-edit/ContactEdit.js +1 -4
  44. package/es/contact-edit/style/index.js +0 -5
  45. package/es/contact-edit/style/less.js +0 -5
  46. package/es/coupon/index.css +1 -1
  47. package/es/coupon/index.less +1 -1
  48. package/es/coupon-list/CouponList.js +1 -1
  49. package/es/coupon-list/index.css +1 -1
  50. package/es/coupon-list/index.less +1 -1
  51. package/es/dialog/Dialog.js +5 -10
  52. package/es/dialog/function-call.d.ts +2 -2
  53. package/es/dialog/function-call.js +2 -2
  54. package/es/dialog/index.css +1 -1
  55. package/es/dialog/index.less +1 -1
  56. package/es/dropdown-item/DropdownItem.js +1 -1
  57. package/es/dropdown-menu/index.css +1 -1
  58. package/es/dropdown-menu/index.less +1 -1
  59. package/es/empty/Network.js +8 -27
  60. package/es/grid-item/GridItem.js +2 -2
  61. package/es/grid-item/index.css +1 -1
  62. package/es/grid-item/index.less +1 -1
  63. package/es/image/Image.js +7 -20
  64. package/es/image/index.css +1 -1
  65. package/es/image/index.less +1 -1
  66. package/es/image-preview/ImagePreview.js +5 -6
  67. package/es/image-preview/function-call.js +2 -2
  68. package/es/image-preview/index.css +1 -1
  69. package/es/image-preview/index.less +1 -1
  70. package/es/index-anchor/index.css +1 -1
  71. package/es/index-anchor/index.less +2 -2
  72. package/es/index-bar/IndexBar.js +1 -12
  73. package/es/index.d.ts +1 -1
  74. package/es/index.js +1 -1
  75. package/es/locale/lang/de-DE-formal.d.ts +0 -1
  76. package/es/locale/lang/de-DE-formal.js +0 -1
  77. package/es/locale/lang/de-DE.d.ts +0 -1
  78. package/es/locale/lang/de-DE.js +0 -1
  79. package/es/locale/lang/en-US.d.ts +0 -1
  80. package/es/locale/lang/en-US.js +0 -1
  81. package/es/locale/lang/es-ES.d.ts +0 -1
  82. package/es/locale/lang/es-ES.js +0 -1
  83. package/es/locale/lang/fr-FR.d.ts +0 -1
  84. package/es/locale/lang/fr-FR.js +0 -1
  85. package/es/locale/lang/ja-JP.d.ts +0 -1
  86. package/es/locale/lang/ja-JP.js +0 -1
  87. package/es/locale/lang/nb-NO.d.ts +0 -1
  88. package/es/locale/lang/nb-NO.js +0 -1
  89. package/es/locale/lang/ro-RO.d.ts +0 -1
  90. package/es/locale/lang/ro-RO.js +0 -1
  91. package/es/locale/lang/ru-RU.d.ts +0 -1
  92. package/es/locale/lang/ru-RU.js +0 -1
  93. package/es/locale/lang/th-TH.d.ts +0 -1
  94. package/es/locale/lang/th-TH.js +0 -1
  95. package/es/locale/lang/tr-TR.d.ts +0 -1
  96. package/es/locale/lang/tr-TR.js +0 -1
  97. package/es/locale/lang/zh-CN.d.ts +0 -1
  98. package/es/locale/lang/zh-CN.js +0 -1
  99. package/es/locale/lang/zh-HK.d.ts +0 -1
  100. package/es/locale/lang/zh-HK.js +0 -1
  101. package/es/locale/lang/zh-TW.d.ts +0 -1
  102. package/es/locale/lang/zh-TW.js +0 -1
  103. package/es/nav-bar/index.css +1 -1
  104. package/es/nav-bar/index.less +1 -1
  105. package/es/notice-bar/NoticeBar.d.ts +1 -1
  106. package/es/notice-bar/index.css +1 -1
  107. package/es/notice-bar/index.d.ts +1 -1
  108. package/es/notice-bar/index.less +1 -1
  109. package/es/notify/Notify.d.ts +4 -2
  110. package/es/notify/Notify.js +6 -1
  111. package/es/notify/function-call.d.ts +4 -2
  112. package/es/notify/function-call.js +1 -1
  113. package/es/notify/index.css +1 -1
  114. package/es/notify/index.less +4 -4
  115. package/es/number-keyboard/index.css +1 -1
  116. package/es/number-keyboard/index.less +3 -3
  117. package/es/overlay/Overlay.js +2 -2
  118. package/es/overlay/index.css +1 -1
  119. package/es/overlay/index.less +1 -1
  120. package/es/pagination/index.css +1 -1
  121. package/es/pagination/index.less +1 -1
  122. package/es/password-input/index.css +1 -1
  123. package/es/password-input/index.less +3 -3
  124. package/es/picker/index.css +1 -1
  125. package/es/picker/index.less +2 -2
  126. package/es/popover/Popover.js +3 -4
  127. package/es/popover/index.css +1 -1
  128. package/es/popover/index.less +2 -2
  129. package/es/popup/Popup.js +2 -4
  130. package/es/popup/index.css +1 -1
  131. package/es/popup/index.less +1 -1
  132. package/es/progress/Progress.js +7 -3
  133. package/es/progress/index.css +1 -1
  134. package/es/progress/index.less +10 -1
  135. package/es/progress/var.less +1 -0
  136. package/es/pull-refresh/PullRefresh.js +2 -2
  137. package/es/radio/Radio.d.ts +9 -6
  138. package/es/radio/index.d.ts +2 -0
  139. package/es/radio-group/RadioGroup.d.ts +1 -0
  140. package/es/radio-group/index.d.ts +2 -0
  141. package/es/search/Search.js +3 -4
  142. package/es/search/index.css +1 -1
  143. package/es/search/index.less +2 -2
  144. package/es/share-sheet/ShareSheet.d.ts +7 -0
  145. package/es/share-sheet/ShareSheet.js +5 -6
  146. package/es/share-sheet/index.d.ts +7 -0
  147. package/es/sidebar-item/index.css +1 -1
  148. package/es/sidebar-item/index.less +1 -1
  149. package/es/skeleton/index.css +1 -1
  150. package/es/skeleton/index.less +2 -2
  151. package/es/slider/index.css +1 -1
  152. package/es/slider/index.less +3 -3
  153. package/es/stepper/Stepper.d.ts +1 -1
  154. package/es/stepper/Stepper.js +1 -2
  155. package/es/stepper/index.css +1 -1
  156. package/es/stepper/index.d.ts +1 -1
  157. package/es/stepper/index.less +3 -3
  158. package/es/steps/index.d.ts +6 -4
  159. package/es/submit-bar/index.css +1 -1
  160. package/es/submit-bar/index.less +2 -2
  161. package/es/swipe-cell/SwipeCell.js +1 -2
  162. package/es/switch/index.css +1 -1
  163. package/es/switch/index.less +3 -3
  164. package/es/tabbar/Tabbar.js +1 -2
  165. package/es/tabbar/index.css +1 -1
  166. package/es/tabbar/index.less +1 -1
  167. package/es/tabbar-item/TabbarItem.js +2 -2
  168. package/es/tabs/Tabs.js +2 -5
  169. package/es/tabs/index.css +1 -1
  170. package/es/tabs/index.less +2 -2
  171. package/es/tag/index.css +1 -1
  172. package/es/tag/index.less +6 -6
  173. package/es/toast/Toast.js +5 -11
  174. package/es/toast/index.css +1 -1
  175. package/es/toast/index.less +1 -1
  176. package/es/tree-select/index.css +1 -1
  177. package/es/tree-select/index.less +2 -2
  178. package/es/uploader/UploaderPreviewItem.js +3 -4
  179. package/es/uploader/index.css +1 -1
  180. package/es/uploader/index.less +4 -4
  181. package/es/utils/interceptor.d.ts +1 -2
  182. package/es/utils/interceptor.js +6 -9
  183. package/lib/action-bar/index.css +1 -1
  184. package/lib/action-bar/index.less +1 -1
  185. package/lib/action-bar-icon/ActionBarIcon.js +1 -1
  186. package/lib/action-bar-icon/index.css +1 -1
  187. package/lib/action-bar-icon/index.less +1 -1
  188. package/lib/action-sheet/ActionSheet.d.ts +15 -9
  189. package/lib/action-sheet/ActionSheet.js +6 -14
  190. package/lib/action-sheet/index.css +1 -1
  191. package/lib/action-sheet/index.d.ts +10 -3
  192. package/lib/action-sheet/index.less +2 -2
  193. package/lib/address-edit/AddressEdit.d.ts +1 -2
  194. package/lib/address-edit/AddressEdit.js +3 -9
  195. package/lib/address-edit/AddressEditDetail.js +4 -5
  196. package/lib/address-edit/index.css +1 -1
  197. package/lib/address-edit/index.d.ts +1 -2
  198. package/lib/address-edit/index.less +2 -2
  199. package/lib/address-edit/style/index.js +0 -6
  200. package/lib/address-edit/style/less.js +0 -6
  201. package/lib/address-list/AddressList.js +2 -6
  202. package/lib/badge/index.css +1 -1
  203. package/lib/badge/index.less +4 -2
  204. package/lib/calendar/Calendar.js +11 -8
  205. package/lib/calendar/index.css +1 -1
  206. package/lib/calendar/index.less +3 -3
  207. package/lib/card/index.css +1 -1
  208. package/lib/card/index.less +1 -1
  209. package/lib/cascader/Cascader.d.ts +25 -14
  210. package/lib/cascader/Cascader.js +48 -45
  211. package/lib/cascader/index.d.ts +8 -6
  212. package/lib/cascader/types.d.ts +18 -0
  213. package/lib/cascader/types.js +3 -0
  214. package/lib/cell/index.css +1 -1
  215. package/lib/cell/index.less +1 -1
  216. package/lib/cell-group/index.css +1 -1
  217. package/lib/cell-group/index.less +1 -1
  218. package/lib/checkbox/Checker.js +1 -8
  219. package/lib/checkbox/index.d.ts +1 -1
  220. package/lib/checkbox/types.d.ts +3 -0
  221. package/lib/checkbox-group/index.d.ts +1 -1
  222. package/lib/checkbox-group/types.d.ts +2 -1
  223. package/lib/collapse-item/index.css +1 -1
  224. package/lib/collapse-item/index.less +1 -1
  225. package/lib/contact-edit/ContactEdit.js +1 -5
  226. package/lib/contact-edit/style/index.js +0 -10
  227. package/lib/contact-edit/style/less.js +0 -10
  228. package/lib/coupon/index.css +1 -1
  229. package/lib/coupon/index.less +1 -1
  230. package/lib/coupon-list/CouponList.js +1 -1
  231. package/lib/coupon-list/index.css +1 -1
  232. package/lib/coupon-list/index.less +1 -1
  233. package/lib/dialog/Dialog.js +5 -10
  234. package/lib/dialog/function-call.d.ts +2 -2
  235. package/lib/dialog/function-call.js +2 -2
  236. package/lib/dialog/index.css +1 -1
  237. package/lib/dialog/index.less +1 -1
  238. package/lib/dropdown-item/DropdownItem.js +1 -1
  239. package/lib/dropdown-menu/index.css +1 -1
  240. package/lib/dropdown-menu/index.less +1 -1
  241. package/lib/empty/Network.js +8 -27
  242. package/lib/grid-item/GridItem.js +1 -1
  243. package/lib/grid-item/index.css +1 -1
  244. package/lib/grid-item/index.less +1 -1
  245. package/lib/image/Image.js +7 -20
  246. package/lib/image/index.css +1 -1
  247. package/lib/image/index.less +1 -1
  248. package/lib/image-preview/ImagePreview.js +5 -6
  249. package/lib/image-preview/function-call.js +2 -2
  250. package/lib/image-preview/index.css +1 -1
  251. package/lib/image-preview/index.less +1 -1
  252. package/lib/index-anchor/index.css +1 -1
  253. package/lib/index-anchor/index.less +2 -2
  254. package/lib/index-bar/IndexBar.js +1 -12
  255. package/lib/index.css +1 -1
  256. package/lib/index.d.ts +1 -1
  257. package/lib/index.js +1 -1
  258. package/lib/index.less +1 -1
  259. package/lib/locale/lang/de-DE-formal.d.ts +0 -1
  260. package/lib/locale/lang/de-DE-formal.js +0 -1
  261. package/lib/locale/lang/de-DE.d.ts +0 -1
  262. package/lib/locale/lang/de-DE.js +0 -1
  263. package/lib/locale/lang/en-US.d.ts +0 -1
  264. package/lib/locale/lang/en-US.js +0 -1
  265. package/lib/locale/lang/es-ES.d.ts +0 -1
  266. package/lib/locale/lang/es-ES.js +0 -1
  267. package/lib/locale/lang/fr-FR.d.ts +0 -1
  268. package/lib/locale/lang/fr-FR.js +0 -1
  269. package/lib/locale/lang/ja-JP.d.ts +0 -1
  270. package/lib/locale/lang/ja-JP.js +0 -1
  271. package/lib/locale/lang/nb-NO.d.ts +0 -1
  272. package/lib/locale/lang/nb-NO.js +0 -1
  273. package/lib/locale/lang/ro-RO.d.ts +0 -1
  274. package/lib/locale/lang/ro-RO.js +0 -1
  275. package/lib/locale/lang/ru-RU.d.ts +0 -1
  276. package/lib/locale/lang/ru-RU.js +0 -1
  277. package/lib/locale/lang/th-TH.d.ts +0 -1
  278. package/lib/locale/lang/th-TH.js +0 -1
  279. package/lib/locale/lang/tr-TR.d.ts +0 -1
  280. package/lib/locale/lang/tr-TR.js +0 -1
  281. package/lib/locale/lang/zh-CN.d.ts +0 -1
  282. package/lib/locale/lang/zh-CN.js +0 -1
  283. package/lib/locale/lang/zh-HK.d.ts +0 -1
  284. package/lib/locale/lang/zh-HK.js +0 -1
  285. package/lib/locale/lang/zh-TW.d.ts +0 -1
  286. package/lib/locale/lang/zh-TW.js +0 -1
  287. package/lib/nav-bar/index.css +1 -1
  288. package/lib/nav-bar/index.less +1 -1
  289. package/lib/notice-bar/NoticeBar.d.ts +1 -1
  290. package/lib/notice-bar/index.css +1 -1
  291. package/lib/notice-bar/index.d.ts +1 -1
  292. package/lib/notice-bar/index.less +1 -1
  293. package/lib/notify/Notify.d.ts +4 -2
  294. package/lib/notify/Notify.js +6 -1
  295. package/lib/notify/function-call.d.ts +4 -2
  296. package/lib/notify/function-call.js +1 -1
  297. package/lib/notify/index.css +1 -1
  298. package/lib/notify/index.less +4 -4
  299. package/lib/number-keyboard/index.css +1 -1
  300. package/lib/number-keyboard/index.less +3 -3
  301. package/lib/overlay/Overlay.js +1 -1
  302. package/lib/overlay/index.css +1 -1
  303. package/lib/overlay/index.less +1 -1
  304. package/lib/pagination/index.css +1 -1
  305. package/lib/pagination/index.less +1 -1
  306. package/lib/password-input/index.css +1 -1
  307. package/lib/password-input/index.less +3 -3
  308. package/lib/picker/index.css +1 -1
  309. package/lib/picker/index.less +2 -2
  310. package/lib/popover/Popover.js +3 -4
  311. package/lib/popover/index.css +1 -1
  312. package/lib/popover/index.less +2 -2
  313. package/lib/popup/Popup.js +2 -4
  314. package/lib/popup/index.css +1 -1
  315. package/lib/popup/index.less +1 -1
  316. package/lib/progress/Progress.js +7 -3
  317. package/lib/progress/index.css +1 -1
  318. package/lib/progress/index.less +10 -1
  319. package/lib/progress/var.less +1 -0
  320. package/lib/pull-refresh/PullRefresh.js +1 -1
  321. package/lib/radio/Radio.d.ts +9 -6
  322. package/lib/radio/index.d.ts +2 -0
  323. package/lib/radio-group/RadioGroup.d.ts +1 -0
  324. package/lib/radio-group/index.d.ts +2 -0
  325. package/lib/search/Search.js +3 -4
  326. package/lib/search/index.css +1 -1
  327. package/lib/search/index.less +2 -2
  328. package/lib/share-sheet/ShareSheet.d.ts +7 -0
  329. package/lib/share-sheet/ShareSheet.js +5 -6
  330. package/lib/share-sheet/index.d.ts +7 -0
  331. package/lib/sidebar-item/index.css +1 -1
  332. package/lib/sidebar-item/index.less +1 -1
  333. package/lib/skeleton/index.css +1 -1
  334. package/lib/skeleton/index.less +2 -2
  335. package/lib/slider/index.css +1 -1
  336. package/lib/slider/index.less +3 -3
  337. package/lib/stepper/Stepper.d.ts +1 -1
  338. package/lib/stepper/Stepper.js +1 -2
  339. package/lib/stepper/index.css +1 -1
  340. package/lib/stepper/index.d.ts +1 -1
  341. package/lib/stepper/index.less +3 -3
  342. package/lib/steps/index.d.ts +6 -4
  343. package/lib/submit-bar/index.css +1 -1
  344. package/lib/submit-bar/index.less +2 -2
  345. package/lib/swipe-cell/SwipeCell.js +1 -2
  346. package/lib/switch/index.css +1 -1
  347. package/lib/switch/index.less +3 -3
  348. package/lib/tabbar/Tabbar.js +1 -2
  349. package/lib/tabbar/index.css +1 -1
  350. package/lib/tabbar/index.less +1 -1
  351. package/lib/tabbar-item/TabbarItem.js +1 -1
  352. package/lib/tabs/Tabs.js +2 -5
  353. package/lib/tabs/index.css +1 -1
  354. package/lib/tabs/index.less +2 -2
  355. package/lib/tag/index.css +1 -1
  356. package/lib/tag/index.less +6 -6
  357. package/lib/toast/Toast.js +4 -10
  358. package/lib/toast/index.css +1 -1
  359. package/lib/toast/index.less +1 -1
  360. package/lib/tree-select/index.css +1 -1
  361. package/lib/tree-select/index.less +2 -2
  362. package/lib/uploader/UploaderPreviewItem.js +2 -3
  363. package/lib/uploader/index.css +1 -1
  364. package/lib/uploader/index.less +4 -4
  365. package/lib/utils/interceptor.d.ts +1 -2
  366. package/lib/utils/interceptor.js +6 -9
  367. package/lib/vant.es.js +758 -831
  368. package/lib/vant.es.min.js +758 -831
  369. package/lib/vant.js +758 -831
  370. package/lib/vant.min.js +1 -1
  371. package/package.json +1 -1
  372. package/vetur/attributes.json +60 -56
  373. package/vetur/tags.json +18 -17
  374. package/vetur/web-types.json +198 -184
  375. package/changelog.generated.md +0 -148
@@ -24,7 +24,7 @@
24
24
  font-family: var(--van-badge-font-family);
25
25
  line-height: 1.2;
26
26
  text-align: center;
27
- background-color: var(--van-badge-background-color);
27
+ background: var(--van-badge-background-color);
28
28
  border: var(--van-badge-border-width) solid var(--van-white);
29
29
  border-radius: var(--van-border-radius-max);
30
30
 
@@ -40,8 +40,10 @@
40
40
  width: var(--van-badge-dot-size);
41
41
  min-width: 0;
42
42
  height: var(--van-badge-dot-size);
43
- background-color: var(--van-badge-dot-color);
43
+ background: var(--van-badge-dot-color);
44
44
  border-radius: 100%;
45
+ border: none;
46
+ padding: 0;
45
47
  }
46
48
 
47
49
  &__wrapper {
@@ -417,18 +417,22 @@ var _default = (0, _vue.defineComponent)({
417
417
  }
418
418
 
419
419
  if (props.showConfirm) {
420
- var text = buttonDisabled.value ? props.confirmDisabledText : props.confirmText;
420
+ var slot = slots['confirm-text'];
421
+ var disabled = buttonDisabled.value;
422
+ var text = disabled ? props.confirmDisabledText : props.confirmText;
421
423
  return (0, _vue.createVNode)(_button.Button, {
422
424
  "round": true,
423
425
  "block": true,
424
426
  "type": "danger",
425
427
  "color": props.color,
426
428
  "class": (0, _utils2.bem)('confirm'),
427
- "disabled": buttonDisabled.value,
429
+ "disabled": disabled,
428
430
  "nativeType": "button",
429
431
  "onClick": onConfirm
430
432
  }, {
431
- default: () => [text || (0, _utils2.t)('confirm')]
433
+ default: () => [slot ? slot({
434
+ disabled
435
+ }) : text || (0, _utils2.t)('confirm')]
432
436
  });
433
437
  }
434
438
  };
@@ -467,7 +471,7 @@ var _default = (0, _vue.defineComponent)({
467
471
  (0, _use.onMountedOrActivated)(init);
468
472
  return () => {
469
473
  if (props.poppable) {
470
- return (0, _vue.createVNode)(_popup.Popup, (0, _vue.mergeProps)({
474
+ return (0, _vue.createVNode)(_popup.Popup, {
471
475
  "show": props.show,
472
476
  "class": (0, _utils2.bem)('popup'),
473
477
  "round": props.round,
@@ -475,11 +479,10 @@ var _default = (0, _vue.defineComponent)({
475
479
  "closeable": props.showTitle || props.showSubtitle,
476
480
  "teleport": props.teleport,
477
481
  "closeOnPopstate": props.closeOnPopstate,
478
- "closeOnClickOverlay": props.closeOnClickOverlay
482
+ "closeOnClickOverlay": props.closeOnClickOverlay,
483
+ "onUpdate:show": updateShow
479
484
  }, {
480
- 'onUpdate:show': updateShow
481
- }), {
482
- default: () => [renderCalendar()]
485
+ default: renderCalendar
483
486
  });
484
487
  }
485
488
 
@@ -1 +1 @@
1
- :root{--van-calendar-background-color:var(--van-white);--van-calendar-popup-height:80%;--van-calendar-header-box-shadow:0 2px 10px rgba(125, 126, 128, 0.16);--van-calendar-header-title-height:44px;--van-calendar-header-title-font-size:var(--van-font-size-lg);--van-calendar-header-subtitle-font-size:var(--van-font-size-md);--van-calendar-weekdays-height:30px;--van-calendar-weekdays-font-size:var(--van-font-size-sm);--van-calendar-month-title-font-size:var(--van-font-size-md);--van-calendar-month-mark-color:rgba(242, 243, 245, 0.8);--van-calendar-month-mark-font-size:160px;--van-calendar-day-height:64px;--van-calendar-day-font-size:var(--van-font-size-lg);--van-calendar-range-edge-color:var(--van-white);--van-calendar-range-edge-background-color:var(--van-danger-color);--van-calendar-range-middle-color:var(--van-danger-color);--van-calendar-range-middle-background-opacity:0.1;--van-calendar-selected-day-size:54px;--van-calendar-selected-day-color:var(--van-white);--van-calendar-info-font-size:var(--van-font-size-xs);--van-calendar-info-line-height:var(--van-line-height-xs);--van-calendar-selected-day-background-color:var(--van-danger-color);--van-calendar-day-disabled-color:var(--van-gray-5);--van-calendar-confirm-button-height:36px;--van-calendar-confirm-button-margin:7px 0}.van-calendar{display:flex;flex-direction:column;height:100%;background-color:var(--van-calendar-background-color)}.van-calendar__popup.van-popup--bottom,.van-calendar__popup.van-popup--top{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-box-shadow)}.van-calendar__header-subtitle,.van-calendar__header-title,.van-calendar__month-title{height:var(--van-calendar-header-title-height);font-weight:var(--van-font-weight-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);cursor:pointer}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:var(--van-calendar-range-edge-color);background-color:var(--van-calendar-range-edge-background-color)}.van-calendar__day--start{border-radius:var(--van-border-radius-md) 0 0 var(--van-border-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-border-radius-md) var(--van-border-radius-md) 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:var(--van-border-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle::after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:''}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background-color:var(--van-calendar-selected-day-background-color);border-radius:var(--van-border-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
1
+ :root{--van-calendar-background-color:var(--van-white);--van-calendar-popup-height:80%;--van-calendar-header-box-shadow:0 2px 10px rgba(125, 126, 128, 0.16);--van-calendar-header-title-height:44px;--van-calendar-header-title-font-size:var(--van-font-size-lg);--van-calendar-header-subtitle-font-size:var(--van-font-size-md);--van-calendar-weekdays-height:30px;--van-calendar-weekdays-font-size:var(--van-font-size-sm);--van-calendar-month-title-font-size:var(--van-font-size-md);--van-calendar-month-mark-color:rgba(242, 243, 245, 0.8);--van-calendar-month-mark-font-size:160px;--van-calendar-day-height:64px;--van-calendar-day-font-size:var(--van-font-size-lg);--van-calendar-range-edge-color:var(--van-white);--van-calendar-range-edge-background-color:var(--van-danger-color);--van-calendar-range-middle-color:var(--van-danger-color);--van-calendar-range-middle-background-opacity:0.1;--van-calendar-selected-day-size:54px;--van-calendar-selected-day-color:var(--van-white);--van-calendar-info-font-size:var(--van-font-size-xs);--van-calendar-info-line-height:var(--van-line-height-xs);--van-calendar-selected-day-background-color:var(--van-danger-color);--van-calendar-day-disabled-color:var(--van-gray-5);--van-calendar-confirm-button-height:36px;--van-calendar-confirm-button-margin:7px 0}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background-color)}.van-calendar__popup.van-popup--bottom,.van-calendar__popup.van-popup--top{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-box-shadow)}.van-calendar__header-subtitle,.van-calendar__header-title,.van-calendar__month-title{height:var(--van-calendar-header-title-height);font-weight:var(--van-font-weight-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);cursor:pointer}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background-color)}.van-calendar__day--start{border-radius:var(--van-border-radius-md) 0 0 var(--van-border-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-border-radius-md) var(--van-border-radius-md) 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:var(--van-border-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle::after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:''}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background-color);border-radius:var(--van-border-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
@@ -32,7 +32,7 @@
32
32
  display: flex;
33
33
  flex-direction: column;
34
34
  height: 100%;
35
- background-color: var(--van-calendar-background-color);
35
+ background: var(--van-calendar-background-color);
36
36
 
37
37
  &__popup {
38
38
  &.van-popup--top,
@@ -132,7 +132,7 @@
132
132
  &--multiple-middle,
133
133
  &--multiple-selected {
134
134
  color: var(--van-calendar-range-edge-color);
135
- background-color: var(--van-calendar-range-edge-background-color);
135
+ background: var(--van-calendar-range-edge-background-color);
136
136
  }
137
137
 
138
138
  &--start {
@@ -194,7 +194,7 @@
194
194
  width: var(--van-calendar-selected-day-size);
195
195
  height: var(--van-calendar-selected-day-size);
196
196
  color: var(--van-calendar-selected-day-color);
197
- background-color: var(--van-calendar-selected-day-background-color);
197
+ background: var(--van-calendar-selected-day-background-color);
198
198
  border-radius: var(--van-border-radius-md);
199
199
  }
200
200
 
@@ -1 +1 @@
1
- :root{--van-card-padding:var(--van-padding-xs) var(--van-padding-md);--van-card-font-size:var(--van-font-size-sm);--van-card-text-color:var(--van-text-color);--van-card-background-color:var(--van-background-color-light);--van-card-thumb-size:88px;--van-card-thumb-border-radius:var(--van-border-radius-lg);--van-card-title-line-height:16px;--van-card-desc-color:var(--van-gray-7);--van-card-desc-line-height:var(--van-line-height-md);--van-card-price-color:var(--van-gray-8);--van-card-origin-price-color:var(--van-gray-6);--van-card-num-color:var(--van-gray-6);--van-card-origin-price-font-size:var(--van-font-size-xs);--van-card-price-font-size:var(--van-font-size-sm);--van-card-price-integer-font-size:var(--van-font-size-lg);--van-card-price-font-family:var(--van-price-integer-font-family)}.van-card{position:relative;box-sizing:border-box;padding:var(--van-card-padding);color:var(--van-card-text-color);font-size:var(--van-card-font-size);background-color:var(--van-card-background-color)}.van-card:not(:first-child){margin-top:var(--van-padding-xs)}.van-card__header{display:flex}.van-card__thumb{position:relative;flex:none;width:var(--van-card-thumb-size);height:var(--van-card-thumb-size);margin-right:var(--van-padding-xs)}.van-card__thumb img{border-radius:var(--van-card-thumb-border-radius)}.van-card__content{position:relative;display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0;min-height:var(--van-card-thumb-size)}.van-card__content--centered{justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{max-height:32px;font-weight:var(--van-font-weight-bold);line-height:var(--van-card-title-line-height)}.van-card__desc{max-height:var(--van-card-desc-line-height);color:var(--van-card-desc-color);line-height:var(--van-card-desc-line-height)}.van-card__bottom{line-height:var(--van-line-height-md)}.van-card__price{display:inline-block;color:var(--van-card-price-color);font-weight:var(--van-font-weight-bold);font-size:var(--van-card-price-font-size)}.van-card__price-integer{font-size:var(--van-card-price-integer-font-size);font-family:var(--van-card-price-font-family)}.van-card__price-decimal{font-family:var(--van-card-price-font-family)}.van-card__origin-price{display:inline-block;margin-left:5px;color:var(--van-card-origin-price-color);font-size:var(--van-card-origin-price-font-size);text-decoration:line-through}.van-card__num{float:right;color:var(--van-card-num-color)}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{flex:none;text-align:right}.van-card__footer .van-button{margin-left:5px}
1
+ :root{--van-card-padding:var(--van-padding-xs) var(--van-padding-md);--van-card-font-size:var(--van-font-size-sm);--van-card-text-color:var(--van-text-color);--van-card-background-color:var(--van-background-color-light);--van-card-thumb-size:88px;--van-card-thumb-border-radius:var(--van-border-radius-lg);--van-card-title-line-height:16px;--van-card-desc-color:var(--van-gray-7);--van-card-desc-line-height:var(--van-line-height-md);--van-card-price-color:var(--van-gray-8);--van-card-origin-price-color:var(--van-gray-6);--van-card-num-color:var(--van-gray-6);--van-card-origin-price-font-size:var(--van-font-size-xs);--van-card-price-font-size:var(--van-font-size-sm);--van-card-price-integer-font-size:var(--van-font-size-lg);--van-card-price-font-family:var(--van-price-integer-font-family)}.van-card{position:relative;box-sizing:border-box;padding:var(--van-card-padding);color:var(--van-card-text-color);font-size:var(--van-card-font-size);background:var(--van-card-background-color)}.van-card:not(:first-child){margin-top:var(--van-padding-xs)}.van-card__header{display:flex}.van-card__thumb{position:relative;flex:none;width:var(--van-card-thumb-size);height:var(--van-card-thumb-size);margin-right:var(--van-padding-xs)}.van-card__thumb img{border-radius:var(--van-card-thumb-border-radius)}.van-card__content{position:relative;display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0;min-height:var(--van-card-thumb-size)}.van-card__content--centered{justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{max-height:32px;font-weight:var(--van-font-weight-bold);line-height:var(--van-card-title-line-height)}.van-card__desc{max-height:var(--van-card-desc-line-height);color:var(--van-card-desc-color);line-height:var(--van-card-desc-line-height)}.van-card__bottom{line-height:var(--van-line-height-md)}.van-card__price{display:inline-block;color:var(--van-card-price-color);font-weight:var(--van-font-weight-bold);font-size:var(--van-card-price-font-size)}.van-card__price-integer{font-size:var(--van-card-price-integer-font-size);font-family:var(--van-card-price-font-family)}.van-card__price-decimal{font-family:var(--van-card-price-font-family)}.van-card__origin-price{display:inline-block;margin-left:5px;color:var(--van-card-origin-price-color);font-size:var(--van-card-origin-price-font-size);text-decoration:line-through}.van-card__num{float:right;color:var(--van-card-num-color)}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{flex:none;text-align:right}.van-card__footer .van-button{margin-left:5px}
@@ -25,7 +25,7 @@
25
25
  padding: var(--van-card-padding);
26
26
  color: var(--van-card-text-color);
27
27
  font-size: var(--van-card-font-size);
28
- background-color: var(--van-card-background-color);
28
+ background: var(--van-card-background-color);
29
29
 
30
30
  &:not(:first-child) {
31
31
  margin-top: var(--van-padding-xs);
@@ -1,18 +1,29 @@
1
- import { PropType } from 'vue';
2
- export declare type CascaderOption = {
3
- text?: string;
4
- value?: string | number;
5
- color?: string;
6
- disabled?: boolean;
7
- children?: CascaderOption[];
8
- className?: unknown;
9
- [key: PropertyKey]: any;
10
- };
11
- export declare type CascaderFieldNames = {
12
- text?: string;
13
- value?: string;
14
- children?: string;
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ import type { CascaderOption, CascaderFieldNames } from './types';
3
+ declare const props: {
4
+ title: StringConstructor;
5
+ options: {
6
+ type: PropType<CascaderOption[]>;
7
+ default: () => never[];
8
+ };
9
+ closeable: {
10
+ type: BooleanConstructor;
11
+ default: true;
12
+ };
13
+ swipeable: {
14
+ type: BooleanConstructor;
15
+ default: true;
16
+ };
17
+ closeIcon: {
18
+ type: PropType<string>;
19
+ default: string;
20
+ };
21
+ modelValue: (NumberConstructor | StringConstructor)[];
22
+ fieldNames: PropType<CascaderFieldNames>;
23
+ placeholder: StringConstructor;
24
+ activeColor: StringConstructor;
15
25
  };
26
+ export declare type CascaderProps = ExtractPropTypes<typeof props>;
16
27
  declare const _default: import("vue").DefineComponent<{
17
28
  title: StringConstructor;
18
29
  options: {
@@ -15,30 +15,29 @@ var _icon = require("../icon");
15
15
 
16
16
  // Components
17
17
  var [name, bem, t] = (0, _utils.createNamespace)('cascader');
18
+ var props = {
19
+ title: String,
20
+ options: (0, _utils.makeArrayProp)(),
21
+ closeable: _utils.truthProp,
22
+ swipeable: _utils.truthProp,
23
+ closeIcon: (0, _utils.makeStringProp)('cross'),
24
+ modelValue: _utils.numericProp,
25
+ fieldNames: Object,
26
+ placeholder: String,
27
+ activeColor: String
28
+ };
18
29
 
19
30
  var _default = (0, _vue.defineComponent)({
20
31
  name,
21
- props: {
22
- title: String,
23
- options: (0, _utils.makeArrayProp)(),
24
- closeable: _utils.truthProp,
25
- swipeable: _utils.truthProp,
26
- closeIcon: (0, _utils.makeStringProp)('cross'),
27
- modelValue: _utils.numericProp,
28
- fieldNames: Object,
29
- placeholder: String,
30
- activeColor: String
31
- },
32
- emits: ['close', 'change', 'finish', 'update:modelValue', 'click-tab'],
32
+ props,
33
+ emits: ['close', 'change', 'finish', 'click-tab', 'update:modelValue'],
33
34
 
34
35
  setup(props, {
35
36
  slots,
36
37
  emit
37
38
  }) {
38
- var state = (0, _vue.reactive)({
39
- tabs: [],
40
- activeTab: 0
41
- });
39
+ var tabs = (0, _vue.ref)([]);
40
+ var activeTab = (0, _vue.ref)(0);
42
41
  var {
43
42
  text: textKey,
44
43
  value: valueKey,
@@ -50,9 +49,7 @@ var _default = (0, _vue.defineComponent)({
50
49
  }, props.fieldNames);
51
50
 
52
51
  var getSelectedOptionsByValue = (options, value) => {
53
- for (var i = 0; i < options.length; i++) {
54
- var option = options[i];
55
-
52
+ for (var option of options) {
56
53
  if (option[valueKey] === value) {
57
54
  return [option];
58
55
  }
@@ -68,12 +65,17 @@ var _default = (0, _vue.defineComponent)({
68
65
  };
69
66
 
70
67
  var updateTabs = () => {
71
- if (props.modelValue || props.modelValue === 0) {
72
- var selectedOptions = getSelectedOptionsByValue(props.options, props.modelValue);
68
+ var {
69
+ options,
70
+ modelValue
71
+ } = props;
72
+
73
+ if (modelValue !== undefined) {
74
+ var selectedOptions = getSelectedOptionsByValue(options, modelValue);
73
75
 
74
76
  if (selectedOptions) {
75
- var optionsCursor = props.options;
76
- state.tabs = selectedOptions.map(option => {
77
+ var optionsCursor = options;
78
+ tabs.value = selectedOptions.map(option => {
77
79
  var tab = {
78
80
  options: optionsCursor,
79
81
  selected: option
@@ -88,21 +90,21 @@ var _default = (0, _vue.defineComponent)({
88
90
  });
89
91
 
90
92
  if (optionsCursor) {
91
- state.tabs.push({
93
+ tabs.value.push({
92
94
  options: optionsCursor,
93
95
  selected: null
94
96
  });
95
97
  }
96
98
 
97
99
  (0, _vue.nextTick)(() => {
98
- state.activeTab = state.tabs.length - 1;
100
+ activeTab.value = tabs.value.length - 1;
99
101
  });
100
102
  return;
101
103
  }
102
104
  }
103
105
 
104
- state.tabs = [{
105
- options: props.options,
106
+ tabs.value = [{
107
+ options,
106
108
  selected: null
107
109
  }];
108
110
  };
@@ -112,10 +114,10 @@ var _default = (0, _vue.defineComponent)({
112
114
  return;
113
115
  }
114
116
 
115
- state.tabs[tabIndex].selected = option;
117
+ tabs.value[tabIndex].selected = option;
116
118
 
117
- if (state.tabs.length > tabIndex + 1) {
118
- state.tabs = state.tabs.slice(0, tabIndex + 1);
119
+ if (tabs.value.length > tabIndex + 1) {
120
+ tabs.value = tabs.value.slice(0, tabIndex + 1);
119
121
  }
120
122
 
121
123
  if (option[childrenKey]) {
@@ -124,28 +126,28 @@ var _default = (0, _vue.defineComponent)({
124
126
  selected: null
125
127
  };
126
128
 
127
- if (state.tabs[tabIndex + 1]) {
128
- state.tabs[tabIndex + 1] = nextTab;
129
+ if (tabs.value[tabIndex + 1]) {
130
+ tabs.value[tabIndex + 1] = nextTab;
129
131
  } else {
130
- state.tabs.push(nextTab);
132
+ tabs.value.push(nextTab);
131
133
  }
132
134
 
133
135
  (0, _vue.nextTick)(() => {
134
- state.activeTab++;
136
+ activeTab.value++;
135
137
  });
136
138
  }
137
139
 
138
- var selectedOptions = state.tabs.map(tab => tab.selected).filter(Boolean);
139
- var eventParams = {
140
+ var selectedOptions = tabs.value.map(tab => tab.selected).filter(Boolean);
141
+ emit('update:modelValue', option[valueKey]);
142
+ var params = {
140
143
  value: option[valueKey],
141
144
  tabIndex,
142
145
  selectedOptions
143
146
  };
144
- emit('update:modelValue', option[valueKey]);
145
- emit('change', eventParams);
147
+ emit('change', params);
146
148
 
147
149
  if (!option[childrenKey]) {
148
- emit('finish', eventParams);
150
+ emit('finish', params);
149
151
  }
150
152
  };
151
153
 
@@ -197,7 +199,8 @@ var _default = (0, _vue.defineComponent)({
197
199
  options,
198
200
  selected
199
201
  } = tab;
200
- var title = selected ? selected[textKey] : props.placeholder || t('select');
202
+ var placeholder = props.placeholder || t('select');
203
+ var title = selected ? selected[textKey] : placeholder;
201
204
  return (0, _vue.createVNode)(_tab.Tab, {
202
205
  "title": title,
203
206
  "titleClass": bem('tab', {
@@ -209,8 +212,8 @@ var _default = (0, _vue.defineComponent)({
209
212
  };
210
213
 
211
214
  var renderTabs = () => (0, _vue.createVNode)(_tabs.Tabs, {
212
- 'active': state.activeTab,
213
- "onUpdate:active": $event => state.activeTab = $event,
215
+ "active": activeTab.value,
216
+ "onUpdate:active": $event => activeTab.value = $event,
214
217
  "animated": true,
215
218
  "class": bem('tabs'),
216
219
  "color": props.activeColor,
@@ -218,7 +221,7 @@ var _default = (0, _vue.defineComponent)({
218
221
  "swipeable": props.swipeable,
219
222
  "onClick-tab": onClickTab
220
223
  }, {
221
- default: () => [state.tabs.map(renderTab)]
224
+ default: () => [tabs.value.map(renderTab)]
222
225
  });
223
226
 
224
227
  updateTabs();
@@ -226,8 +229,8 @@ var _default = (0, _vue.defineComponent)({
226
229
  deep: true
227
230
  });
228
231
  (0, _vue.watch)(() => props.modelValue, value => {
229
- if (value || value === 0) {
230
- var values = state.tabs.map(tab => {
232
+ if (value !== undefined) {
233
+ var values = tabs.value.map(tab => {
231
234
  var _tab$selected;
232
235
 
233
236
  return (_tab$selected = tab.selected) == null ? void 0 : _tab$selected[valueKey];
@@ -1,7 +1,8 @@
1
+ import { CascaderProps } from './Cascader';
1
2
  export declare const Cascader: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  title: StringConstructor;
3
4
  options: {
4
- type: import("vue").PropType<import("./Cascader").CascaderOption[]>;
5
+ type: import("vue").PropType<import("./types").CascaderOption[]>;
5
6
  default: () => never[];
6
7
  };
7
8
  closeable: {
@@ -17,7 +18,7 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
17
18
  default: string;
18
19
  };
19
20
  modelValue: (NumberConstructor | StringConstructor)[];
20
- fieldNames: import("vue").PropType<import("./Cascader").CascaderFieldNames>;
21
+ fieldNames: import("vue").PropType<import("./types").CascaderFieldNames>;
21
22
  placeholder: StringConstructor;
22
23
  activeColor: StringConstructor;
23
24
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "click-tab" | "finish")[], "update:modelValue" | "change" | "close" | "click-tab" | "finish", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<{
@@ -33,14 +34,14 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
33
34
  } & {
34
35
  closeIcon: string;
35
36
  closeable: boolean;
36
- options: import("./Cascader").CascaderOption[];
37
+ options: import("./types").CascaderOption[];
37
38
  swipeable: boolean;
38
39
  } & {
39
40
  title?: string | undefined;
40
41
  modelValue?: string | number | undefined;
41
42
  placeholder?: string | undefined;
42
43
  activeColor?: string | undefined;
43
- fieldNames?: import("./Cascader").CascaderFieldNames | undefined;
44
+ fieldNames?: import("./types").CascaderFieldNames | undefined;
44
45
  }> & {
45
46
  onChange?: ((...args: any[]) => any) | undefined;
46
47
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -50,8 +51,9 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
50
51
  }, {
51
52
  closeIcon: string;
52
53
  closeable: boolean;
53
- options: import("./Cascader").CascaderOption[];
54
+ options: import("./types").CascaderOption[];
54
55
  swipeable: boolean;
55
56
  }>>;
56
57
  export default Cascader;
57
- export type { CascaderOption, CascaderFieldNames } from './Cascader';
58
+ export type { CascaderProps };
59
+ export type { CascaderOption, CascaderFieldNames } from './types';
@@ -0,0 +1,18 @@
1
+ export declare type CascaderOption = {
2
+ text?: string;
3
+ value?: string | number;
4
+ color?: string;
5
+ disabled?: boolean;
6
+ children?: CascaderOption[];
7
+ className?: unknown;
8
+ [key: PropertyKey]: any;
9
+ };
10
+ export declare type CascaderTab = {
11
+ options: CascaderOption[];
12
+ selected: CascaderOption | null;
13
+ };
14
+ export declare type CascaderFieldNames = {
15
+ text?: string;
16
+ value?: string;
17
+ children?: string;
18
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -1 +1 @@
1
- :root{--van-cell-font-size:var(--van-font-size-md);--van-cell-line-height:24px;--van-cell-vertical-padding:10px;--van-cell-horizontal-padding:var(--van-padding-md);--van-cell-text-color:var(--van-text-color);--van-cell-background-color:var(--van-white);--van-cell-border-color:var(--van-border-color);--van-cell-active-color:var(--van-active-color);--van-cell-required-color:var(--van-danger-color);--van-cell-label-color:var(--van-gray-6);--van-cell-label-font-size:var(--van-font-size-sm);--van-cell-label-line-height:var(--van-line-height-sm);--van-cell-label-margin-top:var(--van-padding-base);--van-cell-value-color:var(--van-gray-6);--van-cell-icon-size:16px;--van-cell-right-icon-color:var(--van-gray-6);--van-cell-large-vertical-padding:var(--van-padding-sm);--van-cell-large-title-font-size:var(--van-font-size-lg);--van-cell-large-label-font-size:var(--van-font-size-md)}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background-color:var(--van-cell-background-color)}.van-cell::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell--borderless::after,.van-cell:last-child::after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__value--alone{color:var(--van-text-color);text-align:left}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required::before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:'*'}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}
1
+ :root{--van-cell-font-size:var(--van-font-size-md);--van-cell-line-height:24px;--van-cell-vertical-padding:10px;--van-cell-horizontal-padding:var(--van-padding-md);--van-cell-text-color:var(--van-text-color);--van-cell-background-color:var(--van-white);--van-cell-border-color:var(--van-border-color);--van-cell-active-color:var(--van-active-color);--van-cell-required-color:var(--van-danger-color);--van-cell-label-color:var(--van-gray-6);--van-cell-label-font-size:var(--van-font-size-sm);--van-cell-label-line-height:var(--van-line-height-sm);--van-cell-label-margin-top:var(--van-padding-base);--van-cell-value-color:var(--van-gray-6);--van-cell-icon-size:16px;--van-cell-right-icon-color:var(--van-gray-6);--van-cell-large-vertical-padding:var(--van-padding-sm);--van-cell-large-title-font-size:var(--van-font-size-lg);--van-cell-large-label-font-size:var(--van-font-size-md)}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background-color)}.van-cell::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell--borderless::after,.van-cell:last-child::after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__value--alone{color:var(--van-text-color);text-align:left}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required::before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:'*'}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}
@@ -33,7 +33,7 @@
33
33
  color: var(--van-cell-text-color);
34
34
  font-size: var(--van-cell-font-size);
35
35
  line-height: var(--van-cell-line-height);
36
- background-color: var(--van-cell-background-color);
36
+ background: var(--van-cell-background-color);
37
37
 
38
38
  &::after {
39
39
  .hairline-bottom(var(--van-cell-border-color), var(--van-padding-md), var(--van-padding-md));
@@ -1 +1 @@
1
- :root{--van-cell-group-background-color:var(--van-white);--van-cell-group-title-color:var(--van-gray-6);--van-cell-group-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs);--van-cell-group-title-font-size:var(--van-font-size-md);--van-cell-group-title-line-height:16px;--van-cell-group-inset-padding:0 var(--van-padding-md);--van-cell-group-inset-border-radius:var(--van-border-radius-lg);--van-cell-group-inset-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs) var(--van-padding-xl)}.van-cell-group{background-color:var(--van-cell-group-background-color)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-border-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}
1
+ :root{--van-cell-group-background-color:var(--van-white);--van-cell-group-title-color:var(--van-gray-6);--van-cell-group-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs);--van-cell-group-title-font-size:var(--van-font-size-md);--van-cell-group-title-line-height:16px;--van-cell-group-inset-padding:0 var(--van-padding-md);--van-cell-group-inset-border-radius:var(--van-border-radius-lg);--van-cell-group-inset-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs) var(--van-padding-xl)}.van-cell-group{background:var(--van-cell-group-background-color)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-border-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  .van-cell-group {
15
- background-color: var(--van-cell-group-background-color);
15
+ background: var(--van-cell-group-background-color);
16
16
 
17
17
  &--inset {
18
18
  margin: var(--van-cell-group-inset-padding);
@@ -106,14 +106,7 @@ var _default = (0, _vue.defineComponent)({
106
106
  };
107
107
 
108
108
  return () => {
109
- var nodes = [renderIcon()];
110
-
111
- if (props.labelPosition === 'left') {
112
- nodes.unshift(renderLabel());
113
- } else {
114
- nodes.push(renderLabel());
115
- }
116
-
109
+ var nodes = props.labelPosition === 'left' ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
117
110
  return (0, _vue.createVNode)("div", {
118
111
  "role": props.role,
119
112
  "class": props.bem([{
@@ -48,4 +48,4 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
48
48
  }>>;
49
49
  export default Checkbox;
50
50
  export type { CheckboxProps };
51
- export type { CheckboxInstance } from './types';
51
+ export type { CheckboxShape, CheckboxInstance, CheckboxLabelPosition, } from './types';
@@ -1,5 +1,8 @@
1
1
  import type { ComponentPublicInstance, ComputedRef } from 'vue';
2
2
  import type { CheckboxProps } from './Checkbox';
3
+ import type { CheckerShape, CheckerLabelPosition } from './Checker';
4
+ export declare type CheckboxShape = CheckerShape;
5
+ export declare type CheckboxLabelPosition = CheckerLabelPosition;
3
6
  export declare type CheckboxExpose = {
4
7
  toggle: (newValue?: boolean) => void;
5
8
  /**
@@ -33,4 +33,4 @@ export declare const CheckboxGroup: import("../utils").WithInstall<import("vue")
33
33
  }>>;
34
34
  export default CheckboxGroup;
35
35
  export type { CheckboxGroupProps };
36
- export type { CheckboxGroupInstance, CheckboxGroupToggleAllOptions, } from './types';
36
+ export type { CheckboxGroupInstance, CheckboxGroupDirection, CheckboxGroupToggleAllOptions, } from './types';
@@ -1,6 +1,7 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { CheckboxGroupProps } from './CheckboxGroup';
3
- import type { CheckerParent } from '../checkbox/Checker';
3
+ import type { CheckerParent, CheckerDirection } from '../checkbox/Checker';
4
+ export declare type CheckboxGroupDirection = CheckerDirection;
4
5
  export declare type CheckboxGroupToggleAllOptions = boolean | {
5
6
  checked?: boolean;
6
7
  skipDisabled?: boolean;
@@ -1 +1 @@
1
- :root{--van-collapse-item-transition-duration:var(--van-animation-duration-base);--van-collapse-item-content-padding:var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size:var(--van-font-size-md);--van-collapse-item-content-line-height:1.5;--van-collapse-item-content-text-color:var(--van-gray-6);--van-collapse-item-content-background-color:var(--van-white);--van-collapse-item-title-disabled-color:var(--van-gray-5)}.van-collapse-item{position:relative}.van-collapse-item--border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon::before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-transition-duration)}.van-collapse-item__title::after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon::before{transform:rotate(-90deg)}.van-collapse-item__title--expanded::after{display:block}.van-collapse-item__title--borderless::after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-transition-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background-color:var(--van-collapse-item-content-background-color)}
1
+ :root{--van-collapse-item-transition-duration:var(--van-animation-duration-base);--van-collapse-item-content-padding:var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size:var(--van-font-size-md);--van-collapse-item-content-line-height:1.5;--van-collapse-item-content-text-color:var(--van-gray-6);--van-collapse-item-content-background-color:var(--van-white);--van-collapse-item-title-disabled-color:var(--van-gray-5)}.van-collapse-item{position:relative}.van-collapse-item--border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon::before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-transition-duration)}.van-collapse-item__title::after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon::before{transform:rotate(-90deg)}.van-collapse-item__title--expanded::after{display:block}.van-collapse-item__title--borderless::after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-transition-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background:var(--van-collapse-item-content-background-color)}
@@ -70,6 +70,6 @@
70
70
  color: var(--van-collapse-item-content-text-color);
71
71
  font-size: var(--van-collapse-item-content-font-size);
72
72
  line-height: var(--van-collapse-item-content-line-height);
73
- background-color: var(--van-collapse-item-content-background-color);
73
+ background: var(--van-collapse-item-content-background-color);
74
74
  }
75
75
  }
@@ -15,8 +15,6 @@ var _field = require("../field");
15
15
 
16
16
  var _button = require("../button");
17
17
 
18
- var _dialog = require("../dialog");
19
-
20
18
  var _switch = require("../switch");
21
19
 
22
20
  // Utils
@@ -57,9 +55,7 @@ var _default = (0, _vue.defineComponent)({
57
55
  }
58
56
  };
59
57
 
60
- var onDelete = () => _dialog.Dialog.confirm({
61
- title: t('confirmDelete')
62
- }).then(() => emit('delete', contact));
58
+ var onDelete = () => emit('delete', contact);
63
59
 
64
60
  var renderButtons = () => (0, _vue.createVNode)("div", {
65
61
  "class": bem('buttons')
@@ -2,8 +2,6 @@
2
2
 
3
3
  require('../../style/base.css');
4
4
 
5
- require('../../action-bar/index.css');
6
-
7
5
  require('../../badge/index.css');
8
6
 
9
7
  require('../../icon/index.css');
@@ -18,12 +16,4 @@ require('../../switch/index.css');
18
16
 
19
17
  require('../../button/index.css');
20
18
 
21
- require('../../action-bar-button/index.css');
22
-
23
- require('../../overlay/index.css');
24
-
25
- require('../../popup/index.css');
26
-
27
- require('../../dialog/index.css');
28
-
29
19
  require('../index.css');
@@ -2,8 +2,6 @@
2
2
 
3
3
  require('../../style/base.less');
4
4
 
5
- require('../../action-bar/index.less');
6
-
7
5
  require('../../badge/index.less');
8
6
 
9
7
  require('../../icon/index.less');
@@ -18,12 +16,4 @@ require('../../switch/index.less');
18
16
 
19
17
  require('../../button/index.less');
20
18
 
21
- require('../../action-bar-button/index.less');
22
-
23
- require('../../overlay/index.less');
24
-
25
- require('../../popup/index.less');
26
-
27
- require('../../dialog/index.less');
28
-
29
19
  require('../index.less');