@10yun/cv-mobile-ui 0.5.29 → 0.5.31
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/package.json +5 -1
- package/plugins/luch-request/adapters/index.js +131 -0
- package/plugins/luch-request/core/InterceptorManager.js +50 -0
- package/plugins/luch-request/core/Request.js +199 -0
- package/plugins/luch-request/core/buildFullPath.js +20 -0
- package/plugins/luch-request/core/defaults.js +32 -0
- package/plugins/luch-request/core/dispatchRequest.js +5 -0
- package/plugins/luch-request/core/mergeConfig.js +125 -0
- package/plugins/luch-request/core/settle.js +16 -0
- package/plugins/luch-request/helpers/buildURL.js +71 -0
- package/plugins/luch-request/helpers/combineURLs.js +12 -0
- package/plugins/luch-request/helpers/isAbsoluteURL.js +14 -0
- package/plugins/luch-request/index.d.ts +197 -0
- package/plugins/luch-request/index.js +2 -0
- package/plugins/luch-request/readme.md +3 -0
- package/plugins/luch-request/utils/clone.js +264 -0
- package/plugins/luch-request/utils.js +131 -0
- package/plugins/request.js +2 -2
- package/ui-cv/components/cv-btn-base/cv-btn-base.vue +1 -1
- package/ui-cv/components/cv-form-item/cv-form-item.vue +1 -1
- package/ui-fireui/fui-actionsheet/fui-actionsheet.vue +202 -0
- package/ui-fireui/fui-alert/fui-alert.vue +141 -0
- package/ui-fireui/fui-badge/fui-badge.vue +158 -0
- package/ui-fireui/fui-bottom-navigation/fui-bottom-navigation.vue +390 -0
- package/ui-fireui/fui-bottom-popup/fui-bottom-popup.vue +100 -0
- package/ui-fireui/fui-bubble-popup/fui-bubble-popup.vue +236 -0
- package/ui-fireui/fui-button/fui-button.vue +424 -0
- package/ui-fireui/fui-calendar/fui-calendar.js +915 -0
- package/ui-fireui/fui-calendar/fui-calendar.vue +868 -0
- package/ui-fireui/fui-card/fui-card.vue +231 -0
- package/ui-fireui/fui-cascade-selection/fui-cascade-selection.vue +538 -0
- package/ui-fireui/fui-circular-progress/fui-circular-progress.vue +261 -0
- package/ui-fireui/fui-collapse/fui-collapse.vue +179 -0
- package/ui-fireui/fui-countdown/fui-countdown.vue +301 -0
- package/ui-fireui/fui-datetime/fui-datetime.vue +570 -0
- package/ui-fireui/fui-divider/fui-divider.vue +118 -0
- package/ui-fireui/fui-drawer/fui-drawer.vue +103 -0
- package/ui-fireui/fui-dropdown-list/fui-dropdown-list.vue +70 -0
- package/ui-fireui/fui-fab/fui-fab.vue +284 -0
- package/ui-fireui/fui-footer/fui-footer.vue +131 -0
- package/ui-fireui/fui-grid/fui-grid.vue +42 -0
- package/ui-fireui/fui-grid-item/fui-grid-item.vue +142 -0
- package/ui-fireui/fui-icon/fui-icon.vue +820 -0
- package/ui-fireui/fui-image-cropper/fui-image-cropper.vue +1058 -0
- package/ui-fireui/fui-image-group/fui-image-group.vue +149 -0
- package/ui-fireui/fui-keyboard/fui-keyboard.vue +254 -0
- package/ui-fireui/fui-keyboard-input/fui-keyboard-input.vue +78 -0
- package/ui-fireui/fui-list-cell/fui-list-cell.vue +178 -0
- package/ui-fireui/fui-list-view/fui-list-view.vue +87 -0
- package/ui-fireui/fui-loading/fui-loading.vue +78 -0
- package/ui-fireui/fui-loadmore/fui-loadmore.vue +163 -0
- package/ui-fireui/fui-modal/fui-modal.vue +392 -0
- package/ui-fireui/fui-navigation-bar/fui-navigation-bar.vue +180 -0
- package/ui-fireui/fui-no-data/fui-no-data.vue +116 -0
- package/ui-fireui/fui-nomore/fui-nomore.vue +116 -0
- package/ui-fireui/fui-numberbox/fui-numberbox.vue +234 -0
- package/ui-fireui/fui-numberbox-border/fui-numberbox-border.vue +232 -0
- package/ui-fireui/fui-picture-cropper/fui-picture-cropper.vue +682 -0
- package/ui-fireui/fui-picture-cropper/fui-picture-cropper.wxs +560 -0
- package/ui-fireui/fui-rate/fui-rate.vue +167 -0
- package/ui-fireui/fui-round-progress/fui-round-progress.vue +306 -0
- package/ui-fireui/fui-scroll-top/fui-scroll-top.vue +189 -0
- package/ui-fireui/fui-sharemodel/fui-sharemodel.vue +181 -0
- package/ui-fireui/fui-skeleton/fui-skeleton.vue +248 -0
- package/ui-fireui/fui-steps/fui-steps.vue +214 -0
- package/ui-fireui/fui-sticky/fui-sticky.vue +155 -0
- package/ui-fireui/fui-sticky-wxs/fui-sticky-wxs.vue +133 -0
- package/ui-fireui/fui-sticky-wxs/fui-sticky.wxs +44 -0
- package/ui-fireui/fui-swipe-action/fui-swipe-action.vue +301 -0
- package/ui-fireui/fui-tabbar/fui-tabbar.vue +283 -0
- package/ui-fireui/fui-tabs/fui-tabs.vue +284 -0
- package/ui-fireui/fui-tabs2/fui-tabs2.vue +284 -0
- package/ui-fireui/fui-tag/fui-tag.vue +374 -0
- package/ui-fireui/fui-time-axis/fui-time-axis.vue +36 -0
- package/ui-fireui/fui-timeaxis-item/fui-timeaxis-item.vue +48 -0
- package/ui-fireui/fui-tips/fui-tips.vue +161 -0
- package/ui-fireui/fui-toast/fui-toast.vue +117 -0
- package/ui-fireui/fui-top-dropdown/fui-top-dropdown.vue +129 -0
- package/ui-fireui/fui-upload/fui-upload.vue +446 -0
- package/ui-fireui/fui-uploadsamll/fui-uploadsamll.vue +472 -0
- package/uview-plus/README.md +2 -2
- package/uview-plus/changelog-wu-tool.md +21 -0
- package/uview-plus/changelog-wu.md +91 -0
- package/uview-plus/components/u-action-sheet/_doc/changelog.md +12 -0
- package/uview-plus/components/u-action-sheet/_doc/package.json +92 -0
- package/uview-plus/components/u-action-sheet/_doc/readme.md +16 -0
- package/uview-plus/components/u-action-sheet/u-action-sheet.vue +8 -8
- package/uview-plus/components/u-album/u-album.vue +1 -1
- package/uview-plus/components/u-alert/u-alert.vue +5 -5
- package/uview-plus/components/u-app-update/_doc/changelog.md +26 -0
- package/uview-plus/components/u-app-update/_doc/package.json +89 -0
- package/uview-plus/components/u-app-update/_doc/readme.md +16 -0
- package/uview-plus/components/u-app-update/config.js +120 -0
- package/uview-plus/components/u-app-update/img/act.png +0 -0
- package/uview-plus/components/u-app-update/img/appUploadAlertBoxBg.png +0 -0
- package/uview-plus/components/u-app-update/img/close.png +0 -0
- package/uview-plus/components/u-app-update/js-sdk/checkVersion.js +81 -0
- package/uview-plus/components/u-app-update/js-sdk/silentlyAppUpdate.js +41 -0
- package/uview-plus/components/u-app-update/pages/index.vue +8 -0
- package/uview-plus/components/u-app-update/u-app-update.vue +583 -0
- package/uview-plus/components/u-avatar/u-avatar.vue +2 -2
- package/uview-plus/components/u-avatar-group/u-avatar-group.vue +79 -3
- package/uview-plus/components/u-back-top/u-back-top.vue +4 -4
- package/uview-plus/components/u-badge/u-badge.vue +1 -1
- package/uview-plus/components/u-button/u-button.vue +8 -8
- package/uview-plus/components/u-button-wu/_doc/changelog.md +6 -0
- package/uview-plus/components/u-button-wu/_doc/package.json +89 -0
- package/uview-plus/components/u-button-wu/_doc/readme.md +16 -0
- package/uview-plus/components/u-button-wu/u-button-wu.vue +522 -0
- package/uview-plus/components/u-button-wu/vue.scss +81 -0
- package/uview-plus/components/u-calendar/u-calendar.vue +5 -6
- package/uview-plus/components/u-calendar-wu/_doc/changelog.md +145 -0
- package/uview-plus/components/u-calendar-wu/_doc/package.json +90 -0
- package/uview-plus/components/u-calendar-wu/_doc/readme.md +16 -0
- package/uview-plus/components/u-calendar-wu/calendar.js +664 -0
- package/uview-plus/components/u-calendar-wu/i18n/en.json +14 -0
- package/uview-plus/components/u-calendar-wu/i18n/index.js +8 -0
- package/uview-plus/components/u-calendar-wu/i18n/zh-Hans.json +14 -0
- package/uview-plus/components/u-calendar-wu/i18n/zh-Hant.json +14 -0
- package/uview-plus/components/u-calendar-wu/props.js +166 -0
- package/uview-plus/components/u-calendar-wu/style.css +196 -0
- package/uview-plus/components/u-calendar-wu/u-calendar-wu.vue +921 -0
- package/uview-plus/components/u-calendar-wu/util.js +552 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-block/props.js +73 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-block/wu-calendar-block.vue +122 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-item/props.js +55 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-item/wu-calendar-item.vue +293 -0
- package/uview-plus/components/u-car-keyboard/u-car-keyboard.vue +2 -2
- package/uview-plus/components/u-card/u-card.vue +139 -3
- package/uview-plus/components/u-cell/_doc/changelog.md +6 -0
- package/uview-plus/components/u-cell/_doc/package.json +89 -0
- package/uview-plus/components/u-cell/_doc/readme.md +25 -0
- package/uview-plus/components/u-cell/u-cell.vue +4 -4
- package/uview-plus/components/u-cell-group/u-cell-group.vue +2 -2
- package/uview-plus/components/u-checkbox/_doc/changelog.md +8 -0
- package/uview-plus/components/u-checkbox/_doc/package.json +88 -0
- package/uview-plus/components/u-checkbox/_doc/readme.md +25 -0
- package/uview-plus/components/u-checkbox/u-checkbox.vue +4 -4
- package/uview-plus/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/uview-plus/components/u-code/_doc/changelog.md +6 -0
- package/uview-plus/components/u-code/_doc/package.json +86 -0
- package/uview-plus/components/u-code/_doc/readme.md +16 -0
- package/uview-plus/components/u-code/u-code.vue +1 -1
- package/uview-plus/components/u-code-input/u-code-input.vue +1 -1
- package/uview-plus/components/u-col/u-col.vue +1 -1
- package/uview-plus/components/u-collapse/u-collapse.vue +2 -2
- package/uview-plus/components/u-collapse-item/u-collapse-item.vue +218 -3
- package/uview-plus/components/u-column-notice/u-column-notice.vue +3 -3
- package/uview-plus/components/u-count-down/u-count-down.vue +1 -1
- package/uview-plus/components/u-count-to/u-count-to.vue +1 -1
- package/uview-plus/components/u-datetime-picker/u-datetime-picker.vue +3 -3
- package/uview-plus/components/u-divider/u-divider.vue +3 -3
- package/uview-plus/components/u-drag-sort/_doc/changelog.md +0 -0
- package/uview-plus/components/u-drag-sort/_doc/package.json +85 -0
- package/uview-plus/components/u-drag-sort/_doc/readme.md +16 -0
- package/uview-plus/components/u-drag-sort/u-drag-sort.vue +3 -0
- package/uview-plus/components/u-dropdown/u-dropdown.vue +3 -3
- package/uview-plus/components/u-dropdown-item/u-dropdown-item.vue +1 -1
- package/uview-plus/components/u-empty/u-empty.vue +30 -4
- package/uview-plus/components/u-form-item/u-form-item.vue +4 -4
- package/uview-plus/components/u-gap/_doc/changelog.md +4 -0
- package/uview-plus/components/u-gap/_doc/package.json +86 -0
- package/uview-plus/components/u-gap/_doc/readme.md +22 -0
- package/uview-plus/components/u-gap/u-gap.vue +1 -1
- package/uview-plus/components/u-grid/u-grid.vue +1 -1
- package/uview-plus/components/u-grid-item/u-grid-item.vue +1 -1
- package/uview-plus/components/u-icon/_doc/changelog.md +10 -0
- package/uview-plus/components/u-icon/_doc/package.json +85 -0
- package/uview-plus/components/u-icon/_doc/readme.md +10 -0
- package/uview-plus/components/u-icon/icon.js +23 -25
- package/uview-plus/components/u-icon/icons.js +213 -213
- package/uview-plus/components/u-icon/style.css +3 -3
- package/uview-plus/components/u-icon/u-icon.vue +1 -1
- package/uview-plus/components/u-icon/u-icon2.vue +149 -0
- package/uview-plus/components/u-image/u-image.vue +5 -5
- package/uview-plus/components/u-image-wu/_doc/changelog.md +21 -0
- package/uview-plus/components/u-image-wu/_doc/package.json +88 -0
- package/uview-plus/components/u-image-wu/_doc/readme.md +11 -0
- package/uview-plus/components/u-image-wu/props.js +94 -0
- package/uview-plus/components/u-image-wu/u-image-wu.vue +243 -0
- package/uview-plus/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/uview-plus/components/u-index-list/u-index-list.vue +2 -2
- package/uview-plus/components/u-input/_doc/changelog.md +6 -0
- package/uview-plus/components/u-input/_doc/package.json +88 -0
- package/uview-plus/components/u-input/_doc/readme.md +16 -0
- package/uview-plus/components/u-input/u-input.vue +4 -4
- package/uview-plus/components/u-keyboard/u-keyboard.vue +6 -6
- package/uview-plus/components/u-lazy-load/u-lazy-load.vue +257 -3
- package/uview-plus/components/u-line/_doc/changelog.md +8 -0
- package/uview-plus/components/u-line/_doc/package.json +86 -0
- package/uview-plus/components/u-line/_doc/readme.md +16 -0
- package/uview-plus/components/u-line/u-line.vue +1 -1
- package/uview-plus/components/u-line-progress/u-line-progress.vue +1 -1
- package/uview-plus/components/u-link/_doc/changelog.md +8 -0
- package/uview-plus/components/u-link/_doc/package.json +86 -0
- package/uview-plus/components/u-link/_doc/readme.md +20 -0
- package/uview-plus/components/u-link/u-link.vue +1 -1
- package/uview-plus/components/u-list/u-list.vue +1 -1
- package/uview-plus/components/u-list-item/u-list-item.vue +1 -1
- package/uview-plus/components/u-loading-icon/_doc/changelog.md +12 -0
- package/uview-plus/components/u-loading-icon/_doc/package.json +86 -0
- package/uview-plus/components/u-loading-icon/_doc/readme.md +16 -0
- package/uview-plus/components/u-loading-icon/props.js +1 -1
- package/uview-plus/components/u-loading-icon/u-loading-icon.vue +191 -3
- package/uview-plus/components/u-loading-page/u-loading-page.vue +4 -4
- package/uview-plus/components/u-loadmore/u-loadmore.vue +4 -4
- package/uview-plus/components/u-mask/u-mask.vue +120 -113
- package/uview-plus/components/u-message-input/u-message-input.vue +1 -1
- package/uview-plus/components/u-modal/u-modal.vue +6 -6
- package/uview-plus/components/u-navbar/_doc/changelog.md +6 -0
- package/uview-plus/components/u-navbar/_doc/package.json +89 -0
- package/uview-plus/components/u-navbar/_doc/readme.md +16 -0
- package/uview-plus/components/u-navbar/u-navbar.vue +4 -4
- package/uview-plus/components/u-navbar-mini/u-navbar-mini.vue +2 -2
- package/uview-plus/components/u-navbar-wu/props.js +102 -0
- package/uview-plus/components/u-navbar-wu/u-navbar-wu.vue +196 -0
- package/uview-plus/components/u-no-network/u-no-network.vue +5 -5
- package/uview-plus/components/u-notice-bar/u-notice-bar.vue +5 -5
- package/uview-plus/components/u-notify/u-notify.vue +6 -6
- package/uview-plus/components/u-number-box/_doc/changelog.md +19 -0
- package/uview-plus/components/u-number-box/_doc/package.json +88 -0
- package/uview-plus/components/u-number-box/_doc/readme.md +16 -0
- package/uview-plus/components/u-number-box/u-number-box.vue +9 -3
- package/uview-plus/components/u-number-keyboard/u-number-keyboard.vue +1 -1
- package/uview-plus/components/u-overlay/_doc/changelog.md +4 -0
- package/uview-plus/components/u-overlay/_doc/package.json +88 -0
- package/uview-plus/components/u-overlay/_doc/readme.md +16 -0
- package/uview-plus/components/u-overlay/u-overlay.vue +3 -3
- package/uview-plus/components/u-picker/u-picker.vue +5 -5
- package/uview-plus/components/u-popup/_doc/changelog.md +4 -0
- package/uview-plus/components/u-popup/_doc/package.json +92 -0
- package/uview-plus/components/u-popup/_doc/readme.md +16 -0
- package/uview-plus/components/u-popup/u-popup.vue +8 -8
- package/uview-plus/components/u-popup-wu/keypress.js +45 -0
- package/uview-plus/components/u-popup-wu/u-popup-wu.vue +519 -0
- package/uview-plus/components/u-radio/_doc/changelog.md +6 -0
- package/uview-plus/components/u-radio/_doc/package.json +88 -0
- package/uview-plus/components/u-radio/_doc/readme.md +25 -0
- package/uview-plus/components/u-radio/u-radio.vue +4 -4
- package/uview-plus/components/u-radio-group/u-radio-group.vue +1 -1
- package/uview-plus/components/u-rate/u-rate.vue +5 -5
- package/uview-plus/components/u-read-more/u-read-more.vue +126 -3
- package/uview-plus/components/u-row/_doc/changelog.md +8 -0
- package/uview-plus/components/u-row/_doc/package.json +86 -0
- package/uview-plus/components/u-row/_doc/readme.md +16 -0
- package/uview-plus/components/u-row/u-row.vue +1 -1
- package/uview-plus/components/u-row-notice/u-row-notice.vue +3 -3
- package/uview-plus/components/u-safe-bottom/_doc/changelog.md +6 -0
- package/uview-plus/components/u-safe-bottom/_doc/package.json +86 -0
- package/uview-plus/components/u-safe-bottom/_doc/readme.md +16 -0
- package/uview-plus/components/u-safe-bottom/u-safe-bottom.vue +48 -3
- package/uview-plus/components/u-search/u-search.vue +4 -4
- package/uview-plus/components/u-select/u-select.vue +175 -3
- package/uview-plus/components/u-skeleton/u-skeleton.vue +3 -3
- package/uview-plus/components/u-sku-wu/_doc/changelog.md +27 -0
- package/uview-plus/components/u-sku-wu/_doc/package.json +93 -0
- package/uview-plus/components/u-sku-wu/_doc/readme.md +16 -0
- package/uview-plus/components/u-sku-wu/props.js +86 -0
- package/uview-plus/components/u-sku-wu/style.css +271 -0
- package/uview-plus/components/u-sku-wu/u-sku-wu.vue +864 -0
- package/uview-plus/components/u-status-bar/_doc/changelog.md +4 -0
- package/uview-plus/components/u-status-bar/_doc/package.json +86 -0
- package/uview-plus/components/u-status-bar/_doc/readme.md +16 -0
- package/uview-plus/components/u-status-bar/u-status-bar.vue +1 -1
- package/uview-plus/components/u-steps/u-steps.vue +1 -1
- package/uview-plus/components/u-steps-item/u-steps-item.vue +7 -7
- package/uview-plus/components/u-sticky/u-sticky.vue +1 -1
- package/uview-plus/components/u-subsection/u-subsection.vue +1 -1
- package/uview-plus/components/u-swipe-action/u-swipe-action.vue +1 -1
- package/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue +3 -3
- package/uview-plus/components/u-swiper/u-swiper.vue +1 -1
- package/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
- package/uview-plus/components/u-switch/u-switch.vue +2 -2
- package/uview-plus/components/u-tabbar/u-tabbar.vue +2 -2
- package/uview-plus/components/u-tabbar-item/u-tabbar-item.vue +9 -4
- package/uview-plus/components/u-table/u-table.vue +1 -1
- package/uview-plus/components/u-tabs/u-tabs.vue +3 -3
- package/uview-plus/components/u-tag/u-tag.vue +5 -5
- package/uview-plus/components/u-text/_doc/changelog.md +10 -0
- package/uview-plus/components/u-text/_doc/package.json +89 -0
- package/uview-plus/components/u-text/_doc/readme.md +20 -0
- package/uview-plus/components/u-text/u-text.vue +159 -3
- package/uview-plus/components/u-textarea/_doc/changelog.md +6 -0
- package/uview-plus/components/u-textarea/_doc/package.json +86 -0
- package/uview-plus/components/u-textarea/_doc/readme.md +25 -0
- package/uview-plus/components/u-toast/u-toast.vue +8 -8
- package/uview-plus/components/u-tooltip/u-tooltip.vue +6 -6
- package/uview-plus/components/u-transition/_doc/changelog.md +14 -0
- package/uview-plus/components/u-transition/_doc/package.json +86 -0
- package/uview-plus/components/u-transition/_doc/readme.md +16 -0
- package/uview-plus/components/u-transition-wu/createAnimation.js +148 -0
- package/uview-plus/components/u-transition-wu/props.js +32 -0
- package/uview-plus/components/u-transition-wu/u-transition.vue +300 -0
- package/uview-plus/components/u-upload/u-upload.vue +10 -10
- package/uview-plus/components/u-verification-code/u-verification-code.vue +161 -0
- package/uview-plus/components/u-waterfall/u-waterfall.vue +221 -3
- package/uview-plus/index.js +109 -94
- package/uview-plus/libs/config/config.js +46 -48
- package/uview-plus/libs/css/color.scss +32 -311
- package/uview-plus/libs/css/components-wu.scss +30 -0
- package/uview-plus/libs/css/vue.scss +10 -10
- package/uview-plus/libs/ctocode/index.js +120 -0
- package/uview-plus/libs/function/calc.js +61 -55
- package/uview-plus/libs/function/color/color-convert/CHANGELOG.md +54 -0
- package/uview-plus/libs/function/color/color-convert/LICENSE +21 -0
- package/uview-plus/libs/function/color/color-convert/README.md +68 -0
- package/uview-plus/libs/function/color/color-convert/conversions.js +839 -0
- package/uview-plus/libs/function/color/color-convert/index.js +81 -0
- package/uview-plus/libs/function/color/color-convert/package.json +48 -0
- package/uview-plus/libs/function/color/color-convert/route.js +97 -0
- package/uview-plus/libs/function/color/color-name/LICENSE +8 -0
- package/uview-plus/libs/function/color/color-name/README.md +11 -0
- package/uview-plus/libs/function/color/color-name/index.js +152 -0
- package/uview-plus/libs/function/color/color-name/package.json +28 -0
- package/uview-plus/libs/function/color/color-string/LICENSE +21 -0
- package/uview-plus/libs/function/color/color-string/README.md +62 -0
- package/uview-plus/libs/function/color/color-string/index.js +244 -0
- package/uview-plus/libs/function/color/color-string/package.json +39 -0
- package/uview-plus/libs/function/color/color.js +496 -0
- package/uview-plus/libs/function/color/index.js +158 -0
- package/uview-plus/libs/function/color/is-arrayish/LICENSE +21 -0
- package/uview-plus/libs/function/color/is-arrayish/README.md +16 -0
- package/uview-plus/libs/function/color/is-arrayish/index.js +9 -0
- package/uview-plus/libs/function/color/is-arrayish/package.json +45 -0
- package/uview-plus/libs/function/color/is-arrayish/yarn-error.log +1443 -0
- package/uview-plus/libs/function/color/simple-swizzle/LICENSE +21 -0
- package/uview-plus/libs/function/color/simple-swizzle/README.md +39 -0
- package/uview-plus/libs/function/color/simple-swizzle/index.js +29 -0
- package/uview-plus/libs/function/color/simple-swizzle/package.json +36 -0
- package/uview-plus/libs/function/colorGradient.js +108 -106
- package/uview-plus/libs/function/debounce.js +17 -17
- package/uview-plus/libs/function/digit.js +1 -3
- package/uview-plus/libs/function/http.js +3 -3
- package/uview-plus/libs/function/index-wu.js +198 -0
- package/uview-plus/libs/function/index.js +579 -566
- package/uview-plus/libs/function/platform.js +18 -18
- package/uview-plus/libs/function/test.js +135 -137
- package/uview-plus/libs/function/throttle.js +17 -17
- package/uview-plus/libs/luch-request/core/Request.js +199 -199
- package/uview-plus/libs/mixin/mpMixin.js +1 -0
- package/uview-plus/libs/mixin/openType.js +33 -0
- package/uview-plus/libs/util/async-validator.js +1343 -1343
- package/uview-plus/libs/util/dayjs.js +404 -0
- package/uview-plus/libs/util/route.js +101 -105
- package/uview-plus/package-wu-tool.json +84 -0
- package/uview-plus/package-wu.json +112 -0
- package/uview-plus/package.json +106 -95
- package/uview-plus/readme-wu.md +148 -0
- package/uview-ui/index.js +51 -52
- package/plugins/uni-upgrade.js +0 -294
|
@@ -0,0 +1,868 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view>
|
|
3
|
+
<view :class="{ 'fui-bottom-popup': isFixed, 'fui-popup-show': isShow && isFixed }">
|
|
4
|
+
<view class="fui-calendar-header" :class="{ 'fui-calendar-radius': radius }" @touchmove.stop.prevent="stop" v-if="isFixed">
|
|
5
|
+
<view>日期选择</view>
|
|
6
|
+
<view class="fui-iconfont fui-font-close" hover-class="fui-opacity" :hover-stay-time="150" @tap="hide"></view>
|
|
7
|
+
</view>
|
|
8
|
+
|
|
9
|
+
<view class="fui-date-box">
|
|
10
|
+
<view
|
|
11
|
+
class="fui-iconfont fui-font-arrowleft"
|
|
12
|
+
:style="{ color: yearArrowColor }"
|
|
13
|
+
hover-class="fui-opacity"
|
|
14
|
+
:hover-stay-time="150"
|
|
15
|
+
v-if="arrowType == 1"
|
|
16
|
+
@tap="changeYear(0)"
|
|
17
|
+
></view>
|
|
18
|
+
<view
|
|
19
|
+
class="fui-iconfont fui-font-arrowleft"
|
|
20
|
+
:style="{ color: monthArrowColor }"
|
|
21
|
+
hover-class="fui-opacity"
|
|
22
|
+
:hover-stay-time="150"
|
|
23
|
+
@tap="changeMonth(0)"
|
|
24
|
+
></view>
|
|
25
|
+
<view class="fui-date_time">{{ showTitle }}</view>
|
|
26
|
+
<view
|
|
27
|
+
class="fui-iconfont fui-font-arrowright"
|
|
28
|
+
:style="{ color: monthArrowColor }"
|
|
29
|
+
hover-class="fui-opacity"
|
|
30
|
+
:hover-stay-time="150"
|
|
31
|
+
@tap="changeMonth(1)"
|
|
32
|
+
></view>
|
|
33
|
+
<view
|
|
34
|
+
class="fui-iconfont fui-font-arrowright"
|
|
35
|
+
:style="{ color: yearArrowColor }"
|
|
36
|
+
hover-class="fui-opacity"
|
|
37
|
+
:hover-stay-time="150"
|
|
38
|
+
v-if="arrowType == 1"
|
|
39
|
+
@tap="changeYear(1)"
|
|
40
|
+
></view>
|
|
41
|
+
</view>
|
|
42
|
+
<view class="fui-date-header">
|
|
43
|
+
<view class="fui-date">日</view>
|
|
44
|
+
<view class="fui-date">一</view>
|
|
45
|
+
<view class="fui-date">二</view>
|
|
46
|
+
<view class="fui-date">三</view>
|
|
47
|
+
<view class="fui-date">四</view>
|
|
48
|
+
<view class="fui-date">五</view>
|
|
49
|
+
<view class="fui-date">六</view>
|
|
50
|
+
</view>
|
|
51
|
+
<view
|
|
52
|
+
class="fui-date-content"
|
|
53
|
+
:class="{ 'fui-flex-start': isFixed && fixedHeight }"
|
|
54
|
+
:style="{ height: isFixed && fixedHeight ? dateHeight * 6 + 'px' : 'auto' }"
|
|
55
|
+
>
|
|
56
|
+
<block v-for="(item, index) in weekdayArr" :key="index">
|
|
57
|
+
<view class="fui-date"></view>
|
|
58
|
+
</block>
|
|
59
|
+
<view
|
|
60
|
+
class="fui-date"
|
|
61
|
+
:class="{
|
|
62
|
+
'fui-date-pd_0': isFixed && fixedHeight,
|
|
63
|
+
'fui-opacity': openDisAbled(year, month, index + 1),
|
|
64
|
+
'fui-start-date': (type == 2 && startDate == `${year}-${month}-${index + 1}`) || type == 1,
|
|
65
|
+
'fui-end-date': (type == 2 && endDate == `${year}-${month}-${index + 1}`) || type == 1
|
|
66
|
+
}"
|
|
67
|
+
:style="{
|
|
68
|
+
backgroundColor: isFixed ? getColor(index, 1) : 'transparent',
|
|
69
|
+
height: isFixed && fixedHeight ? dateHeight + 'px' : 'auto'
|
|
70
|
+
}"
|
|
71
|
+
v-for="(item, index) in daysArr"
|
|
72
|
+
:key="index"
|
|
73
|
+
@tap="dateClick(index)"
|
|
74
|
+
>
|
|
75
|
+
<view
|
|
76
|
+
class="fui-date-text"
|
|
77
|
+
:style="{ color: isFixed ? getColor(index, 2) : getStatusData(3, index), backgroundColor: getStatusData(2, index) }"
|
|
78
|
+
>
|
|
79
|
+
<view v-if="isFixed || !getStatusData(4, index)">{{ index + 1 }}</view>
|
|
80
|
+
<view v-if="!getStatusData(4, index)" class="fui-custom-desc" :class="{ 'fui-lunar-unshow': !lunar && isFixed }">
|
|
81
|
+
{{ getDescText(index, startDate, endDate) }}
|
|
82
|
+
</view>
|
|
83
|
+
<text class="fui-iconfont fui-font-check" v-if="getStatusData(4, index)"></text>
|
|
84
|
+
</view>
|
|
85
|
+
<view
|
|
86
|
+
class="fui-date-desc"
|
|
87
|
+
:style="{ color: activeColor }"
|
|
88
|
+
v-if="!lunar && type == 2 && startDate == `${year}-${month}-${index + 1}` && startDate != endDate"
|
|
89
|
+
>
|
|
90
|
+
{{ startText }}
|
|
91
|
+
</view>
|
|
92
|
+
<view
|
|
93
|
+
class="fui-date-desc"
|
|
94
|
+
:style="{ color: activeColor }"
|
|
95
|
+
v-if="!lunar && type == 2 && endDate == `${year}-${month}-${index + 1}`"
|
|
96
|
+
>
|
|
97
|
+
{{ endText }}
|
|
98
|
+
</view>
|
|
99
|
+
</view>
|
|
100
|
+
<view class="fui-bg-month">{{ month }}</view>
|
|
101
|
+
</view>
|
|
102
|
+
|
|
103
|
+
<view class="fui-calendar-op" v-if="isFixed" @touchmove.stop.prevent="stop">
|
|
104
|
+
<view class="fui-calendar-result">
|
|
105
|
+
<text>{{ type == 1 ? activeDate : startDate }}</text>
|
|
106
|
+
<text v-if="endDate">至{{ endDate }}</text>
|
|
107
|
+
</view>
|
|
108
|
+
<view class="fui-calendar-btn_box">
|
|
109
|
+
<fui-button :type="btnType" height="72rpx" shape="circle" :size="28" @click="btnFix(false)">确定</fui-button>
|
|
110
|
+
</view>
|
|
111
|
+
</view>
|
|
112
|
+
</view>
|
|
113
|
+
|
|
114
|
+
<view
|
|
115
|
+
class="fui-popup-mask"
|
|
116
|
+
:class="[isShow ? 'fui-mask-show' : '']"
|
|
117
|
+
@touchmove.stop.prevent="stop"
|
|
118
|
+
v-if="isFixed"
|
|
119
|
+
@tap="hide"
|
|
120
|
+
></view>
|
|
121
|
+
</view>
|
|
122
|
+
</template>
|
|
123
|
+
<script>
|
|
124
|
+
//easycom组件模式 无需手动引入
|
|
125
|
+
// import fuiButton from "../fui-button/fui-button"
|
|
126
|
+
import calendar from './fui-calendar.js';
|
|
127
|
+
export default {
|
|
128
|
+
name: 'fuiCalendar',
|
|
129
|
+
// components:{
|
|
130
|
+
// fuiButton
|
|
131
|
+
// },
|
|
132
|
+
props: {
|
|
133
|
+
//1-切换月份和年份 2-切换月份
|
|
134
|
+
arrowType: {
|
|
135
|
+
type: [Number, String],
|
|
136
|
+
default: 1
|
|
137
|
+
},
|
|
138
|
+
//1-单个日期选择 2-开始日期+结束日期选择
|
|
139
|
+
type: {
|
|
140
|
+
type: Number,
|
|
141
|
+
default: 1
|
|
142
|
+
},
|
|
143
|
+
//可切换最大年份
|
|
144
|
+
maxYear: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: 2030
|
|
147
|
+
},
|
|
148
|
+
//可切换最小年份
|
|
149
|
+
minYear: {
|
|
150
|
+
type: Number,
|
|
151
|
+
default: 1920
|
|
152
|
+
},
|
|
153
|
+
//最小可选日期(不在范围内日期禁用不可选)
|
|
154
|
+
minDate: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: '1920-01-01'
|
|
157
|
+
},
|
|
158
|
+
/**
|
|
159
|
+
* 最大可选日期
|
|
160
|
+
* 默认最大值为今天,之后的日期不可选
|
|
161
|
+
* 2030-12-31
|
|
162
|
+
* */
|
|
163
|
+
maxDate: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: ''
|
|
166
|
+
},
|
|
167
|
+
//显示圆角
|
|
168
|
+
radius: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: true
|
|
171
|
+
},
|
|
172
|
+
//状态 数据顺序与当月天数一致,index=>day
|
|
173
|
+
/**
|
|
174
|
+
* [{
|
|
175
|
+
* text:"", 描述:2字以内
|
|
176
|
+
* value:"",状态值
|
|
177
|
+
* bgColor:"",背景色
|
|
178
|
+
* color:"" 文字颜色,
|
|
179
|
+
* check:false //是否显示对勾
|
|
180
|
+
*
|
|
181
|
+
}]
|
|
182
|
+
*
|
|
183
|
+
* **/
|
|
184
|
+
status: {
|
|
185
|
+
type: Array,
|
|
186
|
+
default() {
|
|
187
|
+
return [];
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
//月份切换箭头颜色
|
|
191
|
+
monthArrowColor: {
|
|
192
|
+
type: String,
|
|
193
|
+
default: '#999'
|
|
194
|
+
},
|
|
195
|
+
//年份切换箭头颜色
|
|
196
|
+
yearArrowColor: {
|
|
197
|
+
type: String,
|
|
198
|
+
default: '#bcbcbc'
|
|
199
|
+
},
|
|
200
|
+
//默认日期字体颜色
|
|
201
|
+
color: {
|
|
202
|
+
type: String,
|
|
203
|
+
default: '#333'
|
|
204
|
+
},
|
|
205
|
+
//选中|起始结束日期背景色
|
|
206
|
+
activeBgColor: {
|
|
207
|
+
type: String,
|
|
208
|
+
default: '#5677fc'
|
|
209
|
+
},
|
|
210
|
+
//选中|起始结束日期字体颜色
|
|
211
|
+
activeColor: {
|
|
212
|
+
type: String,
|
|
213
|
+
default: '#fff'
|
|
214
|
+
},
|
|
215
|
+
//范围内日期背景色
|
|
216
|
+
rangeBgColor: {
|
|
217
|
+
type: String,
|
|
218
|
+
default: 'rgba(86,119,252,0.1)'
|
|
219
|
+
},
|
|
220
|
+
//范围内日期字体颜色
|
|
221
|
+
rangeColor: {
|
|
222
|
+
type: String,
|
|
223
|
+
default: '#5677fc'
|
|
224
|
+
},
|
|
225
|
+
//type=2时生效,起始日期自定义文案
|
|
226
|
+
startText: {
|
|
227
|
+
type: String,
|
|
228
|
+
default: '开始'
|
|
229
|
+
},
|
|
230
|
+
//type=2时生效,结束日期自定义文案
|
|
231
|
+
endText: {
|
|
232
|
+
type: String,
|
|
233
|
+
default: '结束'
|
|
234
|
+
},
|
|
235
|
+
//按钮样式类型
|
|
236
|
+
btnType: {
|
|
237
|
+
type: String,
|
|
238
|
+
default: 'primary'
|
|
239
|
+
},
|
|
240
|
+
//固定在底部
|
|
241
|
+
isFixed: {
|
|
242
|
+
type: Boolean,
|
|
243
|
+
default: false
|
|
244
|
+
},
|
|
245
|
+
//固定日历容器高度,isFixed=true时生效
|
|
246
|
+
fixedHeight: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: true
|
|
249
|
+
},
|
|
250
|
+
//当前选中日期带选中效果
|
|
251
|
+
isActiveCurrent: {
|
|
252
|
+
type: Boolean,
|
|
253
|
+
default: true
|
|
254
|
+
},
|
|
255
|
+
//切换年月是否触发事件 type=1时生效
|
|
256
|
+
isChange: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: false
|
|
259
|
+
},
|
|
260
|
+
//是否显示农历
|
|
261
|
+
lunar: {
|
|
262
|
+
type: Boolean,
|
|
263
|
+
default: false
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
data() {
|
|
267
|
+
return {
|
|
268
|
+
isShow: false,
|
|
269
|
+
weekday: 1, // 星期几,值为1-7
|
|
270
|
+
weekdayArr: [],
|
|
271
|
+
days: 0, //当前月有多少天
|
|
272
|
+
daysArr: [],
|
|
273
|
+
showTitle: '',
|
|
274
|
+
year: 2020,
|
|
275
|
+
month: 0,
|
|
276
|
+
day: 0,
|
|
277
|
+
startYear: 0,
|
|
278
|
+
startMonth: 0,
|
|
279
|
+
startDay: 0,
|
|
280
|
+
endYear: 0,
|
|
281
|
+
endMonth: 0,
|
|
282
|
+
endDay: 0,
|
|
283
|
+
today: '',
|
|
284
|
+
activeDate: '',
|
|
285
|
+
startDate: '',
|
|
286
|
+
endDate: '',
|
|
287
|
+
isStart: true,
|
|
288
|
+
min: null,
|
|
289
|
+
max: null,
|
|
290
|
+
dateHeight: 20
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
computed: {
|
|
294
|
+
dataChange() {
|
|
295
|
+
return `${this.type}-${this.minDate}-${this.maxDate}`;
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
watch: {
|
|
299
|
+
dataChange(val) {
|
|
300
|
+
this.init();
|
|
301
|
+
},
|
|
302
|
+
fixedHeight(val) {
|
|
303
|
+
if (val) {
|
|
304
|
+
this.initDateHeight();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
created() {
|
|
309
|
+
this.init();
|
|
310
|
+
},
|
|
311
|
+
methods: {
|
|
312
|
+
getColor(index, type) {
|
|
313
|
+
let color = type == 1 ? '' : this.color;
|
|
314
|
+
let day = index + 1;
|
|
315
|
+
let date = `${this.year}-${this.month}-${day}`;
|
|
316
|
+
let timestamp = new Date(date.replace(/\-/g, '/')).getTime();
|
|
317
|
+
let start = this.startDate.replace(/\-/g, '/');
|
|
318
|
+
let end = this.endDate.replace(/\-/g, '/');
|
|
319
|
+
if ((this.isActiveCurrent && this.activeDate == date) || this.startDate == date || this.endDate == date) {
|
|
320
|
+
color = type == 1 ? this.activeBgColor : this.activeColor;
|
|
321
|
+
} else if (this.endDate && timestamp > new Date(start).getTime() && timestamp < new Date(end).getTime()) {
|
|
322
|
+
color = type == 1 ? this.rangeBgColor : this.rangeColor;
|
|
323
|
+
}
|
|
324
|
+
return color;
|
|
325
|
+
},
|
|
326
|
+
//获取状态数据
|
|
327
|
+
getStatusData(type, index) {
|
|
328
|
+
//1-描述text,2-bgColor背景色,3-color文字颜色 4-check 是否显示对勾
|
|
329
|
+
let val = ['', 'transparent', '#333', ''][type - 1];
|
|
330
|
+
if (!this.isFixed && this.status && this.status.length > 0) {
|
|
331
|
+
let item = this.status[index];
|
|
332
|
+
if (item) {
|
|
333
|
+
switch (type) {
|
|
334
|
+
case 1:
|
|
335
|
+
val = item.text;
|
|
336
|
+
break;
|
|
337
|
+
case 2:
|
|
338
|
+
val = item.bgColor;
|
|
339
|
+
break;
|
|
340
|
+
case 3:
|
|
341
|
+
val = item.color;
|
|
342
|
+
break;
|
|
343
|
+
case 4:
|
|
344
|
+
val = item.check;
|
|
345
|
+
break;
|
|
346
|
+
default:
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return val;
|
|
352
|
+
},
|
|
353
|
+
getDescText(index, startDate, endDate) {
|
|
354
|
+
let text = this.lunar ? this.getLunar(this.year, this.month, index + 1) : '';
|
|
355
|
+
if (this.isFixed && this.type == 2) {
|
|
356
|
+
//此判断不能与上面条件一起判断
|
|
357
|
+
if (this.lunar) {
|
|
358
|
+
let date = `${this.year}-${this.month}-${index + 1}`;
|
|
359
|
+
if (startDate == date && startDate != endDate) {
|
|
360
|
+
text = this.startText;
|
|
361
|
+
} else if (endDate == date) {
|
|
362
|
+
text = this.endText;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
} else {
|
|
366
|
+
let status = this.getStatusData(1, index);
|
|
367
|
+
if (status) text = status;
|
|
368
|
+
}
|
|
369
|
+
return text;
|
|
370
|
+
},
|
|
371
|
+
getLunar(year, month, day) {
|
|
372
|
+
let obj = calendar.solar2lunar(year, month, day);
|
|
373
|
+
return obj.IDayCn;
|
|
374
|
+
},
|
|
375
|
+
initDateHeight() {
|
|
376
|
+
if (this.fixedHeight && this.isFixed) {
|
|
377
|
+
this.dateHeight = uni.getSystemInfoSync().windowWidth / 7;
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
init() {
|
|
381
|
+
this.initDateHeight();
|
|
382
|
+
let now = new Date();
|
|
383
|
+
this.year = now.getFullYear();
|
|
384
|
+
this.month = now.getMonth() + 1;
|
|
385
|
+
this.day = now.getDate();
|
|
386
|
+
this.today = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
|
|
387
|
+
this.activeDate = this.today;
|
|
388
|
+
this.min = this.initDate(this.minDate);
|
|
389
|
+
this.max = this.initDate(this.maxDate || this.today);
|
|
390
|
+
this.startDate = '';
|
|
391
|
+
this.startYear = 0;
|
|
392
|
+
this.startMonth = 0;
|
|
393
|
+
this.startDay = 0;
|
|
394
|
+
this.endYear = 0;
|
|
395
|
+
this.endMonth = 0;
|
|
396
|
+
this.endDay = 0;
|
|
397
|
+
this.endDate = '';
|
|
398
|
+
this.isStart = true;
|
|
399
|
+
this.changeData();
|
|
400
|
+
},
|
|
401
|
+
//日期处理
|
|
402
|
+
initDate(date) {
|
|
403
|
+
let fdate = date.split('-');
|
|
404
|
+
return {
|
|
405
|
+
year: Number(fdate[0] || 1920),
|
|
406
|
+
month: Number(fdate[1] || 1),
|
|
407
|
+
day: Number(fdate[2] || 1)
|
|
408
|
+
};
|
|
409
|
+
},
|
|
410
|
+
openDisAbled(year, month, day) {
|
|
411
|
+
let bool = true;
|
|
412
|
+
let date = `${year}/${month}/${day}`;
|
|
413
|
+
// let today = this.today.replace(/\-/g, '/');
|
|
414
|
+
let min = `${this.min.year}/${this.min.month}/${this.min.day}`;
|
|
415
|
+
let max = `${this.max.year}/${this.max.month}/${this.max.day}`;
|
|
416
|
+
let timestamp = new Date(date).getTime();
|
|
417
|
+
if (timestamp >= new Date(min).getTime() && timestamp <= new Date(max).getTime()) {
|
|
418
|
+
bool = false;
|
|
419
|
+
}
|
|
420
|
+
return bool;
|
|
421
|
+
},
|
|
422
|
+
generateArray(start, end) {
|
|
423
|
+
return Array.from(new Array(end + 1).keys()).slice(start);
|
|
424
|
+
},
|
|
425
|
+
formatNum(num) {
|
|
426
|
+
return num < 10 ? '0' + num : num + '';
|
|
427
|
+
},
|
|
428
|
+
stop() {
|
|
429
|
+
return !this.isFixed;
|
|
430
|
+
},
|
|
431
|
+
//一个月有多少天
|
|
432
|
+
getMonthDay(year, month) {
|
|
433
|
+
let days = new Date(year, month, 0).getDate();
|
|
434
|
+
return days;
|
|
435
|
+
},
|
|
436
|
+
getWeekday(year, month) {
|
|
437
|
+
let date = new Date(`${year}/${month}/01 00:00:00`);
|
|
438
|
+
return date.getDay();
|
|
439
|
+
},
|
|
440
|
+
checkRange(year) {
|
|
441
|
+
let overstep = false;
|
|
442
|
+
if (year < this.minYear || year > this.maxYear) {
|
|
443
|
+
uni.showToast({
|
|
444
|
+
title: '日期超出范围啦~',
|
|
445
|
+
icon: 'none'
|
|
446
|
+
});
|
|
447
|
+
overstep = true;
|
|
448
|
+
}
|
|
449
|
+
return overstep;
|
|
450
|
+
},
|
|
451
|
+
changeMonth(isAdd) {
|
|
452
|
+
if (isAdd) {
|
|
453
|
+
let month = this.month + 1;
|
|
454
|
+
let year = month > 12 ? this.year + 1 : this.year;
|
|
455
|
+
if (!this.checkRange(year)) {
|
|
456
|
+
this.month = month > 12 ? 1 : month;
|
|
457
|
+
this.year = year;
|
|
458
|
+
this.changeData();
|
|
459
|
+
}
|
|
460
|
+
} else {
|
|
461
|
+
let month = this.month - 1;
|
|
462
|
+
let year = month < 1 ? this.year - 1 : this.year;
|
|
463
|
+
if (!this.checkRange(year)) {
|
|
464
|
+
this.month = month < 1 ? 12 : month;
|
|
465
|
+
this.year = year;
|
|
466
|
+
this.changeData();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
changeYear(isAdd) {
|
|
471
|
+
let year = isAdd ? this.year + 1 : this.year - 1;
|
|
472
|
+
if (!this.checkRange(year)) {
|
|
473
|
+
this.year = year;
|
|
474
|
+
this.changeData();
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
changeData() {
|
|
478
|
+
this.days = this.getMonthDay(this.year, this.month);
|
|
479
|
+
this.daysArr = this.generateArray(1, this.days);
|
|
480
|
+
this.weekday = this.getWeekday(this.year, this.month);
|
|
481
|
+
this.weekdayArr = this.generateArray(1, this.weekday);
|
|
482
|
+
this.showTitle = `${this.year}年${this.month}月`;
|
|
483
|
+
if (this.isChange && this.type == 1) {
|
|
484
|
+
this.btnFix(true);
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
dateClick(day) {
|
|
488
|
+
day += 1;
|
|
489
|
+
if (!this.openDisAbled(this.year, this.month, day)) {
|
|
490
|
+
this.day = day;
|
|
491
|
+
let date = `${this.year}-${this.month}-${day}`;
|
|
492
|
+
if (this.type == 1) {
|
|
493
|
+
this.activeDate = date;
|
|
494
|
+
} else {
|
|
495
|
+
let compare = new Date(date.replace(/\-/g, '/')).getTime() < new Date(this.startDate.replace(/\-/g, '/')).getTime();
|
|
496
|
+
if (this.isStart || compare) {
|
|
497
|
+
this.startDate = date;
|
|
498
|
+
this.startYear = this.year;
|
|
499
|
+
this.startMonth = this.month;
|
|
500
|
+
this.startDay = this.day;
|
|
501
|
+
this.endYear = 0;
|
|
502
|
+
this.endMonth = 0;
|
|
503
|
+
this.endDay = 0;
|
|
504
|
+
this.endDate = '';
|
|
505
|
+
this.activeDate = '';
|
|
506
|
+
this.isStart = false;
|
|
507
|
+
} else {
|
|
508
|
+
this.endDate = date;
|
|
509
|
+
this.endYear = this.year;
|
|
510
|
+
this.endMonth = this.month;
|
|
511
|
+
this.endDay = this.day;
|
|
512
|
+
this.isStart = true;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (!this.isFixed) {
|
|
516
|
+
this.btnFix();
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
show() {
|
|
521
|
+
this.isShow = true;
|
|
522
|
+
},
|
|
523
|
+
hide() {
|
|
524
|
+
this.isShow = false;
|
|
525
|
+
},
|
|
526
|
+
getWeekText(date) {
|
|
527
|
+
date = new Date(`${date.replace(/\-/g, '/')} 00:00:00`);
|
|
528
|
+
let week = date.getDay();
|
|
529
|
+
return '星期' + ['日', '一', '二', '三', '四', '五', '六'][week];
|
|
530
|
+
},
|
|
531
|
+
btnFix(show) {
|
|
532
|
+
if (!show) {
|
|
533
|
+
this.hide();
|
|
534
|
+
}
|
|
535
|
+
if (this.type == 1) {
|
|
536
|
+
let arr = this.activeDate.split('-');
|
|
537
|
+
let year = this.isChange ? this.year : Number(arr[0]);
|
|
538
|
+
let month = this.isChange ? this.month : Number(arr[1]);
|
|
539
|
+
let day = this.isChange ? this.day : Number(arr[2]);
|
|
540
|
+
//当前月有多少天
|
|
541
|
+
let days = this.getMonthDay(year, month);
|
|
542
|
+
let result = `${year}-${this.formatNum(month)}-${this.formatNum(day)}`;
|
|
543
|
+
let weekText = this.getWeekText(result);
|
|
544
|
+
let isToday = false;
|
|
545
|
+
if (`${year}-${month}-${day}` == this.today) {
|
|
546
|
+
//今天
|
|
547
|
+
isToday = true;
|
|
548
|
+
}
|
|
549
|
+
let lunar = calendar.solar2lunar(year, month, day);
|
|
550
|
+
this.$emit('change', {
|
|
551
|
+
year: year,
|
|
552
|
+
month: month,
|
|
553
|
+
day: day,
|
|
554
|
+
days: days,
|
|
555
|
+
result: result,
|
|
556
|
+
week: weekText,
|
|
557
|
+
isToday: isToday,
|
|
558
|
+
switch: show, //是否是切换年月操作
|
|
559
|
+
lunar: lunar
|
|
560
|
+
});
|
|
561
|
+
} else {
|
|
562
|
+
if (!this.startDate || !this.endDate) return;
|
|
563
|
+
let startMonth = this.formatNum(this.startMonth);
|
|
564
|
+
let startDay = this.formatNum(this.startDay);
|
|
565
|
+
let startDate = `${this.startYear}-${startMonth}-${startDay}`;
|
|
566
|
+
let startWeek = this.getWeekText(startDate);
|
|
567
|
+
let startLunar = calendar.solar2lunar(this.startYear, startMonth, startDay);
|
|
568
|
+
|
|
569
|
+
let endMonth = this.formatNum(this.endMonth);
|
|
570
|
+
let endDay = this.formatNum(this.endDay);
|
|
571
|
+
let endDate = `${this.endYear}-${endMonth}-${endDay}`;
|
|
572
|
+
let endWeek = this.getWeekText(endDate);
|
|
573
|
+
let endLunar = calendar.solar2lunar(this.endYear, endMonth, endDay);
|
|
574
|
+
this.$emit('change', {
|
|
575
|
+
startYear: this.startYear,
|
|
576
|
+
startMonth: this.startMonth,
|
|
577
|
+
startDay: this.startDay,
|
|
578
|
+
startDate: startDate,
|
|
579
|
+
startWeek: startWeek,
|
|
580
|
+
startLunar: startLunar,
|
|
581
|
+
endYear: this.endYear,
|
|
582
|
+
endMonth: this.endMonth,
|
|
583
|
+
endDay: this.endDay,
|
|
584
|
+
endDate: endDate,
|
|
585
|
+
endWeek: endWeek,
|
|
586
|
+
endLunar: endLunar
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
</script>
|
|
593
|
+
|
|
594
|
+
<style scoped>
|
|
595
|
+
@font-face {
|
|
596
|
+
font-family: 'fuiDateFont';
|
|
597
|
+
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAVgAA0AAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAFRAAAABoAAAAci0/w50dERUYAAAUkAAAAHgAAAB4AKQANT1MvMgAAAaAAAABDAAAAVjxuSNNjbWFwAAAB+AAAAEoAAAFS5iPQt2dhc3AAAAUcAAAACAAAAAj//wADZ2x5ZgAAAlQAAAFHAAABvPf29TBoZWFkAAABMAAAADAAAAA2GMsN3WhoZWEAAAFgAAAAHQAAACQHjAOFaG10eAAAAeQAAAATAAAAFgzQAPJsb2NhAAACRAAAABAAAAAQAOoBSG1heHAAAAGAAAAAHgAAACABEwA3bmFtZQAAA5wAAAFJAAACiCnmEVVwb3N0AAAE6AAAADQAAABLUwjqHHjaY2BkYGAAYp5Gj5/x/DZfGbhZGEDg1tUn7+F00P/LzOuY9YFcDgYmkCgAa0gNlHjaY2BkYGBu+N/AEMPCAALM6xgYGVABCwBT4AMaAAAAeNpjYGRgYGBn0GZgYgABEMkFhAwM/8F8BgANaAFLAAB42mNgZGFgnMDAysDA1Ml0hoGBoR9CM75mMGLkAIoysDIzYAUBaa4pDA7PGJ49ZG7438AQw9zA0AAUZgTJAQDrcAy8AHjaY2GAABYIDgLCBQx1AAcEAc8AeNpjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETAwMzxifcTx7+P8/kMUAYUkxS/6VVIXqAgNGNgY4lxGoB6QPBTAyDHsAADDkDYkAAAAAAAAAAAAAADQAagC2AN542m2QsU7DMBCG/Tt1bNPUiUnkSgiVtqKpxJAgVLVbeAa6MaK+B4JXgJWBjY21UtW5gpkdMTFX7dzApaJLhXU6n8+n//ttxtn458N79XJWZ8eMxS00C4wy9A1EP8PQncAlIQzS4WgsVtPpSmwzV3OFRqLetH5TSQMK939X61ptPZ2p2EAttNMLBRMrtschQblDeS34aY50cIkCzg/B2Y5C+VpyQxhFkRgu515O8jvU5mmPM2O0wJ5Z27vhX+yMsV437WvCdTM+GI40MgwKfuGammC0uURqeqFMfe9cxaJclkt5GMaB1hIR1VobOgpEiKq+sLZcIrJWhO3/Jw7qWlYj1Jf21FaCtmd5bevrlk28O/7A4spXTl4KTh9MTlqQ8PESBRstReic+sRj0Dni9fIqmNS/pXNWCvWOeYBmx5S9Bsn9Ah+5WtAAeNp9kD1OAzEQhZ/zByQSQiCoXVEA2vyUKRMp9Ailo0g23pBo1155nUg5AS0VB6DlGByAGyDRcgpelkmTImvt6PObmeexAZzjGwr/3yXuhBWO8ShcwREy4Sr1F+Ea+V24jhY+hRvUf4SbuFUD4RYu1BsdVO2Eu5vSbcsKZxgIV3CKJ+Eq9ZVwjfwqXMcVPoQb1L+EmxjjV7iFa2WpDOFhMEFgnEFjig3jAjEcLJIyBtahOfRmEsxMTzd6ETubOBso71dilwMeaDnngCntPbdmvkon/mDLgdSYbh4FS7YpjS4idCgbXyyc1d2oc7D9nu22tNi/a4E1x+xRDWzU/D3bM9JIbAyvkJI18jK3pBJTj2hrrPG7ZynW814IiU68y/SIx5o0dTr3bmniwOLn8owcfbS5kj33qBw+Y1kIeb/dTsQgil2GP5PYcRkAAAB42mNgYoAALjDJyIAO2MGiTIxMjMyMLIys7GmJeRmlmWZQ2pQ5OSORLaU0Mz2/FACDfwlbAAAAAf//AAIAAQAAAAwAAAAWAAAAAgABAAMABgABAAQAAAACAAAAAHjaY2BgYGQAgqtL1DlA9K2rT97DaABNlwiuAAA=)
|
|
598
|
+
format('woff');
|
|
599
|
+
font-weight: normal;
|
|
600
|
+
font-style: normal;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.fui-iconfont {
|
|
604
|
+
font-family: 'fuiDateFont' !important;
|
|
605
|
+
font-size: 36rpx;
|
|
606
|
+
font-style: normal;
|
|
607
|
+
-webkit-font-smoothing: antialiased;
|
|
608
|
+
-moz-osx-font-smoothing: grayscale;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.fui-font-close:before {
|
|
612
|
+
content: '\e608';
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.fui-font-check:before {
|
|
616
|
+
content: '\e6e1';
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.fui-font-arrowright:before {
|
|
620
|
+
content: '\e600';
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.fui-font-arrowleft:before {
|
|
624
|
+
content: '\e601';
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.fui-date-box {
|
|
628
|
+
width: 100%;
|
|
629
|
+
display: flex;
|
|
630
|
+
align-items: center;
|
|
631
|
+
justify-content: center;
|
|
632
|
+
padding: 20rpx 0 30rpx;
|
|
633
|
+
background-color: #fff;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
.fui-calendar-radius {
|
|
637
|
+
border-top-left-radius: 20rpx;
|
|
638
|
+
border-top-right-radius: 20rpx;
|
|
639
|
+
overflow: hidden;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.fui-date_time {
|
|
643
|
+
padding: 0 16rpx;
|
|
644
|
+
color: #333;
|
|
645
|
+
font-size: 32rpx;
|
|
646
|
+
line-height: 32rpx;
|
|
647
|
+
font-weight: bold;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.fui-font-arrowleft {
|
|
651
|
+
margin-right: 32rpx;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.fui-font-arrowright {
|
|
655
|
+
margin-left: 32rpx;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.fui-date-header {
|
|
659
|
+
width: 100%;
|
|
660
|
+
display: flex;
|
|
661
|
+
align-items: center;
|
|
662
|
+
background-color: #fff;
|
|
663
|
+
font-size: 24rpx;
|
|
664
|
+
line-height: 24rpx;
|
|
665
|
+
color: #555;
|
|
666
|
+
box-shadow: 0 15rpx 20rpx -15rpx #efefef;
|
|
667
|
+
position: relative;
|
|
668
|
+
z-index: 2;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.fui-date-content {
|
|
672
|
+
width: 100%;
|
|
673
|
+
display: flex;
|
|
674
|
+
flex-wrap: wrap;
|
|
675
|
+
padding: 12rpx 0;
|
|
676
|
+
box-sizing: border-box;
|
|
677
|
+
background-color: #fff;
|
|
678
|
+
position: relative;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.fui-flex-start {
|
|
682
|
+
align-content: flex-start;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.fui-bg-month {
|
|
686
|
+
position: absolute;
|
|
687
|
+
font-size: 260rpx;
|
|
688
|
+
line-height: 260rpx;
|
|
689
|
+
left: 50%;
|
|
690
|
+
top: 50%;
|
|
691
|
+
transform: translate(-50%, -50%);
|
|
692
|
+
color: #f5f5f7;
|
|
693
|
+
z-index: 1;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.fui-date {
|
|
697
|
+
width: 14.2857%;
|
|
698
|
+
display: flex;
|
|
699
|
+
align-items: center;
|
|
700
|
+
justify-content: center;
|
|
701
|
+
padding: 12rpx 0;
|
|
702
|
+
overflow: hidden;
|
|
703
|
+
position: relative;
|
|
704
|
+
z-index: 2;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.fui-date-pd_0 {
|
|
708
|
+
padding: 0 !important;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.fui-start-date {
|
|
712
|
+
border-top-left-radius: 8rpx;
|
|
713
|
+
border-bottom-left-radius: 8rpx;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.fui-end-date {
|
|
717
|
+
border-top-right-radius: 8rpx;
|
|
718
|
+
border-bottom-right-radius: 8rpx;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.fui-date-text {
|
|
722
|
+
width: 80rpx;
|
|
723
|
+
height: 80rpx;
|
|
724
|
+
display: flex;
|
|
725
|
+
align-items: center;
|
|
726
|
+
justify-content: center;
|
|
727
|
+
flex-direction: column;
|
|
728
|
+
font-size: 32rpx;
|
|
729
|
+
line-height: 32rpx;
|
|
730
|
+
position: relative;
|
|
731
|
+
border-radius: 50%;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.fui-btn-calendar {
|
|
735
|
+
padding: 16rpx;
|
|
736
|
+
box-sizing: border-box;
|
|
737
|
+
text-align: center;
|
|
738
|
+
text-decoration: none;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.fui-opacity {
|
|
742
|
+
opacity: 0.5;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.fui-bottom-popup {
|
|
746
|
+
width: 100%;
|
|
747
|
+
position: fixed;
|
|
748
|
+
left: 0;
|
|
749
|
+
right: 0;
|
|
750
|
+
bottom: 0;
|
|
751
|
+
z-index: 9999;
|
|
752
|
+
visibility: hidden;
|
|
753
|
+
transform: translate3d(0, 100%, 0);
|
|
754
|
+
transform-origin: center;
|
|
755
|
+
transition: all 0.3s ease-in-out;
|
|
756
|
+
min-height: 20rpx;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.fui-popup-show {
|
|
760
|
+
transform: translate3d(0, 0, 0);
|
|
761
|
+
visibility: visible;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.fui-popup-mask {
|
|
765
|
+
position: fixed;
|
|
766
|
+
top: 0;
|
|
767
|
+
left: 0;
|
|
768
|
+
right: 0;
|
|
769
|
+
bottom: 0;
|
|
770
|
+
background: rgba(0, 0, 0, 0.6);
|
|
771
|
+
z-index: 9996;
|
|
772
|
+
transition: all 0.3s ease-in-out;
|
|
773
|
+
opacity: 0;
|
|
774
|
+
visibility: hidden;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.fui-mask-show {
|
|
778
|
+
opacity: 1;
|
|
779
|
+
visibility: visible;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.fui-calendar-header {
|
|
783
|
+
width: 100%;
|
|
784
|
+
height: 80rpx;
|
|
785
|
+
padding: 0 40rpx;
|
|
786
|
+
display: flex;
|
|
787
|
+
justify-content: center;
|
|
788
|
+
align-items: center;
|
|
789
|
+
box-sizing: border-box;
|
|
790
|
+
font-size: 30rpx;
|
|
791
|
+
background-color: #fff;
|
|
792
|
+
color: #555;
|
|
793
|
+
position: relative;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.fui-font-close {
|
|
797
|
+
position: absolute;
|
|
798
|
+
right: 30rpx;
|
|
799
|
+
top: 50%;
|
|
800
|
+
transform: translateY(-50%);
|
|
801
|
+
color: #999;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.fui-btn-calendar {
|
|
805
|
+
padding: 16rpx;
|
|
806
|
+
box-sizing: border-box;
|
|
807
|
+
text-align: center;
|
|
808
|
+
text-decoration: none;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.fui-font-check {
|
|
812
|
+
color: #fff;
|
|
813
|
+
font-size: 54rpx;
|
|
814
|
+
line-height: 54rpx;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.fui-custom-desc {
|
|
818
|
+
width: 100%;
|
|
819
|
+
font-size: 24rpx;
|
|
820
|
+
line-height: 24rpx;
|
|
821
|
+
transform: scale(0.8);
|
|
822
|
+
transform-origin: center center;
|
|
823
|
+
text-align: center;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.fui-lunar-unshow {
|
|
827
|
+
position: absolute;
|
|
828
|
+
left: 0;
|
|
829
|
+
bottom: 8rpx;
|
|
830
|
+
z-index: 2;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.fui-date-desc {
|
|
834
|
+
width: 100%;
|
|
835
|
+
font-size: 24rpx;
|
|
836
|
+
line-height: 24rpx;
|
|
837
|
+
position: absolute;
|
|
838
|
+
left: 0;
|
|
839
|
+
transform: scale(0.8);
|
|
840
|
+
transform-origin: center center;
|
|
841
|
+
text-align: center;
|
|
842
|
+
bottom: 8rpx;
|
|
843
|
+
z-index: 2;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.fui-calendar-op {
|
|
847
|
+
width: 100%;
|
|
848
|
+
display: flex;
|
|
849
|
+
align-items: center;
|
|
850
|
+
justify-content: center;
|
|
851
|
+
flex-direction: column;
|
|
852
|
+
background-color: #fff;
|
|
853
|
+
padding: 0 42rpx 30rpx;
|
|
854
|
+
box-sizing: border-box;
|
|
855
|
+
font-size: 24rpx;
|
|
856
|
+
color: #666;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.fui-calendar-result {
|
|
860
|
+
height: 48rpx;
|
|
861
|
+
transform: scale(0.9);
|
|
862
|
+
transform-origin: center 100%;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.fui-calendar-btn_box {
|
|
866
|
+
width: 100%;
|
|
867
|
+
}
|
|
868
|
+
</style>
|