dpzvc3-ui 3.0.7 → 3.1.1

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 (478) hide show
  1. package/dist/dpzvc3.esm.js +6585 -9367
  2. package/dist/dpzvc3.esm.js.map +1 -1
  3. package/dist/dpzvc3.esm.min.js +1 -1
  4. package/dist/dpzvc3.esm.min.js.map +1 -1
  5. package/dist/dpzvc3.js +6071 -7684
  6. package/dist/dpzvc3.js.map +1 -1
  7. package/dist/dpzvc3.min.js +1 -1
  8. package/dist/dpzvc3.min.js.map +1 -1
  9. package/dist/styles/components/radioBox.css +1 -1
  10. package/dist/styles/components/rater.css +1 -0
  11. package/dist/styles/dpzvc3.css +1 -1
  12. package/dist/types/components/Indicator/types.d.ts +16 -0
  13. package/dist/types/components/Indicator/types.d.ts.map +1 -0
  14. package/dist/types/components/Prompt/types.d.ts +37 -0
  15. package/dist/types/components/Prompt/types.d.ts.map +1 -0
  16. package/dist/types/components/Text/index.d.ts +12 -0
  17. package/dist/types/components/Text/index.d.ts.map +1 -0
  18. package/dist/types/components/Text/textBar.d.ts +84 -0
  19. package/dist/types/components/Text/textBar.d.ts.map +1 -0
  20. package/dist/types/components/Text/types.d.ts +13 -0
  21. package/dist/types/components/Text/types.d.ts.map +1 -0
  22. package/dist/types/components/actionSheet/actionSheet.d.ts +42 -0
  23. package/dist/types/components/actionSheet/actionSheet.d.ts.map +1 -0
  24. package/dist/types/components/actionSheet/index.d.ts +7 -0
  25. package/dist/types/components/actionSheet/index.d.ts.map +1 -0
  26. package/dist/types/components/actionSheet/types.d.ts +11 -0
  27. package/dist/types/components/actionSheet/types.d.ts.map +1 -0
  28. package/dist/types/components/badge/badge.d.ts +51 -0
  29. package/dist/types/components/badge/badge.d.ts.map +1 -0
  30. package/dist/types/components/badge/index.d.ts +12 -0
  31. package/dist/types/components/badge/index.d.ts.map +1 -0
  32. package/dist/types/components/badge/types.d.ts +8 -0
  33. package/dist/types/components/badge/types.d.ts.map +1 -0
  34. package/dist/types/components/button/button.d.ts +103 -0
  35. package/dist/types/components/button/button.d.ts.map +1 -0
  36. package/dist/types/components/button/index.d.ts +12 -0
  37. package/dist/types/components/button/index.d.ts.map +1 -0
  38. package/dist/types/components/button/types.d.ts +13 -0
  39. package/dist/types/components/button/types.d.ts.map +1 -0
  40. package/dist/types/components/card/card.d.ts +18 -0
  41. package/dist/types/components/card/card.d.ts.map +1 -0
  42. package/dist/types/components/card/index.d.ts +12 -0
  43. package/dist/types/components/card/index.d.ts.map +1 -0
  44. package/dist/types/components/card/types.d.ts +4 -0
  45. package/dist/types/components/card/types.d.ts.map +1 -0
  46. package/dist/types/components/cell/cell.d.ts +24 -0
  47. package/dist/types/components/cell/cell.d.ts.map +1 -0
  48. package/dist/types/components/cell/index.d.ts +12 -0
  49. package/dist/types/components/cell/index.d.ts.map +1 -0
  50. package/dist/types/components/cell/types.d.ts +8 -0
  51. package/dist/types/components/cell/types.d.ts.map +1 -0
  52. package/dist/types/components/cellSwipe/cellSwipe.d.ts +37 -0
  53. package/dist/types/components/cellSwipe/cellSwipe.d.ts.map +1 -0
  54. package/dist/types/components/cellSwipe/index.d.ts +12 -0
  55. package/dist/types/components/cellSwipe/index.d.ts.map +1 -0
  56. package/dist/types/components/cellSwipe/types.d.ts +15 -0
  57. package/dist/types/components/cellSwipe/types.d.ts.map +1 -0
  58. package/dist/types/components/checkBox/checkbox-group.d.ts +38 -0
  59. package/dist/types/components/checkBox/checkbox-group.d.ts.map +1 -0
  60. package/dist/types/components/checkBox/checkbox.d.ts +36 -0
  61. package/dist/types/components/checkBox/checkbox.d.ts.map +1 -0
  62. package/dist/types/components/checkBox/index.d.ts +14 -0
  63. package/dist/types/components/checkBox/index.d.ts.map +1 -0
  64. package/dist/types/components/checkBox/types.d.ts +22 -0
  65. package/dist/types/components/checkBox/types.d.ts.map +1 -0
  66. package/dist/types/components/header/header.d.ts +47 -0
  67. package/dist/types/components/header/header.d.ts.map +1 -0
  68. package/dist/types/components/header/index.d.ts +12 -0
  69. package/dist/types/components/header/index.d.ts.map +1 -0
  70. package/dist/types/components/header/types.d.ts +7 -0
  71. package/dist/types/components/header/types.d.ts.map +1 -0
  72. package/dist/types/components/loadMore/index.d.ts +12 -0
  73. package/dist/types/components/loadMore/index.d.ts.map +1 -0
  74. package/dist/types/components/loadMore/loadMore.d.ts +150 -0
  75. package/dist/types/components/loadMore/loadMore.d.ts.map +1 -0
  76. package/dist/types/components/loadMore/types.d.ts +23 -0
  77. package/dist/types/components/loadMore/types.d.ts.map +1 -0
  78. package/dist/types/components/message/types.d.ts +32 -0
  79. package/dist/types/components/message/types.d.ts.map +1 -0
  80. package/dist/types/components/modal/types.d.ts +33 -0
  81. package/dist/types/components/modal/types.d.ts.map +1 -0
  82. package/dist/types/components/number/Number.d.ts +77 -0
  83. package/dist/types/components/number/Number.d.ts.map +1 -0
  84. package/dist/types/components/number/index.d.ts +9 -0
  85. package/dist/types/components/number/index.d.ts.map +1 -0
  86. package/dist/types/components/number/types.d.ts +12 -0
  87. package/dist/types/components/number/types.d.ts.map +1 -0
  88. package/dist/types/components/picker/index.d.ts +12 -0
  89. package/dist/types/components/picker/index.d.ts.map +1 -0
  90. package/dist/types/components/picker/picker.d.ts +237 -0
  91. package/dist/types/components/picker/picker.d.ts.map +1 -0
  92. package/dist/types/components/picker/types.d.ts +17 -0
  93. package/dist/types/components/picker/types.d.ts.map +1 -0
  94. package/dist/types/components/popup/index.d.ts +12 -0
  95. package/dist/types/components/popup/index.d.ts.map +1 -0
  96. package/dist/types/components/popup/popup.d.ts +71 -0
  97. package/dist/types/components/popup/popup.d.ts.map +1 -0
  98. package/dist/types/components/popup/types.d.ts +10 -0
  99. package/dist/types/components/popup/types.d.ts.map +1 -0
  100. package/dist/types/components/progress/index.d.ts +12 -0
  101. package/dist/types/components/progress/index.d.ts.map +1 -0
  102. package/dist/types/components/progress/progress.d.ts +36 -0
  103. package/dist/types/components/progress/progress.d.ts.map +1 -0
  104. package/dist/types/components/progress/types.d.ts +9 -0
  105. package/dist/types/components/progress/types.d.ts.map +1 -0
  106. package/dist/types/components/radioBox/index.d.ts +14 -0
  107. package/dist/types/components/radioBox/index.d.ts.map +1 -0
  108. package/dist/types/components/radioBox/radiobox-group.d.ts +31 -0
  109. package/dist/types/components/radioBox/radiobox-group.d.ts.map +1 -0
  110. package/dist/types/components/radioBox/radiobox.d.ts +38 -0
  111. package/dist/types/components/radioBox/radiobox.d.ts.map +1 -0
  112. package/dist/types/components/radioBox/types.d.ts +18 -0
  113. package/dist/types/components/radioBox/types.d.ts.map +1 -0
  114. package/dist/types/components/rater/index.d.ts +12 -0
  115. package/dist/types/components/rater/index.d.ts.map +1 -0
  116. package/dist/types/components/rater/raters.d.ts +83 -0
  117. package/dist/types/components/rater/raters.d.ts.map +1 -0
  118. package/dist/types/components/rater/types.d.ts +11 -0
  119. package/dist/types/components/rater/types.d.ts.map +1 -0
  120. package/dist/types/components/slideBar/index.d.ts +12 -0
  121. package/dist/types/components/slideBar/index.d.ts.map +1 -0
  122. package/dist/types/components/slideBar/slideBar.d.ts +46 -0
  123. package/dist/types/components/slideBar/slideBar.d.ts.map +1 -0
  124. package/dist/types/components/slideBar/types.d.ts +19 -0
  125. package/dist/types/components/slideBar/types.d.ts.map +1 -0
  126. package/dist/types/components/spinner/index.d.ts +12 -0
  127. package/dist/types/components/spinner/index.d.ts.map +1 -0
  128. package/dist/types/components/spinner/spinner.d.ts +36 -0
  129. package/dist/types/components/spinner/spinner.d.ts.map +1 -0
  130. package/dist/types/components/spinner/types.d.ts +7 -0
  131. package/dist/types/components/spinner/types.d.ts.map +1 -0
  132. package/dist/types/components/swipe/index.d.ts +12 -0
  133. package/dist/types/components/swipe/index.d.ts.map +1 -0
  134. package/dist/types/components/swipe/swipe.d.ts +99 -0
  135. package/dist/types/components/swipe/swipe.d.ts.map +1 -0
  136. package/dist/types/components/swipe/types.d.ts +20 -0
  137. package/dist/types/components/swipe/types.d.ts.map +1 -0
  138. package/dist/types/components/switchbar/index.d.ts +12 -0
  139. package/dist/types/components/switchbar/index.d.ts.map +1 -0
  140. package/dist/types/components/switchbar/switchbar.d.ts +38 -0
  141. package/dist/types/components/switchbar/switchbar.d.ts.map +1 -0
  142. package/dist/types/components/switchbar/types.d.ts +6 -0
  143. package/dist/types/components/switchbar/types.d.ts.map +1 -0
  144. package/dist/types/components/tab/index.d.ts +12 -0
  145. package/dist/types/components/tab/index.d.ts.map +1 -0
  146. package/dist/types/components/tab/tab.d.ts +54 -0
  147. package/dist/types/components/tab/tab.d.ts.map +1 -0
  148. package/dist/types/components/tab/types.d.ts +14 -0
  149. package/dist/types/components/tab/types.d.ts.map +1 -0
  150. package/dist/types/components/toTop/index.d.ts +12 -0
  151. package/dist/types/components/toTop/index.d.ts.map +1 -0
  152. package/dist/types/components/toTop/toTop.d.ts +18 -0
  153. package/dist/types/components/toTop/toTop.d.ts.map +1 -0
  154. package/dist/types/components/toTop/types.d.ts +7 -0
  155. package/dist/types/components/toTop/types.d.ts.map +1 -0
  156. package/dist/types/components/upload/index.d.ts +12 -0
  157. package/dist/types/components/upload/index.d.ts.map +1 -0
  158. package/dist/types/components/upload/types.d.ts +9 -0
  159. package/dist/types/components/upload/types.d.ts.map +1 -0
  160. package/dist/types/components/upload/upload.d.ts +19 -0
  161. package/dist/types/components/upload/upload.d.ts.map +1 -0
  162. package/dist/types/index.d.ts +164 -0
  163. package/dist/types/lib/MegaPixImage.d.ts +9 -0
  164. package/dist/types/lib/MegaPixImage.d.ts.map +1 -0
  165. package/dist/types/lib/lib.d.ts +3 -0
  166. package/dist/types/lib/lib.d.ts.map +1 -0
  167. package/dist/types/utils/util.d.ts +31 -0
  168. package/dist/types/utils/util.d.ts.map +1 -0
  169. package/dist-prod/91.05c8ec5277a15f939b0f.js +3 -0
  170. package/dist-prod/{91.e2fdec39667928bf57b9.js.map → 91.05c8ec5277a15f939b0f.js.map} +1 -1
  171. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +2 -0
  172. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +1 -0
  173. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +2 -0
  174. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +1 -0
  175. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +2 -0
  176. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +1 -0
  177. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +2 -0
  178. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +1 -0
  179. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +2 -0
  180. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +1 -0
  181. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +2 -0
  182. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +1 -0
  183. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +2 -0
  184. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +1 -0
  185. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +2 -0
  186. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +1 -0
  187. package/dist-prod/header.eb10433dd892738ee95a.chunk.js +2 -0
  188. package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +1 -0
  189. package/dist-prod/index.html +1 -1
  190. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +2 -0
  191. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +1 -0
  192. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +2 -0
  193. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +1 -0
  194. package/dist-prod/main.662ad15361e7f3d20234.js +2 -0
  195. package/dist-prod/main.662ad15361e7f3d20234.js.map +1 -0
  196. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +2 -0
  197. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +1 -0
  198. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +2 -0
  199. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +1 -0
  200. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +2 -0
  201. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +1 -0
  202. package/dist-prod/popup.538422c7e188363a468d.chunk.js +2 -0
  203. package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +1 -0
  204. package/dist-prod/progress.240de4b633002f573030.chunk.js +2 -0
  205. package/dist-prod/progress.240de4b633002f573030.chunk.js.map +1 -0
  206. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +2 -0
  207. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +1 -0
  208. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +2 -0
  209. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +1 -0
  210. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +2 -0
  211. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +1 -0
  212. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +2 -0
  213. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +1 -0
  214. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +2 -0
  215. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +1 -0
  216. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +2 -0
  217. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +1 -0
  218. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +2 -0
  219. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +1 -0
  220. package/dist-prod/tab.29f19483f699b7811259.chunk.js +2 -0
  221. package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +1 -0
  222. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +2 -0
  223. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +1 -0
  224. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +2 -0
  225. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +1 -0
  226. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +2 -0
  227. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +1 -0
  228. package/package.json +12 -3
  229. package/src/components/Indicator/Indicator.tsx +67 -0
  230. package/src/components/Indicator/index.ts +111 -0
  231. package/src/components/Indicator/types.ts +15 -0
  232. package/src/components/Text/index.ts +14 -0
  233. package/src/components/Text/textBar.tsx +104 -0
  234. package/src/components/Text/types.ts +13 -0
  235. package/src/components/actionSheet/actionSheet.d.ts +16 -0
  236. package/src/components/actionSheet/actionSheet.tsx +86 -0
  237. package/src/components/{action-sheet/index.js → actionSheet/index.ts} +1 -0
  238. package/src/components/actionSheet/types.ts +10 -0
  239. package/src/components/badge/{badge.vue → badge.tsx} +31 -31
  240. package/src/components/badge/index.ts +12 -0
  241. package/src/components/badge/types.ts +8 -0
  242. package/src/components/button/{button.vue → button.tsx} +46 -52
  243. package/src/components/button/index.ts +13 -0
  244. package/src/components/button/types.ts +13 -0
  245. package/src/components/card/card.d.ts +16 -0
  246. package/src/components/card/card.tsx +38 -0
  247. package/src/components/card/index.ts +12 -0
  248. package/src/components/card/types.ts +3 -0
  249. package/src/components/cell/cell.tsx +89 -0
  250. package/src/components/cell/index.ts +12 -0
  251. package/src/components/cell/types.ts +8 -0
  252. package/src/components/cellSwipe/cellSwipe.tsx +188 -0
  253. package/src/components/cellSwipe/index.ts +13 -0
  254. package/src/components/cellSwipe/types.ts +17 -0
  255. package/src/components/checkBox/checkbox-group.tsx +75 -0
  256. package/src/components/checkBox/checkbox.tsx +107 -0
  257. package/src/components/checkBox/index.ts +29 -0
  258. package/src/components/checkBox/types.ts +32 -0
  259. package/src/components/header/header.tsx +119 -0
  260. package/src/components/header/index.ts +13 -0
  261. package/src/components/header/types.ts +7 -0
  262. package/src/components/loadMore/index.ts +14 -0
  263. package/src/components/loadMore/loadMore.tsx +265 -0
  264. package/src/components/loadMore/types.ts +26 -0
  265. package/src/components/message/confirm.ts +104 -0
  266. package/src/components/message/{index.js → index.ts} +20 -18
  267. package/src/components/message/message.tsx +100 -0
  268. package/src/components/message/messageGroup.tsx +59 -0
  269. package/src/components/message/types.ts +48 -0
  270. package/src/components/modal/{confirm.js → confirm.ts} +8 -7
  271. package/src/components/modal/index.ts +68 -0
  272. package/src/components/modal/modal.tsx +248 -0
  273. package/src/components/modal/types.ts +51 -0
  274. package/src/components/number/Number.tsx +143 -0
  275. package/src/components/number/index.ts +10 -0
  276. package/src/components/number/types.ts +13 -0
  277. package/src/components/picker/index.ts +12 -0
  278. package/src/components/picker/picker.tsx +112 -0
  279. package/src/components/picker/types.ts +17 -0
  280. package/src/components/popup/index.ts +12 -0
  281. package/src/components/popup/popup.d.ts +16 -0
  282. package/src/components/popup/popup.tsx +68 -0
  283. package/src/components/popup/types.ts +9 -0
  284. package/src/components/progress/index.ts +12 -0
  285. package/src/components/progress/progress.tsx +81 -0
  286. package/src/components/progress/types.ts +9 -0
  287. package/src/components/prompt/{confirm.js → confirm.ts} +27 -14
  288. package/src/components/prompt/index.ts +50 -0
  289. package/src/components/prompt/prompt.tsx +161 -0
  290. package/src/components/prompt/types.ts +45 -0
  291. package/src/components/radioBox/index.ts +34 -0
  292. package/src/components/radioBox/radiobox-group.tsx +66 -0
  293. package/src/components/radioBox/radiobox.tsx +115 -0
  294. package/src/components/radioBox/types.ts +24 -0
  295. package/src/components/rater/index.ts +12 -0
  296. package/src/components/rater/rater.d.ts +16 -0
  297. package/src/components/rater/raters.tsx +101 -0
  298. package/src/components/rater/types.ts +10 -0
  299. package/src/components/slideBar/index.ts +13 -0
  300. package/src/components/slideBar/slideBar.tsx +288 -0
  301. package/src/components/slideBar/types.ts +20 -0
  302. package/src/components/spinner/index.ts +13 -0
  303. package/src/components/spinner/spinner.tsx +85 -0
  304. package/src/components/spinner/types.ts +20 -0
  305. package/src/components/swipe/index.ts +13 -0
  306. package/src/components/swipe/swipe.tsx +292 -0
  307. package/src/components/swipe/types.ts +21 -0
  308. package/src/components/switchbar/index.ts +13 -0
  309. package/src/components/switchbar/switchbar.tsx +58 -0
  310. package/src/components/switchbar/types.ts +6 -0
  311. package/src/components/tab/index.ts +12 -0
  312. package/src/components/tab/tab.tsx +71 -0
  313. package/src/components/tab/types.ts +15 -0
  314. package/src/components/toTop/index.ts +13 -0
  315. package/src/components/toTop/toTop.tsx +54 -0
  316. package/src/components/toTop/types.ts +7 -0
  317. package/src/components/upload/index.ts +13 -0
  318. package/src/components/upload/types.ts +9 -0
  319. package/src/components/upload/upload.tsx +180 -0
  320. package/src/index.ts +173 -0
  321. package/src/lib/MegaPixImage.js +1 -0
  322. package/src/{main.js → main.ts} +4 -2
  323. package/src/shims-vue.d.ts +37 -0
  324. package/src/styles/components/radioBox.less +5 -1
  325. package/src/styles/components/rater.less +16 -0
  326. package/src/styles/index.less +1 -0
  327. package/src/types/index.d.ts +164 -0
  328. package/src/types/js-shims.d.ts +36 -0
  329. package/src/utils/test.ts +2 -0
  330. package/src/utils/util.ts +168 -0
  331. package/src/utils/{util.js → util1.js} +2 -2
  332. package/src/views/ActionSheet.vue +7 -7
  333. package/src/views/Badge/Badge.less +12 -0
  334. package/src/views/Badge/Badge.tsx +23 -0
  335. package/src/views/Badge.vue +4 -2
  336. package/src/views/Button.vue +17 -17
  337. package/src/views/Card.vue +2 -1
  338. package/src/views/Cell.vue +6 -5
  339. package/src/views/CellSwipe.vue +51 -39
  340. package/src/views/CheckBox.vue +7 -6
  341. package/src/views/Header.vue +8 -7
  342. package/src/views/Indicator.vue +15 -15
  343. package/src/views/LoadMore.vue +13 -10
  344. package/src/views/Message.vue +14 -14
  345. package/src/views/Modal.vue +10 -10
  346. package/src/views/Picker.vue +19 -17
  347. package/src/views/Popup.vue +47 -41
  348. package/src/views/Progress.vue +8 -6
  349. package/src/views/Prompt.vue +5 -5
  350. package/src/views/RadioBox.vue +6 -4
  351. package/src/views/Rater.vue +7 -3
  352. package/src/views/SlideBar.vue +9 -5
  353. package/src/views/Spinner.vue +17 -5
  354. package/src/views/Swipe.vue +5 -3
  355. package/src/views/SwitchBar.vue +6 -4
  356. package/src/views/Tab.vue +8 -6
  357. package/src/views/Text.vue +14 -10
  358. package/src/views/ToTop.vue +19 -5
  359. package/src/views/Upload.vue +8 -4
  360. package/tsconfig.build.json +30 -0
  361. package/tsconfig.json +39 -0
  362. package/webpack.base.config.js +22 -2
  363. package/webpack.dev.config.js +2 -1
  364. package/webpack.dist.dev.config.js +3 -2
  365. package/webpack.dist.prod.config.js +3 -2
  366. package/webpack.prod.config.js +2 -1
  367. package/dist-prod/91.e2fdec39667928bf57b9.js +0 -3
  368. package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js +0 -2
  369. package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js.map +0 -1
  370. package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js +0 -2
  371. package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js.map +0 -1
  372. package/dist-prod/button.28b491339fbba29c3f16.chunk.js +0 -2
  373. package/dist-prod/button.28b491339fbba29c3f16.chunk.js.map +0 -1
  374. package/dist-prod/card.3ad847f07bebc1391125.chunk.js +0 -2
  375. package/dist-prod/card.3ad847f07bebc1391125.chunk.js.map +0 -1
  376. package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js +0 -2
  377. package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js.map +0 -1
  378. package/dist-prod/cellswipe.04240414bed39e28e7b9.chunk.js +0 -2
  379. package/dist-prod/cellswipe.04240414bed39e28e7b9.chunk.js.map +0 -1
  380. package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js +0 -2
  381. package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js.map +0 -1
  382. package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js +0 -2
  383. package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js.map +0 -1
  384. package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js +0 -2
  385. package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js.map +0 -1
  386. package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js +0 -2
  387. package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js.map +0 -1
  388. package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js +0 -2
  389. package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js.map +0 -1
  390. package/dist-prod/main.717f5c8b51911571fb82.js +0 -2
  391. package/dist-prod/main.717f5c8b51911571fb82.js.map +0 -1
  392. package/dist-prod/message.e57fa263a214006f7191.chunk.js +0 -2
  393. package/dist-prod/message.e57fa263a214006f7191.chunk.js.map +0 -1
  394. package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js +0 -2
  395. package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js.map +0 -1
  396. package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js +0 -2
  397. package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js.map +0 -1
  398. package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js +0 -2
  399. package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js.map +0 -1
  400. package/dist-prod/progress.1e0d785044aecadc5615.chunk.js +0 -2
  401. package/dist-prod/progress.1e0d785044aecadc5615.chunk.js.map +0 -1
  402. package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js +0 -2
  403. package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js.map +0 -1
  404. package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js +0 -2
  405. package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js.map +0 -1
  406. package/dist-prod/rater.939e0e7e770728f684c3.chunk.js +0 -2
  407. package/dist-prod/rater.939e0e7e770728f684c3.chunk.js.map +0 -1
  408. package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js +0 -2
  409. package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js.map +0 -1
  410. package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js +0 -2
  411. package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js.map +0 -1
  412. package/dist-prod/swipe.75b7d741be73c0064982.chunk.js +0 -2
  413. package/dist-prod/swipe.75b7d741be73c0064982.chunk.js.map +0 -1
  414. package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js +0 -2
  415. package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js.map +0 -1
  416. package/dist-prod/tab.4c391211c41b7d12b585.chunk.js +0 -2
  417. package/dist-prod/tab.4c391211c41b7d12b585.chunk.js.map +0 -1
  418. package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js +0 -2
  419. package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js.map +0 -1
  420. package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js +0 -2
  421. package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js.map +0 -1
  422. package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js +0 -2
  423. package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js.map +0 -1
  424. package/src/components/Indicator/index.js +0 -86
  425. package/src/components/Text/Number.vue +0 -167
  426. package/src/components/Text/index.js +0 -7
  427. package/src/components/Text/textBar.vue +0 -122
  428. package/src/components/action-sheet/actionSheet.vue +0 -98
  429. package/src/components/badge/index.js +0 -5
  430. package/src/components/button/index.js +0 -5
  431. package/src/components/card/card.vue +0 -49
  432. package/src/components/card/index.js +0 -5
  433. package/src/components/cell/cell.vue +0 -113
  434. package/src/components/cell/index.js +0 -5
  435. package/src/components/cell-swipe/cell-swipe.vue +0 -168
  436. package/src/components/cell-swipe/index.js +0 -5
  437. package/src/components/checkBox/checkbox-group.vue +0 -74
  438. package/src/components/checkBox/checkbox.vue +0 -117
  439. package/src/components/checkBox/index.js +0 -8
  440. package/src/components/header/header.vue +0 -131
  441. package/src/components/header/index.js +0 -5
  442. package/src/components/loadMore/index.js +0 -5
  443. package/src/components/loadMore/loadmore.vue +0 -258
  444. package/src/components/message/confirm.js +0 -60
  445. package/src/components/message/message.vue +0 -137
  446. package/src/components/message/messageGroup.vue +0 -82
  447. package/src/components/modal/index.js +0 -52
  448. package/src/components/modal/modal.vue +0 -138
  449. package/src/components/picker/index.js +0 -5
  450. package/src/components/picker/picker.vue +0 -111
  451. package/src/components/popup/index.js +0 -5
  452. package/src/components/popup/popup.vue +0 -91
  453. package/src/components/progress/index.js +0 -5
  454. package/src/components/progress/progress.vue +0 -86
  455. package/src/components/prompt/index.js +0 -53
  456. package/src/components/prompt/prompt.vue +0 -125
  457. package/src/components/radioBox/index.js +0 -8
  458. package/src/components/rater/index.js +0 -5
  459. package/src/components/rater/rater.vue +0 -118
  460. package/src/components/slideBar/index.js +0 -6
  461. package/src/components/slideBar/slideBar.vue +0 -225
  462. package/src/components/spinner/index.js +0 -5
  463. package/src/components/spinner/spinner.vue +0 -78
  464. package/src/components/swipe/index.js +0 -5
  465. package/src/components/swipe/swipe.vue +0 -289
  466. package/src/components/switchbar/index.js +0 -5
  467. package/src/components/switchbar/switchbar.vue +0 -79
  468. package/src/components/tab/index.js +0 -6
  469. package/src/components/tab/tab.vue +0 -89
  470. package/src/components/toTop/index.js +0 -5
  471. package/src/components/toTop/topTop.vue +0 -78
  472. package/src/components/upload/index.js +0 -5
  473. package/src/components/upload/upload.vue +0 -166
  474. package/src/index.js +0 -149
  475. /package/dist-prod/{91.e2fdec39667928bf57b9.js.LICENSE.txt → 91.05c8ec5277a15f939b0f.js.LICENSE.txt} +0 -0
  476. /package/src/components/radioBox/{radiobox-group.vue → radiobox-group1.vue} +0 -0
  477. /package/src/components/radioBox/{radiobox.vue → radiobox1.vue} +0 -0
  478. /package/src/{router.js → router.ts} +0 -0
