tlvant 0.0.20 → 0.0.22

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 (830) hide show
  1. package/LICENSE +21 -21
  2. package/README.en.md +36 -36
  3. package/README.md +40 -40
  4. package/package.json +98 -98
  5. package/es/action-sheet/index.css +0 -1
  6. package/es/action-sheet/index.js +0 -177
  7. package/es/action-sheet/index.less +0 -112
  8. package/es/action-sheet/style/index.js +0 -7
  9. package/es/action-sheet/style/less.js +0 -7
  10. package/es/area/index.js +0 -321
  11. package/es/area/style/index.js +0 -3
  12. package/es/area/style/less.js +0 -3
  13. package/es/button/index.css +0 -1
  14. package/es/button/index.js +0 -171
  15. package/es/button/index.less +0 -238
  16. package/es/button/style/index.js +0 -5
  17. package/es/button/style/less.js +0 -5
  18. package/es/calendar/components/Header.js +0 -55
  19. package/es/calendar/components/Month.js +0 -383
  20. package/es/calendar/index.css +0 -1
  21. package/es/calendar/index.js +0 -539
  22. package/es/calendar/index.less +0 -210
  23. package/es/calendar/style/index.js +0 -9
  24. package/es/calendar/style/less.js +0 -9
  25. package/es/calendar/utils.js +0 -66
  26. package/es/cell/index.css +0 -1
  27. package/es/cell/index.js +0 -121
  28. package/es/cell/index.less +0 -103
  29. package/es/cell/shared.js +0 -24
  30. package/es/cell/style/index.js +0 -4
  31. package/es/cell/style/less.js +0 -4
  32. package/es/cell-group/index.css +0 -1
  33. package/es/cell-group/index.js +0 -34
  34. package/es/cell-group/index.less +0 -12
  35. package/es/cell-group/style/index.js +0 -2
  36. package/es/cell-group/style/less.js +0 -2
  37. package/es/checkbox/index.css +0 -1
  38. package/es/checkbox/index.js +0 -80
  39. package/es/checkbox/index.less +0 -85
  40. package/es/checkbox/style/index.js +0 -4
  41. package/es/checkbox/style/less.js +0 -4
  42. package/es/checkbox-group/index.css +0 -1
  43. package/es/checkbox-group/index.js +0 -64
  44. package/es/checkbox-group/index.less +0 -8
  45. package/es/checkbox-group/style/index.js +0 -2
  46. package/es/checkbox-group/style/less.js +0 -2
  47. package/es/collapse/index.js +0 -39
  48. package/es/collapse/style/index.js +0 -1
  49. package/es/collapse/style/less.js +0 -1
  50. package/es/collapse-item/index.css +0 -1
  51. package/es/collapse-item/index.js +0 -198
  52. package/es/collapse-item/index.less +0 -67
  53. package/es/collapse-item/style/index.js +0 -5
  54. package/es/collapse-item/style/less.js +0 -5
  55. package/es/contact-card/index.css +0 -1
  56. package/es/contact-card/index.js +0 -59
  57. package/es/contact-card/index.less +0 -42
  58. package/es/contact-card/style/index.js +0 -5
  59. package/es/contact-card/style/less.js +0 -5
  60. package/es/contact-edit/index.css +0 -1
  61. package/es/contact-edit/index.js +0 -193
  62. package/es/contact-edit/index.less +0 -30
  63. package/es/contact-edit/style/index.js +0 -14
  64. package/es/contact-edit/style/less.js +0 -14
  65. package/es/contact-list/index.css +0 -1
  66. package/es/contact-list/index.js +0 -119
  67. package/es/contact-list/index.less +0 -54
  68. package/es/contact-list/style/index.js +0 -10
  69. package/es/contact-list/style/less.js +0 -10
  70. package/es/datetime-picker/DatePicker.js +0 -246
  71. package/es/datetime-picker/TimePicker.js +0 -104
  72. package/es/datetime-picker/index.js +0 -29
  73. package/es/datetime-picker/shared.js +0 -110
  74. package/es/datetime-picker/style/index.js +0 -3
  75. package/es/datetime-picker/style/less.js +0 -3
  76. package/es/datetime-picker/utils.js +0 -29
  77. package/es/demo-button/index-sfc.css +0 -1
  78. package/es/demo-button/index-sfc.less +0 -9
  79. package/es/demo-button/index.js +0 -27
  80. package/es/demo-button/style/index.js +0 -1
  81. package/es/demo-button/style/less.js +0 -1
  82. package/es/dialog/Dialog.js +0 -246
  83. package/es/dialog/index.css +0 -1
  84. package/es/dialog/index.js +0 -104
  85. package/es/dialog/index.less +0 -153
  86. package/es/dialog/style/index.js +0 -10
  87. package/es/dialog/style/less.js +0 -10
  88. package/es/dropdown-item/index.css +0 -1
  89. package/es/dropdown-item/index.js +0 -210
  90. package/es/dropdown-item/index.less +0 -39
  91. package/es/dropdown-item/style/index.js +0 -7
  92. package/es/dropdown-item/style/less.js +0 -7
  93. package/es/dropdown-menu/index.css +0 -1
  94. package/es/dropdown-menu/index.js +0 -132
  95. package/es/dropdown-menu/index.less +0 -77
  96. package/es/dropdown-menu/style/index.js +0 -2
  97. package/es/dropdown-menu/style/less.js +0 -2
  98. package/es/empty/Network.js +0 -193
  99. package/es/empty/index.css +0 -1
  100. package/es/empty/index.js +0 -81
  101. package/es/empty/index.less +0 -32
  102. package/es/empty/style/index.js +0 -2
  103. package/es/empty/style/less.js +0 -2
  104. package/es/field/index.css +0 -1
  105. package/es/field/index.js +0 -623
  106. package/es/field/index.less +0 -172
  107. package/es/field/style/index.js +0 -5
  108. package/es/field/style/less.js +0 -5
  109. package/es/form/index.js +0 -200
  110. package/es/form/style/index.js +0 -1
  111. package/es/form/style/less.js +0 -1
  112. package/es/goods-action/index.css +0 -1
  113. package/es/goods-action/index.js +0 -24
  114. package/es/goods-action/index.less +0 -19
  115. package/es/goods-action/style/index.js +0 -2
  116. package/es/goods-action/style/less.js +0 -2
  117. package/es/goods-action-button/index.css +0 -1
  118. package/es/goods-action-button/index.js +0 -57
  119. package/es/goods-action-button/index.less +0 -34
  120. package/es/goods-action-button/style/index.js +0 -6
  121. package/es/goods-action-button/style/less.js +0 -6
  122. package/es/icon/index.css +0 -1
  123. package/es/icon/index.js +0 -74
  124. package/es/icon/index.less +0 -11
  125. package/es/icon/local.css +0 -1
  126. package/es/icon/local.less +0 -1
  127. package/es/icon/style/index.js +0 -3
  128. package/es/icon/style/less.js +0 -3
  129. package/es/image/index.css +0 -1
  130. package/es/image/index.js +0 -189
  131. package/es/image/index.less +0 -47
  132. package/es/image/style/index.js +0 -4
  133. package/es/image/style/less.js +0 -4
  134. package/es/image-preview/ImagePreview.js +0 -234
  135. package/es/image-preview/ImagePreviewItem.js +0 -242
  136. package/es/image-preview/index.css +0 -1
  137. package/es/image-preview/index.js +0 -86
  138. package/es/image-preview/index.less +0 -103
  139. package/es/image-preview/shared.js +0 -7
  140. package/es/image-preview/style/index.js +0 -10
  141. package/es/image-preview/style/less.js +0 -10
  142. package/es/index-anchor/index.css +0 -1
  143. package/es/index-anchor/index.js +0 -83
  144. package/es/index-anchor/index.less +0 -21
  145. package/es/index-anchor/style/index.js +0 -2
  146. package/es/index-anchor/style/less.js +0 -2
  147. package/es/index-bar/index.css +0 -1
  148. package/es/index-bar/index.js +0 -222
  149. package/es/index-bar/index.less +0 -27
  150. package/es/index-bar/style/index.js +0 -2
  151. package/es/index-bar/style/less.js +0 -2
  152. package/es/index.js +0 -80
  153. package/es/info/index.css +0 -1
  154. package/es/info/index.js +0 -30
  155. package/es/info/index.less +0 -29
  156. package/es/info/style/index.js +0 -2
  157. package/es/info/style/less.js +0 -2
  158. package/es/lazyload/index.js +0 -2
  159. package/es/lazyload/style/index.js +0 -1
  160. package/es/lazyload/style/less.js +0 -1
  161. package/es/list/index.css +0 -1
  162. package/es/list/index.js +0 -178
  163. package/es/list/index.less +0 -21
  164. package/es/list/style/index.js +0 -3
  165. package/es/list/style/less.js +0 -3
  166. package/es/loading/index.css +0 -1
  167. package/es/loading/index.js +0 -86
  168. package/es/loading/index.less +0 -103
  169. package/es/loading/style/index.js +0 -2
  170. package/es/loading/style/less.js +0 -2
  171. package/es/locale/index.js +0 -27
  172. package/es/locale/lang/de-DE-formal.js +0 -90
  173. package/es/locale/lang/de-DE.js +0 -90
  174. package/es/locale/lang/en-US.js +0 -90
  175. package/es/locale/lang/es-ES.js +0 -90
  176. package/es/locale/lang/ja-JP.js +0 -91
  177. package/es/locale/lang/nb-NO.js +0 -90
  178. package/es/locale/lang/ro-RO.js +0 -90
  179. package/es/locale/lang/tr-TR.js +0 -90
  180. package/es/locale/lang/zh-CN.js +0 -91
  181. package/es/locale/lang/zh-HK.js +0 -91
  182. package/es/locale/lang/zh-TW.js +0 -91
  183. package/es/locale/style/index.js +0 -1
  184. package/es/locale/style/less.js +0 -1
  185. package/es/mixins/bind-event.js +0 -29
  186. package/es/mixins/checkbox.js +0 -139
  187. package/es/mixins/click-outside.js +0 -33
  188. package/es/mixins/close-on-popstate.js +0 -38
  189. package/es/mixins/field.js +0 -24
  190. package/es/mixins/popup/context.js +0 -10
  191. package/es/mixins/popup/index.js +0 -208
  192. package/es/mixins/popup/overlay.js +0 -76
  193. package/es/mixins/popup/type.js +0 -0
  194. package/es/mixins/portal.js +0 -48
  195. package/es/mixins/relation.js +0 -76
  196. package/es/mixins/slots.js +0 -23
  197. package/es/mixins/touch.js +0 -58
  198. package/es/nav-bar/index.css +0 -1
  199. package/es/nav-bar/index.js +0 -124
  200. package/es/nav-bar/index.less +0 -77
  201. package/es/nav-bar/style/index.js +0 -4
  202. package/es/nav-bar/style/less.js +0 -4
  203. package/es/number-keyboard/CollapseIcon.js +0 -16
  204. package/es/number-keyboard/DeleteIcon.js +0 -16
  205. package/es/number-keyboard/Key.js +0 -121
  206. package/es/number-keyboard/index.css +0 -1
  207. package/es/number-keyboard/index.js +0 -409
  208. package/es/number-keyboard/index.less +0 -191
  209. package/es/number-keyboard/style/index.js +0 -3
  210. package/es/number-keyboard/style/less.js +0 -3
  211. package/es/overlay/index.css +0 -1
  212. package/es/overlay/index.js +0 -53
  213. package/es/overlay/index.less +0 -11
  214. package/es/overlay/style/index.js +0 -2
  215. package/es/overlay/style/less.js +0 -2
  216. package/es/password-input/index.css +0 -1
  217. package/es/password-input/index.js +0 -84
  218. package/es/password-input/index.less +0 -83
  219. package/es/password-input/style/index.js +0 -2
  220. package/es/password-input/style/less.js +0 -2
  221. package/es/picker/PickerColumn.js +0 -300
  222. package/es/picker/index.css +0 -1
  223. package/es/picker/index.js +0 -383
  224. package/es/picker/index.less +0 -118
  225. package/es/picker/shared.js +0 -22
  226. package/es/picker/style/index.js +0 -3
  227. package/es/picker/style/less.js +0 -3
  228. package/es/popover/index.css +0 -1
  229. package/es/popover/index.js +0 -211
  230. package/es/popover/index.less +0 -270
  231. package/es/popover/style/index.js +0 -6
  232. package/es/popover/style/less.js +0 -6
  233. package/es/popup/index.css +0 -1
  234. package/es/popup/index.js +0 -111
  235. package/es/popup/index.less +0 -140
  236. package/es/popup/style/index.js +0 -5
  237. package/es/popup/style/less.js +0 -5
  238. package/es/pull-refresh/index.css +0 -1
  239. package/es/pull-refresh/index.js +0 -213
  240. package/es/pull-refresh/index.less +0 -25
  241. package/es/pull-refresh/style/index.js +0 -3
  242. package/es/pull-refresh/style/less.js +0 -3
  243. package/es/radio/index.css +0 -1
  244. package/es/radio/index.js +0 -32
  245. package/es/radio/index.less +0 -86
  246. package/es/radio/style/index.js +0 -4
  247. package/es/radio/style/less.js +0 -4
  248. package/es/radio-group/index.css +0 -1
  249. package/es/radio-group/index.js +0 -32
  250. package/es/radio-group/index.less +0 -8
  251. package/es/radio-group/style/index.js +0 -2
  252. package/es/radio-group/style/less.js +0 -2
  253. package/es/rate/index.css +0 -1
  254. package/es/rate/index.js +0 -227
  255. package/es/rate/index.less +0 -46
  256. package/es/rate/style/index.js +0 -4
  257. package/es/rate/style/less.js +0 -4
  258. package/es/search/index.css +0 -1
  259. package/es/search/index.js +0 -114
  260. package/es/search/index.less +0 -68
  261. package/es/search/style/index.js +0 -6
  262. package/es/search/style/less.js +0 -6
  263. package/es/slider/index.css +0 -1
  264. package/es/slider/index.js +0 -289
  265. package/es/slider/index.less +0 -94
  266. package/es/slider/style/index.js +0 -2
  267. package/es/slider/style/less.js +0 -2
  268. package/es/step/index.css +0 -1
  269. package/es/step/index.js +0 -115
  270. package/es/step/index.less +0 -151
  271. package/es/step/style/index.js +0 -4
  272. package/es/step/style/less.js +0 -4
  273. package/es/stepper/index.css +0 -1
  274. package/es/stepper/index.js +0 -355
  275. package/es/stepper/index.less +0 -129
  276. package/es/stepper/style/index.js +0 -2
  277. package/es/stepper/style/less.js +0 -2
  278. package/es/steps/index.css +0 -1
  279. package/es/steps/index.js +0 -35
  280. package/es/steps/index.less +0 -21
  281. package/es/steps/style/index.js +0 -2
  282. package/es/steps/style/less.js +0 -2
  283. package/es/sticky/index.css +0 -1
  284. package/es/sticky/index.js +0 -146
  285. package/es/sticky/index.less +0 -11
  286. package/es/sticky/style/index.js +0 -2
  287. package/es/sticky/style/less.js +0 -2
  288. package/es/style/animation.css +0 -1
  289. package/es/style/animation.less +0 -139
  290. package/es/style/base.css +0 -1
  291. package/es/style/base.less +0 -10
  292. package/es/style/clearfix.css +0 -1
  293. package/es/style/clearfix.less +0 -5
  294. package/es/style/ellipsis.css +0 -1
  295. package/es/style/ellipsis.less +0 -13
  296. package/es/style/hairline.css +0 -1
  297. package/es/style/hairline.less +0 -47
  298. package/es/style/iconfont.css +0 -1
  299. package/es/style/iconfont.less +0 -910
  300. package/es/style/mixins/clearfix.css +0 -0
  301. package/es/style/mixins/clearfix.less +0 -7
  302. package/es/style/mixins/ellipsis.css +0 -0
  303. package/es/style/mixins/ellipsis.less +0 -15
  304. package/es/style/mixins/hairline.css +0 -0
  305. package/es/style/mixins/hairline.less +0 -39
  306. package/es/style/normalize.css +0 -1
  307. package/es/style/normalize.less +0 -38
  308. package/es/style/reset.css +0 -1
  309. package/es/style/reset.less +0 -171
  310. package/es/style/var.css +0 -0
  311. package/es/style/var.less +0 -983
  312. package/es/swipe/index.css +0 -1
  313. package/es/swipe/index.js +0 -429
  314. package/es/swipe/index.less +0 -56
  315. package/es/swipe/style/index.js +0 -2
  316. package/es/swipe/style/less.js +0 -2
  317. package/es/swipe-item/index.css +0 -1
  318. package/es/swipe-item/index.js +0 -78
  319. package/es/swipe-item/index.less +0 -8
  320. package/es/swipe-item/style/index.js +0 -2
  321. package/es/swipe-item/style/less.js +0 -2
  322. package/es/switch/index.css +0 -1
  323. package/es/switch/index.js +0 -74
  324. package/es/switch/index.less +0 -57
  325. package/es/switch/shared.js +0 -19
  326. package/es/switch/style/index.js +0 -3
  327. package/es/switch/style/less.js +0 -3
  328. package/es/tab/index.css +0 -1
  329. package/es/tab/index.js +0 -102
  330. package/es/tab/index.less +0 -24
  331. package/es/tab/style/index.js +0 -2
  332. package/es/tab/style/less.js +0 -2
  333. package/es/tabs/Content.js +0 -78
  334. package/es/tabs/Title.js +0 -92
  335. package/es/tabs/index.css +0 -1
  336. package/es/tabs/index.js +0 -419
  337. package/es/tabs/index.less +0 -153
  338. package/es/tabs/style/index.js +0 -4
  339. package/es/tabs/style/less.js +0 -4
  340. package/es/tabs/utils.js +0 -43
  341. package/es/tag/index.css +0 -1
  342. package/es/tag/index.js +0 -74
  343. package/es/tag/index.less +0 -97
  344. package/es/tag/style/index.js +0 -4
  345. package/es/tag/style/less.js +0 -4
  346. package/es/toast/Toast.js +0 -155
  347. package/es/toast/index.css +0 -1
  348. package/es/toast/index.js +0 -189
  349. package/es/toast/index.less +0 -76
  350. package/es/toast/lock-click.js +0 -16
  351. package/es/toast/style/index.js +0 -7
  352. package/es/toast/style/less.js +0 -7
  353. package/es/types/address-edit.d.js +0 -11
  354. package/es/types/area.d.js +0 -11
  355. package/es/types/calendar.d.js +0 -11
  356. package/es/types/checkbox-group.d.js +0 -11
  357. package/es/types/checkbox.d.js +0 -11
  358. package/es/types/collapse-item.d.js +0 -11
  359. package/es/types/component.d.js +0 -11
  360. package/es/types/count-down.d.js +0 -11
  361. package/es/types/datetime-picker.d.js +0 -11
  362. package/es/types/dialog.d.js +0 -1
  363. package/es/types/dropdown-item.d.js +0 -11
  364. package/es/types/field.d.js +0 -11
  365. package/es/types/form.d.js +0 -11
  366. package/es/types/image-preview.d.js +0 -12
  367. package/es/types/index-bar.d.js +0 -11
  368. package/es/types/index.d.js +0 -590
  369. package/es/types/jsx.d.js +0 -0
  370. package/es/types/lazyload.d.js +0 -1
  371. package/es/types/list.d.js +0 -11
  372. package/es/types/locale.d.js +0 -1
  373. package/es/types/mixins/popup.d.js +0 -1
  374. package/es/types/notify.d.js +0 -2
  375. package/es/types/picker.d.js +0 -11
  376. package/es/types/progress.d.js +0 -11
  377. package/es/types/sku.d.js +0 -11
  378. package/es/types/swipe-cell.d.js +0 -11
  379. package/es/types/swipe.d.js +0 -11
  380. package/es/types/tabs.d.js +0 -11
  381. package/es/types/toast.d.js +0 -2
  382. package/es/types/uploader.d.js +0 -11
  383. package/es/uploader/index.css +0 -1
  384. package/es/uploader/index.js +0 -451
  385. package/es/uploader/index.less +0 -159
  386. package/es/uploader/style/index.js +0 -11
  387. package/es/uploader/style/less.js +0 -11
  388. package/es/uploader/utils.js +0 -57
  389. package/es/utils/constant.js +0 -10
  390. package/es/utils/create/bem.js +0 -39
  391. package/es/utils/create/component.js +0 -57
  392. package/es/utils/create/i18n.js +0 -16
  393. package/es/utils/create/index.js +0 -7
  394. package/es/utils/deep-assign.js +0 -24
  395. package/es/utils/deep-clone.js +0 -14
  396. package/es/utils/dom/event.js +0 -48
  397. package/es/utils/dom/node.js +0 -7
  398. package/es/utils/dom/raf.js +0 -36
  399. package/es/utils/dom/reset-scroll.js +0 -14
  400. package/es/utils/dom/scroll.js +0 -69
  401. package/es/utils/dom/style.js +0 -9
  402. package/es/utils/format/number.js +0 -47
  403. package/es/utils/format/string.js +0 -19
  404. package/es/utils/format/unit.js +0 -59
  405. package/es/utils/functional.js +0 -56
  406. package/es/utils/index.js +0 -29
  407. package/es/utils/interceptor.js +0 -22
  408. package/es/utils/router.js +0 -36
  409. package/es/utils/types.js +0 -0
  410. package/es/utils/validate/date.js +0 -4
  411. package/es/utils/validate/email.js +0 -5
  412. package/es/utils/validate/mobile.js +0 -4
  413. package/es/utils/validate/number.js +0 -11
  414. package/es/utils/validate/system.js +0 -9
  415. package/es/utils/vnodes.js +0 -36
  416. package/lib/action-sheet/index.css +0 -1
  417. package/lib/action-sheet/index.js +0 -194
  418. package/lib/action-sheet/index.less +0 -112
  419. package/lib/action-sheet/style/index.js +0 -7
  420. package/lib/action-sheet/style/less.js +0 -7
  421. package/lib/area/index.js +0 -331
  422. package/lib/area/style/index.js +0 -3
  423. package/lib/area/style/less.js +0 -3
  424. package/lib/button/index.css +0 -1
  425. package/lib/button/index.js +0 -188
  426. package/lib/button/index.less +0 -238
  427. package/lib/button/style/index.js +0 -5
  428. package/lib/button/style/less.js +0 -5
  429. package/lib/calendar/components/Header.js +0 -63
  430. package/lib/calendar/components/Month.js +0 -393
  431. package/lib/calendar/index.css +0 -1
  432. package/lib/calendar/index.js +0 -557
  433. package/lib/calendar/index.less +0 -210
  434. package/lib/calendar/style/index.js +0 -9
  435. package/lib/calendar/style/less.js +0 -9
  436. package/lib/calendar/utils.js +0 -91
  437. package/lib/cell/index.css +0 -1
  438. package/lib/cell/index.js +0 -137
  439. package/lib/cell/index.less +0 -103
  440. package/lib/cell/shared.js +0 -29
  441. package/lib/cell/style/index.js +0 -4
  442. package/lib/cell/style/less.js +0 -4
  443. package/lib/cell-group/index.css +0 -1
  444. package/lib/cell-group/index.js +0 -47
  445. package/lib/cell-group/index.less +0 -12
  446. package/lib/cell-group/style/index.js +0 -2
  447. package/lib/cell-group/style/less.js +0 -2
  448. package/lib/checkbox/index.css +0 -1
  449. package/lib/checkbox/index.js +0 -88
  450. package/lib/checkbox/index.less +0 -85
  451. package/lib/checkbox/style/index.js +0 -4
  452. package/lib/checkbox/style/less.js +0 -4
  453. package/lib/checkbox-group/index.css +0 -1
  454. package/lib/checkbox-group/index.js +0 -73
  455. package/lib/checkbox-group/index.less +0 -8
  456. package/lib/checkbox-group/style/index.js +0 -2
  457. package/lib/checkbox-group/style/less.js +0 -2
  458. package/lib/collapse/index.js +0 -48
  459. package/lib/collapse/style/index.js +0 -1
  460. package/lib/collapse/style/less.js +0 -1
  461. package/lib/collapse-item/index.css +0 -1
  462. package/lib/collapse-item/index.js +0 -213
  463. package/lib/collapse-item/index.less +0 -67
  464. package/lib/collapse-item/style/index.js +0 -5
  465. package/lib/collapse-item/style/less.js +0 -5
  466. package/lib/contact-card/index.css +0 -1
  467. package/lib/contact-card/index.js +0 -72
  468. package/lib/contact-card/index.less +0 -42
  469. package/lib/contact-card/style/index.js +0 -5
  470. package/lib/contact-card/style/less.js +0 -5
  471. package/lib/contact-edit/index.css +0 -1
  472. package/lib/contact-edit/index.js +0 -210
  473. package/lib/contact-edit/index.less +0 -30
  474. package/lib/contact-edit/style/index.js +0 -14
  475. package/lib/contact-edit/style/less.js +0 -14
  476. package/lib/contact-list/index.css +0 -1
  477. package/lib/contact-list/index.js +0 -138
  478. package/lib/contact-list/index.less +0 -54
  479. package/lib/contact-list/style/index.js +0 -10
  480. package/lib/contact-list/style/less.js +0 -10
  481. package/lib/datetime-picker/DatePicker.js +0 -261
  482. package/lib/datetime-picker/TimePicker.js +0 -117
  483. package/lib/datetime-picker/index.js +0 -41
  484. package/lib/datetime-picker/shared.js +0 -124
  485. package/lib/datetime-picker/style/index.js +0 -3
  486. package/lib/datetime-picker/style/less.js +0 -3
  487. package/lib/datetime-picker/utils.js +0 -39
  488. package/lib/demo-button/index-sfc.css +0 -1
  489. package/lib/demo-button/index-sfc.less +0 -9
  490. package/lib/demo-button/index.js +0 -33
  491. package/lib/demo-button/style/index.js +0 -1
  492. package/lib/demo-button/style/less.js +0 -1
  493. package/lib/dialog/Dialog.js +0 -261
  494. package/lib/dialog/index.css +0 -1
  495. package/lib/dialog/index.js +0 -116
  496. package/lib/dialog/index.less +0 -153
  497. package/lib/dialog/style/index.js +0 -10
  498. package/lib/dialog/style/less.js +0 -10
  499. package/lib/dropdown-item/index.css +0 -1
  500. package/lib/dropdown-item/index.js +0 -225
  501. package/lib/dropdown-item/index.less +0 -39
  502. package/lib/dropdown-item/style/index.js +0 -7
  503. package/lib/dropdown-item/style/less.js +0 -7
  504. package/lib/dropdown-menu/index.css +0 -1
  505. package/lib/dropdown-menu/index.js +0 -142
  506. package/lib/dropdown-menu/index.less +0 -77
  507. package/lib/dropdown-menu/style/index.js +0 -2
  508. package/lib/dropdown-menu/style/less.js +0 -2
  509. package/lib/empty/Network.js +0 -198
  510. package/lib/empty/index.css +0 -1
  511. package/lib/empty/index.js +0 -92
  512. package/lib/empty/index.less +0 -32
  513. package/lib/empty/style/index.js +0 -2
  514. package/lib/empty/style/less.js +0 -2
  515. package/lib/field/index.css +0 -1
  516. package/lib/field/index.js +0 -639
  517. package/lib/field/index.less +0 -172
  518. package/lib/field/style/index.js +0 -5
  519. package/lib/field/style/less.js +0 -5
  520. package/lib/form/index.js +0 -208
  521. package/lib/form/style/index.js +0 -1
  522. package/lib/form/style/less.js +0 -1
  523. package/lib/goods-action/index.css +0 -1
  524. package/lib/goods-action/index.js +0 -32
  525. package/lib/goods-action/index.less +0 -19
  526. package/lib/goods-action/style/index.js +0 -2
  527. package/lib/goods-action/style/less.js +0 -2
  528. package/lib/goods-action-button/index.css +0 -1
  529. package/lib/goods-action-button/index.js +0 -70
  530. package/lib/goods-action-button/index.less +0 -34
  531. package/lib/goods-action-button/style/index.js +0 -6
  532. package/lib/goods-action-button/style/less.js +0 -6
  533. package/lib/icon/index.css +0 -1
  534. package/lib/icon/index.js +0 -87
  535. package/lib/icon/index.less +0 -11
  536. package/lib/icon/local.css +0 -1
  537. package/lib/icon/local.less +0 -1
  538. package/lib/icon/style/index.js +0 -3
  539. package/lib/icon/style/less.js +0 -3
  540. package/lib/image/index.css +0 -1
  541. package/lib/image/index.js +0 -199
  542. package/lib/image/index.less +0 -47
  543. package/lib/image/style/index.js +0 -4
  544. package/lib/image/style/less.js +0 -4
  545. package/lib/image-preview/ImagePreview.js +0 -250
  546. package/lib/image-preview/ImagePreviewItem.js +0 -256
  547. package/lib/image-preview/index.css +0 -1
  548. package/lib/image-preview/index.js +0 -96
  549. package/lib/image-preview/index.less +0 -103
  550. package/lib/image-preview/shared.js +0 -13
  551. package/lib/image-preview/style/index.js +0 -10
  552. package/lib/image-preview/style/less.js +0 -10
  553. package/lib/index-anchor/index.css +0 -1
  554. package/lib/index-anchor/index.js +0 -93
  555. package/lib/index-anchor/index.less +0 -21
  556. package/lib/index-anchor/style/index.js +0 -2
  557. package/lib/index-anchor/style/less.js +0 -2
  558. package/lib/index-bar/index.css +0 -1
  559. package/lib/index-bar/index.js +0 -235
  560. package/lib/index-bar/index.less +0 -27
  561. package/lib/index-bar/style/index.js +0 -2
  562. package/lib/index-bar/style/less.js +0 -2
  563. package/lib/index.css +0 -1
  564. package/lib/index.js +0 -262
  565. package/lib/index.less +0 -52
  566. package/lib/info/index.css +0 -1
  567. package/lib/info/index.js +0 -42
  568. package/lib/info/index.less +0 -29
  569. package/lib/info/style/index.js +0 -2
  570. package/lib/info/style/less.js +0 -2
  571. package/lib/lazyload/index.js +0 -11
  572. package/lib/lazyload/style/index.js +0 -1
  573. package/lib/lazyload/style/less.js +0 -1
  574. package/lib/list/index.css +0 -1
  575. package/lib/list/index.js +0 -191
  576. package/lib/list/index.less +0 -21
  577. package/lib/list/style/index.js +0 -3
  578. package/lib/list/style/less.js +0 -3
  579. package/lib/loading/index.css +0 -1
  580. package/lib/loading/index.js +0 -98
  581. package/lib/loading/index.less +0 -103
  582. package/lib/loading/style/index.js +0 -2
  583. package/lib/loading/style/less.js +0 -2
  584. package/lib/locale/index.js +0 -38
  585. package/lib/locale/lang/de-DE-formal.js +0 -95
  586. package/lib/locale/lang/de-DE.js +0 -95
  587. package/lib/locale/lang/en-US.js +0 -95
  588. package/lib/locale/lang/es-ES.js +0 -95
  589. package/lib/locale/lang/ja-JP.js +0 -96
  590. package/lib/locale/lang/nb-NO.js +0 -95
  591. package/lib/locale/lang/ro-RO.js +0 -95
  592. package/lib/locale/lang/tr-TR.js +0 -95
  593. package/lib/locale/lang/zh-CN.js +0 -96
  594. package/lib/locale/lang/zh-HK.js +0 -96
  595. package/lib/locale/lang/zh-TW.js +0 -96
  596. package/lib/locale/style/index.js +0 -1
  597. package/lib/locale/style/less.js +0 -1
  598. package/lib/mixins/bind-event.js +0 -36
  599. package/lib/mixins/checkbox.js +0 -152
  600. package/lib/mixins/click-outside.js +0 -41
  601. package/lib/mixins/close-on-popstate.js +0 -46
  602. package/lib/mixins/field.js +0 -29
  603. package/lib/mixins/popup/context.js +0 -15
  604. package/lib/mixins/popup/index.js +0 -224
  605. package/lib/mixins/popup/overlay.js +0 -95
  606. package/lib/mixins/popup/type.js +0 -1
  607. package/lib/mixins/portal.js +0 -53
  608. package/lib/mixins/relation.js +0 -84
  609. package/lib/mixins/slots.js +0 -29
  610. package/lib/mixins/touch.js +0 -65
  611. package/lib/nav-bar/index.css +0 -1
  612. package/lib/nav-bar/index.js +0 -135
  613. package/lib/nav-bar/index.less +0 -77
  614. package/lib/nav-bar/style/index.js +0 -4
  615. package/lib/nav-bar/style/less.js +0 -4
  616. package/lib/number-keyboard/CollapseIcon.js +0 -21
  617. package/lib/number-keyboard/DeleteIcon.js +0 -21
  618. package/lib/number-keyboard/Key.js +0 -134
  619. package/lib/number-keyboard/index.css +0 -1
  620. package/lib/number-keyboard/index.js +0 -423
  621. package/lib/number-keyboard/index.less +0 -191
  622. package/lib/number-keyboard/style/index.js +0 -3
  623. package/lib/number-keyboard/style/less.js +0 -3
  624. package/lib/overlay/index.css +0 -1
  625. package/lib/overlay/index.js +0 -67
  626. package/lib/overlay/index.less +0 -11
  627. package/lib/overlay/style/index.js +0 -2
  628. package/lib/overlay/style/less.js +0 -2
  629. package/lib/password-input/index.css +0 -1
  630. package/lib/password-input/index.js +0 -97
  631. package/lib/password-input/index.less +0 -83
  632. package/lib/password-input/style/index.js +0 -2
  633. package/lib/password-input/style/less.js +0 -2
  634. package/lib/picker/PickerColumn.js +0 -314
  635. package/lib/picker/index.css +0 -1
  636. package/lib/picker/index.js +0 -399
  637. package/lib/picker/index.less +0 -118
  638. package/lib/picker/shared.js +0 -28
  639. package/lib/picker/style/index.js +0 -3
  640. package/lib/picker/style/less.js +0 -3
  641. package/lib/popover/index.css +0 -1
  642. package/lib/popover/index.js +0 -226
  643. package/lib/popover/index.less +0 -270
  644. package/lib/popover/style/index.js +0 -6
  645. package/lib/popover/style/less.js +0 -6
  646. package/lib/popup/index.css +0 -1
  647. package/lib/popup/index.js +0 -122
  648. package/lib/popup/index.less +0 -140
  649. package/lib/popup/style/index.js +0 -5
  650. package/lib/popup/style/less.js +0 -5
  651. package/lib/pull-refresh/index.css +0 -1
  652. package/lib/pull-refresh/index.js +0 -227
  653. package/lib/pull-refresh/index.less +0 -25
  654. package/lib/pull-refresh/style/index.js +0 -3
  655. package/lib/pull-refresh/style/less.js +0 -3
  656. package/lib/radio/index.css +0 -1
  657. package/lib/radio/index.js +0 -40
  658. package/lib/radio/index.less +0 -86
  659. package/lib/radio/style/index.js +0 -4
  660. package/lib/radio/style/less.js +0 -4
  661. package/lib/radio-group/index.css +0 -1
  662. package/lib/radio-group/index.js +0 -41
  663. package/lib/radio-group/index.less +0 -8
  664. package/lib/radio-group/style/index.js +0 -2
  665. package/lib/radio-group/style/less.js +0 -2
  666. package/lib/rate/index.css +0 -1
  667. package/lib/rate/index.js +0 -240
  668. package/lib/rate/index.less +0 -46
  669. package/lib/rate/style/index.js +0 -4
  670. package/lib/rate/style/less.js +0 -4
  671. package/lib/search/index.css +0 -1
  672. package/lib/search/index.js +0 -128
  673. package/lib/search/index.less +0 -68
  674. package/lib/search/style/index.js +0 -6
  675. package/lib/search/style/less.js +0 -6
  676. package/lib/slider/index.css +0 -1
  677. package/lib/slider/index.js +0 -300
  678. package/lib/slider/index.less +0 -94
  679. package/lib/slider/style/index.js +0 -2
  680. package/lib/slider/style/less.js +0 -2
  681. package/lib/step/index.css +0 -1
  682. package/lib/step/index.js +0 -127
  683. package/lib/step/index.less +0 -151
  684. package/lib/step/style/index.js +0 -4
  685. package/lib/step/style/less.js +0 -4
  686. package/lib/stepper/index.css +0 -1
  687. package/lib/stepper/index.js +0 -369
  688. package/lib/stepper/index.less +0 -129
  689. package/lib/stepper/style/index.js +0 -2
  690. package/lib/stepper/style/less.js +0 -2
  691. package/lib/steps/index.css +0 -1
  692. package/lib/steps/index.js +0 -43
  693. package/lib/steps/index.less +0 -21
  694. package/lib/steps/style/index.js +0 -2
  695. package/lib/steps/style/less.js +0 -2
  696. package/lib/sticky/index.css +0 -1
  697. package/lib/sticky/index.js +0 -157
  698. package/lib/sticky/index.less +0 -11
  699. package/lib/sticky/style/index.js +0 -2
  700. package/lib/sticky/style/less.js +0 -2
  701. package/lib/style/animation.css +0 -1
  702. package/lib/style/animation.less +0 -139
  703. package/lib/style/base.css +0 -1
  704. package/lib/style/base.less +0 -10
  705. package/lib/style/clearfix.css +0 -1
  706. package/lib/style/clearfix.less +0 -5
  707. package/lib/style/ellipsis.css +0 -1
  708. package/lib/style/ellipsis.less +0 -13
  709. package/lib/style/hairline.css +0 -1
  710. package/lib/style/hairline.less +0 -47
  711. package/lib/style/iconfont.css +0 -1
  712. package/lib/style/iconfont.less +0 -910
  713. package/lib/style/mixins/clearfix.css +0 -0
  714. package/lib/style/mixins/clearfix.less +0 -7
  715. package/lib/style/mixins/ellipsis.css +0 -0
  716. package/lib/style/mixins/ellipsis.less +0 -15
  717. package/lib/style/mixins/hairline.css +0 -0
  718. package/lib/style/mixins/hairline.less +0 -39
  719. package/lib/style/normalize.css +0 -1
  720. package/lib/style/normalize.less +0 -38
  721. package/lib/style/reset.css +0 -1
  722. package/lib/style/reset.less +0 -171
  723. package/lib/style/var.css +0 -0
  724. package/lib/style/var.less +0 -983
  725. package/lib/swipe/index.css +0 -1
  726. package/lib/swipe/index.js +0 -443
  727. package/lib/swipe/index.less +0 -56
  728. package/lib/swipe/style/index.js +0 -2
  729. package/lib/swipe/style/less.js +0 -2
  730. package/lib/swipe-item/index.css +0 -1
  731. package/lib/swipe-item/index.js +0 -89
  732. package/lib/swipe-item/index.less +0 -8
  733. package/lib/swipe-item/style/index.js +0 -2
  734. package/lib/swipe-item/style/less.js +0 -2
  735. package/lib/switch/index.css +0 -1
  736. package/lib/switch/index.js +0 -86
  737. package/lib/switch/index.less +0 -57
  738. package/lib/switch/shared.js +0 -25
  739. package/lib/switch/style/index.js +0 -3
  740. package/lib/switch/style/less.js +0 -3
  741. package/lib/tab/index.css +0 -1
  742. package/lib/tab/index.js +0 -114
  743. package/lib/tab/index.less +0 -24
  744. package/lib/tab/style/index.js +0 -2
  745. package/lib/tab/style/less.js +0 -2
  746. package/lib/tabs/Content.js +0 -90
  747. package/lib/tabs/Title.js +0 -102
  748. package/lib/tabs/index.css +0 -1
  749. package/lib/tabs/index.js +0 -441
  750. package/lib/tabs/index.less +0 -153
  751. package/lib/tabs/style/index.js +0 -4
  752. package/lib/tabs/style/less.js +0 -4
  753. package/lib/tabs/utils.js +0 -53
  754. package/lib/tag/index.css +0 -1
  755. package/lib/tag/index.js +0 -87
  756. package/lib/tag/index.less +0 -97
  757. package/lib/tag/style/index.js +0 -4
  758. package/lib/tag/style/less.js +0 -4
  759. package/lib/tlvant.js +0 -16704
  760. package/lib/tlvant.min.js +0 -7
  761. package/lib/toast/Toast.js +0 -168
  762. package/lib/toast/index.css +0 -1
  763. package/lib/toast/index.js +0 -200
  764. package/lib/toast/index.less +0 -76
  765. package/lib/toast/lock-click.js +0 -21
  766. package/lib/toast/style/index.js +0 -7
  767. package/lib/toast/style/less.js +0 -7
  768. package/lib/types/address-edit.d.js +0 -22
  769. package/lib/types/area.d.js +0 -22
  770. package/lib/types/calendar.d.js +0 -22
  771. package/lib/types/checkbox-group.d.js +0 -22
  772. package/lib/types/checkbox.d.js +0 -22
  773. package/lib/types/collapse-item.d.js +0 -22
  774. package/lib/types/component.d.js +0 -22
  775. package/lib/types/count-down.d.js +0 -22
  776. package/lib/types/datetime-picker.d.js +0 -22
  777. package/lib/types/dialog.d.js +0 -6
  778. package/lib/types/dropdown-item.d.js +0 -22
  779. package/lib/types/field.d.js +0 -22
  780. package/lib/types/form.d.js +0 -22
  781. package/lib/types/image-preview.d.js +0 -24
  782. package/lib/types/index-bar.d.js +0 -22
  783. package/lib/types/index.d.js +0 -862
  784. package/lib/types/jsx.d.js +0 -1
  785. package/lib/types/lazyload.d.js +0 -6
  786. package/lib/types/list.d.js +0 -22
  787. package/lib/types/locale.d.js +0 -6
  788. package/lib/types/mixins/popup.d.js +0 -8
  789. package/lib/types/notify.d.js +0 -11
  790. package/lib/types/picker.d.js +0 -22
  791. package/lib/types/progress.d.js +0 -22
  792. package/lib/types/sku.d.js +0 -22
  793. package/lib/types/swipe-cell.d.js +0 -22
  794. package/lib/types/swipe.d.js +0 -22
  795. package/lib/types/tabs.d.js +0 -22
  796. package/lib/types/toast.d.js +0 -11
  797. package/lib/types/uploader.d.js +0 -22
  798. package/lib/uploader/index.css +0 -1
  799. package/lib/uploader/index.js +0 -467
  800. package/lib/uploader/index.less +0 -159
  801. package/lib/uploader/style/index.js +0 -11
  802. package/lib/uploader/style/less.js +0 -11
  803. package/lib/uploader/utils.js +0 -71
  804. package/lib/utils/constant.js +0 -22
  805. package/lib/utils/create/bem.js +0 -44
  806. package/lib/utils/create/component.js +0 -70
  807. package/lib/utils/create/i18n.js +0 -27
  808. package/lib/utils/create/index.js +0 -15
  809. package/lib/utils/deep-assign.js +0 -30
  810. package/lib/utils/deep-clone.js +0 -20
  811. package/lib/utils/dom/event.js +0 -62
  812. package/lib/utils/dom/node.js +0 -12
  813. package/lib/utils/dom/raf.js +0 -47
  814. package/lib/utils/dom/reset-scroll.js +0 -21
  815. package/lib/utils/dom/scroll.js +0 -89
  816. package/lib/utils/dom/style.js +0 -14
  817. package/lib/utils/format/number.js +0 -53
  818. package/lib/utils/format/string.js +0 -26
  819. package/lib/utils/format/unit.js +0 -68
  820. package/lib/utils/functional.js +0 -68
  821. package/lib/utils/index.js +0 -56
  822. package/lib/utils/interceptor.js +0 -28
  823. package/lib/utils/router.js +0 -46
  824. package/lib/utils/types.js +0 -1
  825. package/lib/utils/validate/date.js +0 -10
  826. package/lib/utils/validate/email.js +0 -10
  827. package/lib/utils/validate/mobile.js +0 -9
  828. package/lib/utils/validate/number.js +0 -18
  829. package/lib/utils/validate/system.js +0 -17
  830. package/lib/utils/vnodes.js +0 -41
