fusions-ui 1.2.7 → 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/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 -110
- package/components/fu-icon/fuicon.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 -730
- 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/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
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view
|
|
3
|
-
class="fu-text"
|
|
4
|
-
:class="[customClass]"
|
|
5
|
-
:style="{margin: margin, justifyContent: align === 'left' ? 'flex-start' : align === 'center' ? 'center' : 'flex-end'}"
|
|
6
|
-
@tap="handleClick"
|
|
7
|
-
v-if="show">
|
|
8
|
-
<text :class="['fu-text__price', type && `fu-text__value--${type}`]" :style="[valueStyle]" v-if="mode === 'price'">¥</text>
|
|
9
|
-
<view class="fu-text__prefix-icon" v-if="prefixIcon">
|
|
10
|
-
<fu-icon :name="prefixIcon" :color="iconColor" :size="iconSize"></fu-icon>
|
|
11
|
-
</view>
|
|
12
|
-
<fu-link :href="href" underLine v-if="mode === 'link'">
|
|
13
|
-
<slot>{{ value }}</slot>
|
|
14
|
-
</fu-link>
|
|
15
|
-
<template v-else-if="openType && isMp">
|
|
16
|
-
<button
|
|
17
|
-
class="fu-reset-button fu-text__value"
|
|
18
|
-
:class="[type && `fu-text__value--${type}`, lines && `fu-line-${lines}`]"
|
|
19
|
-
:style="[valueStyle]"
|
|
20
|
-
:openType="openType"
|
|
21
|
-
:lang="lang"
|
|
22
|
-
:session-from="sessionFrom"
|
|
23
|
-
:send-message-title="sendMessageTitle"
|
|
24
|
-
:send-message-path="sendMessagePath"
|
|
25
|
-
:send-message-img="sendMessageImg"
|
|
26
|
-
:show-message-card="showMessageCard"
|
|
27
|
-
:app-parameter="appParameter"
|
|
28
|
-
@getuserinfo="onGetUserInfo"
|
|
29
|
-
@contact="onContact"
|
|
30
|
-
@getphonenumber="onGetPhoneNumber"
|
|
31
|
-
@error="onError"
|
|
32
|
-
@launchapp="onLaunchApp"
|
|
33
|
-
@opensetting="onOpenSetting">
|
|
34
|
-
<slot>{{ value }}</slot>
|
|
35
|
-
</button>
|
|
36
|
-
</template>
|
|
37
|
-
<text
|
|
38
|
-
class="fu-text__value"
|
|
39
|
-
:style="[valueStyle]"
|
|
40
|
-
:class="[type && `fu-text__value--${type}`, lines && `fu-line-${lines}`]"
|
|
41
|
-
v-else>
|
|
42
|
-
<slot>{{ value }}</slot>
|
|
43
|
-
</text>
|
|
44
|
-
<view class="fu-text__suffix-icon" v-if="suffixIcon">
|
|
45
|
-
<fu-icon :name="suffixIcon" :color="iconColor" :size="iconSize"></fu-icon>
|
|
46
|
-
</view>
|
|
47
|
-
</view>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
52
|
-
import mixin from '../../libs/mixin/mixin.js'
|
|
53
|
-
import value from './value.js'
|
|
54
|
-
import button from './button.js'
|
|
55
|
-
import openType from './openType.js'
|
|
56
|
-
import props from './props.js'
|
|
57
|
-
/**
|
|
58
|
-
* Text 文本
|
|
59
|
-
* @description 此组件集成了文本类在项目中的常用功能,包括状态,拨打电话,格式化日期,*替换,超链接...等功能。 您大可不必在使用特殊文本时自己定义,text组件几乎涵盖您能使用的大部分场景。
|
|
60
|
-
* @property {String} type = [primary|error|success|warning|info] 主题颜色
|
|
61
|
-
* @value primary 主色
|
|
62
|
-
* @value error 错误
|
|
63
|
-
* @value success 成功
|
|
64
|
-
* @value warning 警告
|
|
65
|
-
* @value info 信息
|
|
66
|
-
* @property {Boolean} show = [true|false] 是否显示(默认 true)
|
|
67
|
-
* @property {String,Number} text 显示的值
|
|
68
|
-
* @property {String} prefixIcon 前置图标
|
|
69
|
-
* @property {String} suffixIcon 后置图标
|
|
70
|
-
* @property {String} iconColor 图标颜色
|
|
71
|
-
* @property {String,Number} iconSize 图标大小(默认 15)
|
|
72
|
-
* @property {String} mode = [text|price|phone|name|date|link] 文本处理的匹配模式
|
|
73
|
-
* @value text 普通文本
|
|
74
|
-
* @value price 价格
|
|
75
|
-
* @value phone 手机号
|
|
76
|
-
* @value name 姓名
|
|
77
|
-
* @value date 日期
|
|
78
|
-
* @value link 超链接
|
|
79
|
-
* @property {String} href 配置的链接(仅mode=link时生效)
|
|
80
|
-
* @property {String,Function} format 格式化规则
|
|
81
|
-
* @property {Boolean} call 点击文本是否拨打电话(仅mode=phone时生效)(默认 false)
|
|
82
|
-
* @property {String} openType 小程序的打开方式
|
|
83
|
-
* @property {String,Number} weight 控制文本粗细(默认 'normal')
|
|
84
|
-
* @property {Boolean} block 是否块状(默认 false)
|
|
85
|
-
* @property {String,Number} lines 文本显示的行数,如果设置,超出此行数,将会显示省略号
|
|
86
|
-
* @property {String} color 文本颜色
|
|
87
|
-
* @property {String,Number} size 字体大小(默认 15)
|
|
88
|
-
* @property {String} decoration = [none|underline|line-through] 文字装饰(默认 'none' )
|
|
89
|
-
* @value none 无装饰
|
|
90
|
-
* @value underline 下划线
|
|
91
|
-
* @value line-through 中划线
|
|
92
|
-
* @property {String,Number} margin 外边距,对象、字符串,数值形式均可(默认 0)
|
|
93
|
-
* @property {String,Number} lineHeight 文本行高
|
|
94
|
-
* @property {String} align = [left|center|right] 文本对齐方式(默认 'left')
|
|
95
|
-
* @value left 左对齐
|
|
96
|
-
* @value center 居中
|
|
97
|
-
* @value right 右对齐
|
|
98
|
-
* @property {String} wordWrap = [break-word|normal|anywhere] 文字换行(默认 'normal' )
|
|
99
|
-
* @value break-word 在长单词或URL地址内部进行换行
|
|
100
|
-
* @value normal 只在允许的断字点换行(浏览器保持默认处理)
|
|
101
|
-
* @value anywhere 为防止溢出,如果行中没有其他可接受的断点,则不可断的字符串(如长词或 URL)可能会在任何时候换行。
|
|
102
|
-
* @property {String} customClass 定义需要用到的外部类
|
|
103
|
-
* @property {Object,String} customStyle 定义需要用到的外部样式
|
|
104
|
-
*
|
|
105
|
-
* @event {Function} click 点击触发事件
|
|
106
|
-
* @example <fu-text text="愿重逢折扇青衣, 愿再见杨柳依依"></fu-text>
|
|
107
|
-
*/
|
|
108
|
-
export default {
|
|
109
|
-
name: "FuText",
|
|
110
|
-
emits: ['click'],
|
|
111
|
-
// #ifdef MP
|
|
112
|
-
mixins: [mpMixin, mixin, value, button, openType, props],
|
|
113
|
-
// #endif
|
|
114
|
-
// #ifndef MP
|
|
115
|
-
mixins: [mpMixin, mixin, value, props],
|
|
116
|
-
// #endif
|
|
117
|
-
data() {
|
|
118
|
-
return {};
|
|
119
|
-
},
|
|
120
|
-
computed: {
|
|
121
|
-
valueStyle() {
|
|
122
|
-
const style = {
|
|
123
|
-
textDecoration: this.decoration,
|
|
124
|
-
fontWeight: this.weight || 'normal',
|
|
125
|
-
wordWrap: this.wordWrap,
|
|
126
|
-
fontSize: this.$fu.addUnit(this.size)
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
if(!this.type) {
|
|
130
|
-
style.color = this.color
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if(this.lineHeight) {
|
|
134
|
-
style.lineHeight = this.$fu.addUnit(this.lineHeight)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if(this.isNvue) {
|
|
138
|
-
if(this.lines) {
|
|
139
|
-
style.lines = this.lines
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if(this.mode != 'price' && !this.prefixIcon && !this.suffixIcon) {
|
|
143
|
-
style.flex = 1;
|
|
144
|
-
style.textAlign = this.align === 'left' ? 'flex-start' : this.align === 'center' ? 'center' : 'right';
|
|
145
|
-
}
|
|
146
|
-
} else {
|
|
147
|
-
if(this.block) {
|
|
148
|
-
style.display = 'block'
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return this.$fu.deepMerge(style, this.$fu.addStyle(this.customStyle));
|
|
153
|
-
},
|
|
154
|
-
isNvue() {
|
|
155
|
-
let nvue = false;
|
|
156
|
-
// #ifdef APP-NVUE
|
|
157
|
-
nvue = true;
|
|
158
|
-
// #endif
|
|
159
|
-
return nvue
|
|
160
|
-
},
|
|
161
|
-
isMp() {
|
|
162
|
-
let mp = false;
|
|
163
|
-
// #ifdef MP
|
|
164
|
-
mp = true;
|
|
165
|
-
// #endif
|
|
166
|
-
return mp
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
methods: {
|
|
170
|
-
handleClick() {
|
|
171
|
-
// 如果为手机号模式,拨打电话
|
|
172
|
-
if (this.call && this.mode === 'phone') {
|
|
173
|
-
uni.makePhoneCall({
|
|
174
|
-
phoneNumber: this.text
|
|
175
|
-
})
|
|
176
|
-
}
|
|
177
|
-
this.$emit('click')
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
</script>
|
|
182
|
-
|
|
183
|
-
<style lang="scss" scoped>
|
|
184
|
-
@import '../../libs/style/components.scss';
|
|
185
|
-
@import '../../libs/style/color.scss';
|
|
186
|
-
$fu-main-color: #333333;
|
|
187
|
-
$fu-content-color: #666666;
|
|
188
|
-
$fu-tips-color: #909193;
|
|
189
|
-
$fu-light-color: #c0c4cc;
|
|
190
|
-
|
|
191
|
-
.fu-text {
|
|
192
|
-
@include flex;
|
|
193
|
-
align-items: center;
|
|
194
|
-
flex-wrap: nowrap;
|
|
195
|
-
flex: 1;
|
|
196
|
-
/* #ifndef APP-NVUE */
|
|
197
|
-
width: 100%;
|
|
198
|
-
/* #endif */
|
|
199
|
-
|
|
200
|
-
&__price {
|
|
201
|
-
font-size: 14px;
|
|
202
|
-
color: $fu-content-color;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
&__value {
|
|
206
|
-
font-size: 14px;
|
|
207
|
-
@include flex;
|
|
208
|
-
flex-wrap: wrap;
|
|
209
|
-
text-overflow: ellipsis;
|
|
210
|
-
align-items: center;
|
|
211
|
-
// 兼容支付宝小程序去除默认样式
|
|
212
|
-
/* #ifdef MP-ALIPAY */
|
|
213
|
-
height: auto;
|
|
214
|
-
border: none;
|
|
215
|
-
/* #endif */
|
|
216
|
-
|
|
217
|
-
&--primary {
|
|
218
|
-
color: $fu-primary;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
&--warning {
|
|
222
|
-
color: $fu-warning;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
&--success {
|
|
226
|
-
color: $fu-success;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
&--info {
|
|
230
|
-
color: $fu-info;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
&--error {
|
|
234
|
-
color: $fu-error;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
&--main {
|
|
238
|
-
color: $fu-main-color;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
&--content {
|
|
242
|
-
color: $fu-content-color;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&--tips {
|
|
246
|
-
color: $fu-tips-color;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
&--light {
|
|
250
|
-
color: $fu-light-color;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
props: {
|
|
3
|
-
openType: String
|
|
4
|
-
},
|
|
5
|
-
emits: ['getphonenumber','getuserinfo','error','opensetting','launchapp','contact','chooseavatar','addgroupapp','chooseaddress','subscribe','login','im'],
|
|
6
|
-
methods: {
|
|
7
|
-
onGetPhoneNumber(event) {
|
|
8
|
-
this.$emit('getphonenumber', event.detail)
|
|
9
|
-
},
|
|
10
|
-
onGetUserInfo(event) {
|
|
11
|
-
this.$emit('getuserinfo', event.detail)
|
|
12
|
-
},
|
|
13
|
-
onError(event) {
|
|
14
|
-
this.$emit('error', event.detail)
|
|
15
|
-
},
|
|
16
|
-
onOpenSetting(event) {
|
|
17
|
-
this.$emit('opensetting', event.detail)
|
|
18
|
-
},
|
|
19
|
-
onLaunchApp(event) {
|
|
20
|
-
this.$emit('launchapp', event.detail)
|
|
21
|
-
},
|
|
22
|
-
onContact(event) {
|
|
23
|
-
this.$emit('contact', event.detail)
|
|
24
|
-
},
|
|
25
|
-
onChooseavatar(event) {
|
|
26
|
-
this.$emit('chooseavatar', event.detail)
|
|
27
|
-
},
|
|
28
|
-
onAgreeprivacyauthorization(event) {
|
|
29
|
-
this.$emit('agreeprivacyauthorization', event.detail)
|
|
30
|
-
},
|
|
31
|
-
onAddgroupapp(event) {
|
|
32
|
-
this.$emit('addgroupapp', event.detail)
|
|
33
|
-
},
|
|
34
|
-
onChooseaddress(event) {
|
|
35
|
-
this.$emit('chooseaddress', event.detail)
|
|
36
|
-
},
|
|
37
|
-
onSubscribe(event) {
|
|
38
|
-
this.$emit('subscribe', event.detail)
|
|
39
|
-
},
|
|
40
|
-
onLogin(event) {
|
|
41
|
-
this.$emit('login', event.detail)
|
|
42
|
-
},
|
|
43
|
-
onIm(event) {
|
|
44
|
-
this.$emit('im', event.detail)
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
props: {
|
|
3
|
-
/**
|
|
4
|
-
* @description 主题颜色
|
|
5
|
-
* @values 'primary' - 主色, 'error' - 错误, 'success' - 成功, 'warning' - 警告, 'info' - 信息
|
|
6
|
-
*/
|
|
7
|
-
type: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: ''
|
|
10
|
-
},
|
|
11
|
-
/**
|
|
12
|
-
* @description 是否显示
|
|
13
|
-
* @default true
|
|
14
|
-
*/
|
|
15
|
-
show: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: true
|
|
18
|
-
},
|
|
19
|
-
/**
|
|
20
|
-
* @description 显示的值
|
|
21
|
-
*/
|
|
22
|
-
text: {
|
|
23
|
-
type: [String,Number],
|
|
24
|
-
default: ''
|
|
25
|
-
},
|
|
26
|
-
/**
|
|
27
|
-
* @description 前置图标
|
|
28
|
-
*/
|
|
29
|
-
prefixIcon: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ''
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* @description 后置图标
|
|
35
|
-
*/
|
|
36
|
-
suffixIcon: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: ''
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* @description 图标颜色
|
|
42
|
-
*/
|
|
43
|
-
iconColor: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: ''
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* @description 图标大小
|
|
49
|
-
* @default 15
|
|
50
|
-
*/
|
|
51
|
-
iconSize: {
|
|
52
|
-
type: [String,Number],
|
|
53
|
-
default: 15
|
|
54
|
-
},
|
|
55
|
-
/**
|
|
56
|
-
* @description 文本处理的匹配模式
|
|
57
|
-
* @values 'text' - 普通文本, 'price' - 价格, 'phone' - 手机号码, 'name' - 姓名, 'date' - 日期, 'link' - 超链接
|
|
58
|
-
* @default 'text'
|
|
59
|
-
*/
|
|
60
|
-
mode: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: 'text'
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* @description 配置的链接(仅mode=link时生效)
|
|
66
|
-
*/
|
|
67
|
-
href: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: ''
|
|
70
|
-
},
|
|
71
|
-
/**
|
|
72
|
-
* 格式化规则
|
|
73
|
-
*/
|
|
74
|
-
format: {
|
|
75
|
-
type: [String,Function],
|
|
76
|
-
default: ''
|
|
77
|
-
},
|
|
78
|
-
/**
|
|
79
|
-
* @description 点击文本是否拨打电话(仅mode=phone时生效)
|
|
80
|
-
* @default false
|
|
81
|
-
*/
|
|
82
|
-
call: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* @description 小程序的打开方式
|
|
88
|
-
*/
|
|
89
|
-
openType: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: ''
|
|
92
|
-
},
|
|
93
|
-
/**
|
|
94
|
-
* @description 是否粗体
|
|
95
|
-
* @default 'normal'
|
|
96
|
-
*/
|
|
97
|
-
weight: {
|
|
98
|
-
type: [String,Number],
|
|
99
|
-
default: 'normal'
|
|
100
|
-
},
|
|
101
|
-
/**
|
|
102
|
-
* @description 是否块状
|
|
103
|
-
* @default true
|
|
104
|
-
*/
|
|
105
|
-
block: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: false
|
|
108
|
-
},
|
|
109
|
-
/**
|
|
110
|
-
* @description 文本显示的行数,如果设置,超出此行数,将会显示省略号
|
|
111
|
-
*/
|
|
112
|
-
lines: {
|
|
113
|
-
type: [String,Number],
|
|
114
|
-
default: ''
|
|
115
|
-
},
|
|
116
|
-
/**
|
|
117
|
-
* @description 文本颜色
|
|
118
|
-
*/
|
|
119
|
-
color: {
|
|
120
|
-
type: String,
|
|
121
|
-
default: ''
|
|
122
|
-
},
|
|
123
|
-
/**
|
|
124
|
-
* @description 字体大小
|
|
125
|
-
* @default 15
|
|
126
|
-
*/
|
|
127
|
-
size: {
|
|
128
|
-
type: [String,Number],
|
|
129
|
-
default: 15
|
|
130
|
-
},
|
|
131
|
-
/**
|
|
132
|
-
* @description 文字装饰
|
|
133
|
-
* @values 'none' - 无装饰, 'underline' - 下划线, 'line-through' - 中划线
|
|
134
|
-
* @default 'none'
|
|
135
|
-
*/
|
|
136
|
-
decoration: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: 'none'
|
|
139
|
-
},
|
|
140
|
-
/**
|
|
141
|
-
* @description 外边距,对象、字符串,数值形式均可
|
|
142
|
-
*/
|
|
143
|
-
margin: {
|
|
144
|
-
type: [Object,String,Number],
|
|
145
|
-
default: 0
|
|
146
|
-
},
|
|
147
|
-
/**
|
|
148
|
-
* @description 文本行高
|
|
149
|
-
*/
|
|
150
|
-
lineHeight: {
|
|
151
|
-
type: [String,Number],
|
|
152
|
-
default: ''
|
|
153
|
-
},
|
|
154
|
-
/**
|
|
155
|
-
* @description 文本对齐方式
|
|
156
|
-
* @values 'left' - 左对齐, 'center' - 居中, 'right' - 右对齐
|
|
157
|
-
* @default 'left'
|
|
158
|
-
*/
|
|
159
|
-
align: {
|
|
160
|
-
type: String,
|
|
161
|
-
default: 'left'
|
|
162
|
-
},
|
|
163
|
-
/**
|
|
164
|
-
* @description 文字换行
|
|
165
|
-
* @values 'break-word' - 在长单词或URL地址内部进行换行, 'normal' - 只在允许的断字点换行(浏览器保持默认处理), 'anywhere' - 为防止溢出,如果行中没有其他可接受的断点,则不可断的字符串(如长词或 URL)可能会在任何时候换行。
|
|
166
|
-
* @default 'normal'
|
|
167
|
-
*/
|
|
168
|
-
wordWrap: {
|
|
169
|
-
type: String,
|
|
170
|
-
default: 'normal'
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
computed: {
|
|
3
|
-
// 经处理后需要显示的值
|
|
4
|
-
value() {
|
|
5
|
-
const { text, mode, format, href } = this;
|
|
6
|
-
// 价格类型
|
|
7
|
-
switch(mode) {
|
|
8
|
-
case 'price':
|
|
9
|
-
// 如果text不为金额进行提示
|
|
10
|
-
if (!/^\d+(\.\d+)?$/.test(text)) {
|
|
11
|
-
this.$fu.error('金额模式下,text参数需要为金额格式');
|
|
12
|
-
}
|
|
13
|
-
// 进行格式化,判断用户传入的format参数为正则,或者函数,如果没有传入format,则使用默认的金额格式化处理
|
|
14
|
-
if (this.$fu.isFunc(format)) {
|
|
15
|
-
// 如果用户传入的是函数,使用函数格式化
|
|
16
|
-
return format(text)
|
|
17
|
-
}
|
|
18
|
-
// 如果format非正则,非函数,则使用默认的金额格式化方法进行操作
|
|
19
|
-
return this.$fu.priceFormat(text, 2)
|
|
20
|
-
break
|
|
21
|
-
case 'date':
|
|
22
|
-
// 判断是否合法的日期或者时间戳
|
|
23
|
-
!this.$fu.checkDate(text) && this.$fu.error('日期模式下,text参数需要为日期或时间戳格式')
|
|
24
|
-
// 进行格式化,判断用户传入的format参数为正则,或者函数,如果没有传入format,则使用默认的格式化处理
|
|
25
|
-
if (this.$fu.isFunc(format)) {
|
|
26
|
-
// 如果用户传入的是函数,使用函数格式化
|
|
27
|
-
return format(text)
|
|
28
|
-
} if (format) {
|
|
29
|
-
// 如果format非正则,非函数,则使用默认的时间格式化方法进行操作
|
|
30
|
-
return this.$fu.formatTime(text, format)
|
|
31
|
-
}
|
|
32
|
-
// 如果没有设置format,则设置为默认的时间格式化形式
|
|
33
|
-
return this.$fu.formatTime(text, 'Y-M-D')
|
|
34
|
-
break
|
|
35
|
-
case 'phone':
|
|
36
|
-
// 判断是否合法的手机号
|
|
37
|
-
// !mobile(text) && error('手机号模式下,text参数需要为手机号码格式')
|
|
38
|
-
if (this.$fu.isFunc(format)) {
|
|
39
|
-
// 如果用户传入的是函数,使用函数格式化
|
|
40
|
-
return format(text)
|
|
41
|
-
} if (format === 'encrypt') {
|
|
42
|
-
// 如果format为encrypt,则将手机号进行星号加密处理
|
|
43
|
-
return `${text.substr(0, 3)}****${text.substr(7)}`
|
|
44
|
-
}
|
|
45
|
-
return text
|
|
46
|
-
break
|
|
47
|
-
case 'name':
|
|
48
|
-
// 判断是否合法的字符粗
|
|
49
|
-
!(typeof (text) === 'string') && this.$fu.error('姓名模式下,text参数需要为字符串格式')
|
|
50
|
-
if (this.$fu.isFunc(format)) {
|
|
51
|
-
// 如果用户传入的是函数,使用函数格式化
|
|
52
|
-
return format(text)
|
|
53
|
-
} if (format === 'encrypt') {
|
|
54
|
-
// 如果format为encrypt,则将姓名进行星号加密处理
|
|
55
|
-
return this.formatName(text)
|
|
56
|
-
}
|
|
57
|
-
return text
|
|
58
|
-
break
|
|
59
|
-
case 'link':
|
|
60
|
-
// 判断是否合法的字符粗
|
|
61
|
-
!this.$fu.isUrl(href) && this.$fu.error('超链接模式下,href参数需要为URL格式')
|
|
62
|
-
return text
|
|
63
|
-
break
|
|
64
|
-
default:
|
|
65
|
-
return text
|
|
66
|
-
break
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
methods: {
|
|
71
|
-
// 默认的姓名脱敏规则
|
|
72
|
-
formatName(name) {
|
|
73
|
-
let value = '';
|
|
74
|
-
if (name.length === 2) {
|
|
75
|
-
value = name.substr(0, 1) + '*';
|
|
76
|
-
} else if (name.length > 2) {
|
|
77
|
-
let char = '';
|
|
78
|
-
for (let i = 0, len = name.length - 2; i < len; i++) {
|
|
79
|
-
char += '*';
|
|
80
|
-
}
|
|
81
|
-
value = name.substr(0, 1) + char + name.substr(-1, 1);
|
|
82
|
-
} else {
|
|
83
|
-
value = name;
|
|
84
|
-
}
|
|
85
|
-
return value
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|