@@ -0,0 +1,180 @@
1
+ // src/components/upload/upload.tsx
2
+ import {
3
+ defineComponent,
4
+ ref,
5
+ computed,
6
+ watch,
7
+ getCurrentInstance,
8
+ PropType
9
+ } from 'vue'
10
+ import exifr from 'exifr'
11
+ import MegaPixImage from '../../lib/MegaPixImage'
12
+ import { JPEG } from '../../utils/util'
13
+ import type { UploadProps } from './types'
14
+
15
+ export type { UploadProps }
16
+
17
+ const prefixCls = 'dpzvc3-upload'
18
+
19
+ export default defineComponent({
20
+ name: 'Dpzvc3Upload',
21
+
22
+ props: {
23
+ multiple: {
24
+ type: Boolean as PropType<boolean>,
25
+ default: false
26
+ },
27
+ accept: {
28
+ type: String as PropType<string>,
29
+ default: 'image/*'
30
+ },
31
+ styles: {
32
+ type: Object as PropType<Record<string, any>>,
33
+ default: () => ({})
34
+ }
35
+ },
36
+
37
+ emits: ['on-change-file'],
38
+
39
+ setup(props: UploadProps, { emit, slots }) {
40
+ const { proxy } = getCurrentInstance()!
41
+
42
+ const files = ref<any[]>([])
43
+ const fileLength = ref(0)
44
+ const uploadRef = ref<HTMLInputElement | null>(null)
45
+
46
+ const classes = computed(() => [prefixCls])
47
+ const wrapperClasses = computed(() => [`${prefixCls}-wrapper`])
48
+
49
+ watch(files, (val) => {
50
+ emit('on-change-file', val)
51
+ })
52
+
53
+ const showPhoto = async (e: Event) => {
54
+ const input = e.target as HTMLInputElement
55
+ const fileList = input.files
56
+ if (!fileList || !proxy) return
57
+
58
+ (proxy as any).$Indicator?.snake({ text: '上传中' })
59
+
60
+ files.value = []
61
+ fileLength.value = fileList.length
62
+
63
+ for (let i = 0; i < fileList.length; i++) {
64
+ const file = fileList[i]
65
+ try {
66
+ const orientation = await exifr.orientation(file)
67
+
68
+ const dataURL = await new Promise<string>((resolve, reject) => {
69
+ const reader = new FileReader()
70
+ reader.readAsDataURL(file)
71
+ reader.onload = () => resolve(reader.result as string)
72
+ reader.onerror = reject
73
+ })
74
+
75
+ const img = new Image()
76
+ img.src = dataURL
77
+
78
+ await new Promise<void>((resolve) => {
79
+ img.onload = () => {
80
+ create(img, orientation)
81
+ resolve()
82
+ }
83
+ })
84
+ } catch (err) {
85
+ console.error('读取图片失败', err)
86
+ }
87
+ }
88
+
89
+ input.value = ''
90
+ }
91
+
92
+ const create = (file: HTMLImageElement, orientation?: number) => {
93
+ const img = new Image()
94
+ const mpImg = new MegaPixImage(file)
95
+
96
+ mpImg.render(img, { maxWidth: 600, quality: 0.8 })
97
+
98
+ img.onload = () => {
99
+ const canvas = document.createElement('canvas')
100
+ const ctx = canvas.getContext('2d')!
101
+ canvas.width = img.width
102
+ canvas.height = img.height
103
+ ctx.drawImage(img, 0, 0, canvas.width, canvas.height)
104
+
105
+ let data = canvas.toDataURL('image/jpeg', 0.8)
106
+
107
+ if (/iphone/i.test(navigator.userAgent) && orientation && orientation !== 1) {
108
+ rotateImg(img, orientation, canvas)
109
+ data = canvas.toDataURL('image/jpeg', 0.8)
110
+ }
111
+
112
+ if (/android/i.test(navigator.userAgent)) {
113
+ const encoder = new JPEG.JPEGEncoder()
114
+ data = encoder.encode(
115
+ ctx.getImageData(0, 0, canvas.width, canvas.height),
116
+ 80
117
+ )
118
+ }
119
+
120
+ files.value.push({
121
+ base64: data,
122
+ clearBase64: data.slice(data.indexOf(',') + 1)
123
+ })
124
+
125
+ if (files.value.length === fileLength.value) {
126
+ (proxy as any).$Indicator?.remove()
127
+ }
128
+ }
129
+ }
130
+
131
+ const rotateImg = (
132
+ img: HTMLImageElement,
133
+ orientation: number,
134
+ canvas: HTMLCanvasElement
135
+ ) => {
136
+ const ctx = canvas.getContext('2d')!
137
+ const width = img.width
138
+ const height = img.height
139
+
140
+ switch (orientation) {
141
+ case 6:
142
+ canvas.width = height
143
+ canvas.height = width
144
+ ctx.rotate(Math.PI / 2)
145
+ ctx.drawImage(img, 0, -height)
146
+ break
147
+ case 8:
148
+ canvas.width = height
149
+ canvas.height = width
150
+ ctx.rotate(-Math.PI / 2)
151
+ ctx.drawImage(img, -width, 0)
152
+ break
153
+ case 3:
154
+ canvas.width = width
155
+ canvas.height = height
156
+ ctx.rotate(Math.PI)
157
+ ctx.drawImage(img, -width, -height)
158
+ break
159
+ }
160
+ }
161
+
162
+ return () => (
163
+ <div class={classes.value} style={props.styles}>
164
+ {slots.default ? (
165
+ slots.default()
166
+ ) : (
167
+ <div class={wrapperClasses.value}>图片上传</div>
168
+ )}
169
+
170
+ <input
171
+ ref={uploadRef}
172
+ type="file"
173
+ accept={props.accept}
174
+ multiple={props.multiple}
175
+ onChange={showPhoto}
176
+ />
177
+ </div>
178
+ )
179
+ }
180
+ })
package/src/index.ts ADDED
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Vue 3 组件库入口 ts 版本
3
+ */
4
+
5
+ import type { App,Plugin } from 'vue'
6
+
7
+ /* ========= 组件引入 ========= */
8
+ import DpButton from './components/button'
9
+ import { CheckBox, CheckBoxGroup } from './components/checkBox'
10
+ import DpHeader from './components/header'
11
+ import Message from './components/message'
12
+ import Modal from './components/modal'
13
+ import Picker from './components/picker'
14
+ import { RadioBox, RadioBoxGroup } from './components/radioBox'
15
+ import Swipe from './components/swipe'
16
+ import Tab from './components/tab'
17
+ import Prompt from './components/prompt'
18
+ import SlideBar from './components/slideBar'
19
+ import TextBar from './components/Text'
20
+ import Upload from './components/upload'
21
+ import ActionSheet from './components/actionSheet'
22
+ import SwitchBar from './components/switchbar'
23
+ import Rater from './components/rater'
24
+ import Spinner from './components/spinner'
25
+ import DpLoadMore from './components/loadMore'
26
+ import Popup from './components/popup'
27
+ import Indicator from './components/Indicator'
28
+ import Progress from './components/progress'
29
+ import ToTop from './components/toTop'
30
+ import Cell from './components/cell'
31
+ import CellSwipe from './components/cellSwipe'
32
+ import Badge from './components/badge'
33
+ import Card from './components/card'
34
+ import Number from './components/number'
35
+
36
+ /* ========= Installable 泛型 ========= */
37
+ // export type Installable<T> = T & {
38
+ // install?: (app: App) => void
39
+ // }
40
+ export type Components = {
41
+ [K in keyof typeof _components]: any//Installable<typeof _components[K]>
42
+ }
43
+ export const components: Components = {} as Components
44
+ /* ========= 组件集合 ========= */
45
+ const _components = {
46
+ DpButton,
47
+ CheckBox,
48
+ CheckBoxGroup,
49
+ RadioBox,
50
+ RadioBoxGroup,
51
+ DpHeader,
52
+ Picker,
53
+ Swipe,
54
+ Tab,
55
+ SlideBar,
56
+ TextBar,
57
+ Number,
58
+ Upload,
59
+ ActionSheet,
60
+ SwitchBar,
61
+ Rater,
62
+ Spinner,
63
+ DpLoadMore,
64
+ Popup,
65
+ DpProgress: Progress,
66
+ ToTop,
67
+ Cell,
68
+ CellSwipe,
69
+ Badge,
70
+ Card
71
+ }
72
+ /* typeof _component在ts输出
73
+ // {
74
+ // VButton: typeof VButton
75
+ // CheckBox: typeof CheckBox
76
+ // CheckBoxGroup: typeof CheckBoxGroup
77
+ // }
78
+ 如果直接写[K in keyof _components]报错Type '_components' is not a type. 原因就是 _components 是 值,不是类型。
79
+ • keyof 只能作用在 类型上。
80
+ • 所以必须先用 typeof 变成类型:keyof typeof _components。
81
+ */
82
+ /* ========= 生成 Installable 类型组件集合 ========= */
83
+ // export const components: {
84
+ // [K in keyof typeof _components]: Installable<typeof _components[K]>
85
+ // } = {} as any
86
+ // 遍历给组件加 install
87
+ Object.keys(_components).forEach((key) => {
88
+ // const component = _components[key as keyof typeof _components] as Installable<
89
+ // typeof _components[keyof typeof _components]
90
+ // >
91
+ const component = _components[key as keyof typeof _components]
92
+ if (component && !component.install) {
93
+ component.install = (app: App) => {
94
+ // console.log(key, component, '----component----')
95
+ app.component(key, component)
96
+ }
97
+ }
98
+ components[key as keyof typeof _components] = component
99
+ // console.log(components, '----components----')
100
+ })
101
+ /* ========= 服务组件 ========= */
102
+ export const services: Record<string, any> = {
103
+ Message,
104
+ Modal,
105
+ Prompt,
106
+ Indicator
107
+ }
108
+
109
+ Object.keys(services).forEach((key) => {
110
+ const service = services[key]
111
+ if (service && !service.install) {
112
+ service.install = (app: App) => {
113
+ app.config.globalProperties[`$${key}`] = service
114
+ }
115
+ }
116
+ })
117
+
118
+ /* ========= 全量 install ========= */
119
+ export const install: Plugin['install'] = (app: App) => {
120
+ if (!app) {
121
+ console.warn(
122
+ 'dpzvc3 install: app is undefined, ensure you are using Vue 3 createApp'
123
+ )
124
+ return
125
+ }
126
+ // 注册组件
127
+ Object.values(components).forEach((comp) => {
128
+ if (comp.install) {
129
+ comp.install(app)
130
+ }
131
+ })
132
+
133
+ // 注册服务
134
+ Object.values(services).forEach((srv) => {
135
+ if (srv.install) {
136
+ srv.install(app)
137
+ }
138
+ })
139
+ }
140
+
141
+ /* ========= 按需导出 ========= */
142
+ export {
143
+ DpButton,
144
+ CheckBox,
145
+ CheckBoxGroup,
146
+ DpHeader,
147
+ Message,
148
+ Modal,
149
+ Prompt,
150
+ Picker,
151
+ RadioBox,
152
+ Swipe,
153
+ Tab,
154
+ SlideBar,
155
+ TextBar,
156
+ Upload,
157
+ ActionSheet,
158
+ SwitchBar,
159
+ Rater,
160
+ Spinner,
161
+ DpLoadMore,
162
+ Popup,
163
+ Indicator,
164
+ Progress,
165
+ ToTop,
166
+ Cell,
167
+ CellSwipe,
168
+ Badge,
169
+ Card
170
+ }
171
+ const DpzVc3: Plugin = { install }
172
+ /* ========= 默认导出 ========= */
173
+ export default DpzVc3
@@ -116,6 +116,7 @@ class MegaPixImage {
116
116
  }