@@ -1 +0,0 @@
1
- .van-swipe{position:relative;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.van-swipe__track--vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.van-swipe__indicators{position:absolute;bottom:12px;left:50%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:6px}.van-swipe__indicator{width:6px;height:6px;background-color:#ebedf0;border-radius:100%;opacity:.3;-webkit-transition:opacity .2s,background-color .2s;transition:opacity .2s,background-color .2s}.van-swipe__indicator:not(:last-child){margin-right:6px}.van-swipe__indicator--active{background-color:#1989fa;opacity:1}
@@ -1,443 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _utils = require("../utils");
7
-
8
- var _style = require("../utils/dom/style");
9
-
10
- var _event = require("../utils/dom/event");
11
-
12
- var _raf = require("../utils/dom/raf");
13
-
14
- var _number = require("../utils/format/number");
15
-
16
- var _touch = require("../mixins/touch");
17
-
18
- var _relation = require("../mixins/relation");
19
-
20
- var _bindEvent = require("../mixins/bind-event");
21
-
22
- // Utils
23
- // Mixins
24
- var _createNamespace = (0, _utils.createNamespace)('swipe'),
25
- createComponent = _createNamespace[0],
26
- bem = _createNamespace[1];
27
-
28
- var _default = createComponent({
29
- mixins: [_touch.TouchMixin, (0, _relation.ParentMixin)('vanSwipe'), (0, _bindEvent.BindEventMixin)(function (bind, isBind) {
30
- bind(window, 'resize', this.resize, true);
31
- bind(window, 'orientationchange', this.resize, true);
32
- bind(window, 'visibilitychange', this.onVisibilityChange);
33
-
34
- if (isBind) {
35
- this.initialize();
36
- } else {
37
- this.clear();
38
- }
39
- })],
40
- props: {
41
- width: [Number, String],
42
- height: [Number, String],
43
- autoplay: [Number, String],
44
- vertical: Boolean,
45
- lazyRender: Boolean,
46
- indicatorColor: String,
47
- loop: {
48
- type: Boolean,
49
- default: true
50
- },
51
- duration: {
52
- type: [Number, String],
53
- default: 500
54
- },
55
- touchable: {
56
- type: Boolean,
57
- default: true
58
- },
59
- initialSwipe: {
60
- type: [Number, String],
61
- default: 0
62
- },
63
- showIndicators: {
64
- type: Boolean,
65
- default: true
66
- },
67
- stopPropagation: {
68
- type: Boolean,
69
- default: true
70
- }
71
- },
72
- data: function data() {
73
- return {
74
- rect: null,
75
- offset: 0,
76
- active: 0,
77
- deltaX: 0,
78
- deltaY: 0,
79
- swiping: false,
80
- computedWidth: 0,
81
- computedHeight: 0
82
- };
83
- },
84
- watch: {
85
- children: function children() {
86
- this.initialize();
87
- },
88
- initialSwipe: function initialSwipe() {
89
- this.initialize();
90
- },
91
- autoplay: function autoplay(_autoplay) {
92
- if (_autoplay > 0) {
93
- this.autoPlay();
94
- } else {
95
- this.clear();
96
- }
97
- }
98
- },
99
- computed: {
100
- count: function count() {
101
- return this.children.length;
102
- },
103
- maxCount: function maxCount() {
104
- return Math.ceil(Math.abs(this.minOffset) / this.size);
105
- },
106
- delta: function delta() {
107
- return this.vertical ? this.deltaY : this.deltaX;
108
- },
109
- size: function size() {
110
- return this[this.vertical ? 'computedHeight' : 'computedWidth'];
111
- },
112
- trackSize: function trackSize() {
113
- return this.count * this.size;
114
- },
115
- activeIndicator: function activeIndicator() {
116
- return (this.active + this.count) % this.count;
117
- },
118
- isCorrectDirection: function isCorrectDirection() {
119
- var expect = this.vertical ? 'vertical' : 'horizontal';
120
- return this.direction === expect;
121
- },
122
- trackStyle: function trackStyle() {
123
- var style = {
124
- transitionDuration: (this.swiping ? 0 : this.duration) + "ms",
125
- transform: "translate" + (this.vertical ? 'Y' : 'X') + "(" + this.offset + "px)"
126
- };
127
-
128
- if (this.size) {
129
- var mainAxis = this.vertical ? 'height' : 'width';
130
- var crossAxis = this.vertical ? 'width' : 'height';
131
- style[mainAxis] = this.trackSize + "px";
132
- style[crossAxis] = this[crossAxis] ? this[crossAxis] + "px" : '';
133
- }
134
-
135
- return style;
136
- },
137
- indicatorStyle: function indicatorStyle() {
138
- return {
139
- backgroundColor: this.indicatorColor
140
- };
141
- },
142
- minOffset: function minOffset() {
143
- return (this.vertical ? this.rect.height : this.rect.width) - this.size * this.count;
144
- }
145
- },
146
- mounted: function mounted() {
147
- this.bindTouchEvent(this.$refs.track);
148
- },
149
- methods: {
150
- // initialize swipe position
151
- initialize: function initialize(active) {
152
- if (active === void 0) {
153
- active = +this.initialSwipe;
154
- }
155
-
156
- if (!this.$el || (0, _style.isHidden)(this.$el)) {
157
- return;
158
- }
159
-
160
- clearTimeout(this.timer);
161
- var rect = this.$el.getBoundingClientRect();
162
- this.rect = rect;
163
- this.swiping = true;
164
- this.active = active;
165
- this.computedWidth = +this.width || rect.width;
166
- this.computedHeight = +this.height || rect.height;
167
- this.offset = this.getTargetOffset(active);
168
- this.children.forEach(function (swipe) {
169
- swipe.offset = 0;
170
- });
171
- this.autoPlay();
172
- },
173
- // @exposed-api
174
- resize: function resize() {
175
- this.initialize(this.activeIndicator);
176
- },
177
- onVisibilityChange: function onVisibilityChange() {
178
- if (document.hidden) {
179
- this.clear();
180
- } else {
181
- this.autoPlay();
182
- }
183
- },
184
- onTouchStart: function onTouchStart(event) {
185
- if (!this.touchable) return;
186
- this.clear();
187
- this.touchStartTime = Date.now();
188
- this.touchStart(event);
189
- this.correctPosition();
190
- },
191
- onTouchMove: function onTouchMove(event) {
192
- if (!this.touchable || !this.swiping) return;
193
- this.touchMove(event);
194
-
195
- if (this.isCorrectDirection) {
196
- (0, _event.preventDefault)(event, this.stopPropagation);
197
- this.move({
198
- offset: this.delta
199
- });
200
- }
201
- },
202
- onTouchEnd: function onTouchEnd() {
203
- if (!this.touchable || !this.swiping) return;
204
- var size = this.size,
205
- delta = this.delta;
206
- var duration = Date.now() - this.touchStartTime;
207
- var speed = delta / duration;
208
- var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(delta) > size / 2;
209
-
210
- if (shouldSwipe && this.isCorrectDirection) {
211
- var offset = this.vertical ? this.offsetY : this.offsetX;
212
- var pace = 0;
213
-
214
- if (this.loop) {
215
- pace = offset > 0 ? delta > 0 ? -1 : 1 : 0;
216
- } else {
217
- pace = -Math[delta > 0 ? 'ceil' : 'floor'](delta / size);
218
- }
219
-
220
- this.move({
221
- pace: pace,
222
- emitChange: true
223
- });
224
- } else if (delta) {
225
- this.move({
226
- pace: 0
227
- });
228
- }
229
-
230
- this.swiping = false;
231
- this.autoPlay();
232
- },
233
- getTargetActive: function getTargetActive(pace) {
234
- var active = this.active,
235
- count = this.count,
236
- maxCount = this.maxCount;
237
-
238
- if (pace) {
239
- if (this.loop) {
240
- return (0, _number.range)(active + pace, -1, count);
241
- }
242
-
243
- return (0, _number.range)(active + pace, 0, maxCount);
244
- }
245
-
246
- return active;
247
- },
248
- getTargetOffset: function getTargetOffset(targetActive, offset) {
249
- if (offset === void 0) {
250
- offset = 0;
251
- }
252
-
253
- var currentPosition = targetActive * this.size;
254
-
255
- if (!this.loop) {
256
- currentPosition = Math.min(currentPosition, -this.minOffset);
257
- }
258
-
259
- var targetOffset = offset - currentPosition;
260
-
261
- if (!this.loop) {
262
- targetOffset = (0, _number.range)(targetOffset, this.minOffset, 0);
263
- }
264
-
265
- return targetOffset;
266
- },
267
- move: function move(_ref) {
268
- var _ref$pace = _ref.pace,
269
- pace = _ref$pace === void 0 ? 0 : _ref$pace,
270
- _ref$offset = _ref.offset,
271
- offset = _ref$offset === void 0 ? 0 : _ref$offset,
272
- emitChange = _ref.emitChange;
273
- var loop = this.loop,
274
- count = this.count,
275
- active = this.active,
276
- children = this.children,
277
- trackSize = this.trackSize,
278
- minOffset = this.minOffset;
279
-
280
- if (count <= 1) {
281
- return;
282
- }
283
-
284
- var targetActive = this.getTargetActive(pace);
285
- var targetOffset = this.getTargetOffset(targetActive, offset); // auto move first and last swipe in loop mode
286
-
287
- if (loop) {
288
- if (children[0] && targetOffset !== minOffset) {
289
- var outRightBound = targetOffset < minOffset;
290
- children[0].offset = outRightBound ? trackSize : 0;
291
- }
292
-
293
- if (children[count - 1] && targetOffset !== 0) {
294
- var outLeftBound = targetOffset > 0;
295
- children[count - 1].offset = outLeftBound ? -trackSize : 0;
296
- }
297
- }
298
-
299
- this.active = targetActive;
300
- this.offset = targetOffset;
301
-
302
- if (emitChange && targetActive !== active) {
303
- this.$emit('change', this.activeIndicator);
304
- }
305
- },
306
- // @exposed-api
307
- prev: function prev() {
308
- var _this = this;
309
-
310
- this.correctPosition();
311
- this.resetTouchStatus();
312
- (0, _raf.doubleRaf)(function () {
313
- _this.swiping = false;
314
-
315
- _this.move({
316
- pace: -1,
317
- emitChange: true
318
- });
319
- });
320
- },
321
- // @exposed-api
322
- next: function next() {
323
- var _this2 = this;
324
-
325
- this.correctPosition();
326
- this.resetTouchStatus();
327
- (0, _raf.doubleRaf)(function () {
328
- _this2.swiping = false;
329
-
330
- _this2.move({
331
- pace: 1,
332
- emitChange: true
333
- });
334
- });
335
- },
336
- // @exposed-api
337
- swipeTo: function swipeTo(index, options) {
338
- var _this3 = this;
339
-
340
- if (options === void 0) {
341
- options = {};
342
- }
343
-
344
- this.correctPosition();
345
- this.resetTouchStatus();
346
- (0, _raf.doubleRaf)(function () {
347
- var targetIndex;
348
-
349
- if (_this3.loop && index === _this3.count) {
350
- targetIndex = _this3.active === 0 ? 0 : index;
351
- } else {
352
- targetIndex = index % _this3.count;
353
- }
354
-
355
- if (options.immediate) {
356
- (0, _raf.doubleRaf)(function () {
357
- _this3.swiping = false;
358
- });
359
- } else {
360
- _this3.swiping = false;
361
- }
362
-
363
- _this3.move({
364
- pace: targetIndex - _this3.active,
365
- emitChange: true
366
- });
367
- });
368
- },
369
- correctPosition: function correctPosition() {
370
- this.swiping = true;
371
-
372
- if (this.active <= -1) {
373
- this.move({
374
- pace: this.count
375
- });
376
- }
377
-
378
- if (this.active >= this.count) {
379
- this.move({
380
- pace: -this.count
381
- });
382
- }
383
- },
384
- clear: function clear() {
385
- clearTimeout(this.timer);
386
- },
387
- autoPlay: function autoPlay() {
388
- var _this4 = this;
389
-
390
- var autoplay = this.autoplay;
391
-
392
- if (autoplay > 0 && this.count > 1) {
393
- this.clear();
394
- this.timer = setTimeout(function () {
395
- _this4.next();
396
-
397
- _this4.autoPlay();
398
- }, autoplay);
399
- }
400
- },
401
- genIndicator: function genIndicator() {
402
- var _this5 = this;
403
-
404
- var h = this.$createElement;
405
- var count = this.count,
406
- activeIndicator = this.activeIndicator;
407
- var slot = this.slots('indicator');
408
-
409
- if (slot) {
410
- return slot;
411
- }
412
-
413
- if (this.showIndicators && count > 1) {
414
- return h("div", {
415
- "class": bem('indicators', {
416
- vertical: this.vertical
417
- })
418
- }, [Array.apply(void 0, Array(count)).map(function (empty, index) {
419
- return h("i", {
420
- "class": bem('indicator', {
421
- active: index === activeIndicator
422
- }),
423
- "style": index === activeIndicator ? _this5.indicatorStyle : null
424
- });
425
- })]);
426
- }
427
- }
428
- },
429
- render: function render() {
430
- var h = arguments[0];
431
- return h("div", {
432
- "class": bem()
433
- }, [h("div", {
434
- "ref": "track",
435
- "style": this.trackStyle,
436
- "class": bem('track', {
437
- vertical: this.vertical
438
- })
439
- }, [this.slots()]), this.genIndicator()]);
440
- }
441
- });
442
-
443
- exports.default = _default;
@@ -1,56 +0,0 @@
1
- @import '../style/var';
2
-
3
- .van-swipe {
4
- position: relative;
5
- overflow: hidden;
6
- cursor: grab;
7
- user-select: none;
8
-
9
- &__track {
10
- display: flex;
11
- height: 100%;
12
-
13
- &--vertical {
14
- flex-direction: column;
15
- }
16
- }
17
-
18
- &__indicators {
19
- position: absolute;
20
- bottom: @swipe-indicator-margin;
21
- left: 50%;
22
- display: flex;
23
- transform: translateX(-50%);
24
-
25
- &--vertical {
26
- top: 50%;
27
- bottom: auto;
28
- left: @swipe-indicator-margin;
29
- flex-direction: column;
30
- transform: translateY(-50%);
31
-
32
- .van-swipe__indicator:not(:last-child) {
33
- margin-bottom: @swipe-indicator-size;
34
- }
35
- }
36
- }
37
-
38
- &__indicator {
39
- width: @swipe-indicator-size;
40
- height: @swipe-indicator-size;
41
- background-color: @swipe-indicator-inactive-background-color;
42
- border-radius: 100%;
43
- opacity: @swipe-indicator-inactive-opacity;
44
- transition: opacity @animation-duration-fast,
45
- background-color @animation-duration-fast;
46
-
47
- &:not(:last-child) {
48
- margin-right: @swipe-indicator-size;
49
- }
50
-
51
- &--active {
52
- background-color: @swipe-indicator-active-background-color;
53
- opacity: @swipe-indicator-active-opacity;
54
- }
55
- }
56
- }
@@ -1,2 +0,0 @@
1
- require('../../style/base.css');
2
- require('../index.css');
@@ -1,2 +0,0 @@
1
- require('../../style/base.less');
2
- require('../index.less');
@@ -1 +0,0 @@
1
- .van-swipe-item{position:relative;-webkit-flex-shrink:0;flex-shrink:0;width:100%;height:100%}
@@ -1,89 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- exports.__esModule = true;
6
- exports.default = void 0;
7
-
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
-
10
- var _utils = require("../utils");
11
-
12
- var _relation = require("../mixins/relation");
13
-
14
- var _createNamespace = (0, _utils.createNamespace)('swipe-item'),
15
- createComponent = _createNamespace[0],
16
- bem = _createNamespace[1];
17
-
18
- var _default = createComponent({
19
- mixins: [(0, _relation.ChildrenMixin)('vanSwipe')],
20
- data: function data() {
21
- return {
22
- offset: 0,
23
- inited: false,
24
- mounted: false
25
- };
26
- },
27
- mounted: function mounted() {
28
- var _this = this;
29
-
30
- this.$nextTick(function () {
31
- _this.mounted = true;
32
- });
33
- },
34
- computed: {
35
- style: function style() {
36
- var style = {};
37
- var _this$parent = this.parent,
38
- size = _this$parent.size,
39
- vertical = _this$parent.vertical;
40
-
41
- if (size) {
42
- style[vertical ? 'height' : 'width'] = size + "px";
43
- }
44
-
45
- if (this.offset) {
46
- style.transform = "translate" + (vertical ? 'Y' : 'X') + "(" + this.offset + "px)";
47
- }
48
-
49
- return style;
50
- },
51
- shouldRender: function shouldRender() {
52
- var index = this.index,
53
- inited = this.inited,
54
- parent = this.parent,
55
- mounted = this.mounted;
56
-
57
- if (!parent.lazyRender || inited) {
58
- return true;
59
- } // wait for all item to mount, so we can get the exact count
60
-
61
-
62
- if (!mounted) {
63
- return false;
64
- }
65
-
66
- var active = parent.activeIndicator;
67
- var maxActive = parent.count - 1;
68
- var prevActive = active === 0 && parent.loop ? maxActive : active - 1;
69
- var nextActive = active === maxActive && parent.loop ? 0 : active + 1;
70
- var shouldRender = index === active || index === prevActive || index === nextActive;
71
-
72
- if (shouldRender) {
73
- this.inited = true;
74
- }
75
-
76
- return shouldRender;
77
- }
78
- },
79
- render: function render() {
80
- var h = arguments[0];
81
- return h("div", {
82
- "class": bem(),
83
- "style": this.style,
84
- "on": (0, _extends2.default)({}, this.$listeners)
85
- }, [this.shouldRender && this.slots()]);
86
- }
87
- });
88
-
89
- exports.default = _default;
@@ -1,8 +0,0 @@
1
- @import '../style/var';
2
-
3
- .van-swipe-item {
4
- position: relative;
5
- flex-shrink: 0;
6
- width: 100%;
7
- height: 100%;
8
- }
@@ -1,2 +0,0 @@
1
- require('../../style/base.css');
2
- require('../index.css');
@@ -1,2 +0,0 @@
1
- require('../../style/base.less');
2
- require('../index.less');
@@ -1 +0,0 @@
1
- .van-switch{position:relative;display:inline-block;box-sizing:content-box;width:2em;height:1em;font-size:30px;background-color:#fff;border:1px solid rgba(0,0,0,.1);border-radius:1em;cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s}.van-switch__node{position:absolute;top:0;left:0;width:1em;height:1em;background-color:#fff;border-radius:100%;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);-webkit-transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05);transition:transform .3s cubic-bezier(.3,1.05,.4,1.05),-webkit-transform .3s cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{top:25%;left:25%;width:50%;height:50%;line-height:1}.van-switch--on{background-color:#3b99fc}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em)}.van-switch--on .van-switch__loading{color:#1989fa}.van-switch--disabled{cursor:not-allowed;opacity:.5}.van-switch--loading{cursor:default}
@@ -1,86 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- exports.__esModule = true;
6
- exports.default = void 0;
7
-
8
- var _utils = require("../utils");
9
-
10
- var _shared = require("./shared");
11
-
12
- var _field = require("../mixins/field");
13
-
14
- var _loading = _interopRequireDefault(require("../loading"));
15
-
16
- // Utils
17
- // Mixins
18
- // Components
19
- var _createNamespace = (0, _utils.createNamespace)('switch'),
20
- createComponent = _createNamespace[0],
21
- bem = _createNamespace[1];
22
-
23
- var _default = createComponent({
24
- mixins: [_field.FieldMixin],
25
- props: _shared.switchProps,
26
- computed: {
27
- checked: function checked() {
28
- return this.value === this.activeValue;
29
- },
30
- style: function style() {
31
- return {
32
- fontSize: (0, _utils.addUnit)(this.size),
33
- backgroundColor: this.checked ? this.activeColor : this.inactiveColor
34
- };
35
- }
36
- },
37
- methods: {
38
- onClick: function onClick(event) {
39
- this.$emit('click', event);
40
-
41
- if (!this.disabled && !this.loading) {
42
- var newValue = this.checked ? this.inactiveValue : this.activeValue;
43
- this.$emit('input', newValue);
44
- this.$emit('change', newValue);
45
- }
46
- },
47
- genLoading: function genLoading() {
48
- var h = this.$createElement;
49
-
50
- if (this.loading) {
51
- var color = this.checked ? this.activeColor : this.inactiveColor;
52
- return h(_loading.default, {
53
- "class": bem('loading'),
54
- "attrs": {
55
- "color": color
56
- }
57
- });
58
- }
59
- }
60
- },
61
- render: function render() {
62
- var h = arguments[0];
63
- var checked = this.checked,
64
- loading = this.loading,
65
- disabled = this.disabled;
66
- return h("div", {
67
- "class": bem({
68
- on: checked,
69
- loading: loading,
70
- disabled: disabled
71
- }),
72
- "attrs": {
73
- "role": "switch",
74
- "aria-checked": String(checked)
75
- },
76
- "style": this.style,
77
- "on": {
78
- "click": this.onClick
79
- }
80
- }, [h("div", {
81
- "class": bem('node')
82
- }, [this.genLoading()])]);
83
- }
84
- });
85
-
86
- exports.default = _default;