fusions-ui 1.2.6 → 1.2.8
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/LICENSE +1 -1
- package/changelog.md +2 -0
- package/components/avatar/index.ts +1 -0
- package/components/avatar/src/avatar.ts +131 -0
- package/components/avatar/src/avatar.vue +104 -0
- package/components/avatar/src/composables/index.ts +1 -0
- package/components/avatar/src/composables/use-avatar.ts +61 -0
- package/components/avatar-group/index.ts +1 -0
- package/components/avatar-group/src/avatar-group.ts +86 -0
- package/components/{fu-avatar-group/fu-avatar-group.vue → avatar-group/src/avatar-group.vue} +27 -34
- package/components/avatar-group/src/composables/index.ts +1 -0
- package/components/avatar-group/src/composables/use-avatar-group.ts +17 -0
- package/components/badge/index.ts +1 -0
- package/components/badge/src/badge.ts +126 -0
- package/components/{fu-badge/fu-badge.vue → badge/src/badge.vue} +26 -62
- package/components/badge/src/composables/badge-custom.ts +51 -0
- package/components/badge/src/composables/index.ts +1 -0
- package/components/banner-arc/index.ts +1 -0
- package/components/banner-arc/src/banner-arc.ts +41 -0
- package/components/banner-arc/src/banner-arc.vue +49 -0
- package/components/banner-arc/src/composables/banner-arc-custom.ts +19 -0
- package/components/banner-arc/src/composables/index.ts +1 -0
- package/components/button/index.ts +1 -0
- package/components/button/src/button.ts +332 -0
- package/components/{fu-button/fu-button.vue → button/src/button.vue} +57 -163
- package/components/button/src/composables/button-custom.ts +90 -0
- package/components/button/src/composables/index.ts +2 -0
- package/components/button/src/composables/use-button.ts +137 -0
- package/components/cell/index.ts +1 -0
- package/components/cell/src/cell.ts +167 -0
- package/components/{fu-cell/fu-cell.vue → cell/src/cell.vue} +29 -38
- package/components/cell/src/composables/index.ts +1 -0
- package/components/cell/src/composables/use-cell.ts +20 -0
- package/components/cell-group/index.ts +1 -0
- package/components/cell-group/src/cell-group.ts +23 -0
- package/components/{fu-cell-group/fu-cell-group.vue → cell-group/src/cell-group.vue} +8 -13
- package/components/checkbox/index.ts +1 -0
- package/components/checkbox/src/checkbox.ts +144 -0
- package/components/checkbox/src/checkbox.vue +270 -0
- package/components/checkbox/src/composables/checkbox-custom.ts +15 -0
- package/components/checkbox/src/composables/index.ts +2 -0
- package/components/checkbox/src/composables/use-checkbox.ts +200 -0
- package/components/code-input/index.ts +1 -0
- package/components/code-input/src/code-input.ts +157 -0
- package/components/code-input/src/code-input.vue +158 -0
- package/components/code-input/src/composables/code-input-custom.ts +74 -0
- package/components/code-input/src/composables/index.ts +2 -0
- package/components/code-input/src/composables/use-code-input.ts +67 -0
- package/components/code-verify/index.ts +1 -0
- package/components/code-verify/src/code-verify.ts +160 -0
- package/components/code-verify/src/code-verify.vue +87 -0
- package/components/code-verify/src/composables/code-verify-custom.ts +23 -0
- package/components/code-verify/src/composables/index.ts +2 -0
- package/components/code-verify/src/composables/use-code-verify.ts +132 -0
- package/components/collapse/index.ts +1 -0
- package/components/collapse/src/collapse.ts +41 -0
- package/components/collapse/src/collapse.vue +48 -0
- package/components/collapse/src/composables/index.ts +1 -0
- package/components/collapse/src/composables/use-collapse.ts +150 -0
- package/components/collapse-item/index.ts +1 -0
- package/components/collapse-item/src/collapse-item.ts +102 -0
- package/components/{fu-collapse-item/fu-collapse-item.vue → collapse-item/src/collapse-item.vue} +20 -159
- package/components/collapse-item/src/composables/index.ts +1 -0
- package/components/collapse-item/src/composables/use-collapse-item.ts +139 -0
- package/components/countdown/index.ts +1 -0
- package/components/countdown/src/composables/index.ts +1 -0
- package/components/countdown/src/composables/use-countdown.ts +133 -0
- package/components/countdown/src/countdown.ts +63 -0
- package/components/countdown/src/countdown.vue +60 -0
- package/components/{fu-countdown/util.js → countdown/src/util.ts} +5 -5
- package/components/datetime-picker/index.ts +1 -0
- package/components/datetime-picker/src/composables/index.ts +1 -0
- package/components/datetime-picker/src/composables/use-datetime-picker.ts +325 -0
- package/components/datetime-picker/src/datetime-picker.ts +223 -0
- package/components/datetime-picker/src/datetime-picker.vue +96 -0
- package/components/form/index.ts +1 -0
- package/components/form/src/composables/index.ts +1 -0
- package/components/form/src/composables/use-form.ts +256 -0
- package/components/form/src/form.ts +108 -0
- package/components/form/src/form.vue +64 -0
- package/components/{fu-form/utils.js → form/src/utils.ts} +49 -42
- package/components/{fu-form/validate.js → form/src/validate.ts} +58 -49
- package/components/form-item/index.ts +1 -0
- package/components/form-item/src/composables/index.ts +1 -0
- package/components/form-item/src/composables/use-form-item.ts +292 -0
- package/components/form-item/src/form-item.ts +81 -0
- package/components/form-item/src/form-item.vue +229 -0
- package/components/fusions-ui/src/fusions-ui.vue +8 -0
- package/components/grid/index.ts +1 -0
- package/components/grid/src/composables/index.ts +1 -0
- package/components/grid/src/composables/use-grid.ts +67 -0
- package/components/grid/src/grid.ts +54 -0
- package/components/grid/src/grid.vue +69 -0
- package/components/grid-item/index.ts +1 -0
- package/components/grid-item/src/composables/grid-item-custom.ts +16 -0
- package/components/grid-item/src/composables/index.ts +2 -0
- package/components/grid-item/src/composables/use-grid-item.ts +55 -0
- package/components/grid-item/src/grid-item.ts +15 -0
- package/components/grid-item/src/grid-item.vue +102 -0
- package/components/icon/index.ts +1 -0
- package/components/icon/src/composables/icon-custom.ts +41 -0
- package/components/icon/src/composables/index.ts +2 -0
- package/components/icon/src/composables/use-icon.ts +14 -0
- package/components/{fu-icon/icon.css → icon/src/fuicon.css} +584 -584
- package/components/icon/src/fuicon.ts +1023 -0
- package/components/icon/src/icon.ts +84 -0
- package/components/icon/src/icon.vue +92 -0
- package/components/image/index.ts +1 -0
- package/components/image/src/composables/image-custom.ts +36 -0
- package/components/image/src/composables/index.ts +2 -0
- package/components/image/src/composables/use-image.ts +135 -0
- package/components/image/src/image.ts +185 -0
- package/components/image/src/image.vue +152 -0
- package/components/index-anchor/index.ts +1 -0
- package/components/index-anchor/src/composables/index.ts +1 -0
- package/components/index-anchor/src/composables/use-index-anchor.ts +44 -0
- package/components/index-anchor/src/index-anchor.ts +45 -0
- package/components/index-anchor/src/index-anchor.vue +60 -0
- package/components/index-item/index.ts +1 -0
- package/components/index-item/src/composables/index.ts +1 -0
- package/components/index-item/src/composables/use-index-item.ts +75 -0
- package/components/index-item/src/index-item.ts +13 -0
- package/components/index-item/src/index-item.vue +32 -0
- package/components/index-list/index.ts +1 -0
- package/components/index-list/src/composables/index.ts +1 -0
- package/components/index-list/src/composables/use-index-list.ts +297 -0
- package/components/index-list/src/index-list.ts +52 -0
- package/components/index-list/src/index-list.vue +178 -0
- package/components/index.ts +62 -0
- package/components/input/index.ts +1 -0
- package/components/input/src/composables/index.ts +2 -0
- package/components/input/src/composables/input-custom.ts +69 -0
- package/components/input/src/composables/use-input.ts +117 -0
- package/components/input/src/input.ts +360 -0
- package/components/input/src/input.vue +241 -0
- package/components/keyboard/index.ts +1 -0
- package/components/keyboard/src/composables/index.ts +3 -0
- package/components/keyboard/src/composables/use-keyboard-car.ts +99 -0
- package/components/keyboard/src/composables/use-keyboard-number.ts +81 -0
- package/components/keyboard/src/composables/use-keyboard.ts +61 -0
- package/components/keyboard/src/keyboard-car.ts +53 -0
- package/components/{fu-keyboard → keyboard/src}/keyboard-car.vue +37 -199
- package/components/keyboard/src/keyboard-number.ts +44 -0
- package/components/keyboard/src/keyboard-number.vue +108 -0
- package/components/keyboard/src/keyboard.ts +174 -0
- package/components/{fu-keyboard/fu-keyboard.vue → keyboard/src/keyboard.vue} +38 -63
- package/components/line/index.ts +1 -0
- package/components/line/src/composables/index.ts +1 -0
- package/components/line/src/composables/line-custom.ts +30 -0
- package/components/line/src/line.ts +82 -0
- package/components/line/src/line.vue +44 -0
- package/components/link/index.ts +1 -0
- package/components/link/src/composables/index.ts +2 -0
- package/components/link/src/composables/link-custom.ts +19 -0
- package/components/link/src/composables/use-link.ts +33 -0
- package/components/link/src/link.ts +61 -0
- package/components/link/src/link.vue +62 -0
- package/components/loading/index.ts +1 -0
- package/{libs/function/colorGradient.js → components/loading/src/composables/colorGradient.ts} +4 -4
- package/components/loading/src/composables/index.ts +2 -0
- package/components/loading/src/composables/loading-custom.ts +21 -0
- package/components/loading/src/composables/use-loading.ts +100 -0
- package/components/loading/src/loading.ts +77 -0
- package/components/{fu-loading/fu-loading.vue → loading/src/loading.vue} +23 -119
- package/components/loading-more/index.ts +1 -0
- package/components/loading-more/src/loading-more.ts +75 -0
- package/components/{fu-loading-more/fu-loading-more.vue → loading-more/src/loading-more.vue} +18 -19
- package/components/modal/index.ts +1 -0
- package/components/modal/src/composables/index.ts +2 -0
- package/components/modal/src/composables/modal-custom.ts +17 -0
- package/components/modal/src/composables/use-modal.ts +56 -0
- package/components/modal/src/modal.ts +152 -0
- package/components/{fu-modal/fu-modal.vue → modal/src/modal.vue} +41 -69
- package/components/navbar/index.ts +1 -0
- package/components/navbar/src/composables/index.ts +2 -0
- package/components/navbar/src/composables/navbar-custom.ts +62 -0
- package/components/navbar/src/composables/use-navbar.ts +42 -0
- package/components/navbar/src/navbar.ts +151 -0
- package/components/navbar/src/navbar.vue +249 -0
- package/components/notice-bar/index.ts +3 -0
- package/components/notice-bar/src/composables/index.ts +5 -0
- package/components/notice-bar/src/composables/notice-column-custom.ts +43 -0
- package/components/notice-bar/src/composables/notice-row-custom.ts +26 -0
- package/components/notice-bar/src/composables/use-notice-bar.ts +34 -0
- package/components/notice-bar/src/composables/use-notice-column.ts +31 -0
- package/components/notice-bar/src/composables/use-notice-row.ts +88 -0
- package/components/notice-bar/src/notice-bar.ts +197 -0
- package/components/{fu-notice-bar/fu-notice-bar.vue → notice-bar/src/notice-bar.vue} +28 -41
- package/components/notice-bar/src/notice-column.ts +172 -0
- package/components/notice-bar/src/notice-column.vue +129 -0
- package/components/notice-bar/src/notice-row.ts +155 -0
- package/components/notice-bar/src/notice-row.vue +135 -0
- package/components/number-box/index.ts +1 -0
- package/components/number-box/src/composables/index.ts +2 -0
- package/components/number-box/src/composables/number-box-custom.ts +16 -0
- package/components/number-box/src/composables/use-number-box.ts +84 -0
- package/components/number-box/src/number-box.ts +98 -0
- package/components/number-box/src/number-box.vue +123 -0
- package/components/parse/index.ts +1 -0
- package/components/parse/src/app-plus/html/js/handler.js +254 -0
- package/components/parse/src/app-plus/html/js/uni.webview.min.js +188 -0
- package/components/parse/src/app-plus/html/local.html +32 -0
- package/components/parse/src/composables/index.ts +1 -0
- package/components/parse/src/composables/use-parse.ts +428 -0
- package/components/parse/src/node/node.vue +635 -0
- package/components/parse/src/parse.ts +156 -0
- package/components/parse/src/parse.vue +131 -0
- package/components/parse/src/parser.ts +1402 -0
- package/components/picker/index.ts +1 -0
- package/components/picker/src/composables/index.ts +2 -0
- package/components/picker/src/composables/picker-custom.ts +40 -0
- package/components/picker/src/composables/use-picker.ts +179 -0
- package/components/picker/src/picker.ts +172 -0
- package/components/picker/src/picker.vue +197 -0
- package/components/popup/index.ts +1 -0
- package/components/popup/src/composables/index.ts +1 -0
- package/components/popup/src/composables/use-popup.ts +346 -0
- package/components/popup/src/keypress.ts +55 -0
- package/components/popup/src/popup.ts +101 -0
- package/components/popup/src/popup.vue +204 -0
- package/components/progress/index.ts +1 -0
- package/components/progress/src/composables/index.ts +2 -0
- package/components/progress/src/composables/progress-custom.ts +24 -0
- package/components/progress/src/composables/use-progress.ts +159 -0
- package/components/progress/src/progress.ts +84 -0
- package/components/progress/src/progress.vue +150 -0
- package/components/rate/index.ts +1 -0
- package/components/rate/src/composables/index.ts +1 -0
- package/components/rate/src/composables/use-rate.ts +196 -0
- package/components/rate/src/rate.ts +114 -0
- package/components/rate/src/rate.vue +113 -0
- package/components/read-more/index.ts +1 -0
- package/components/read-more/src/composables/index.ts +2 -0
- package/components/read-more/src/composables/read-more-custom.ts +46 -0
- package/components/read-more/src/composables/use-read-more.ts +72 -0
- package/components/read-more/src/read-more.ts +102 -0
- package/components/read-more/src/read-more.vue +104 -0
- package/components/safe-bottom/index.ts +1 -0
- package/components/safe-bottom/src/composables/index.ts +2 -0
- package/components/safe-bottom/src/composables/safe-bottom-custom.ts +18 -0
- package/components/safe-bottom/src/composables/use-safe-bottom.ts +17 -0
- package/components/safe-bottom/src/safe-bottom.ts +8 -0
- package/components/safe-bottom/src/safe-bottom.vue +43 -0
- package/components/scroll-list/index.ts +1 -0
- package/components/scroll-list/src/composables/index.ts +2 -0
- package/components/scroll-list/src/composables/scroll-list-custom.ts +41 -0
- package/components/scroll-list/src/composables/use-scroll-list.ts +126 -0
- package/components/scroll-list/src/scroll-list.ts +57 -0
- package/components/scroll-list/src/scroll-list.vue +143 -0
- package/components/{fu-scroll-list/scrollWxs.wxs → scroll-list/src/scroll-wxs.wxs} +2 -2
- package/components/search/index.ts +1 -0
- package/components/search/src/composables/index.ts +2 -0
- package/components/search/src/composables/search-custom.ts +25 -0
- package/components/search/src/composables/use-search.ts +106 -0
- package/components/search/src/search.ts +186 -0
- package/components/{fu-search/fu-search.vue → search/src/search.vue} +42 -154
- package/components/section/index.ts +1 -0
- package/components/section/src/composables/index.ts +1 -0
- package/components/section/src/composables/use-section.ts +19 -0
- package/components/section/src/section.ts +83 -0
- package/components/{fu-section/fu-section.vue → section/src/section.vue} +36 -35
- package/components/sign-board/index.ts +1 -0
- package/components/sign-board/src/composables/index.ts +1 -0
- package/components/sign-board/src/composables/use-sign-board.ts +552 -0
- package/components/sign-board/src/sign-board.ts +48 -0
- package/components/sign-board/src/sign-board.vue +191 -0
- package/components/skeleton/index.ts +1 -0
- package/components/skeleton/src/composables/index.ts +2 -0
- package/components/skeleton/src/composables/skeleton-custom.ts +23 -0
- package/components/skeleton/src/composables/use-skeleton.ts +102 -0
- package/components/skeleton/src/skeleton.ts +37 -0
- package/components/skeleton/src/skeleton.vue +147 -0
- package/components/status-bar/src/composables/index.ts +1 -0
- package/components/status-bar/src/composables/use-status-bar.ts +29 -0
- package/components/status-bar/src/status-bar.vue +21 -0
- package/components/steps/index.ts +1 -0
- package/components/steps/src/composables/index.ts +1 -0
- package/components/steps/src/composables/use-steps.ts +27 -0
- package/components/steps/src/steps.ts +65 -0
- package/components/steps/src/steps.vue +46 -0
- package/components/steps-item/index.ts +1 -0
- package/components/steps-item/src/composables/index.ts +2 -0
- package/components/steps-item/src/composables/steps-item-custom.ts +81 -0
- package/components/steps-item/src/composables/use-steps-item.ts +87 -0
- package/components/steps-item/src/steps-item.ts +38 -0
- package/components/steps-item/src/steps-item.vue +224 -0
- package/components/sticky/index.ts +1 -0
- package/components/sticky/src/composables/index.ts +2 -0
- package/components/sticky/src/composables/sticky-custom.ts +57 -0
- package/components/sticky/src/composables/use-sticky.ts +152 -0
- package/components/sticky/src/sticky.ts +62 -0
- package/components/sticky/src/sticky.vue +65 -0
- package/components/subsection/index.ts +1 -0
- package/components/subsection/src/composables/index.ts +2 -0
- package/components/subsection/src/composables/subsection-custom.ts +71 -0
- package/components/subsection/src/composables/use-subsection.ts +85 -0
- package/components/subsection/src/subsection.ts +107 -0
- package/components/subsection/src/subsection.vue +165 -0
- package/components/swipe-action/src/composables/index.ts +1 -0
- package/components/swipe-action/src/composables/use-swipe-action.ts +58 -0
- package/components/swipe-action/src/swipe-action.vue +81 -0
- package/components/swipe-action-item/index.ts +1 -0
- package/components/{fu-swipe-action-item/mpwxs.js → swipe-action-item/src/mpwxs.ts} +22 -27
- package/components/swipe-action-item/src/swipe-action-item.ts +68 -0
- package/components/{fu-swipe-action-item/fu-swipe-action-item.vue → swipe-action-item/src/swipe-action-item.vue} +24 -17
- package/components/{fu-swipe-action-item → swipe-action-item/src}/wx.wxs +2 -2
- package/components/swiper/index.ts +1 -0
- package/components/swiper/src/composables/index.ts +2 -0
- package/components/swiper/src/composables/swiper-custom.ts +40 -0
- package/components/swiper/src/composables/use-swiper.ts +75 -0
- package/components/swiper/src/swiper.ts +189 -0
- package/components/{fu-swiper/fu-swiper.vue → swiper/src/swiper.vue} +49 -118
- package/components/switch/index.ts +1 -0
- package/components/switch/src/composables/index.ts +2 -0
- package/components/switch/src/composables/switch-custom.ts +32 -0
- package/components/switch/src/composables/use-switch.ts +38 -0
- package/components/switch/src/switch.ts +115 -0
- package/components/{fu-switch/fu-switch.vue → switch/src/switch.vue} +25 -73
- package/components/tabs/index.ts +1 -0
- package/components/tabs/src/composables/index.ts +2 -0
- package/components/tabs/src/composables/tabs-custom.ts +43 -0
- package/components/tabs/src/composables/use-tabs.ts +210 -0
- package/components/tabs/src/tabs.ts +123 -0
- package/components/tabs/src/tabs.vue +153 -0
- package/components/tag/index.ts +1 -0
- package/components/tag/src/composables/index.ts +2 -0
- package/components/tag/src/composables/tag-custom.ts +61 -0
- package/components/tag/src/composables/use-tag.ts +23 -0
- package/components/tag/src/tag.ts +159 -0
- package/components/{fu-tag/fu-tag.vue → tag/src/tag.vue} +53 -93
- package/components/text/index.ts +1 -0
- package/components/text/src/composables/index.ts +2 -0
- package/components/text/src/composables/text-custom.ts +120 -0
- package/components/text/src/composables/use-text.ts +83 -0
- package/components/text/src/text.ts +261 -0
- package/components/text/src/text.vue +186 -0
- package/components/textarea/index.ts +1 -0
- package/components/textarea/src/composables/index.ts +2 -0
- package/components/textarea/src/composables/textarea-custom.ts +50 -0
- package/components/textarea/src/composables/use-textarea.ts +88 -0
- package/components/textarea/src/textarea.ts +250 -0
- package/components/textarea/src/textarea.vue +162 -0
- package/components/{fu-timeaxis/fu-timeaxis.vue → timeaxis/src/timeaxis.vue} +3 -9
- package/components/timeaxis-item/index.ts +1 -0
- package/components/timeaxis-item/src/timeaxis-item.ts +20 -0
- package/components/timeaxis-item/src/timeaxis-item.vue +50 -0
- package/components/transition/index.ts +1 -0
- package/components/transition/src/composables/createAnimation.ts +171 -0
- package/components/transition/src/composables/index.ts +2 -0
- package/components/transition/src/composables/transform-custom.ts +18 -0
- package/components/transition/src/composables/use-transition.ts +251 -0
- package/components/transition/src/transition.ts +64 -0
- package/components/transition/src/transition.vue +70 -0
- package/components/upload/index.ts +1 -0
- package/components/upload/src/composables/index.ts +5 -0
- package/components/upload/src/composables/upload-file-custom.ts +68 -0
- package/components/upload/src/composables/upload-image-custom.ts +76 -0
- package/components/upload/src/composables/use-upload-file.ts +27 -0
- package/components/upload/src/composables/use-upload-image.ts +38 -0
- package/components/upload/src/composables/use-upload.ts +388 -0
- package/components/upload/src/upload-file.ts +84 -0
- package/components/upload/src/upload-file.vue +193 -0
- package/components/upload/src/upload-image.ts +90 -0
- package/components/upload/src/upload-image.vue +158 -0
- package/components/upload/src/upload.ts +196 -0
- package/components/upload/src/upload.vue +151 -0
- package/components/{fu-upload/utils.js → upload/src/utils.ts} +12 -12
- package/components/vtabs/index.ts +1 -0
- package/components/vtabs/src/composables/index.ts +2 -0
- package/components/vtabs/src/composables/use-vtabs.ts +276 -0
- package/components/vtabs/src/composables/vtabs-custom.ts +54 -0
- package/components/vtabs/src/vtabs.ts +130 -0
- package/components/vtabs/src/vtabs.vue +189 -0
- package/components/vtabs-item/index.ts +1 -0
- package/components/vtabs-item/src/composables/index.ts +1 -0
- package/components/vtabs-item/src/composables/use-vtabs-item.ts +60 -0
- package/components/vtabs-item/src/vtabs-item.ts +10 -0
- package/components/vtabs-item/src/vtabs-item.vue +20 -0
- package/components/waterfall/index.ts +1 -0
- package/components/waterfall/src/composables/index.ts +2 -0
- package/components/waterfall/src/composables/use-waterfall.ts +139 -0
- package/components/waterfall/src/composables/waterfall-custom.ts +18 -0
- package/components/waterfall/src/waterfall.ts +114 -0
- package/components/waterfall/src/waterfall.vue +104 -0
- package/{libs/config/config.js → config/config.ts} +13 -7
- package/constants/images.ts +18 -0
- package/constants/index.ts +6 -0
- package/constants/open-types.ts +33 -0
- package/constants/props.ts +18 -0
- package/constants/shapes.ts +6 -0
- package/constants/types.ts +10 -0
- package/constants/z-index.ts +27 -0
- package/global.d.ts +103 -0
- package/hooks/index.ts +25 -0
- package/index.scss +3 -5
- package/index.ts +56 -0
- package/package.json +1 -1
- package/{libs/route/min.route.config.js → route/min.route.config.ts} +62 -23
- package/route/route.config.ts +93 -0
- package/style/color.scss +26 -0
- package/{libs/style → style}/common.scss +1 -14
- package/{libs/function/applyEven.js → utils/applyEven.ts} +21 -12
- package/utils/check.ts +276 -0
- package/{libs/function/chooseUploadFile.js → utils/chooseUploadFile.ts} +22 -26
- package/utils/common.ts +609 -0
- package/{libs/function/digit.js → utils/digit.ts} +63 -33
- package/{components/fu-swipe-action-item/isPC.js → utils/isPC.ts} +1 -1
- package/utils/toast.ts +42 -0
- package/components/fu-avatar/fu-avatar.vue +0 -157
- package/components/fu-avatar/props.js +0 -117
- package/components/fu-avatar-group/props.js +0 -74
- package/components/fu-badge/props.js +0 -112
- package/components/fu-banner-arc/fu-banner-arc.vue +0 -58
- package/components/fu-banner-arc/props.js +0 -35
- package/components/fu-button/props.js +0 -228
- package/components/fu-cell/props.js +0 -108
- package/components/fu-cell-group/props.js +0 -19
- package/components/fu-checkbox/fu-checkbox.vue +0 -469
- package/components/fu-checkbox/props.js +0 -126
- package/components/fu-code-input/fu-code-input.vue +0 -269
- package/components/fu-code-input/props.js +0 -136
- package/components/fu-code-verify/fu-code-verify.vue +0 -221
- package/components/fu-code-verify/props.js +0 -136
- package/components/fu-collapse/fu-collapse.vue +0 -143
- package/components/fu-collapse/props.js +0 -29
- package/components/fu-collapse-item/props.js +0 -101
- package/components/fu-countdown/fu-countdown.vue +0 -164
- package/components/fu-countdown/props.js +0 -35
- package/components/fu-datetime-picker/fu-datetime-picker.vue +0 -375
- package/components/fu-datetime-picker/props.js +0 -194
- package/components/fu-form/fu-form.vue +0 -284
- package/components/fu-form/props.js +0 -74
- package/components/fu-form-item/fu-form-item.vue +0 -535
- package/components/fu-form-item/props.js +0 -66
- package/components/fu-grid/fu-grid.vue +0 -113
- package/components/fu-grid/props.js +0 -44
- package/components/fu-grid-item/fu-grid-item.vue +0 -136
- package/components/fu-grid-item/props.js +0 -27
- package/components/fu-icon/fu-icon.vue +0 -107
- package/components/fu-icon/icon.js +0 -1031
- package/components/fu-icon/props.js +0 -55
- package/components/fu-image/fu-image.vue +0 -268
- package/components/fu-image/props.js +0 -145
- package/components/fu-index-anchor/fu-index-anchor.vue +0 -91
- package/components/fu-index-anchor/props.js +0 -43
- package/components/fu-index-item/fu-index-item.vue +0 -79
- package/components/fu-index-list/fu-index-list.vue +0 -426
- package/components/fu-index-list/props.js +0 -42
- package/components/fu-input/fu-input.vue +0 -393
- package/components/fu-input/props.js +0 -291
- package/components/fu-keyboard/keyboard-number.vue +0 -195
- package/components/fu-keyboard/props.js +0 -138
- package/components/fu-line/fu-line.vue +0 -64
- package/components/fu-line/props.js +0 -58
- package/components/fu-link/fu-link.vue +0 -91
- package/components/fu-link/props.js +0 -49
- package/components/fu-loading/props.js +0 -60
- package/components/fu-loading-more/props.js +0 -59
- package/components/fu-modal/props.js +0 -128
- package/components/fu-navbar/fu-navbar.vue +0 -271
- package/components/fu-navbar/props.js +0 -72
- package/components/fu-navbar/status-bar.vue +0 -27
- package/components/fu-notice-bar/notice-column.vue +0 -313
- package/components/fu-notice-bar/notice-row.vue +0 -363
- package/components/fu-notice-bar/props.js +0 -173
- package/components/fu-number-box/fu-number-box.vue +0 -210
- package/components/fu-number-box/props.js +0 -79
- package/components/fu-parse/fu-parse.vue +0 -508
- package/components/fu-parse/node/node.vue +0 -576
- package/components/fu-parse/parser.js +0 -1335
- package/components/fu-picker/fu-picker.vue +0 -347
- package/components/fu-picker/props.js +0 -150
- package/components/fu-popup/fu-popup.vue +0 -475
- package/components/fu-popup/keypress.js +0 -45
- package/components/fu-popup/props.js +0 -83
- package/components/fu-progress/fu-progress.vue +0 -292
- package/components/fu-progress/props.js +0 -76
- package/components/fu-rate/fu-rate.vue +0 -301
- package/components/fu-rate/props.js +0 -103
- package/components/fu-read-more/fu-read-more.vue +0 -191
- package/components/fu-read-more/props.js +0 -72
- package/components/fu-ribbon/fu-ribbon.vue +0 -106
- package/components/fu-ribbon/props.js +0 -35
- package/components/fu-safe-area/fu-safe-area.vue +0 -61
- package/components/fu-scroll-list/fu-scroll-list.vue +0 -196
- package/components/fu-scroll-list/nvue.js +0 -28
- package/components/fu-scroll-list/props.js +0 -43
- package/components/fu-search/props.js +0 -149
- package/components/fu-section/props.js +0 -59
- package/components/fu-sign-board/fu-sign-board.vue +0 -728
- package/components/fu-sign-board/props.js +0 -34
- package/components/fu-skeleton/fu-skeleton.vue +0 -238
- package/components/fu-skeleton/props.js +0 -35
- package/components/fu-steps/fu-steps.vue +0 -81
- package/components/fu-steps/props.js +0 -55
- package/components/fu-steps-item/fu-steps-item.vue +0 -274
- package/components/fu-steps-item/props.js +0 -34
- package/components/fu-sticky/fu-sticky.vue +0 -232
- package/components/fu-sticky/props.js +0 -54
- package/components/fu-subsection/fu-subsection.vue +0 -288
- package/components/fu-subsection/props.js +0 -88
- package/components/fu-swipe-action/fu-swipe-action.vue +0 -64
- package/components/fu-swipe-action-item/props.js +0 -54
- package/components/fu-swiper/props.js +0 -163
- package/components/fu-switch/props.js +0 -102
- package/components/fu-tabs/fu-tabs.vue +0 -361
- package/components/fu-tabs/props.js +0 -109
- package/components/fu-tag/props.js +0 -135
- package/components/fu-text/button.js +0 -13
- package/components/fu-text/fu-text.vue +0 -254
- package/components/fu-text/openType.js +0 -47
- package/components/fu-text/props.js +0 -173
- package/components/fu-text/value.js +0 -88
- package/components/fu-textarea/fu-textarea.vue +0 -288
- package/components/fu-textarea/props.js +0 -206
- package/components/fu-timeaxis-item/fu-timeaxis-item.vue +0 -68
- package/components/fu-transition/createAnimation.js +0 -131
- package/components/fu-transition/fu-transition.vue +0 -292
- package/components/fu-transition/props.js +0 -21
- package/components/fu-upload/fu-upload.vue +0 -563
- package/components/fu-upload/props.js +0 -171
- package/components/fu-upload/upload-file.vue +0 -332
- package/components/fu-upload/upload-image.vue +0 -304
- package/components/fu-vtabs/fu-vtabs.vue +0 -443
- package/components/fu-vtabs/props.js +0 -114
- package/components/fu-vtabs-item/fu-vtabs-item.vue +0 -71
- package/components/fu-waterfall/fu-waterfall.vue +0 -238
- package/components/fu-waterfall/props.js +0 -85
- package/index.js +0 -71
- package/libs/function/check.js +0 -215
- package/libs/function/common.js +0 -527
- package/libs/function/message.js +0 -47
- package/libs/mixin/button.js +0 -85
- package/libs/mixin/mixin.js +0 -94
- package/libs/mixin/mpMixin.js +0 -8
- package/libs/mixin/mpShare.js +0 -15
- package/libs/route/route.config.js +0 -66
- package/libs/style/color.scss +0 -24
- /package/components/{fu-icon/icon.ttf → icon/src/fuicon.ttf} +0 -0
- /package/components/{fu-swipe-action-item → swipe-action-item/src}/bindingx.js +0 -0
- /package/components/{fu-swipe-action-item → swipe-action-item/src}/mpalipay.js +0 -0
- /package/components/{fu-swipe-action-item → swipe-action-item/src}/mpother.js +0 -0
- /package/components/{fu-swipe-action-item → swipe-action-item/src}/render.js +0 -0
- /package/{libs/style → style}/components.scss +0 -0
- /package/{libs/style → style}/style.h5.scss +0 -0
- /package/{libs/style → style}/style.mp.scss +0 -0
- /package/{libs/function → utils}/dayjs.js +0 -0
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
:placeholder="placeholder"
|
|
17
17
|
:maxlength="maxlength"
|
|
18
18
|
confirm-type="search"
|
|
19
|
-
@confirm="
|
|
20
|
-
@blur="
|
|
21
|
-
@focus="
|
|
19
|
+
@confirm="handleConfirm"
|
|
20
|
+
@blur="handleBlur"
|
|
21
|
+
@focus="handleFocus"
|
|
22
22
|
:style="[{
|
|
23
23
|
textAlign: inputAlign,
|
|
24
24
|
color: color,
|
|
@@ -27,28 +27,27 @@
|
|
|
27
27
|
}, inputStyle]"
|
|
28
28
|
v-if="show || searchValue" />
|
|
29
29
|
<text class="fu-search__text-placeholder" :style="[inputStyle]" v-else>{{ placeholder }}</text>
|
|
30
|
-
<view class="fu-search__box__icon-clear" v-if="show && (clearabled === 'always' || clearabled==='auto' && searchValue !=='') && !readonly" @click="
|
|
30
|
+
<view class="fu-search__box__icon-clear" v-if="show && (clearabled === 'always' || clearabled==='auto' && searchValue !=='') && !readonly" @click="handleClear">
|
|
31
31
|
<slot name="clearIcon">
|
|
32
32
|
<fu-icon name="close-fill" color="#c0c4cc" size="20" />
|
|
33
33
|
</slot>
|
|
34
34
|
</view>
|
|
35
35
|
</view>
|
|
36
|
-
<text class="fu-search__custom" :style="[actionStyle]" v-if="(clearabled === 'always' || show && clearabled ==='auto') && showAction" @tap.stop.prevent="
|
|
36
|
+
<text class="fu-search__custom" :style="[actionStyle]" v-if="(clearabled === 'always' || show && clearabled ==='auto') && showAction" @tap.stop.prevent="handleCustom">
|
|
37
37
|
{{actionText || ''}}
|
|
38
38
|
</text>
|
|
39
39
|
</view>
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
|
-
<script>
|
|
43
|
-
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
44
|
-
import props from './props.js'
|
|
42
|
+
<script lang="ts" setup>
|
|
45
43
|
/**
|
|
46
44
|
* Search 搜索
|
|
47
45
|
* @description Search 搜索组件,集成了常见搜索框所需功能,用户可以一键引入,开箱即用。
|
|
48
|
-
* @
|
|
46
|
+
* @tutorial http://www.fusions.top/components/search.html
|
|
47
|
+
* @property {String | Number} v-model 输入框初始值
|
|
49
48
|
* @property {String} placeholder 占位提示文字(默认 '搜索关键词')
|
|
50
|
-
* @property {String
|
|
51
|
-
* @property {String
|
|
49
|
+
* @property {String | Number} radius 自定义圆角 (默认 5)
|
|
50
|
+
* @property {String | Number} maxlength 输入最大长度(默认 150)
|
|
52
51
|
* @property {String} clearabledd = [always|auto|none] 是否显示清除按钮
|
|
53
52
|
* @value always 一直显示
|
|
54
53
|
* @value auto 输入框不为空时显示
|
|
@@ -61,13 +60,13 @@
|
|
|
61
60
|
* @property {String} actionText 右侧控件文字(默认 '搜索' )
|
|
62
61
|
* @property {Object} inputStyle input输入框的样式,可以定义文字颜色,大小等,对象形式
|
|
63
62
|
* @property {String} searchIcon 左边的图标,可以为fuIcons图标名称(默认 'magnifier')
|
|
64
|
-
* @property {String
|
|
63
|
+
* @property {String | Number} searchIconSize 左边的图标大小(默认 18)
|
|
65
64
|
* @property {String} searchIconColor 左边图标的颜色(默认 '#c0c4cc')
|
|
66
65
|
* @property {String} inputAlign 输入框对齐方式(默认 'center')
|
|
67
66
|
* @value left 左对齐
|
|
68
67
|
* @value center 居中
|
|
69
68
|
* @value right 右对齐
|
|
70
|
-
* @property {String
|
|
69
|
+
* @property {String | Number} height 高度(默认 36)
|
|
71
70
|
* @property {String} color 输入框字体颜色
|
|
72
71
|
*
|
|
73
72
|
* @event {Function} confirm fuSearch 的输入框 confirm 事件,返回参数为fuSearch的value,e={value:Number}
|
|
@@ -77,157 +76,46 @@
|
|
|
77
76
|
* @event {Function} focus input聚焦时触发事件
|
|
78
77
|
* @event {Function} custom 用户点击右侧控件时触发
|
|
79
78
|
* @event {Function} click readonly为true时,点击输入框,发出此事件,用于跳转搜索页
|
|
80
|
-
* @example <fu-search></fu-search>
|
|
79
|
+
* @example <fu-search v-model="keyword"></fu-search>
|
|
81
80
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return Object.keys(this.inputStyle).length? this.$fu.addStyle(this.inputStyle): ''
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
methods: {
|
|
110
|
-
searchClick() {
|
|
111
|
-
if(this.readonly) return this.$emit('click')
|
|
112
|
-
if (this.show) {
|
|
113
|
-
return
|
|
114
|
-
}
|
|
115
|
-
this.show = true;
|
|
116
|
-
this.$nextTick(() => {
|
|
117
|
-
this.showFocus = true
|
|
118
|
-
})
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
// 清空输入
|
|
122
|
-
// 也可以作为用户通过this.$refs形式调用清空输入框内容
|
|
123
|
-
clear() {
|
|
124
|
-
this.$emit("clear", {
|
|
125
|
-
value: this.searchValue
|
|
126
|
-
})
|
|
127
|
-
this.searchValue = "";
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// 点击右边自定义按钮的事件
|
|
131
|
-
custom() {
|
|
132
|
-
if(this.readonly) return
|
|
133
|
-
this.$emit("custom", {
|
|
134
|
-
value: this.searchValue
|
|
135
|
-
});
|
|
136
|
-
this.show = false;
|
|
137
|
-
this.showFocus = false;
|
|
138
|
-
// #ifndef APP-PLUS
|
|
139
|
-
uni.hideKeyboard()
|
|
140
|
-
// #endif
|
|
141
|
-
// #ifdef APP-PLUS
|
|
142
|
-
plus.key.hideSoftKeybord()
|
|
143
|
-
// #endif
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
confirm() {
|
|
147
|
-
// #ifndef APP-PLUS
|
|
148
|
-
uni.hideKeyboard();
|
|
149
|
-
// #endif
|
|
150
|
-
// #ifdef APP-PLUS
|
|
151
|
-
plus.key.hideSoftKeybord()
|
|
152
|
-
// #endif
|
|
153
|
-
this.$emit("confirm", {
|
|
154
|
-
value: this.searchValue
|
|
155
|
-
})
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
blur() {
|
|
159
|
-
// #ifndef APP-PLUS
|
|
160
|
-
uni.hideKeyboard();
|
|
161
|
-
// #endif
|
|
162
|
-
// #ifdef APP-PLUS
|
|
163
|
-
plus.key.hideSoftKeybord()
|
|
164
|
-
// #endif
|
|
165
|
-
this.$emit("blur", {
|
|
166
|
-
value: this.searchValue
|
|
167
|
-
})
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
emitFocus(e) {
|
|
171
|
-
this.$emit("focus", e.detail)
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
watch: {
|
|
175
|
-
// #ifndef VUE3
|
|
176
|
-
value: {
|
|
177
|
-
immediate: true,
|
|
178
|
-
handler(newVal) {
|
|
179
|
-
this.searchValue = newVal;
|
|
180
|
-
if (newVal) {
|
|
181
|
-
this.show = true;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
// #endif
|
|
186
|
-
// #ifdef VUE3
|
|
187
|
-
modelValue: {
|
|
188
|
-
immediate: true,
|
|
189
|
-
handler(newVal) {
|
|
190
|
-
this.searchValue = newVal;
|
|
191
|
-
if (newVal) {
|
|
192
|
-
this.show = true;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
// #endif
|
|
197
|
-
focus: {
|
|
198
|
-
immediate: true,
|
|
199
|
-
handler(newVal) {
|
|
200
|
-
if (newVal) {
|
|
201
|
-
if(this.readonly) return
|
|
202
|
-
this.show = true;
|
|
203
|
-
this.$nextTick(() => {
|
|
204
|
-
this.showFocus = true;
|
|
205
|
-
})
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
searchValue(newVal, oldVal) {
|
|
210
|
-
this.$emit("input", newVal)
|
|
211
|
-
// #ifdef VUE3
|
|
212
|
-
this.$emit("update:modelValue", newVal)
|
|
213
|
-
// #endif
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
81
|
+
import { searchEmits, searchProps } from './search';
|
|
82
|
+
import { useSearch, useSearchCustomStyle } from './composables';
|
|
83
|
+
|
|
84
|
+
defineOptions({ name: 'FuSearch', options: { virtualHost: true } })
|
|
85
|
+
|
|
86
|
+
const props = defineProps(searchProps);
|
|
87
|
+
const $emit = defineEmits(searchEmits);
|
|
88
|
+
|
|
89
|
+
const {
|
|
90
|
+
show,
|
|
91
|
+
showFocus,
|
|
92
|
+
searchValue,
|
|
93
|
+
searchClick,
|
|
94
|
+
handleClear,
|
|
95
|
+
handleCustom,
|
|
96
|
+
handleConfirm,
|
|
97
|
+
handleBlur,
|
|
98
|
+
handleFocus
|
|
99
|
+
} = useSearch(props, $emit);
|
|
100
|
+
|
|
101
|
+
const {
|
|
102
|
+
searchStyle,
|
|
103
|
+
placeholderStyle
|
|
104
|
+
} = useSearchCustomStyle(props);
|
|
217
105
|
</script>
|
|
218
106
|
|
|
219
107
|
<style lang="scss" scoped>
|
|
220
|
-
@
|
|
108
|
+
@use '../../../style/components.scss';
|
|
221
109
|
$fu-search-height: 36px;
|
|
222
110
|
|
|
223
111
|
.fu-search {
|
|
224
|
-
@include flex(row);
|
|
112
|
+
@include components.flex(row);
|
|
225
113
|
flex: 1;
|
|
226
114
|
position: relative;
|
|
227
115
|
align-items: center;
|
|
228
116
|
|
|
229
117
|
&__box {
|
|
230
|
-
@include flex(row);
|
|
118
|
+
@include components.flex(row);
|
|
231
119
|
/* #ifndef APP-NVUE */
|
|
232
120
|
box-sizing: border-box;
|
|
233
121
|
overflow: hidden;
|
|
@@ -239,7 +127,7 @@
|
|
|
239
127
|
height: $fu-search-height;
|
|
240
128
|
|
|
241
129
|
&__icon-search {
|
|
242
|
-
@include flex(row);
|
|
130
|
+
@include components.flex(row);
|
|
243
131
|
padding: 0 8px;
|
|
244
132
|
justify-content: center;
|
|
245
133
|
align-items: center;
|
|
@@ -253,7 +141,7 @@
|
|
|
253
141
|
}
|
|
254
142
|
|
|
255
143
|
&__icon-clear {
|
|
256
|
-
@include flex(row);
|
|
144
|
+
@include components.flex(row);
|
|
257
145
|
align-items: center;
|
|
258
146
|
padding: 0 8px;
|
|
259
147
|
/* #ifdef H5 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/section'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-section'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SetupContext, watch } from 'vue';
|
|
2
|
+
import type { SectionProps, SectionEmits } from '../section';
|
|
3
|
+
|
|
4
|
+
export const useSection = (props: SectionProps, $emit: SetupContext<SectionEmits>['emit']) => {
|
|
5
|
+
const handleClick = () => {
|
|
6
|
+
$emit('click')
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// watch监听事件
|
|
10
|
+
watch(() => props.title, (newVal) => {
|
|
11
|
+
if (uni.report && newVal !== '') {
|
|
12
|
+
uni.report('title', newVal)
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
handleClick
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { componentProps } from "../../../constants";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 标题mode有效值
|
|
6
|
+
*/
|
|
7
|
+
export const sectionModes = ['line', 'circle', 'square'] as const;
|
|
8
|
+
|
|
9
|
+
export const sectionProps = {
|
|
10
|
+
/**
|
|
11
|
+
* @description 标题装饰类型
|
|
12
|
+
* @values 'line' - 竖线, 'circle' - 圆形, 'square' - 正方形
|
|
13
|
+
* @example <fu-section mode="line"></fu-section>
|
|
14
|
+
*/
|
|
15
|
+
mode: {
|
|
16
|
+
type: String,
|
|
17
|
+
values: sectionModes,
|
|
18
|
+
default: ''
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* @description 主标题
|
|
22
|
+
* @example <fu-section title="标题"></fu-section>
|
|
23
|
+
*/
|
|
24
|
+
title: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
default: ''
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @description 主标题字体大小
|
|
31
|
+
* @default 14
|
|
32
|
+
* @example <fu-section titleSize="14"></fu-section>
|
|
33
|
+
*/
|
|
34
|
+
titleSize: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: 14
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* @description 主标题字体颜色
|
|
40
|
+
* @example <fu-section titleColor="red"></fu-section>
|
|
41
|
+
*/
|
|
42
|
+
titleColor: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ''
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* @description 副标题
|
|
48
|
+
* @example <fu-section subTitle="副标题"></fu-section>
|
|
49
|
+
*/
|
|
50
|
+
subTitle: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* @description 副标题字体大小
|
|
56
|
+
* @default 12
|
|
57
|
+
* @example <fu-section subTitleSize="12"></fu-section>
|
|
58
|
+
*/
|
|
59
|
+
subTitleSize: {
|
|
60
|
+
type: [String, Number],
|
|
61
|
+
default: 12
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* @description 副标题字体颜色
|
|
65
|
+
* @default '#999999'
|
|
66
|
+
* @example <fu-section subTitleColor="#999999"></fu-section>
|
|
67
|
+
*/
|
|
68
|
+
subTitleColor: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: '#999999'
|
|
71
|
+
},
|
|
72
|
+
...componentProps
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const sectionEmits = {
|
|
76
|
+
/**
|
|
77
|
+
* @description 文本点击事件
|
|
78
|
+
*/
|
|
79
|
+
click: () => true,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export type SectionProps = ExtractPropTypes<typeof sectionProps>;
|
|
83
|
+
export type SectionEmits = typeof sectionEmits;
|
|
@@ -5,10 +5,18 @@
|
|
|
5
5
|
<slot v-else name="decoration"></slot>
|
|
6
6
|
|
|
7
7
|
<view class="fu-section-header__content">
|
|
8
|
-
<text
|
|
8
|
+
<text
|
|
9
|
+
class="fu-section__content-title"
|
|
9
10
|
:class="{'distraction': !subTitle}"
|
|
10
|
-
:style="{
|
|
11
|
-
|
|
11
|
+
:style="{fontSize: $fu.addUnit(titleSize), 'color': titleColor}">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</text>
|
|
14
|
+
<text
|
|
15
|
+
class="fu-section-header__content-sub"
|
|
16
|
+
:style="{fontSize: $fu.addUnit(subTitleSize), color: subTitleColor}"
|
|
17
|
+
v-if="subTitle">
|
|
18
|
+
{{ subTitle }}
|
|
19
|
+
</text>
|
|
12
20
|
</view>
|
|
13
21
|
|
|
14
22
|
<view class="fu-section-header__slot-right">
|
|
@@ -22,55 +30,48 @@
|
|
|
22
30
|
</view>
|
|
23
31
|
</template>
|
|
24
32
|
|
|
25
|
-
<script>
|
|
26
|
-
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
27
|
-
import mixin from '../../libs/mixin/mixin.js'
|
|
28
|
-
import props from './props.js'
|
|
33
|
+
<script lang="ts" setup>
|
|
29
34
|
/**
|
|
30
35
|
* Section 标题栏
|
|
31
|
-
* @description
|
|
36
|
+
* @description 主要用于文章、列表详情等标题展示
|
|
37
|
+
* @tutorial http://www.fusions.top/components/section.html
|
|
32
38
|
* @property {String} mode = [line|circle|square] 标题装饰类型
|
|
33
39
|
* @value line 竖线
|
|
34
40
|
* @value circle 圆形
|
|
35
41
|
* @value square 正方形
|
|
36
42
|
* @property {String} title 主标题
|
|
37
|
-
* @property {String
|
|
43
|
+
* @property {String | Number} titleSize 主标题字体大小(默认 14)
|
|
38
44
|
* @property {String} titleColor 主标题字体颜色
|
|
39
45
|
* @property {String} subTitle 副标题
|
|
40
|
-
* @property {String
|
|
41
|
-
* @property {String} subTitleColor
|
|
46
|
+
* @property {String | Number} subTitleSize 副标题字体大小(默认 12)
|
|
47
|
+
* @property {String} subTitleColor 副标题字体颜色(默认 '#999999')
|
|
42
48
|
* @property {String} customClass 定义需要用到的外部样式
|
|
43
|
-
* @property {Object
|
|
49
|
+
* @property {String | Object} customStyle 定义需要用到的外部样式
|
|
44
50
|
*
|
|
45
51
|
* @event {Function} click 点击标题栏触发
|
|
46
52
|
* @example <fu-section title="标题"></fu-section>
|
|
47
53
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (uni.report && newVal !== '') {
|
|
60
|
-
uni.report('title', newVal)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
54
|
+
import { sectionEmits, sectionProps } from './section';
|
|
55
|
+
import { useSection } from './composables';
|
|
56
|
+
|
|
57
|
+
defineOptions({ name: 'FuSection', options: { virtualHost: true } });
|
|
58
|
+
|
|
59
|
+
const props = defineProps(sectionProps);
|
|
60
|
+
const $emit = defineEmits(sectionEmits);
|
|
61
|
+
|
|
62
|
+
const {
|
|
63
|
+
handleClick
|
|
64
|
+
} = useSection(props, $emit);
|
|
65
65
|
</script>
|
|
66
|
+
|
|
66
67
|
<style lang="scss" scoped>
|
|
67
|
-
@
|
|
68
|
-
@
|
|
68
|
+
@use '../../../style/components.scss';
|
|
69
|
+
@use '../../../style/color.scss' as *;
|
|
69
70
|
|
|
70
71
|
.fu-section {
|
|
71
72
|
|
|
72
73
|
.fu-section-header {
|
|
73
|
-
@include flex(row);
|
|
74
|
+
@include components.flex(row);
|
|
74
75
|
position: relative;
|
|
75
76
|
align-items: center;
|
|
76
77
|
font-weight: normal;
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
|
|
79
80
|
&__decoration {
|
|
80
81
|
margin-right: 6px;
|
|
81
|
-
background-color: $fu-primary;
|
|
82
|
+
background-color: $fu-color-primary;
|
|
82
83
|
|
|
83
84
|
&.line {
|
|
84
85
|
width: 4px;
|
|
@@ -102,9 +103,9 @@
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
&__content {
|
|
105
|
-
@include flex(column);
|
|
106
|
+
@include components.flex(column);
|
|
106
107
|
flex: 1;
|
|
107
|
-
color:
|
|
108
|
+
color: $fu-color-main;
|
|
108
109
|
|
|
109
110
|
.distraction {
|
|
110
111
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/sign-board'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-sign-board'
|