dpzvc3-ui 3.0.7 → 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 +7761 -10544
- 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 +6067 -7681
- 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,20 @@
|
|
|
1
|
+
// src/components/spinner/types.ts
|
|
2
|
+
export type SpinnerType =
|
|
3
|
+
| 'blade'
|
|
4
|
+
| 'snake'
|
|
5
|
+
| 'double-bounce'
|
|
6
|
+
| 'triple-bounce'
|
|
7
|
+
| 'fading-circle'
|
|
8
|
+
|
|
9
|
+
// type Compute<T> = { [K in keyof T]: T[K] extends Object ? Compute<T[K]> : T[K] }; // 将类型展开方便提示
|
|
10
|
+
// interface Spinner {
|
|
11
|
+
// size?: number | string
|
|
12
|
+
// type?: SpinnerType | number
|
|
13
|
+
// color?: string
|
|
14
|
+
// }
|
|
15
|
+
// export type SpinnerProps = Compute<Spinner>
|
|
16
|
+
export interface SpinnerProps {
|
|
17
|
+
size?: number | string
|
|
18
|
+
type?: SpinnerType | number
|
|
19
|
+
color?: string
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by admin on 2017/5/11.
|
|
3
|
+
*/
|
|
4
|
+
import type { App } from 'vue'
|
|
5
|
+
import Swipe from './swipe'
|
|
6
|
+
// export default Swipe
|
|
7
|
+
Swipe.install = (app: App): void => {
|
|
8
|
+
app.component('Swipe', Swipe); // 注册全局组件
|
|
9
|
+
}
|
|
10
|
+
type IWithInstall<T> = T & { install(app: App): void };
|
|
11
|
+
const _Swipe=Swipe as IWithInstall<typeof Swipe>;
|
|
12
|
+
export default _Swipe
|
|
13
|
+
export type { SwipeProps } from './types'
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
// src/components/swipe/swipe.tsx
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
ref,
|
|
5
|
+
computed,
|
|
6
|
+
onMounted,
|
|
7
|
+
onBeforeUnmount,
|
|
8
|
+
PropType
|
|
9
|
+
} from 'vue'
|
|
10
|
+
import rafTimeout from '../../lib/lib'
|
|
11
|
+
import type { SwipeItem, SwipeProps } from './types'
|
|
12
|
+
|
|
13
|
+
export type { SwipeProps }
|
|
14
|
+
|
|
15
|
+
const prefixCls = 'dpzvc3-swipe'
|
|
16
|
+
|
|
17
|
+
export default defineComponent({
|
|
18
|
+
name: 'Dpzvc3Swipe',
|
|
19
|
+
|
|
20
|
+
props: {
|
|
21
|
+
auto: { type: Boolean, default: true },
|
|
22
|
+
list: { type: Array as PropType<SwipeItem[]>, default: () => [] },
|
|
23
|
+
startIndex: { type: Number, default: 0 },
|
|
24
|
+
height: { type: [Number, String] as PropType<number | string>, default: 'auto' },
|
|
25
|
+
dots: { type: String as PropType<'top' | 'bottom'>, default: 'bottom' },
|
|
26
|
+
multiple: { type: Boolean, default: false },
|
|
27
|
+
distanceIndex: { type: Number, default: 1.5 },
|
|
28
|
+
loop: { type: Boolean, default: true },
|
|
29
|
+
speed: { type: Number, default: 2 },
|
|
30
|
+
perpage: { type: Number, default: 1 }
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
setup(props, { slots }) {
|
|
34
|
+
const swipeRef = ref<HTMLDivElement | null>(null)
|
|
35
|
+
const wrapper = ref<HTMLDivElement | null>(null)
|
|
36
|
+
|
|
37
|
+
const clientWidth = ref(0)
|
|
38
|
+
const translateX = ref(0)
|
|
39
|
+
const currentTranslateX = ref(0)
|
|
40
|
+
const dragging = ref(false)
|
|
41
|
+
const autoSwipe = ref(true)
|
|
42
|
+
const startX = ref(0)
|
|
43
|
+
const distance = ref(0)
|
|
44
|
+
const slideIndex = ref(props.startIndex)
|
|
45
|
+
const timer = ref<null | (() => void)>(null)
|
|
46
|
+
|
|
47
|
+
const localList = ref<SwipeItem[]>([...props.list])
|
|
48
|
+
const transitionRef = ref('transform .2s ease-out')
|
|
49
|
+
|
|
50
|
+
/** 是否多列 */
|
|
51
|
+
const isMultiple = computed(() => {
|
|
52
|
+
if (props.perpage <= 1) return false
|
|
53
|
+
|
|
54
|
+
const page = props.perpage
|
|
55
|
+
const result: SwipeItem[][] = []
|
|
56
|
+
let temp: SwipeItem[] = []
|
|
57
|
+
|
|
58
|
+
localList.value.forEach((item, idx) => {
|
|
59
|
+
temp.push(item)
|
|
60
|
+
if (temp.length === page || idx === localList.value.length - 1) {
|
|
61
|
+
result.push(temp)
|
|
62
|
+
temp = []
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
// ⚠️ 保持与你原逻辑一致(computed 内有副作用)
|
|
67
|
+
localList.value = result as any
|
|
68
|
+
return true
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
/** 实际渲染数组 */
|
|
72
|
+
const arrayList = computed<any[]>(() => {
|
|
73
|
+
if (!localList.value.length) return []
|
|
74
|
+
return props.loop
|
|
75
|
+
? [...localList.value, localList.value[0]]
|
|
76
|
+
: localList.value
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const dotLength = computed(() => localList.value.length)
|
|
80
|
+
const minIndex = computed(() => 0)
|
|
81
|
+
const maxIndex = computed(() =>
|
|
82
|
+
props.loop ? arrayList.value.length - 2 : arrayList.value.length - 1
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
/** class / style */
|
|
86
|
+
const classes = computed(() => [prefixCls])
|
|
87
|
+
const wrapperClasses = computed(() => [
|
|
88
|
+
`${prefixCls}-wrapper`,
|
|
89
|
+
{ [`${prefixCls}-dragging`]: dragging.value }
|
|
90
|
+
])
|
|
91
|
+
const multipleClass = `${prefixCls}-multiple`
|
|
92
|
+
const singleClass = `${prefixCls}-single`
|
|
93
|
+
const itemClasses = computed(() => [
|
|
94
|
+
`${prefixCls}-item`,
|
|
95
|
+
{ multiple: isMultiple.value }
|
|
96
|
+
])
|
|
97
|
+
const dotsClasses = computed(() => [
|
|
98
|
+
`${prefixCls}-dots`,
|
|
99
|
+
{
|
|
100
|
+
[`${prefixCls}-dots-bottom`]: props.dots === 'bottom',
|
|
101
|
+
[`${prefixCls}-dots-top`]: props.dots === 'top'
|
|
102
|
+
}
|
|
103
|
+
])
|
|
104
|
+
|
|
105
|
+
const wrapperStyle = computed(() => ({
|
|
106
|
+
width: `${arrayList.value.length * clientWidth.value}px`,
|
|
107
|
+
transform: `translate3d(${translateX.value}px,0,0)`,
|
|
108
|
+
transition: transitionRef.value
|
|
109
|
+
}))
|
|
110
|
+
|
|
111
|
+
/** 点击 */
|
|
112
|
+
function choose(item: SwipeItem, index: number, e?: Event) {
|
|
113
|
+
if (item.onClick) {
|
|
114
|
+
item.onClick(item, index)
|
|
115
|
+
} else if (item.link) {
|
|
116
|
+
if (/https?:\/\//i.test(item.link)) {
|
|
117
|
+
window.location.href = item.link
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** touch */
|
|
123
|
+
function onTouchStart(e: TouchEvent) {
|
|
124
|
+
dragging.value = true
|
|
125
|
+
autoSwipe.value = false
|
|
126
|
+
startX.value = e.touches[0].clientX
|
|
127
|
+
currentTranslateX.value = translateX.value
|
|
128
|
+
distance.value = 0
|
|
129
|
+
clearTimer()
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function onTouchMove(e: TouchEvent) {
|
|
133
|
+
const currentX = e.touches[0].clientX
|
|
134
|
+
distance.value = props.distanceIndex
|
|
135
|
+
? (currentX - startX.value) / props.distanceIndex
|
|
136
|
+
: currentX - startX.value
|
|
137
|
+
translateX.value = currentTranslateX.value + distance.value
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function onTouchEnd() {
|
|
141
|
+
if (distance.value < 0 && Math.abs(distance.value) > clientWidth.value / 5) {
|
|
142
|
+
props.loop ? onLoopSlideLeft() : onSlideLeft()
|
|
143
|
+
} else if (distance.value > 0 && Math.abs(distance.value) > clientWidth.value / 5) {
|
|
144
|
+
props.loop ? onLoopSlideRight() : onSlideRight()
|
|
145
|
+
} else {
|
|
146
|
+
translateX.value = currentTranslateX.value
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
dragging.value = false
|
|
150
|
+
autoSwipe.value = true
|
|
151
|
+
props.auto && autoSlide()
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function onSlideLeft() {
|
|
155
|
+
if (slideIndex.value < maxIndex.value) slideIndex.value++
|
|
156
|
+
translateX.value = -slideIndex.value * clientWidth.value
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function onSlideRight() {
|
|
160
|
+
if (slideIndex.value > minIndex.value) slideIndex.value--
|
|
161
|
+
translateX.value = -slideIndex.value * clientWidth.value
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function onLoopSlideLeft() {
|
|
165
|
+
onSlideLeft()
|
|
166
|
+
if (slideIndex.value > maxIndex.value) {
|
|
167
|
+
slideIndex.value = maxIndex.value
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function onLoopSlideRight() {
|
|
172
|
+
onSlideRight()
|
|
173
|
+
if (slideIndex.value < minIndex.value) {
|
|
174
|
+
slideIndex.value = minIndex.value
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function autoSlide() {
|
|
179
|
+
timer.value = rafTimeout(() => {
|
|
180
|
+
if (!dragging.value && autoSwipe.value) {
|
|
181
|
+
translateX.value -= clientWidth.value
|
|
182
|
+
slideIndex.value++
|
|
183
|
+
if (slideIndex.value > maxIndex.value && props.loop) {
|
|
184
|
+
slideIndex.value = minIndex.value
|
|
185
|
+
wrapper.value?.addEventListener('transitionend', resetSlide, false)
|
|
186
|
+
}
|
|
187
|
+
autoSlide()
|
|
188
|
+
}
|
|
189
|
+
}, props.speed < 1 ? 1000 : props.speed * 1000)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function resetSlide() {
|
|
193
|
+
wrapper.value?.removeEventListener('transitionend', resetSlide)
|
|
194
|
+
slideIndex.value = minIndex.value
|
|
195
|
+
autoSwipe.value = false
|
|
196
|
+
transitionRef.value = 'none'
|
|
197
|
+
translateX.value = -slideIndex.value * clientWidth.value
|
|
198
|
+
setTimeout(() => {
|
|
199
|
+
autoSwipe.value = true
|
|
200
|
+
transitionRef.value = 'transform .2s ease-out'
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function clearTimer() {
|
|
205
|
+
timer.value?.()
|
|
206
|
+
timer.value = null
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function onResize() {
|
|
210
|
+
clientWidth.value = swipeRef.value?.clientWidth || 0
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
onMounted(() => {
|
|
214
|
+
clientWidth.value = swipeRef.value?.clientWidth || 0
|
|
215
|
+
props.auto && autoSlide()
|
|
216
|
+
|
|
217
|
+
wrapper.value?.addEventListener('touchstart', onTouchStart)
|
|
218
|
+
wrapper.value?.addEventListener('touchmove', onTouchMove)
|
|
219
|
+
wrapper.value?.addEventListener('touchend', onTouchEnd)
|
|
220
|
+
|
|
221
|
+
window.addEventListener('resize', onResize)
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
onBeforeUnmount(() => {
|
|
225
|
+
wrapper.value?.removeEventListener('touchstart', onTouchStart)
|
|
226
|
+
wrapper.value?.removeEventListener('touchmove', onTouchMove)
|
|
227
|
+
wrapper.value?.removeEventListener('touchend', onTouchEnd)
|
|
228
|
+
window.removeEventListener('resize', onResize)
|
|
229
|
+
clearTimer()
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
/** render */
|
|
233
|
+
return () => (
|
|
234
|
+
<div
|
|
235
|
+
ref={swipeRef}
|
|
236
|
+
class={classes.value}
|
|
237
|
+
style={{ height: props.height }}
|
|
238
|
+
>
|
|
239
|
+
<div
|
|
240
|
+
ref={wrapper}
|
|
241
|
+
class={wrapperClasses.value}
|
|
242
|
+
style={wrapperStyle.value}
|
|
243
|
+
>
|
|
244
|
+
{arrayList.value.map((item: any, index: number) => (
|
|
245
|
+
<div key={index} class={itemClasses.value}>
|
|
246
|
+
{isMultiple.value ? (
|
|
247
|
+
item.map((sub: SwipeItem, i: number) => (
|
|
248
|
+
<a
|
|
249
|
+
key={i}
|
|
250
|
+
class={multipleClass}
|
|
251
|
+
onClick={(e: any) => choose(sub, i, e)}
|
|
252
|
+
>
|
|
253
|
+
{slots.default?.({ item: sub, index: i }) ?? (
|
|
254
|
+
<>
|
|
255
|
+
<img src={sub.image} />
|
|
256
|
+
<span>{sub.spec}</span>
|
|
257
|
+
</>
|
|
258
|
+
)}
|
|
259
|
+
</a>
|
|
260
|
+
))
|
|
261
|
+
) : (
|
|
262
|
+
<a
|
|
263
|
+
class={singleClass}
|
|
264
|
+
onClick={(e: any) => choose(item, index, e)}
|
|
265
|
+
>
|
|
266
|
+
{slots.default?.({ item, index }) ?? (
|
|
267
|
+
<>
|
|
268
|
+
<img src={item.image} />
|
|
269
|
+
<span>{item.spec}</span>
|
|
270
|
+
</>
|
|
271
|
+
)}
|
|
272
|
+
</a>
|
|
273
|
+
)}
|
|
274
|
+
</div>
|
|
275
|
+
))}
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<div class={dotsClasses.value}>
|
|
279
|
+
{Array.from({ length: dotLength.value }).map((_, i) => (
|
|
280
|
+
<span
|
|
281
|
+
key={i}
|
|
282
|
+
class={[
|
|
283
|
+
'dpzvc3-swipe-dots-item',
|
|
284
|
+
i === slideIndex.value ? 'active' : ''
|
|
285
|
+
]}
|
|
286
|
+
/>
|
|
287
|
+
))}
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
)
|
|
291
|
+
}
|
|
292
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/components/swipe/types.ts
|
|
2
|
+
export interface SwipeItem {
|
|
3
|
+
image?: string
|
|
4
|
+
spec?: string
|
|
5
|
+
link?: string
|
|
6
|
+
onClick?: (item: SwipeItem, index: number) => void
|
|
7
|
+
[key: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface SwipeProps {
|
|
11
|
+
auto?: boolean
|
|
12
|
+
list?: SwipeItem[]
|
|
13
|
+
startIndex?: number
|
|
14
|
+
height?: number | string
|
|
15
|
+
dots?: 'top' | 'bottom'
|
|
16
|
+
multiple?: boolean
|
|
17
|
+
distanceIndex?: number
|
|
18
|
+
loop?: boolean
|
|
19
|
+
speed?: number
|
|
20
|
+
perpage?: number
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by admin on 2025/09/26.
|
|
3
|
+
*/
|
|
4
|
+
import type { App } from 'vue'
|
|
5
|
+
import SwitchBar from './switchbar'
|
|
6
|
+
SwitchBar.install = (app: App): void => {
|
|
7
|
+
app.component('SwitchBar', SwitchBar); // 注册全局组件
|
|
8
|
+
}
|
|
9
|
+
type IWithInstall<T> = T & { install(app: App): void };
|
|
10
|
+
const _SwitchBar=SwitchBar as IWithInstall<typeof SwitchBar>;
|
|
11
|
+
export default _SwitchBar
|
|
12
|
+
// export default SwitchBar
|
|
13
|
+
export type { SwitchBarProps } from './types'
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/components/switchbar/switchbar.tsx
|
|
2
|
+
import { defineComponent, ref, computed, watch, onMounted, PropType } from 'vue'
|
|
3
|
+
import { randomStr } from '../../utils/util'
|
|
4
|
+
import type { SwitchBarProps } from './types'
|
|
5
|
+
|
|
6
|
+
export type { SwitchBarProps }
|
|
7
|
+
|
|
8
|
+
const prefixCls = 'dpzvc3-switch'
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'SwitchBar',
|
|
12
|
+
props: {
|
|
13
|
+
id: { type: String, default: null },
|
|
14
|
+
modelValue: { type: Boolean, default: false },
|
|
15
|
+
size: { type: String as PropType<'small' | 'large'>, default: 'small' }
|
|
16
|
+
},
|
|
17
|
+
emits: ['update:modelValue'],
|
|
18
|
+
setup(props, { emit }) {
|
|
19
|
+
const name = ref(props.id || '')
|
|
20
|
+
const currentValue = ref(props.modelValue)
|
|
21
|
+
|
|
22
|
+
// 外部 v-model
|
|
23
|
+
watch(() => props.modelValue, val => {
|
|
24
|
+
currentValue.value = val
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
// 内部变化通知父组件
|
|
28
|
+
watch(currentValue, val => {
|
|
29
|
+
emit('update:modelValue', val)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// 自动生成 id
|
|
33
|
+
onMounted(() => {
|
|
34
|
+
if (!props.id) {
|
|
35
|
+
name.value = Date.now() + '_' + randomStr()
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const classes = computed(() => [prefixCls])
|
|
40
|
+
const inputCheckClasses = computed(() => [`${prefixCls}-checkbox`, 'hidden'])
|
|
41
|
+
const sizeClasses = computed(() => [
|
|
42
|
+
`${prefixCls}-ui`,
|
|
43
|
+
{ small: props.size === 'small' }
|
|
44
|
+
])
|
|
45
|
+
|
|
46
|
+
return () => (
|
|
47
|
+
<div class={classes.value}>
|
|
48
|
+
<input
|
|
49
|
+
id={name.value}
|
|
50
|
+
type="checkbox"
|
|
51
|
+
class={inputCheckClasses.value}
|
|
52
|
+
v-model={currentValue.value}
|
|
53
|
+
/>
|
|
54
|
+
<label for={name.value} class={sizeClasses.value} />
|
|
55
|
+
</div>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by admin on 2025/10/15.
|
|
3
|
+
*/
|
|
4
|
+
import type { App } from 'vue'
|
|
5
|
+
import Tab from './tab'
|
|
6
|
+
Tab.install = (app: App): void => {
|
|
7
|
+
app.component('Tab', Tab); // 注册全局组件
|
|
8
|
+
}
|
|
9
|
+
type IWithInstall<T> = T & { install(app: App): void };
|
|
10
|
+
const _Tab=Tab as IWithInstall<typeof Tab>;
|
|
11
|
+
export default _Tab
|
|
12
|
+
export type { TabProps } from './types'
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/components/tab/tab.tsx
|
|
2
|
+
import { defineComponent, ref, computed, watch, PropType } from 'vue'
|
|
3
|
+
import type { TabProps, TabItem } from './types'
|
|
4
|
+
import { RouterLink } from 'vue-router'
|
|
5
|
+
|
|
6
|
+
export type { TabProps }
|
|
7
|
+
|
|
8
|
+
const prefixCls = 'dpzvc3-tab'
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'Dpzvc3Tab',
|
|
12
|
+
props: {
|
|
13
|
+
items: { type: Array as PropType<TabItem[]>, default: () => [] },
|
|
14
|
+
modelValue: { type: Boolean, default: true },
|
|
15
|
+
index: { type: [Number, String], default: 0 },
|
|
16
|
+
border: { type: Boolean, default: true },
|
|
17
|
+
styles: { type: Object as PropType<Record<string, any>>, default: () => ({}) }
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const show = ref(props.modelValue)
|
|
21
|
+
|
|
22
|
+
watch(() => props.modelValue, val => {
|
|
23
|
+
show.value = val
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const classes = computed(() => [prefixCls])
|
|
27
|
+
const getStyles = computed(() => ({ ...props.styles }))
|
|
28
|
+
|
|
29
|
+
const itemClass = (index: number) => {
|
|
30
|
+
const _class = [`tab-item-${index}`]
|
|
31
|
+
if (Number(props.index) === Number(index)) _class.push('cur')
|
|
32
|
+
return _class
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const getIconHtml = (index: number) => {
|
|
36
|
+
const item = props.items[index]
|
|
37
|
+
if (!item) return ''
|
|
38
|
+
return Number(props.index) === Number(index) ? (item.iconCur || item.icon) : item.icon
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return () => (
|
|
42
|
+
show.value && (
|
|
43
|
+
<div class={classes.value} style={getStyles.value}>
|
|
44
|
+
<ul>
|
|
45
|
+
{props.items?.map((item, idx) => {
|
|
46
|
+
const isExternal = /^(http|https):\/\//i.test(item.path)
|
|
47
|
+
const iconHtml = getIconHtml(idx)
|
|
48
|
+
const cls = itemClass(idx)
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<li key={idx}>
|
|
52
|
+
{isExternal ? (
|
|
53
|
+
<a href={item.path} class={cls}>
|
|
54
|
+
<span innerHTML={iconHtml} />
|
|
55
|
+
<p>{item.name}</p>
|
|
56
|
+
</a>
|
|
57
|
+
) : (
|
|
58
|
+
<RouterLink to={item.path} class={cls}>
|
|
59
|
+
<span innerHTML={iconHtml} />
|
|
60
|
+
<p>{item.name}</p>
|
|
61
|
+
</RouterLink>
|
|
62
|
+
)}
|
|
63
|
+
</li>
|
|
64
|
+
)
|
|
65
|
+
})}
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/components/tab/types.ts
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
name: string
|
|
4
|
+
path: string
|
|
5
|
+
icon?: string
|
|
6
|
+
iconCur?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface TabProps {
|
|
10
|
+
items?: TabItem[]
|
|
11
|
+
modelValue?: boolean
|
|
12
|
+
index?: number | string
|
|
13
|
+
border?: boolean
|
|
14
|
+
styles?: Record<string, any>
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by admin on 2025/11/29.
|
|
3
|
+
*/
|
|
4
|
+
import type { App } from 'vue'
|
|
5
|
+
import ToTop from './toTop'
|
|
6
|
+
ToTop.install = (app: App): void => {
|
|
7
|
+
app.component('ToTop', ToTop); // 注册全局组件
|
|
8
|
+
}
|
|
9
|
+
type IWithInstall<T> = T & { install(app: App): void };
|
|
10
|
+
const _ToTop=ToTop as IWithInstall<typeof ToTop>;
|
|
11
|
+
export default _ToTop
|
|
12
|
+
// export default ToTop
|
|
13
|
+
export type { ToTopProps } from './types'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, onBeforeUnmount } from 'vue'
|
|
2
|
+
import { scrollTop } from '../../utils/util'
|
|
3
|
+
import { ToTopProps } from './types'
|
|
4
|
+
|
|
5
|
+
const prefixCls = 'dpzvc3-toTop'
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'ToTop',
|
|
9
|
+
props: {
|
|
10
|
+
distance: { type: Number, default: 200 },
|
|
11
|
+
bottom: { type: [Number, String], default: 30 },
|
|
12
|
+
right: { type: [Number, String], default: 30 },
|
|
13
|
+
duration: { type: Number, default: 1000 }
|
|
14
|
+
}, //as unknown as Record<keyof ToTopProps, any>
|
|
15
|
+
setup(props: ToTopProps) {
|
|
16
|
+
const back = ref(false)
|
|
17
|
+
|
|
18
|
+
const classes = computed(() => [prefixCls])
|
|
19
|
+
const wrapperClasses = computed(() => [`${prefixCls}-wrapper`])
|
|
20
|
+
const positionStyles = computed(() => ({
|
|
21
|
+
bottom: typeof props.bottom === 'number' ? props.bottom + 'px' : props.bottom,
|
|
22
|
+
right: typeof props.right === 'number' ? props.right + 'px' : props.right
|
|
23
|
+
}))
|
|
24
|
+
|
|
25
|
+
const scroll = () => {
|
|
26
|
+
back.value = window.pageYOffset > (props.distance || 0)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const toTopHandler = () => {
|
|
30
|
+
scrollTop(window, window.pageYOffset, 0, props.duration || 1000)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
onMounted(() => {
|
|
34
|
+
window.addEventListener('scroll', scroll, false)
|
|
35
|
+
window.addEventListener('resize', scroll, false)
|
|
36
|
+
scroll() // 初始化判断
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
onBeforeUnmount(() => {
|
|
40
|
+
window.removeEventListener('scroll', scroll, false)
|
|
41
|
+
window.removeEventListener('resize', scroll, false)
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
return () => {
|
|
45
|
+
return back.value ? (
|
|
46
|
+
<div class={classes.value} style={positionStyles.value} onClick={toTopHandler}>
|
|
47
|
+
<slot>
|
|
48
|
+
<div class={wrapperClasses.value}></div>
|
|
49
|
+
</slot>
|
|
50
|
+
</div>
|
|
51
|
+
) : null
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by admin on 2025/10/26.
|
|
3
|
+
*/
|
|
4
|
+
import type { App } from 'vue'
|
|
5
|
+
import Upload from './upload'
|
|
6
|
+
Upload.install = (app: App): void => {
|
|
7
|
+
app.component('Upload', Upload); // 注册全局组件
|
|
8
|
+
}
|
|
9
|
+
type IWithInstall<T> = T & { install(app: App): void };
|
|
10
|
+
const _Upload=Upload as IWithInstall<typeof Upload>;
|
|
11
|
+
export default _Upload
|
|
12
|
+
// export default Upload
|
|
13
|
+
export type { UploadProps } from './types'
|