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
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="fu-textarea" :class="textareaClass" :style="[textareaStyle]">
|
|
3
|
-
<textarea class="fu-textarea__field" :class="{'fu-textarea--disabled': disabled}" :style="itemStyle" :value="innerValue"
|
|
4
|
-
:placeholder="placeholder"
|
|
5
|
-
:placeholder-style="placehStyle"
|
|
6
|
-
:placeholder-class="placeholderClass"
|
|
7
|
-
:disabled="disabled"
|
|
8
|
-
:focus="focus"
|
|
9
|
-
:autoHeight="autoHeight"
|
|
10
|
-
:fixed="fixed"
|
|
11
|
-
:cursorSpacing="cursorSpacing"
|
|
12
|
-
:cursor="cursor"
|
|
13
|
-
:showConfirmBar="showConfirmBar"
|
|
14
|
-
:selectionStart="selectionStart"
|
|
15
|
-
:selectionEnd="selectionEnd"
|
|
16
|
-
:adjustPosition="adjustPosition"
|
|
17
|
-
:disableDefaultPadding="disableDefaultPadding"
|
|
18
|
-
:holdKeyboard="holdKeyboard"
|
|
19
|
-
:maxlength="maxlength"
|
|
20
|
-
:confirm-type="confirmType"
|
|
21
|
-
:show-count="count"
|
|
22
|
-
@focus="onFocus"
|
|
23
|
-
@blur="onBlur"
|
|
24
|
-
@linechange="onLinechange"
|
|
25
|
-
@input="onInput"
|
|
26
|
-
@confirm="onConfirm"
|
|
27
|
-
@keyboardheightchange="onKeyboardheightchange"></textarea>
|
|
28
|
-
<!-- #ifndef MP-ALIPAY -->
|
|
29
|
-
<text class="fu-textarea__count" style="{'background-color': disabled ? 'transparent' : '#fff'}" v-if="count">{{ innerValue.length }}/{{ maxlength }}</text>
|
|
30
|
-
<!-- #endif -->
|
|
31
|
-
</view>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
36
|
-
import mixin from '../../libs/mixin/mixin.js'
|
|
37
|
-
import props from "./props.js";
|
|
38
|
-
/**
|
|
39
|
-
* Textarea 文本域
|
|
40
|
-
* @description 此组件满足了可能出现的表单信息补充,编辑等实际逻辑的功能,内置了字数校验等
|
|
41
|
-
* @property {String,Number} value 输入框的内容
|
|
42
|
-
* @property {String,Number} placeholder 输入框为空时占位符
|
|
43
|
-
* @property {String} placeholderClass 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/( 默认 'textarea-placeholder' )
|
|
44
|
-
* @property {String,Object} placeholderStyle 指定placeholder的样式,字符串/对象形式,如"color: red;"
|
|
45
|
-
* @property {String,Number} height 输入框高度(默认 70)
|
|
46
|
-
* @property {String} confirmType = [send|search|next] 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效(默认 'done')
|
|
47
|
-
* @value send 右下角按钮为'发送'
|
|
48
|
-
* @value search 右下角按钮为'搜索'
|
|
49
|
-
* @value next 右下角按钮为'下一个'
|
|
50
|
-
* @value 右下角按钮为'前往'
|
|
51
|
-
* @value 右下角按钮为'完成'
|
|
52
|
-
* @property {Boolean} disabled = [true|false] 是否禁用(默认 false)
|
|
53
|
-
* @property {Boolean} count = [true|false] 是否显示统计字数 (默认 false)
|
|
54
|
-
* @property {Boolean} focus = [true|false] 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现(默认 false)
|
|
55
|
-
* @property {Boolean} autoHeight = [true|false] 是否自动增加高度(默认 false)
|
|
56
|
-
* @property {Boolean} fixed = [true|false] 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true(默认 false)
|
|
57
|
-
* @property {Number} cursorSpacing 指定光标与键盘的距离(默认 0)
|
|
58
|
-
* @property {String,Number} cursor 指定focus时的光标位置
|
|
59
|
-
* @property {Boolean} showConfirmBar = [true|false] 是否显示键盘上方带有“完成”按钮那一栏(默认 true)
|
|
60
|
-
* @property {Number} selectionStart 光标起始位置,自动聚焦时有效,需与selection-end搭配使用(默认 -1)
|
|
61
|
-
* @property {Number} selectionEnd 光标结束位置,自动聚焦时有效,需与selection-start搭配使用(默认 -1)
|
|
62
|
-
* @property {Boolean} adjustPosition = [true|false] 键盘弹起时,是否自动上推页面(默认 true)
|
|
63
|
-
* @property {Boolean} disableDefaultPadding = [true|false] 是否去掉 iOS 下的默认内边距,只微信小程序有效(默认 false)
|
|
64
|
-
* @property {Boolean} holdKeyboard = [true|false] focus时,点击页面的时候不收起键盘,只微信小程序有效(默认 false)
|
|
65
|
-
* @property {String,Number} maxlength 最大输入长度,设置为 -1 的时候不限制最大长度(默认 140)
|
|
66
|
-
* @property {String} border = [surround|bottom] 边框类型,surround-四周边框,bottom-底部边框(默认 'surround')
|
|
67
|
-
* @value surround 四周边框
|
|
68
|
-
* @value bottom 底部边框
|
|
69
|
-
* @property {String} borderColor 边框颜色(默认 '#dadbde')
|
|
70
|
-
* @property {String,Number} size 自定义字体大小(默认 14)
|
|
71
|
-
* @property {String,Object} customStyle 定义需要用到的外部样式
|
|
72
|
-
* @event {Function} formatter 内容式化函数
|
|
73
|
-
*
|
|
74
|
-
* @event {Function(e)} focus 输入框聚焦时触发,event.detail = { value, height },height 为键盘高度
|
|
75
|
-
* @event {Function(e)} blur 输入框失去焦点时触发,event.detail = {value, cursor}
|
|
76
|
-
* @event {Function(e)} linechange 输入框行数变化时调用,event.detail = {height: 0, heightRpx: 0, lineCount: 0}
|
|
77
|
-
* @event {Function(e)} input 当键盘输入时,触发 input 事件
|
|
78
|
-
* @event {Function(e)} change 输入框输入时,触发change事件
|
|
79
|
-
* @event {Function(e)} confirm 点击完成时, 触发 confirm 事件
|
|
80
|
-
* @event {Function(e)} keyboardheightchange 键盘高度发生变化的时候触发此事件
|
|
81
|
-
* @example <fu-textarea v-model="value" placeholder="请输入内容" ></fu-textarea>
|
|
82
|
-
*/
|
|
83
|
-
export default {
|
|
84
|
-
name:"FuTextarea",
|
|
85
|
-
emits: ['input', 'update:modelValue', 'change', 'blur', 'confirm', 'focus', 'linechange', 'keyboardheightchange'],
|
|
86
|
-
mixins: [mpMixin, mixin, props],
|
|
87
|
-
model: {
|
|
88
|
-
prop: 'modelValue',
|
|
89
|
-
event: 'update:modelValue'
|
|
90
|
-
},
|
|
91
|
-
data() {
|
|
92
|
-
return {
|
|
93
|
-
// 输入框的值
|
|
94
|
-
innerValue: "",
|
|
95
|
-
// 是否处于获得焦点状态
|
|
96
|
-
focused: false,
|
|
97
|
-
// value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
|
|
98
|
-
firstChange: true,
|
|
99
|
-
// value绑定值的变化是由内部还是外部引起的
|
|
100
|
-
changeFromInner: false,
|
|
101
|
-
// 过滤处理方法
|
|
102
|
-
innerFormatter: value => value
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
computed: {
|
|
106
|
-
itemStyle() {
|
|
107
|
-
let style = {
|
|
108
|
-
height: this.$fu.addUnit(this.height),
|
|
109
|
-
fontSize: this.$fu.addUnit(this.size)
|
|
110
|
-
}
|
|
111
|
-
return this.$fu.deepMerge(style, this.$fu.addStyle(this.customStyle));
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
placehStyle() {
|
|
115
|
-
return this.$fu.addStyle(this.placeholderStyle, 'string')
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
// 组件的类名
|
|
119
|
-
textareaClass() {
|
|
120
|
-
let classes = [], { border, disabled } = this;
|
|
121
|
-
border === "surround" && (classes = classes.concat(["fu-textarea__border", "fu-textarea--radius"]));
|
|
122
|
-
border === "bottom" && (classes = classes.concat(["fu-textarea__border-bottom", "fu-textarea--no-radius"]));
|
|
123
|
-
disabled && classes.push("fu-textarea--disabled");
|
|
124
|
-
return classes.join(" ");
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
// 组件的样式
|
|
128
|
-
textareaStyle() {
|
|
129
|
-
const style = {
|
|
130
|
-
borderColor: this.borderColor,
|
|
131
|
-
backgroundColor: this.disabled && this.disabledColor
|
|
132
|
-
};
|
|
133
|
-
// #ifdef APP-NVUE
|
|
134
|
-
// 由于textarea在安卓nvue上的差异性,需要额外再调整其内边距
|
|
135
|
-
if (this.$fu.os() === "android") {
|
|
136
|
-
style.paddingTop = "6px";
|
|
137
|
-
style.paddingLeft = "6px";
|
|
138
|
-
style.paddingBottom = "3px";
|
|
139
|
-
style.paddingRight = "6px";
|
|
140
|
-
}
|
|
141
|
-
// #endif
|
|
142
|
-
return this.$fu.deepMerge(style, this.$fu.addStyle(this.customStyle));
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
methods: {
|
|
146
|
-
// 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
|
|
147
|
-
setFormatter(e) {
|
|
148
|
-
this.innerFormatter = e
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
onFocus(e) {
|
|
152
|
-
this.$emit("focus", e);
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
onBlur(e) {
|
|
156
|
-
this.$emit("blur", e);
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
onLinechange(e) {
|
|
160
|
-
this.$emit("linechange", e);
|
|
161
|
-
},
|
|
162
|
-
onInput(e) {
|
|
163
|
-
let { value = "" } = e.detail || {};
|
|
164
|
-
// 格式化过滤方法
|
|
165
|
-
const formatter = this.formatter || this.innerFormatter
|
|
166
|
-
const formatValue = formatter(value)
|
|
167
|
-
// 为了避免props的单向数据流特性,需要先将innerValue值设置为当前值,再在$nextTick中重新赋予设置后的值才有效
|
|
168
|
-
this.innerValue = value
|
|
169
|
-
this.$nextTick(() => {
|
|
170
|
-
this.innerValue = formatValue;
|
|
171
|
-
this.valueChange();
|
|
172
|
-
})
|
|
173
|
-
},
|
|
174
|
-
// 内容发生变化,进行处理
|
|
175
|
-
valueChange() {
|
|
176
|
-
const value = this.innerValue;
|
|
177
|
-
this.$nextTick(() => {
|
|
178
|
-
// 兼容 Vue2
|
|
179
|
-
this.$emit("input", value);
|
|
180
|
-
// 兼容 Vue3
|
|
181
|
-
this.$emit('update:modelValue', value);
|
|
182
|
-
// 标识value值的变化是由内部引起的
|
|
183
|
-
this.changeFromInner = true;
|
|
184
|
-
this.$emit("change", value);
|
|
185
|
-
});
|
|
186
|
-
},
|
|
187
|
-
onConfirm(e) {
|
|
188
|
-
this.$emit("confirm", e);
|
|
189
|
-
},
|
|
190
|
-
onKeyboardheightchange(e) {
|
|
191
|
-
this.$emit("keyboardheightchange", e);
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
watch: {
|
|
195
|
-
// #ifndef VUE2
|
|
196
|
-
value: {
|
|
197
|
-
immediate: true,
|
|
198
|
-
handler(newVal, oldVal) {
|
|
199
|
-
this.innerValue = newVal;
|
|
200
|
-
/* #ifdef H5 */
|
|
201
|
-
// 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
|
|
202
|
-
if (this.firstChange === false && this.changeFromInner === false) {
|
|
203
|
-
this.valueChange();
|
|
204
|
-
}
|
|
205
|
-
/* #endif */
|
|
206
|
-
this.firstChange = false;
|
|
207
|
-
// 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
|
|
208
|
-
this.changeFromInner = false;
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
// #endif
|
|
212
|
-
// #ifdef VUE3
|
|
213
|
-
modelValue: {
|
|
214
|
-
immediate: true,
|
|
215
|
-
handler(newVal, oldVal) {
|
|
216
|
-
this.innerValue = newVal;
|
|
217
|
-
/* #ifdef H5 */
|
|
218
|
-
// 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
|
|
219
|
-
if (this.firstChange === false && this.changeFromInner === false) {
|
|
220
|
-
this.valueChange();
|
|
221
|
-
}
|
|
222
|
-
/* #endif */
|
|
223
|
-
this.firstChange = false;
|
|
224
|
-
// 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
|
|
225
|
-
this.changeFromInner = false;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
// #endif
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
</script>
|
|
232
|
-
|
|
233
|
-
<style lang="scss" scoped>
|
|
234
|
-
@import '../../libs/style/components.scss';
|
|
235
|
-
$color_dadbde: #dadbde;
|
|
236
|
-
$color-disabled: #F5F7FA;
|
|
237
|
-
|
|
238
|
-
.fu-textarea {
|
|
239
|
-
@include flex(row);
|
|
240
|
-
background-color: #ffffff;
|
|
241
|
-
position: relative;
|
|
242
|
-
flex: 1;
|
|
243
|
-
padding: 9px 12px;
|
|
244
|
-
|
|
245
|
-
&__field {
|
|
246
|
-
flex: 1;
|
|
247
|
-
font-size: 14px;
|
|
248
|
-
color: #333333;
|
|
249
|
-
width: 100%;
|
|
250
|
-
/* #ifdef MP-ALIPAY */
|
|
251
|
-
padding: 0;
|
|
252
|
-
/* #endif */
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&--radius {
|
|
256
|
-
border-radius: 5px;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&--no-radius {
|
|
260
|
-
border-radius: 0;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&--disabled {
|
|
264
|
-
background-color: $color-disabled;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
&__count {
|
|
268
|
-
position: absolute;
|
|
269
|
-
right: 5px;
|
|
270
|
-
bottom: 2px;
|
|
271
|
-
font-size: 12px;
|
|
272
|
-
color: #999999;
|
|
273
|
-
padding: 1px 4px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
&__border {
|
|
277
|
-
border-width: 0.5px;
|
|
278
|
-
border-color: $color_dadbde;
|
|
279
|
-
border-style: solid;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
&__border-bottom {
|
|
283
|
-
border-bottom-width: 0.5px;
|
|
284
|
-
border-color: $color_dadbde;
|
|
285
|
-
border-bottom-style: solid;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
</style>
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
props: {
|
|
3
|
-
/**
|
|
4
|
-
* @description 输入框的内容
|
|
5
|
-
*/
|
|
6
|
-
value: {
|
|
7
|
-
type: [String,Number],
|
|
8
|
-
default: ''
|
|
9
|
-
},
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: [String,Number],
|
|
12
|
-
default: ''
|
|
13
|
-
},
|
|
14
|
-
/**
|
|
15
|
-
* @description 输入框为空时占位符
|
|
16
|
-
* @default null
|
|
17
|
-
*/
|
|
18
|
-
placeholder: {
|
|
19
|
-
type: [String,Number],
|
|
20
|
-
default: null
|
|
21
|
-
},
|
|
22
|
-
/**
|
|
23
|
-
* @description 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写:depp(...)
|
|
24
|
-
* @default 'textarea-placeholder'
|
|
25
|
-
*/
|
|
26
|
-
placeholderClass: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: 'textarea-placeholder'
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* @description 指定placeholder的样式
|
|
32
|
-
* @default 'color: #CCCCCC'
|
|
33
|
-
*/
|
|
34
|
-
placeholderStyle: {
|
|
35
|
-
type: [String,Object],
|
|
36
|
-
default: 'color: #CCCCCC'
|
|
37
|
-
},
|
|
38
|
-
/**
|
|
39
|
-
* @description 输入框高度
|
|
40
|
-
* @default 70
|
|
41
|
-
*/
|
|
42
|
-
height: {
|
|
43
|
-
type: [String,Number],
|
|
44
|
-
default: 70
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* @description 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
|
|
48
|
-
* @default 'done'
|
|
49
|
-
*/
|
|
50
|
-
confirmType: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: 'done'
|
|
53
|
-
},
|
|
54
|
-
/**
|
|
55
|
-
* @description 是否禁用
|
|
56
|
-
* @default false
|
|
57
|
-
*/
|
|
58
|
-
disabled: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false
|
|
61
|
-
},
|
|
62
|
-
/**
|
|
63
|
-
* @description 禁用状态时的背景色
|
|
64
|
-
* @default '#F5F7FA'
|
|
65
|
-
*/
|
|
66
|
-
disabledColor: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: '#F5F7FA'
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
* @description 是否显示统计字数
|
|
72
|
-
* @default false
|
|
73
|
-
*/
|
|
74
|
-
count: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: false
|
|
77
|
-
},
|
|
78
|
-
/**
|
|
79
|
-
* @description 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
|
|
80
|
-
* @default false
|
|
81
|
-
*/
|
|
82
|
-
focus: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* @description 是否自动增加高度
|
|
88
|
-
* @default false
|
|
89
|
-
*/
|
|
90
|
-
autoHeight: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: false
|
|
93
|
-
},
|
|
94
|
-
/**
|
|
95
|
-
* @description 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
|
|
96
|
-
* @default false
|
|
97
|
-
*/
|
|
98
|
-
fixed: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: false
|
|
101
|
-
},
|
|
102
|
-
/**
|
|
103
|
-
* @description 指定光标与键盘的距离
|
|
104
|
-
*/
|
|
105
|
-
cursorSpacing: {
|
|
106
|
-
type: Number,
|
|
107
|
-
default: 0
|
|
108
|
-
},
|
|
109
|
-
/**
|
|
110
|
-
* @description 指定focus时的光标位置
|
|
111
|
-
*/
|
|
112
|
-
cursor: {
|
|
113
|
-
type: [String,Number],
|
|
114
|
-
default: ''
|
|
115
|
-
},
|
|
116
|
-
/**
|
|
117
|
-
* @description 是否显示键盘上方带有“完成”按钮那一栏
|
|
118
|
-
* @default true
|
|
119
|
-
*/
|
|
120
|
-
showConfirmBar: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: true
|
|
123
|
-
},
|
|
124
|
-
/**
|
|
125
|
-
* @description 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
|
|
126
|
-
* @default -1
|
|
127
|
-
*/
|
|
128
|
-
selectionStart: {
|
|
129
|
-
type: Number,
|
|
130
|
-
default: -1
|
|
131
|
-
},
|
|
132
|
-
/**
|
|
133
|
-
* @description 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
|
|
134
|
-
* @default -1
|
|
135
|
-
*/
|
|
136
|
-
selectionEnd: {
|
|
137
|
-
type: Number,
|
|
138
|
-
default: -1
|
|
139
|
-
},
|
|
140
|
-
/**
|
|
141
|
-
* @description 键盘弹起时,是否自动上推页面
|
|
142
|
-
* @default true
|
|
143
|
-
*/
|
|
144
|
-
adjustPosition: {
|
|
145
|
-
type: Boolean,
|
|
146
|
-
default: true
|
|
147
|
-
},
|
|
148
|
-
/**
|
|
149
|
-
* @description 是否去掉 iOS 下的默认内边距,只微信小程序有效
|
|
150
|
-
* @default false
|
|
151
|
-
*/
|
|
152
|
-
disableDefaultPadding: {
|
|
153
|
-
type: Boolean,
|
|
154
|
-
default: false
|
|
155
|
-
},
|
|
156
|
-
/**
|
|
157
|
-
* @description focus时,点击页面的时候不收起键盘,只微信小程序有效
|
|
158
|
-
* @default false
|
|
159
|
-
*/
|
|
160
|
-
holdKeyboard: {
|
|
161
|
-
type: Boolean,
|
|
162
|
-
default: false
|
|
163
|
-
},
|
|
164
|
-
/**
|
|
165
|
-
* @description 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
166
|
-
* @default 140
|
|
167
|
-
*/
|
|
168
|
-
maxlength: {
|
|
169
|
-
type: [String,Number],
|
|
170
|
-
default: 140
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* @description 边框类型
|
|
174
|
-
* @values 'surround' - 四周边框, 'bottom' - 底部边框
|
|
175
|
-
* @default 'surround'
|
|
176
|
-
*/
|
|
177
|
-
border: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: 'surround'
|
|
180
|
-
},
|
|
181
|
-
/**
|
|
182
|
-
* @description 边框颜色
|
|
183
|
-
* @default '#dadbde'
|
|
184
|
-
*/
|
|
185
|
-
borderColor: {
|
|
186
|
-
type: String,
|
|
187
|
-
default: '#dadbde'
|
|
188
|
-
},
|
|
189
|
-
/**
|
|
190
|
-
* @description 文本域字体大小
|
|
191
|
-
* @default 14
|
|
192
|
-
*/
|
|
193
|
-
size: {
|
|
194
|
-
type: [String,Number],
|
|
195
|
-
default: 14
|
|
196
|
-
},
|
|
197
|
-
/**
|
|
198
|
-
* @description 用于处理或者过滤输入框内容的方法
|
|
199
|
-
* @default null
|
|
200
|
-
*/
|
|
201
|
-
formatter: {
|
|
202
|
-
type: [Function,null],
|
|
203
|
-
default: null
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="fu-timeaxis-item">
|
|
3
|
-
<slot name="content"></slot>
|
|
4
|
-
<view class="fu-timeaxis-node" :style="[nodeStyle]">
|
|
5
|
-
<slot name="node"></slot>
|
|
6
|
-
</view>
|
|
7
|
-
</view>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
/**
|
|
12
|
-
* 时间轴需配合FuTimeaxis组件一起使用
|
|
13
|
-
*/
|
|
14
|
-
export default {
|
|
15
|
-
name: "FuTimeaxisItem",
|
|
16
|
-
props: {
|
|
17
|
-
/**
|
|
18
|
-
* @description 左侧节点背景颜色
|
|
19
|
-
*/
|
|
20
|
-
bgColor: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: ""
|
|
23
|
-
},
|
|
24
|
-
/**
|
|
25
|
-
* @description 左侧节点绝对定位top值
|
|
26
|
-
*/
|
|
27
|
-
nodeTop: {
|
|
28
|
-
type: [String,Number],
|
|
29
|
-
default: 0
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
data() {
|
|
33
|
-
return {};
|
|
34
|
-
},
|
|
35
|
-
computed: {
|
|
36
|
-
nodeStyle() {
|
|
37
|
-
return {
|
|
38
|
-
backgroundColor: this.bgColor,
|
|
39
|
-
top: this.$fu.addUnit(this.nodeTop)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<style lang="scss" scoped>
|
|
47
|
-
@import '../../libs/style/components.scss';
|
|
48
|
-
|
|
49
|
-
.fu-timeaxis-item {
|
|
50
|
-
@include flex(column);
|
|
51
|
-
position: relative;
|
|
52
|
-
width: 100%;
|
|
53
|
-
margin-bottom: 25px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.fu-timeaxis-node {
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 0;
|
|
59
|
-
left: -20px;
|
|
60
|
-
transform-origin: 0;
|
|
61
|
-
transform: translateX(-50%);
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
z-index: 99;
|
|
66
|
-
font-size: 12px;
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
// const defaultOption = {
|
|
2
|
-
// duration: 300,
|
|
3
|
-
// timingFunction: 'linear',
|
|
4
|
-
// delay: 0,
|
|
5
|
-
// transformOrigin: '50% 50% 0'
|
|
6
|
-
// }
|
|
7
|
-
// #ifdef APP-NVUE
|
|
8
|
-
const nvueAnimation = uni.requireNativePlugin('animation')
|
|
9
|
-
// #endif
|
|
10
|
-
class MPAnimation {
|
|
11
|
-
constructor(options, _this) {
|
|
12
|
-
this.options = options
|
|
13
|
-
// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
|
|
14
|
-
this.animation = uni.createAnimation({
|
|
15
|
-
...options
|
|
16
|
-
})
|
|
17
|
-
this.currentStepAnimates = {}
|
|
18
|
-
this.next = 0
|
|
19
|
-
this.$ = _this
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
_nvuePushAnimates(type, args) {
|
|
24
|
-
let aniObj = this.currentStepAnimates[this.next]
|
|
25
|
-
let styles = {}
|
|
26
|
-
if (!aniObj) {
|
|
27
|
-
styles = {
|
|
28
|
-
styles: {},
|
|
29
|
-
config: {}
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
styles = aniObj
|
|
33
|
-
}
|
|
34
|
-
if (animateTypes1.includes(type)) {
|
|
35
|
-
if (!styles.styles.transform) {
|
|
36
|
-
styles.styles.transform = ''
|
|
37
|
-
}
|
|
38
|
-
let unit = ''
|
|
39
|
-
if(type === 'rotate'){
|
|
40
|
-
unit = 'deg'
|
|
41
|
-
}
|
|
42
|
-
styles.styles.transform += `${type}(${args+unit}) `
|
|
43
|
-
} else {
|
|
44
|
-
styles.styles[type] = `${args}`
|
|
45
|
-
}
|
|
46
|
-
this.currentStepAnimates[this.next] = styles
|
|
47
|
-
}
|
|
48
|
-
_animateRun(styles = {}, config = {}) {
|
|
49
|
-
let ref = this.$.$refs['ani'].ref
|
|
50
|
-
if (!ref) return
|
|
51
|
-
return new Promise((resolve, reject) => {
|
|
52
|
-
nvueAnimation.transition(ref, {
|
|
53
|
-
styles,
|
|
54
|
-
...config
|
|
55
|
-
}, res => {
|
|
56
|
-
resolve()
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
_nvueNextAnimate(animates, step = 0, fn) {
|
|
62
|
-
let obj = animates[step]
|
|
63
|
-
if (obj) {
|
|
64
|
-
let {
|
|
65
|
-
styles,
|
|
66
|
-
config
|
|
67
|
-
} = obj
|
|
68
|
-
this._animateRun(styles, config).then(() => {
|
|
69
|
-
step += 1
|
|
70
|
-
this._nvueNextAnimate(animates, step, fn)
|
|
71
|
-
})
|
|
72
|
-
} else {
|
|
73
|
-
this.currentStepAnimates = {}
|
|
74
|
-
typeof fn === 'function' && fn()
|
|
75
|
-
this.isEnd = true
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
step(config = {}) {
|
|
80
|
-
// #ifndef APP-NVUE
|
|
81
|
-
this.animation.step(config)
|
|
82
|
-
// #endif
|
|
83
|
-
// #ifdef APP-NVUE
|
|
84
|
-
this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config)
|
|
85
|
-
this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin
|
|
86
|
-
this.next++
|
|
87
|
-
// #endif
|
|
88
|
-
return this
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
run(fn) {
|
|
92
|
-
// #ifndef APP-NVUE
|
|
93
|
-
this.$.animationData = this.animation.export()
|
|
94
|
-
this.$.timer = setTimeout(() => {
|
|
95
|
-
typeof fn === 'function' && fn()
|
|
96
|
-
}, this.$.durationTime)
|
|
97
|
-
// #endif
|
|
98
|
-
// #ifdef APP-NVUE
|
|
99
|
-
this.isEnd = false
|
|
100
|
-
let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref
|
|
101
|
-
if(!ref) return
|
|
102
|
-
this._nvueNextAnimate(this.currentStepAnimates, 0, fn)
|
|
103
|
-
this.next = 0
|
|
104
|
-
// #endif
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
|
|
110
|
-
'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
|
|
111
|
-
'translateZ'
|
|
112
|
-
]
|
|
113
|
-
const animateTypes2 = ['opacity', 'backgroundColor']
|
|
114
|
-
const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']
|
|
115
|
-
animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => {
|
|
116
|
-
MPAnimation.prototype[type] = function(...args) {
|
|
117
|
-
// #ifndef APP-NVUE
|
|
118
|
-
this.animation[type](...args)
|
|
119
|
-
// #endif
|
|
120
|
-
// #ifdef APP-NVUE
|
|
121
|
-
this._nvuePushAnimates(type, args)
|
|
122
|
-
// #endif
|
|
123
|
-
return this
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
export function createAnimation(option, _this) {
|
|
128
|
-
if(!_this) return
|
|
129
|
-
clearTimeout(_this.timer)
|
|
130
|
-
return new MPAnimation(option, _this)
|
|
131
|
-
}
|