117
117
  if (!srcImage.naturalWidth && !srcImage.naturalHeight) {
118
118
  this.imageLoadListeners = []
119
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
119
120
  const _this = this
120
121
  srcImage.onload = srcImage.onerror = function () {
121
122
  const listeners = _this.imageLoadListeners
@@ -4,8 +4,10 @@ import { createRouter, createWebHashHistory } from 'vue-router'
4
4
  import App from './components/app.vue'
5
5
  import Routers from './router'
6
6
  import Config from './config/config'
7
+ // import dpzvc3 from 'dpzvc3-ui'
7
8
  import dpzvc3 from './index'
8
-
9
+ // import { count } from './utils/test'
10
+ // console.log(count)
9
11
  // 1️⃣ 创建 app
10
12
  const app = createApp(App)
11
13
 
@@ -19,7 +21,7 @@ app.config.globalProperties.$Config = Config
19
21
  const router = createRouter({
20
22
  history: createWebHashHistory(), // 等价于 Vue 2 的 mode: 'hash'
21
23
  routes: Routers,
22
- scrollBehavior () {
24
+ scrollBehavior() {
23
25
  return { top: 0 }
24
26
  }
25
27
  })
@@ -0,0 +1,37 @@
1
+ // shims-vue.d.ts
2
+ import type { App } from 'vue'
3
+ // import type { BadgeProps } from '@/components/badge'
4
+ // import type { PopupProps } from '@/components/popup'
5
+ // import type { ActionSheetProps } from '@/components/actionSheet'
6
+ // import type { CardProps } from '@/components/card'
7
+ // import type { RaterProps } from '@/components/rater'
8
+ declare module '*.vue' {
9
+ import { defineComponent } from 'vue'
10
+
11
+ // 默认导出的 Vue 组件类型
12
+ const component: ReturnType<typeof defineComponent> & { install?(app: App): void }
13
+ export default component
14
+ }
15
+
16
+ // 全局组件类型声明,让 TS 和 Volar 能在模板里检查 props
17
+ // declare module 'vue' {
18
+ // export interface GlobalComponents {
19
+ // Badge: typeof import('@/components/badge')['default'] & { __props: BadgeProps },
20
+ // Popup: typeof import('@/components/popup')['default'] & { __props: PopupProps },
21
+ // ActionSheet: typeof import('@/components/actionSheet')['default'] & { __props: ActionSheetProps },
22
+ // Card: typeof import('@/components/actionSheet')['default'] & { __props: CardProps },
23
+ // Rater: typeof import('@/components/rater')['default'] & { __props: RaterProps },
24
+ // }
25
+ // }
26
+
27
+ // JSX 支持(如果你用 TSX/JSX,这块保留)
28
+ declare global {
29
+ namespace JSX {
30
+ interface IntrinsicElements {
31
+ [elem: string]: any
32
+ }
33
+ interface ElementChildrenAttribute {
34
+ children: {}
35
+ }
36
+ }
37
+ }
@@ -9,7 +9,11 @@
9
9
  // }
10
10
  //}
11
11
  @import "../base/variable.less";
12
-
12
+ .dpzvc3-radioBoxGroup.dpzvc3-radioBoxGroup-vertical {
13
+ display: flex;
14
+ justify-content: center;
15
+ flex-direction: column;
16
+ }
13
17
  .dpzvc3-radioBoxGroup.dpzvc3-radioBoxGroup-vertical .dpzvc3-radiobox {
14
18
  margin-right: 0;
15
19
  margin-bottom: 8px;
@@ -0,0 +1,16 @@
1
+ .dpzvc3-rater {
2
+ &-star {
3
+ color: #e9e9e9;
4
+ position: relative;
5
+ display: inline-block;
6
+ > span {
7
+ position: absolute;
8
+ height: 100%;
9
+ content: '★';
10
+ left: 0;
11
+ top: 0;
12
+ color: #e9e9e9;
13
+ overflow: hidden;
14
+ }
15
+ }
16
+ }
@@ -8,6 +8,7 @@
8
8
  @import "utils/1px.less";
9
9
 
10
10
  // components
11
+ @import "components/rater.less";
11
12
  @import "components/header.less";
12
13
  @import "components/actionsheet.less";
13
14
  @import "components/message.less";
@@ -0,0 +1,164 @@
1
+ // src/types/index.d.ts
2
+
3
+ /* ----------------------------------
4
+ * 1️⃣ 导出组件 & props(给 TS 模块 import 用)
5
+ * ---------------------------------- */
6
+ export { default as Badge } from '../components/badge'
7
+ export type { BadgeProps } from '../components/badge/types'
8
+ export { default as Popup } from '../components/popup'
9
+ export type { PopupProps } from '../components/popup/types'
10
+ export { default as ActionSheet } from '../components/actionSheet'
11
+ export type { ActionSheetProps } from '../components/actionSheet/types'
12
+
13
+ export { default as Card } from '../components/card'
14
+ export type { CardProps } from '../components/card/types'
15
+
16
+ export { default as Rater } from '../components/rater'
17
+ export type { RaterProps } from '../components/rater/types'
18
+
19
+ export { default as Cell } from '../components/cell'
20
+ export type { CellProps } from '../components/cell/types'
21
+
22
+ export { default as CellSwipe } from '../components/cellSwipe'
23
+ export type { CellSwipeProps } from '../components/cellSwipe/types'
24
+
25
+ export { default as DpHeader } from '../components/header'
26
+ export type { HeaderProps } from '../components/header/types'
27
+
28
+ export { default as Spinner } from '../components/spinner'
29
+ export type { SpinnerProps } from '../components/spinner/types'
30
+
31
+ export { default as Swipe } from '../components/swipe'
32
+ export type { SwipeProps } from '../components/swipe/types'
33
+
34
+ export { default as DpButton } from '../components/button'
35
+ export type { ButtonProps } from '../components/button/types'
36
+
37
+ export { default as Picker } from '../components/picker'
38
+ export type { PickerProps } from '../components/picker/types'
39
+
40
+ export { default as SwitchBar } from '../components/switchbar'
41
+ export type { SwitchBarProps } from '../components/switchbar/types'
42
+
43
+ export { default as Tab } from '../components/tab'
44
+ export type { TabProps } from '../components/tab/types'
45
+
46
+ export { default as TextBar } from '../components/Text'
47
+ export type { TextBarProps } from '../components/Text/types'
48
+
49
+ export { default as Number } from '../components/number'
50
+ export type { NumberProps } from '../components/number/types'
51
+
52
+ export { default as ToTop } from '../components/toTop'
53
+ export type { ToTopProps } from '../components/toTop/types'
54
+
55
+ export { default as Upload } from '../components/upload'
56
+ export type { UploadProps } from '../components/upload/types'
57
+
58
+ export { default as SlideBar } from '../components/slideBar'
59
+ export type { SlideBarProps } from '../components/slideBar/types'
60
+
61
+ export { default as DpProgress } from '../components/progress'
62
+ export type { ProgressProps } from '../components/progress/types'
63
+
64
+ export { default as DpLoadMore } from '../components/loadMore'
65
+ export type { LoadmoreProps } from '../components/loadMore/types'
66
+
67
+ export { default as CheckBox, default as CheckBoxGroup } from '../components/checkBox'
68
+ export type { CheckBoxProps, CheckBoxGroupProps } from '../components/checkBox/types'
69
+
70
+ export { default as RadioBox, default as RadioBoxGroup } from '../components/radioBox'
71
+ export type { RadioBoxProps, RadioGroupProps } from '../components/radioBox/types'
72
+
73
+ // // Modal
74
+ // export { default as Modal } from '../components/modal/modal'
75
+ // // 实例调用类型定义
76
+ // export type { ModalInstance } from '../components/modal/types'
77
+ // // Modal 组件的 props 类型定义
78
+ // export type { ModalProps } from '../components/modal/types'
79
+
80
+ /* ----------------------------------
81
+ * 2️⃣ 全局组件声明(给 <template> 用)
82
+ * ---------------------------------- */
83
+ import type { App, Plugin } from 'vue'
84
+ import type { BadgeProps } from '../components/badge/types'
85
+ import type { PopupProps } from '../components/popup/types'
86
+ import type { ActionSheetProps } from '../components/actionSheet/types'
87
+ import type { CardProps } from '../components/card/types'
88
+ import type { RaterProps } from '../components/rater/types'
89
+ import type { CellProps } from '../components/cell/types'
90
+ import type { CellSwipeProps } from '../components/cellSwipe/types'
91
+ import type { HeaderProps } from '../components/header/types'
92
+ import type { SpinnerProps } from '../components/spinner/types'
93
+ import type { SwipeProps } from '../components/swipe/types'
94
+ import type { ButtonProps } from '../components/button/types'
95
+ import type { PickerProps } from '../components/picker/types'
96
+ import type { SwitchBarProps } from '../components/switchbar/types'
97
+ import type { TabProps } from '../components/tab/types'
98
+ import type { TextBarProps } from '../components/Text/types'
99
+ import type { NumberProps } from '../components/Number/types'
100
+ import type { ToTopProps } from '../components/toTop/types'
101
+ import type { UploadProps } from '../components/upload/types'
102
+ import type { SlideBarProps } from '../components/slideBar/types'
103
+ import type { ModalInstance } from '../components/modal/types'
104
+ import type { MessageInstance } from '../components/message/types'
105
+ import type { IndicatorInstance } from '../components/Indicator/types'
106
+ import type { ProgressProps } from '../components/progress/types'
107
+ import type { LoadmoreProps } from '../components/loadMore/types'
108
+ import type { CheckBoxProps } from '../components/checkBox/types'
109
+ import type { CheckBoxGroupProps } from '../components/checkBox/types'
110
+ import type { RadioBoxProps } from '../components/radioBox/types'
111
+ import type { RadioGroupProps } from '../components/radioBox/types'
112
+ import type { PromptInstance } from '../components/Prompt/types'
113
+ // src/shims-vue.d.ts
114
+ declare module 'vue' {
115
+ interface ComponentCustomProperties {
116
+ $Modal: ModalInstance
117
+ $Message: MessageInstance
118
+ $Indicator: IndicatorInstance
119
+ $Prompt: PromptInstance
120
+ }
121
+ export interface GlobalComponents {
122
+ // Badge: typeof import('../components/badge')['default'] & {
123
+ // install(app: App): void
124
+ // // __props: BadgeProps
125
+ // },
126
+ Badge: typeof import('../components/badge')['default'],
127
+ Popup: typeof import('../components/popup')['default'],
128
+ ActionSheet: typeof import('../components/actionSheet')['default'],
129
+ Card: typeof import('../components/card')['default'],
130
+ Rater: typeof import('../components/rater')['default'],
131
+ Cell: typeof import('../components/cell')['default'],
132
+ CellSwipe: typeof import('../components/cellSwipe')['default'],
133
+ DpHeader: typeof import('../components/header')['default'],
134
+ Spinner: typeof import('../components/spinner')['default'],
135
+ Swipe: typeof import('../components/swipe')['default'],
136
+ DpButton: typeof import('../components/button')['default'],
137
+ Picker: typeof import('../components/picker')['default'],
138
+ SwitchBar: typeof import('../components/switchbar')['default'],
139
+ Tab: typeof import('../components/tab')['default'],
140
+ TextBar: typeof import('../components/Text')['default'],
141
+ Number: typeof import('../components/number')['default'],
142
+ ToTop: typeof import('../components/toTop')['default'],
143
+ Upload: typeof import('../components/upload')['default'],
144
+ SlideBar: typeof import('../components/slideBar')['default'],
145
+ DpProgress: typeof import('../components/progress')['default'],
146
+ DpLoadMore: typeof import('../components/loadMore')['default'],
147
+ CheckBoxGroup: typeof import('../components/checkBox')['CheckBoxGroup'],
148
+ CheckBox: typeof import('../components/checkBox')['CheckBox'],
149
+ RadioBoxGroup: typeof import('../components/radioBox')['RadioBoxGroup'],
150
+ RadioBox: typeof import('../components/radioBox')['RadioBox'],
151
+ }
152
+ }
153
+
154
+ /* ----------------------------------
155
+ * 3️⃣ 默认导出整个组件库为 Vue 插件
156
+ * ---------------------------------- */
157
+ import type { Plugin } from 'vue'
158
+ declare const DpzVc3: Plugin
159
+ export default DpzVc3
160
+
161
+ /* ----------------------------------
162
+ * 4️⃣ 保证这是 module
163
+ * ---------------------------------- */
164
+ export {}
@@ -0,0 +1,36 @@
1
+ // 声明所有 JS 模块,让 TS 知道它们的类型
2
+ declare module '*.js' {
3
+ const content: any
4
+ export default content
5
+ }
6
+ declare module '*.vue' {
7
+ import type { DefineComponent } from 'vue'
8
+ const component: DefineComponent<any, any, any>
9
+ export default component
10
+ }
11
+
12
+ // 单独声明一些特殊 JS 类
13
+ declare module '../../utils/util' {
14
+ export function randomStr(length?: number): string
15
+ export function scrollTop(el: HTMLElement | Window, to?: number, duration?: number): void
16
+ export const JPEG: any
17
+ }
18
+
19
+ declare module '../../lib/lib' {
20
+ const rafTimeout: any
21
+ export default rafTimeout
22
+ }
23
+
24
+ declare module '../../lib/MegaPixImage' {
25
+ const MegaPixImage: any
26
+ export default MegaPixImage
27
+ }
28
+
29
+ // 针对 JPEGEncoder 类的情况
30
+ declare module '../../utils/JPEGEncoder' {
31
+ class JPEGEncoder {
32
+ encode(data: any): any
33
+ }
34
+ const JPEG: JPEGEncoder
35
+ export default JPEG
36
+ }
@@ -0,0 +1,2 @@
1
+ // src/test.ts
2
+ export const count: number = 123