dpzvc3-ui 3.0.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dpzvc3.esm.js +7641 -10423
- package/dist/dpzvc3.esm.js.map +1 -1
- package/dist/dpzvc3.esm.min.js +1 -1
- package/dist/dpzvc3.esm.min.js.map +1 -1
- package/dist/dpzvc3.js +6646 -8258
- package/dist/dpzvc3.js.map +1 -1
- package/dist/dpzvc3.min.js +1 -1
- package/dist/dpzvc3.min.js.map +1 -1
- package/dist/styles/components/radioBox.css +1 -1
- package/dist/styles/components/rater.css +1 -0
- package/dist/styles/dpzvc3.css +1 -1
- package/dist/types/components/Indicator/types.d.ts +16 -0
- package/dist/types/components/Indicator/types.d.ts.map +1 -0
- package/dist/types/components/Prompt/types.d.ts +37 -0
- package/dist/types/components/Prompt/types.d.ts.map +1 -0
- package/dist/types/components/Text/index.d.ts +12 -0
- package/dist/types/components/Text/index.d.ts.map +1 -0
- package/dist/types/components/Text/textBar.d.ts +84 -0
- package/dist/types/components/Text/textBar.d.ts.map +1 -0
- package/dist/types/components/Text/types.d.ts +13 -0
- package/dist/types/components/Text/types.d.ts.map +1 -0
- package/dist/types/components/actionSheet/actionSheet.d.ts +42 -0
- package/dist/types/components/actionSheet/actionSheet.d.ts.map +1 -0
- package/dist/types/components/actionSheet/index.d.ts +7 -0
- package/dist/types/components/actionSheet/index.d.ts.map +1 -0
- package/dist/types/components/actionSheet/types.d.ts +11 -0
- package/dist/types/components/actionSheet/types.d.ts.map +1 -0
- package/dist/types/components/badge/badge.d.ts +51 -0
- package/dist/types/components/badge/badge.d.ts.map +1 -0
- package/dist/types/components/badge/index.d.ts +12 -0
- package/dist/types/components/badge/index.d.ts.map +1 -0
- package/dist/types/components/badge/types.d.ts +8 -0
- package/dist/types/components/badge/types.d.ts.map +1 -0
- package/dist/types/components/button/button.d.ts +103 -0
- package/dist/types/components/button/button.d.ts.map +1 -0
- package/dist/types/components/button/index.d.ts +12 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/button/types.d.ts +13 -0
- package/dist/types/components/button/types.d.ts.map +1 -0
- package/dist/types/components/card/card.d.ts +18 -0
- package/dist/types/components/card/card.d.ts.map +1 -0
- package/dist/types/components/card/index.d.ts +12 -0
- package/dist/types/components/card/index.d.ts.map +1 -0
- package/dist/types/components/card/types.d.ts +4 -0
- package/dist/types/components/card/types.d.ts.map +1 -0
- package/dist/types/components/cell/cell.d.ts +24 -0
- package/dist/types/components/cell/cell.d.ts.map +1 -0
- package/dist/types/components/cell/index.d.ts +12 -0
- package/dist/types/components/cell/index.d.ts.map +1 -0
- package/dist/types/components/cell/types.d.ts +8 -0
- package/dist/types/components/cell/types.d.ts.map +1 -0
- package/dist/types/components/cellSwipe/cellSwipe.d.ts +37 -0
- package/dist/types/components/cellSwipe/cellSwipe.d.ts.map +1 -0
- package/dist/types/components/cellSwipe/index.d.ts +12 -0
- package/dist/types/components/cellSwipe/index.d.ts.map +1 -0
- package/dist/types/components/cellSwipe/types.d.ts +15 -0
- package/dist/types/components/cellSwipe/types.d.ts.map +1 -0
- package/dist/types/components/checkBox/checkbox-group.d.ts +38 -0
- package/dist/types/components/checkBox/checkbox-group.d.ts.map +1 -0
- package/dist/types/components/checkBox/checkbox.d.ts +36 -0
- package/dist/types/components/checkBox/checkbox.d.ts.map +1 -0
- package/dist/types/components/checkBox/index.d.ts +14 -0
- package/dist/types/components/checkBox/index.d.ts.map +1 -0
- package/dist/types/components/checkBox/types.d.ts +22 -0
- package/dist/types/components/checkBox/types.d.ts.map +1 -0
- package/dist/types/components/header/header.d.ts +47 -0
- package/dist/types/components/header/header.d.ts.map +1 -0
- package/dist/types/components/header/index.d.ts +12 -0
- package/dist/types/components/header/index.d.ts.map +1 -0
- package/dist/types/components/header/types.d.ts +7 -0
- package/dist/types/components/header/types.d.ts.map +1 -0
- package/dist/types/components/loadMore/index.d.ts +12 -0
- package/dist/types/components/loadMore/index.d.ts.map +1 -0
- package/dist/types/components/loadMore/loadMore.d.ts +150 -0
- package/dist/types/components/loadMore/loadMore.d.ts.map +1 -0
- package/dist/types/components/loadMore/types.d.ts +23 -0
- package/dist/types/components/loadMore/types.d.ts.map +1 -0
- package/dist/types/components/message/types.d.ts +32 -0
- package/dist/types/components/message/types.d.ts.map +1 -0
- package/dist/types/components/modal/types.d.ts +33 -0
- package/dist/types/components/modal/types.d.ts.map +1 -0
- package/dist/types/components/number/Number.d.ts +77 -0
- package/dist/types/components/number/Number.d.ts.map +1 -0
- package/dist/types/components/number/index.d.ts +9 -0
- package/dist/types/components/number/index.d.ts.map +1 -0
- package/dist/types/components/number/types.d.ts +12 -0
- package/dist/types/components/number/types.d.ts.map +1 -0
- package/dist/types/components/picker/index.d.ts +12 -0
- package/dist/types/components/picker/index.d.ts.map +1 -0
- package/dist/types/components/picker/picker.d.ts +237 -0
- package/dist/types/components/picker/picker.d.ts.map +1 -0
- package/dist/types/components/picker/types.d.ts +17 -0
- package/dist/types/components/picker/types.d.ts.map +1 -0
- package/dist/types/components/popup/index.d.ts +12 -0
- package/dist/types/components/popup/index.d.ts.map +1 -0
- package/dist/types/components/popup/popup.d.ts +71 -0
- package/dist/types/components/popup/popup.d.ts.map +1 -0
- package/dist/types/components/popup/types.d.ts +10 -0
- package/dist/types/components/popup/types.d.ts.map +1 -0
- package/dist/types/components/progress/index.d.ts +12 -0
- package/dist/types/components/progress/index.d.ts.map +1 -0
- package/dist/types/components/progress/progress.d.ts +36 -0
- package/dist/types/components/progress/progress.d.ts.map +1 -0
- package/dist/types/components/progress/types.d.ts +9 -0
- package/dist/types/components/progress/types.d.ts.map +1 -0
- package/dist/types/components/radioBox/index.d.ts +14 -0
- package/dist/types/components/radioBox/index.d.ts.map +1 -0
- package/dist/types/components/radioBox/radiobox-group.d.ts +31 -0
- package/dist/types/components/radioBox/radiobox-group.d.ts.map +1 -0
- package/dist/types/components/radioBox/radiobox.d.ts +38 -0
- package/dist/types/components/radioBox/radiobox.d.ts.map +1 -0
- package/dist/types/components/radioBox/types.d.ts +18 -0
- package/dist/types/components/radioBox/types.d.ts.map +1 -0
- package/dist/types/components/rater/index.d.ts +12 -0
- package/dist/types/components/rater/index.d.ts.map +1 -0
- package/dist/types/components/rater/raters.d.ts +83 -0
- package/dist/types/components/rater/raters.d.ts.map +1 -0
- package/dist/types/components/rater/types.d.ts +11 -0
- package/dist/types/components/rater/types.d.ts.map +1 -0
- package/dist/types/components/slideBar/index.d.ts +12 -0
- package/dist/types/components/slideBar/index.d.ts.map +1 -0
- package/dist/types/components/slideBar/slideBar.d.ts +46 -0
- package/dist/types/components/slideBar/slideBar.d.ts.map +1 -0
- package/dist/types/components/slideBar/types.d.ts +19 -0
- package/dist/types/components/slideBar/types.d.ts.map +1 -0
- package/dist/types/components/spinner/index.d.ts +12 -0
- package/dist/types/components/spinner/index.d.ts.map +1 -0
- package/dist/types/components/spinner/spinner.d.ts +36 -0
- package/dist/types/components/spinner/spinner.d.ts.map +1 -0
- package/dist/types/components/spinner/types.d.ts +7 -0
- package/dist/types/components/spinner/types.d.ts.map +1 -0
- package/dist/types/components/swipe/index.d.ts +12 -0
- package/dist/types/components/swipe/index.d.ts.map +1 -0
- package/dist/types/components/swipe/swipe.d.ts +99 -0
- package/dist/types/components/swipe/swipe.d.ts.map +1 -0
- package/dist/types/components/swipe/types.d.ts +20 -0
- package/dist/types/components/swipe/types.d.ts.map +1 -0
- package/dist/types/components/switchbar/index.d.ts +12 -0
- package/dist/types/components/switchbar/index.d.ts.map +1 -0
- package/dist/types/components/switchbar/switchbar.d.ts +38 -0
- package/dist/types/components/switchbar/switchbar.d.ts.map +1 -0
- package/dist/types/components/switchbar/types.d.ts +6 -0
- package/dist/types/components/switchbar/types.d.ts.map +1 -0
- package/dist/types/components/tab/index.d.ts +12 -0
- package/dist/types/components/tab/index.d.ts.map +1 -0
- package/dist/types/components/tab/tab.d.ts +54 -0
- package/dist/types/components/tab/tab.d.ts.map +1 -0
- package/dist/types/components/tab/types.d.ts +14 -0
- package/dist/types/components/tab/types.d.ts.map +1 -0
- package/dist/types/components/toTop/index.d.ts +12 -0
- package/dist/types/components/toTop/index.d.ts.map +1 -0
- package/dist/types/components/toTop/toTop.d.ts +18 -0
- package/dist/types/components/toTop/toTop.d.ts.map +1 -0
- package/dist/types/components/toTop/types.d.ts +7 -0
- package/dist/types/components/toTop/types.d.ts.map +1 -0
- package/dist/types/components/upload/index.d.ts +12 -0
- package/dist/types/components/upload/index.d.ts.map +1 -0
- package/dist/types/components/upload/types.d.ts +9 -0
- package/dist/types/components/upload/types.d.ts.map +1 -0
- package/dist/types/components/upload/upload.d.ts +19 -0
- package/dist/types/components/upload/upload.d.ts.map +1 -0
- package/dist/types/index.d.ts +157 -0
- package/dist/types/lib/MegaPixImage.d.ts +9 -0
- package/dist/types/lib/MegaPixImage.d.ts.map +1 -0
- package/dist/types/lib/lib.d.ts +3 -0
- package/dist/types/lib/lib.d.ts.map +1 -0
- package/dist/types/utils/util.d.ts +31 -0
- package/dist/types/utils/util.d.ts.map +1 -0
- package/dist-prod/91.05c8ec5277a15f939b0f.js +3 -0
- package/dist-prod/{91.e2fdec39667928bf57b9.js.map → 91.05c8ec5277a15f939b0f.js.map} +1 -1
- package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +2 -0
- package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +1 -0
- package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +2 -0
- package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +1 -0
- package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +2 -0
- package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +1 -0
- package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +2 -0
- package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +1 -0
- package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +2 -0
- package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +1 -0
- package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +2 -0
- package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +1 -0
- package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +2 -0
- package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +1 -0
- package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +2 -0
- package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +1 -0
- package/dist-prod/header.eb10433dd892738ee95a.chunk.js +2 -0
- package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +1 -0
- package/dist-prod/index.html +1 -1
- package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +2 -0
- package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +1 -0
- package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +2 -0
- package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +1 -0
- package/dist-prod/main.662ad15361e7f3d20234.js +2 -0
- package/dist-prod/main.662ad15361e7f3d20234.js.map +1 -0
- package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +2 -0
- package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +1 -0
- package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +2 -0
- package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +1 -0
- package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +2 -0
- package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +1 -0
- package/dist-prod/popup.538422c7e188363a468d.chunk.js +2 -0
- package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +1 -0
- package/dist-prod/progress.240de4b633002f573030.chunk.js +2 -0
- package/dist-prod/progress.240de4b633002f573030.chunk.js.map +1 -0
- package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +2 -0
- package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +1 -0
- package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +2 -0
- package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +1 -0
- package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +2 -0
- package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +1 -0
- package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +2 -0
- package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +1 -0
- package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +2 -0
- package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +1 -0
- package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +2 -0
- package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +1 -0
- package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +2 -0
- package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +1 -0
- package/dist-prod/tab.29f19483f699b7811259.chunk.js +2 -0
- package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +1 -0
- package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +2 -0
- package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +1 -0
- package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +2 -0
- package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +1 -0
- package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +2 -0
- package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +1 -0
- package/package.json +12 -3
- package/src/components/Indicator/Indicator.tsx +67 -0
- package/src/components/Indicator/index.ts +111 -0
- package/src/components/Indicator/types.ts +15 -0
- package/src/components/Text/index.ts +14 -0
- package/src/components/Text/textBar.tsx +104 -0
- package/src/components/Text/types.ts +13 -0
- package/src/components/actionSheet/actionSheet.d.ts +16 -0
- package/src/components/actionSheet/actionSheet.tsx +86 -0
- package/src/components/{action-sheet/index.js → actionSheet/index.ts} +1 -0
- package/src/components/actionSheet/types.ts +10 -0
- package/src/components/badge/{badge.vue → badge.tsx} +31 -31
- package/src/components/badge/index.ts +12 -0
- package/src/components/badge/types.ts +8 -0
- package/src/components/button/{button.vue → button.tsx} +46 -52
- package/src/components/button/index.ts +13 -0
- package/src/components/button/types.ts +13 -0
- package/src/components/card/card.d.ts +16 -0
- package/src/components/card/card.tsx +38 -0
- package/src/components/card/index.ts +12 -0
- package/src/components/card/types.ts +3 -0
- package/src/components/cell/cell.tsx +89 -0
- package/src/components/cell/index.ts +12 -0
- package/src/components/cell/types.ts +8 -0
- package/src/components/cellSwipe/cellSwipe.tsx +188 -0
- package/src/components/cellSwipe/index.ts +13 -0
- package/src/components/cellSwipe/types.ts +17 -0
- package/src/components/checkBox/checkbox-group.tsx +75 -0
- package/src/components/checkBox/checkbox.tsx +107 -0
- package/src/components/checkBox/index.ts +29 -0
- package/src/components/checkBox/types.ts +32 -0
- package/src/components/header/header.tsx +119 -0
- package/src/components/header/index.ts +13 -0
- package/src/components/header/types.ts +7 -0
- package/src/components/loadMore/index.ts +14 -0
- package/src/components/loadMore/loadMore.tsx +265 -0
- package/src/components/loadMore/types.ts +26 -0
- package/src/components/message/confirm.ts +104 -0
- package/src/components/message/{index.js → index.ts} +20 -18
- package/src/components/message/message.tsx +100 -0
- package/src/components/message/messageGroup.tsx +59 -0
- package/src/components/message/types.ts +48 -0
- package/src/components/modal/{confirm.js → confirm.ts} +8 -7
- package/src/components/modal/index.ts +68 -0
- package/src/components/modal/modal.tsx +248 -0
- package/src/components/modal/types.ts +51 -0
- package/src/components/number/Number.tsx +143 -0
- package/src/components/number/index.ts +10 -0
- package/src/components/number/types.ts +13 -0
- package/src/components/picker/index.ts +12 -0
- package/src/components/picker/picker.tsx +112 -0
- package/src/components/picker/types.ts +17 -0
- package/src/components/popup/index.ts +12 -0
- package/src/components/popup/popup.d.ts +16 -0
- package/src/components/popup/popup.tsx +68 -0
- package/src/components/popup/types.ts +9 -0
- package/src/components/progress/index.ts +12 -0
- package/src/components/progress/progress.tsx +81 -0
- package/src/components/progress/types.ts +9 -0
- package/src/components/prompt/{confirm.js → confirm.ts} +27 -14
- package/src/components/prompt/index.ts +50 -0
- package/src/components/prompt/prompt.tsx +161 -0
- package/src/components/prompt/types.ts +45 -0
- package/src/components/radioBox/index.ts +34 -0
- package/src/components/radioBox/radiobox-group.tsx +66 -0
- package/src/components/radioBox/radiobox.tsx +115 -0
- package/src/components/radioBox/types.ts +24 -0
- package/src/components/rater/index.ts +12 -0
- package/src/components/rater/rater.d.ts +16 -0
- package/src/components/rater/raters.tsx +101 -0
- package/src/components/rater/types.ts +10 -0
- package/src/components/slideBar/index.ts +13 -0
- package/src/components/slideBar/slideBar.tsx +288 -0
- package/src/components/slideBar/types.ts +20 -0
- package/src/components/spinner/index.ts +13 -0
- package/src/components/spinner/spinner.tsx +85 -0
- package/src/components/spinner/types.ts +20 -0
- package/src/components/swipe/index.ts +13 -0
- package/src/components/swipe/swipe.tsx +292 -0
- package/src/components/swipe/types.ts +21 -0
- package/src/components/switchbar/index.ts +13 -0
- package/src/components/switchbar/switchbar.tsx +58 -0
- package/src/components/switchbar/types.ts +6 -0
- package/src/components/tab/index.ts +12 -0
- package/src/components/tab/tab.tsx +71 -0
- package/src/components/tab/types.ts +15 -0
- package/src/components/toTop/index.ts +13 -0
- package/src/components/toTop/toTop.tsx +54 -0
- package/src/components/toTop/types.ts +7 -0
- package/src/components/upload/index.ts +13 -0
- package/src/components/upload/types.ts +9 -0
- package/src/components/upload/upload.tsx +180 -0
- package/src/index.ts +175 -0
- package/src/lib/MegaPixImage.js +1 -0
- package/src/{main.js → main.ts} +4 -2
- package/src/shims-vue.d.ts +37 -0
- package/src/styles/components/radioBox.less +5 -1
- package/src/styles/components/rater.less +16 -0
- package/src/styles/index.less +1 -0
- package/src/types/index.d.ts +157 -0
- package/src/types/js-shims.d.ts +36 -0
- package/src/utils/test.ts +2 -0
- package/src/utils/util.ts +168 -0
- package/src/utils/{util.js → util1.js} +2 -2
- package/src/views/ActionSheet.vue +7 -7
- package/src/views/Badge/Badge.less +12 -0
- package/src/views/Badge/Badge.tsx +23 -0
- package/src/views/Badge.vue +4 -2
- package/src/views/Button.vue +17 -17
- package/src/views/Card.vue +2 -1
- package/src/views/Cell.vue +6 -5
- package/src/views/CellSwipe.vue +51 -39
- package/src/views/CheckBox.vue +7 -6
- package/src/views/Header.vue +8 -7
- package/src/views/Indicator.vue +15 -15
- package/src/views/LoadMore.vue +13 -10
- package/src/views/Message.vue +14 -14
- package/src/views/Modal.vue +10 -10
- package/src/views/Picker.vue +19 -17
- package/src/views/Popup.vue +47 -41
- package/src/views/Progress.vue +8 -6
- package/src/views/Prompt.vue +5 -5
- package/src/views/RadioBox.vue +6 -4
- package/src/views/Rater.vue +7 -3
- package/src/views/SlideBar.vue +9 -5
- package/src/views/Spinner.vue +17 -5
- package/src/views/Swipe.vue +5 -3
- package/src/views/SwitchBar.vue +6 -4
- package/src/views/Tab.vue +8 -6
- package/src/views/Text.vue +14 -10
- package/src/views/ToTop.vue +19 -5
- package/src/views/Upload.vue +8 -4
- package/tsconfig.build.json +30 -0
- package/tsconfig.json +39 -0
- package/webpack.base.config.js +22 -2
- package/webpack.dev.config.js +2 -1
- package/webpack.dist.dev.config.js +3 -2
- package/webpack.dist.prod.config.js +3 -2
- package/webpack.prod.config.js +2 -1
- package/dist-prod/91.e2fdec39667928bf57b9.js +0 -3
- package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js +0 -2
- package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js.map +0 -1
- package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js +0 -2
- package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js.map +0 -1
- package/dist-prod/button.28b491339fbba29c3f16.chunk.js +0 -2
- package/dist-prod/button.28b491339fbba29c3f16.chunk.js.map +0 -1
- package/dist-prod/card.3ad847f07bebc1391125.chunk.js +0 -2
- package/dist-prod/card.3ad847f07bebc1391125.chunk.js.map +0 -1
- package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js +0 -2
- package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js.map +0 -1
- package/dist-prod/cellswipe.04240414bed39e28e7b9.chunk.js +0 -2
- package/dist-prod/cellswipe.04240414bed39e28e7b9.chunk.js.map +0 -1
- package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js +0 -2
- package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js.map +0 -1
- package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js +0 -2
- package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js.map +0 -1
- package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js +0 -2
- package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js.map +0 -1
- package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js +0 -2
- package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js.map +0 -1
- package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js +0 -2
- package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js.map +0 -1
- package/dist-prod/main.717f5c8b51911571fb82.js +0 -2
- package/dist-prod/main.717f5c8b51911571fb82.js.map +0 -1
- package/dist-prod/message.e57fa263a214006f7191.chunk.js +0 -2
- package/dist-prod/message.e57fa263a214006f7191.chunk.js.map +0 -1
- package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js +0 -2
- package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js.map +0 -1
- package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js +0 -2
- package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js.map +0 -1
- package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js +0 -2
- package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js.map +0 -1
- package/dist-prod/progress.1e0d785044aecadc5615.chunk.js +0 -2
- package/dist-prod/progress.1e0d785044aecadc5615.chunk.js.map +0 -1
- package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js +0 -2
- package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js.map +0 -1
- package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js +0 -2
- package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js.map +0 -1
- package/dist-prod/rater.939e0e7e770728f684c3.chunk.js +0 -2
- package/dist-prod/rater.939e0e7e770728f684c3.chunk.js.map +0 -1
- package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js +0 -2
- package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js.map +0 -1
- package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js +0 -2
- package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js.map +0 -1
- package/dist-prod/swipe.75b7d741be73c0064982.chunk.js +0 -2
- package/dist-prod/swipe.75b7d741be73c0064982.chunk.js.map +0 -1
- package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js +0 -2
- package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js.map +0 -1
- package/dist-prod/tab.4c391211c41b7d12b585.chunk.js +0 -2
- package/dist-prod/tab.4c391211c41b7d12b585.chunk.js.map +0 -1
- package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js +0 -2
- package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js.map +0 -1
- package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js +0 -2
- package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js.map +0 -1
- package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js +0 -2
- package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js.map +0 -1
- package/src/components/Indicator/index.js +0 -86
- package/src/components/Text/Number.vue +0 -167
- package/src/components/Text/index.js +0 -7
- package/src/components/Text/textBar.vue +0 -122
- package/src/components/action-sheet/actionSheet.vue +0 -98
- package/src/components/badge/index.js +0 -5
- package/src/components/button/index.js +0 -5
- package/src/components/card/card.vue +0 -49
- package/src/components/card/index.js +0 -5
- package/src/components/cell/cell.vue +0 -113
- package/src/components/cell/index.js +0 -5
- package/src/components/cell-swipe/cell-swipe.vue +0 -168
- package/src/components/cell-swipe/index.js +0 -5
- package/src/components/checkBox/checkbox-group.vue +0 -74
- package/src/components/checkBox/checkbox.vue +0 -117
- package/src/components/checkBox/index.js +0 -8
- package/src/components/header/header.vue +0 -131
- package/src/components/header/index.js +0 -5
- package/src/components/loadMore/index.js +0 -5
- package/src/components/loadMore/loadmore.vue +0 -258
- package/src/components/message/confirm.js +0 -60
- package/src/components/message/message.vue +0 -137
- package/src/components/message/messageGroup.vue +0 -82
- package/src/components/modal/index.js +0 -52
- package/src/components/modal/modal.vue +0 -138
- package/src/components/picker/index.js +0 -5
- package/src/components/picker/picker.vue +0 -111
- package/src/components/popup/index.js +0 -5
- package/src/components/popup/popup.vue +0 -91
- package/src/components/progress/index.js +0 -5
- package/src/components/progress/progress.vue +0 -86
- package/src/components/prompt/index.js +0 -53
- package/src/components/prompt/prompt.vue +0 -125
- package/src/components/radioBox/index.js +0 -8
- package/src/components/rater/index.js +0 -5
- package/src/components/rater/rater.vue +0 -118
- package/src/components/slideBar/index.js +0 -6
- package/src/components/slideBar/slideBar.vue +0 -225
- package/src/components/spinner/index.js +0 -5
- package/src/components/spinner/spinner.vue +0 -78
- package/src/components/swipe/index.js +0 -5
- package/src/components/swipe/swipe.vue +0 -289
- package/src/components/switchbar/index.js +0 -5
- package/src/components/switchbar/switchbar.vue +0 -79
- package/src/components/tab/index.js +0 -6
- package/src/components/tab/tab.vue +0 -89
- package/src/components/toTop/index.js +0 -5
- package/src/components/toTop/topTop.vue +0 -78
- package/src/components/upload/index.js +0 -5
- package/src/components/upload/upload.vue +0 -166
- package/src/index.js +0 -149
- /package/dist-prod/{91.e2fdec39667928bf57b9.js.LICENSE.txt → 91.05c8ec5277a15f939b0f.js.LICENSE.txt} +0 -0
- /package/src/components/radioBox/{radiobox-group.vue → radiobox-group1.vue} +0 -0
- /package/src/components/radioBox/{radiobox.vue → radiobox1.vue} +0 -0
- /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,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue 3 组件库入口 ts 版本
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { App } 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 = (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
|
+
|
|
172
|
+
/* ========= 默认导出 ========= */
|
|
173
|
+
export default {
|
|
174
|
+
install
|
|
175
|
+
}
|
package/src/lib/MegaPixImage.js
CHANGED
|
@@ -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
|
package/src/{main.js → main.ts}
RENAMED
|
@@ -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;
|
package/src/styles/index.less
CHANGED
|
@@ -0,0 +1,157 @@
|
|
|
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 } 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️⃣ 必须存在,保证这是 module
|
|
156
|
+
* ---------------------------------- */
|
|
157
|
+
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
|
+
}
|