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
@@ -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: {
@@ -1,5 +1,5 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { nextTick, reactive, watch, defineComponent } from 'vue';
2
+ import { ref, watch, nextTick, defineComponent } from 'vue';
3
3
  import { extend, truthProp, numericProp, makeArrayProp, makeStringProp, createNamespace } from '../utils'; // Components
4
4
 
5
5
  import { Tab } from '../tab';
@@ -7,29 +7,28 @@ import { Tabs } from '../tabs';
7
7
  import { Icon } from '../icon'; // Types
8
8
 
9
9
  var [name, bem, t] = createNamespace('cascader');
10
+ var props = {
11
+ title: String,
12
+ options: makeArrayProp(),
13
+ closeable: truthProp,
14
+ swipeable: truthProp,
15
+ closeIcon: makeStringProp('cross'),
16
+ modelValue: numericProp,
17
+ fieldNames: Object,
18
+ placeholder: String,
19
+ activeColor: String
20
+ };
10
21
  export default defineComponent({
11
22
  name,
12
- props: {
13
- title: String,
14
- options: makeArrayProp(),
15
- closeable: truthProp,
16
- swipeable: truthProp,
17
- closeIcon: makeStringProp('cross'),
18
- modelValue: numericProp,
19
- fieldNames: Object,
20
- placeholder: String,
21
- activeColor: String
22
- },
23
- emits: ['close', 'change', 'finish', 'update:modelValue', 'click-tab'],
23
+ props,
24
+ emits: ['close', 'change', 'finish', 'click-tab', 'update:modelValue'],
24
25
 
25
26
  setup(props, {
26
27
  slots,
27
28
  emit
28
29
  }) {
29
- var state = reactive({
30
- tabs: [],
31
- activeTab: 0
32
- });
30
+ var tabs = ref([]);
31
+ var activeTab = ref(0);
33
32
  var {
34
33
  text: textKey,
35
34
  value: valueKey,
@@ -41,9 +40,7 @@ export default defineComponent({
41
40
  }, props.fieldNames);
42
41
 
43
42
  var getSelectedOptionsByValue = (options, value) => {
44
- for (var i = 0; i < options.length; i++) {
45
- var option = options[i];
46
-
43
+ for (var option of options) {
47
44
  if (option[valueKey] === value) {
48
45
  return [option];
49
46
  }
@@ -59,12 +56,17 @@ export default defineComponent({
59
56
  };
60
57
 
61
58
  var updateTabs = () => {
62
- if (props.modelValue || props.modelValue === 0) {
63
- var selectedOptions = getSelectedOptionsByValue(props.options, props.modelValue);
59
+ var {
60
+ options,
61
+ modelValue
62
+ } = props;
63
+
64
+ if (modelValue !== undefined) {
65
+ var selectedOptions = getSelectedOptionsByValue(options, modelValue);
64
66
 
65
67
  if (selectedOptions) {
66
- var optionsCursor = props.options;
67
- state.tabs = selectedOptions.map(option => {
68
+ var optionsCursor = options;
69
+ tabs.value = selectedOptions.map(option => {
68
70
  var tab = {
69
71
  options: optionsCursor,
70
72
  selected: option
@@ -79,21 +81,21 @@ export default defineComponent({
79
81
  });
80
82
 
81
83
  if (optionsCursor) {
82
- state.tabs.push({
84
+ tabs.value.push({
83
85
  options: optionsCursor,
84
86
  selected: null
85
87
  });
86
88
  }
87
89
 
88
90
  nextTick(() => {
89
- state.activeTab = state.tabs.length - 1;
91
+ activeTab.value = tabs.value.length - 1;
90
92
  });
91
93
  return;
92
94
  }
93
95
  }
94
96
 
95
- state.tabs = [{
96
- options: props.options,
97
+ tabs.value = [{
98
+ options,
97
99
  selected: null
98
100
  }];
99
101
  };
@@ -103,10 +105,10 @@ export default defineComponent({
103
105
  return;
104
106
  }
105
107
 
106
- state.tabs[tabIndex].selected = option;
108
+ tabs.value[tabIndex].selected = option;
107
109
 
108
- if (state.tabs.length > tabIndex + 1) {
109
- state.tabs = state.tabs.slice(0, tabIndex + 1);
110
+ if (tabs.value.length > tabIndex + 1) {
111
+ tabs.value = tabs.value.slice(0, tabIndex + 1);
110
112
  }
111
113
 
112
114
  if (option[childrenKey]) {
@@ -115,28 +117,28 @@ export default defineComponent({
115
117
  selected: null
116
118
  };
117
119
 
118
- if (state.tabs[tabIndex + 1]) {
119
- state.tabs[tabIndex + 1] = nextTab;
120
+ if (tabs.value[tabIndex + 1]) {
121
+ tabs.value[tabIndex + 1] = nextTab;
120
122
  } else {
121
- state.tabs.push(nextTab);
123
+ tabs.value.push(nextTab);
122
124
  }
123
125
 
124
126
  nextTick(() => {
125
- state.activeTab++;
127
+ activeTab.value++;
126
128
  });
127
129
  }
128
130
 
129
- var selectedOptions = state.tabs.map(tab => tab.selected).filter(Boolean);
130
- var eventParams = {
131
+ var selectedOptions = tabs.value.map(tab => tab.selected).filter(Boolean);
132
+ emit('update:modelValue', option[valueKey]);
133
+ var params = {
131
134
  value: option[valueKey],
132
135
  tabIndex,
133
136
  selectedOptions
134
137
  };
135
- emit('update:modelValue', option[valueKey]);
136
- emit('change', eventParams);
138
+ emit('change', params);
137
139
 
138
140
  if (!option[childrenKey]) {
139
- emit('finish', eventParams);
141
+ emit('finish', params);
140
142
  }
141
143
  };
142
144
 
@@ -188,7 +190,8 @@ export default defineComponent({
188
190
  options,
189
191
  selected
190
192
  } = tab;
191
- var title = selected ? selected[textKey] : props.placeholder || t('select');
193
+ var placeholder = props.placeholder || t('select');
194
+ var title = selected ? selected[textKey] : placeholder;
192
195
  return _createVNode(Tab, {
193
196
  "title": title,
194
197
  "titleClass": bem('tab', {
@@ -200,8 +203,8 @@ export default defineComponent({
200
203
  };
201
204
 
202
205
  var renderTabs = () => _createVNode(Tabs, {
203
- 'active': state.activeTab,
204
- "onUpdate:active": $event => state.activeTab = $event,
206
+ "active": activeTab.value,
207
+ "onUpdate:active": $event => activeTab.value = $event,
205
208
  "animated": true,
206
209
  "class": bem('tabs'),
207
210
  "color": props.activeColor,
@@ -209,7 +212,7 @@ export default defineComponent({
209
212
  "swipeable": props.swipeable,
210
213
  "onClick-tab": onClickTab
211
214
  }, {
212
- default: () => [state.tabs.map(renderTab)]
215
+ default: () => [tabs.value.map(renderTab)]
213
216
  });
214
217
 
215
218
  updateTabs();
@@ -217,8 +220,8 @@ export default defineComponent({
217
220
  deep: true
218
221
  });
219
222
  watch(() => props.modelValue, value => {
220
- if (value || value === 0) {
221
- var values = state.tabs.map(tab => {
223
+ if (value !== undefined) {
224
+ var values = tabs.value.map(tab => {
222
225
  var _tab$selected;
223
226
 
224
227
  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 @@
1
+ export {};
package/es/cell/index.css CHANGED
@@ -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);
@@ -97,14 +97,7 @@ export default defineComponent({
97
97
  };
98
98
 
99
99
  return () => {
100
- var nodes = [renderIcon()];
101
-
102
- if (props.labelPosition === 'left') {
103
- nodes.unshift(renderLabel());
104
- } else {
105
- nodes.push(renderLabel());
106
- }
107
-
100
+ var nodes = props.labelPosition === 'left' ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
108
101
  return _createVNode("div", {
109
102
  "role": props.role,
110
103
  "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
  }
@@ -7,7 +7,6 @@ import { Cell } from '../cell';
7
7
  import { Form } from '../form';
8
8
  import { Field } from '../field';
9
9
  import { Button } from '../button';
10
- import { Dialog } from '../dialog';
11
10
  import { Switch } from '../switch';
12
11
  var [name, bem, t] = createNamespace('contact-edit');
13
12
  var DEFAULT_CONTACT = {
@@ -44,9 +43,7 @@ export default defineComponent({
44
43
  }
45
44
  };
46
45
 
47
- var onDelete = () => Dialog.confirm({
48
- title: t('confirmDelete')
49
- }).then(() => emit('delete', contact));
46
+ var onDelete = () => emit('delete', contact);
50
47
 
51
48
  var renderButtons = () => _createVNode("div", {
52
49
  "class": bem('buttons')
@@ -1,5 +1,4 @@
1
1
  import '../../style/base.css';
2
- import '../../action-bar/index.css';
3
2
  import '../../badge/index.css';
4
3
  import '../../icon/index.css';
5
4
  import '../../cell/index.css';
@@ -7,8 +6,4 @@ import '../../field/index.css';
7
6
  import '../../loading/index.css';
8
7
  import '../../switch/index.css';
9
8
  import '../../button/index.css';
10
- import '../../action-bar-button/index.css';
11
- import '../../overlay/index.css';
12
- import '../../popup/index.css';
13
- import '../../dialog/index.css';
14
9
  import '../index.css';
@@ -1,5 +1,4 @@
1
1
  import '../../style/base.less';
2
- import '../../action-bar/index.less';
3
2
  import '../../badge/index.less';
4
3
  import '../../icon/index.less';
5
4
  import '../../cell/index.less';
@@ -7,8 +6,4 @@ import '../../field/index.less';
7
6
  import '../../loading/index.less';
8
7
  import '../../switch/index.less';
9
8
  import '../../button/index.less';
10
- import '../../action-bar-button/index.less';
11
- import '../../overlay/index.less';
12
- import '../../popup/index.less';
13
- import '../../dialog/index.less';
14
9
  import '../index.less';
@@ -1 +1 @@
1
- :root{--van-coupon-margin:0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height:84px;--van-coupon-content-padding:14px 0;--van-coupon-background-color:var(--van-white);--van-coupon-active-background-color:var(--van-active-color);--van-coupon-border-radius:var(--van-border-radius-lg);--van-coupon-box-shadow:0 0 4px rgba(0, 0, 0, 0.1);--van-coupon-head-width:96px;--van-coupon-amount-color:var(--van-danger-color);--van-coupon-amount-font-size:30px;--van-coupon-currency-font-size:40%;--van-coupon-name-font-size:var(--van-font-size-md);--van-coupon-disabled-text-color:var(--van-gray-6);--van-coupon-description-padding:var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color:var(--van-border-color);--van-coupon-corner-checkbox-icon-color:var(--van-danger-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background-color:var(--van-coupon-background-color);border-radius:var(--van-coupon-border-radius);box-shadow:var(--van-coupon-box-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background-color)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-gray-8)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-weight-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-weight:400;font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1;border-radius:0 var(--van-coupon-border-radius) var(--van-coupon-border-radius) 0}.van-coupon__name{margin-bottom:10px;font-weight:700;font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-corner-checkbox-icon-color);border-color:var(--van-coupon-corner-checkbox-icon-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background-color)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
1
+ :root{--van-coupon-margin:0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height:84px;--van-coupon-content-padding:14px 0;--van-coupon-background-color:var(--van-white);--van-coupon-active-background-color:var(--van-active-color);--van-coupon-border-radius:var(--van-border-radius-lg);--van-coupon-box-shadow:0 0 4px rgba(0, 0, 0, 0.1);--van-coupon-head-width:96px;--van-coupon-amount-color:var(--van-danger-color);--van-coupon-amount-font-size:30px;--van-coupon-currency-font-size:40%;--van-coupon-name-font-size:var(--van-font-size-md);--van-coupon-disabled-text-color:var(--van-gray-6);--van-coupon-description-padding:var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color:var(--van-border-color);--van-coupon-corner-checkbox-icon-color:var(--van-danger-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background-color);border-radius:var(--van-coupon-border-radius);box-shadow:var(--van-coupon-box-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background-color)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-gray-8)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-weight-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-weight:400;font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1;border-radius:0 var(--van-coupon-border-radius) var(--van-coupon-border-radius) 0}.van-coupon__name{margin-bottom:10px;font-weight:700;font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-corner-checkbox-icon-color);border-color:var(--van-coupon-corner-checkbox-icon-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background-color)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
@@ -23,7 +23,7 @@
23
23
  .van-coupon {
24
24
  margin: var(--van-coupon-margin);
25
25
  overflow: hidden;
26
- background-color: var(--van-coupon-background-color);
26
+ background: var(--van-coupon-background-color);
27
27
  border-radius: var(--van-coupon-border-radius);
28
28
  box-shadow: var(--van-coupon-box-shadow);
29
29
 
@@ -156,7 +156,7 @@ export default defineComponent({
156
156
  return () => _createVNode("div", {
157
157
  "class": bem()
158
158
  }, [renderExchangeBar(), _createVNode(Tabs, {
159
- 'active': state.tab,
159
+ "active": state.tab,
160
160
  "onUpdate:active": $event => state.tab = $event,
161
161
  "class": bem('tab'),
162
162
  "border": false
@@ -1 +1 @@
1
- :root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-gray-6);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background-color:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-white)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;height:calc(100vh - 108px);padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bar{height:calc(100vh - 152px)}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-white)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
1
+ :root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-gray-6);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-white)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;height:calc(100vh - 108px);padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bar{height:calc(100vh - 152px)}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-white)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
@@ -14,7 +14,7 @@
14
14
  .van-coupon-list {
15
15
  position: relative;
16
16
  height: 100%;
17
- background-color: var(--van-coupon-list-background-color);
17
+ background: var(--van-coupon-list-background-color);
18
18
 
19
19
  &__field {
20
20
  padding: var(--van-coupon-list-field-padding);
@@ -47,10 +47,7 @@ export default defineComponent({
47
47
 
48
48
  var close = action => {
49
49
  updateShow(false);
50
-
51
- if (props.callback) {
52
- props.callback(action);
53
- }
50
+ props.callback == null ? void 0 : props.callback(action);
54
51
  };
55
52
 
56
53
  var getActionHandler = action => () => {
@@ -63,8 +60,7 @@ export default defineComponent({
63
60
 
64
61
  if (props.beforeClose) {
65
62
  loading[action] = true;
66
- callInterceptor({
67
- interceptor: props.beforeClose,
63
+ callInterceptor(props.beforeClose, {
68
64
  args: [action],
69
65
 
70
66
  done() {
@@ -211,10 +207,9 @@ export default defineComponent({
211
207
  "style": {
212
208
  width: addUnit(width)
213
209
  },
214
- "aria-labelledby": title || message
215
- }, pick(props, popupKeys), {
216
- 'onUpdate:show': updateShow
217
- }), {
210
+ "aria-labelledby": title || message,
211
+ "onUpdate:show": updateShow
212
+ }, pick(props, popupKeys)), {
218
213
  default: () => [renderTitle(), renderContent(), renderFooter()]
219
214
  });
220
215
  };
@@ -13,7 +13,7 @@ declare namespace Dialog {
13
13
  className: string;
14
14
  allowHtml: boolean;
15
15
  lockScroll: boolean;
16
- transition: string;
16
+ transition: undefined;
17
17
  beforeClose: null;
18
18
  overlayClass: string;
19
19
  overlayStyle: undefined;
@@ -38,7 +38,7 @@ declare namespace Dialog {
38
38
  className: string;
39
39
  allowHtml: boolean;
40
40
  lockScroll: boolean;
41
- transition: string;
41
+ transition: undefined;
42
42
  beforeClose: null;
43
43
  overlayClass: string;
44
44
  overlayStyle: undefined;
@@ -12,7 +12,7 @@ function initInstance() {
12
12
  toggle
13
13
  } = usePopupState();
14
14
  return () => _createVNode(VanDialog, _mergeProps(state, {
15
- 'onUpdate:show': toggle
15
+ "onUpdate:show": toggle
16
16
  }), null);
17
17
  }
18
18
 
@@ -52,7 +52,7 @@ Dialog.defaultOptions = {
52
52
  className: '',
53
53
  allowHtml: false,
54
54
  lockScroll: true,
55
- transition: 'van-dialog-bounce',
55
+ transition: undefined,
56
56
  beforeClose: null,
57
57
  overlayClass: '',
58
58
  overlayStyle: undefined,
@@ -1 +1 @@
1
- :root{--van-dialog-width:320px;--van-dialog-small-screen-width:90%;--van-dialog-font-size:var(--van-font-size-lg);--van-dialog-transition:var(--van-animation-duration-base);--van-dialog-border-radius:16px;--van-dialog-background-color:var(--van-white);--van-dialog-header-font-weight:var(--van-font-weight-bold);--van-dialog-header-line-height:24px;--van-dialog-header-padding-top:26px;--van-dialog-header-isolated-padding:var(--van-padding-lg) 0;--van-dialog-message-padding:var(--van-padding-lg);--van-dialog-message-font-size:var(--van-font-size-md);--van-dialog-message-line-height:var(--van-line-height-md);--van-dialog-message-max-height:60vh;--van-dialog-has-title-message-text-color:var(--van-gray-7);--van-dialog-has-title-message-padding-top:var(--van-padding-xs);--van-dialog-button-height:48px;--van-dialog-round-button-height:36px;--van-dialog-confirm-button-text-color:var(--van-danger-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background-color:var(--van-dialog-background-color);border-radius:var(--van-dialog-border-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width:321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__cancel,.van-dialog__confirm{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__cancel,.van-dialog--round-button .van-dialog__confirm{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
1
+ :root{--van-dialog-width:320px;--van-dialog-small-screen-width:90%;--van-dialog-font-size:var(--van-font-size-lg);--van-dialog-transition:var(--van-animation-duration-base);--van-dialog-border-radius:16px;--van-dialog-background-color:var(--van-white);--van-dialog-header-font-weight:var(--van-font-weight-bold);--van-dialog-header-line-height:24px;--van-dialog-header-padding-top:26px;--van-dialog-header-isolated-padding:var(--van-padding-lg) 0;--van-dialog-message-padding:var(--van-padding-lg);--van-dialog-message-font-size:var(--van-font-size-md);--van-dialog-message-line-height:var(--van-line-height-md);--van-dialog-message-max-height:60vh;--van-dialog-has-title-message-text-color:var(--van-gray-7);--van-dialog-has-title-message-padding-top:var(--van-padding-xs);--van-dialog-button-height:48px;--van-dialog-round-button-height:36px;--van-dialog-confirm-button-text-color:var(--van-danger-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background-color);border-radius:var(--van-dialog-border-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width:321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__cancel,.van-dialog__confirm{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__cancel,.van-dialog--round-button .van-dialog__confirm{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
@@ -28,7 +28,7 @@
28
28
  width: var(--van-dialog-width);
29
29
  overflow: hidden;
30
30
  font-size: var(--van-dialog-font-size);
31
- background-color: var(--van-dialog-background-color);
31
+ background: var(--van-dialog-background-color);
32
32
  border-radius: var(--van-dialog-border-radius);
33
33
  backface-visibility: hidden; // avoid blurry text after scale animation
34
34
  transition: var(--van-dialog-transition);