@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,404 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) =>
|
|
3
|
+
function __require() {
|
|
4
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// C:/Users/LP/Downloads/wuui-plus_3.1.27_example/node_modules/dayjs/dayjs.min.js
|
|
8
|
+
var require_dayjs_min = __commonJS({
|
|
9
|
+
'C:/Users/LP/Downloads/wuui-plus_3.1.27_example/node_modules/dayjs/dayjs.min.js'(exports, module) {
|
|
10
|
+
!(function (t, e) {
|
|
11
|
+
'object' == typeof exports && 'undefined' != typeof module
|
|
12
|
+
? (module.exports = e())
|
|
13
|
+
: 'function' == typeof define && define.amd
|
|
14
|
+
? define(e)
|
|
15
|
+
: ((t = 'undefined' != typeof globalThis ? globalThis : t || self).dayjs = e());
|
|
16
|
+
})(exports, function () {
|
|
17
|
+
'use strict';
|
|
18
|
+
var t = 1e3,
|
|
19
|
+
e = 6e4,
|
|
20
|
+
n = 36e5,
|
|
21
|
+
r = 'millisecond',
|
|
22
|
+
i = 'second',
|
|
23
|
+
s = 'minute',
|
|
24
|
+
u = 'hour',
|
|
25
|
+
a = 'day',
|
|
26
|
+
o = 'week',
|
|
27
|
+
f = 'month',
|
|
28
|
+
h = 'quarter',
|
|
29
|
+
c = 'year',
|
|
30
|
+
d = 'date',
|
|
31
|
+
l = 'Invalid Date',
|
|
32
|
+
$ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
|
|
33
|
+
y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
|
|
34
|
+
M = {
|
|
35
|
+
name: 'en',
|
|
36
|
+
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
|
|
37
|
+
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
|
|
38
|
+
ordinal: function (t2) {
|
|
39
|
+
var e2 = ['th', 'st', 'nd', 'rd'],
|
|
40
|
+
n2 = t2 % 100;
|
|
41
|
+
return '[' + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + ']';
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
m = function (t2, e2, n2) {
|
|
45
|
+
var r2 = String(t2);
|
|
46
|
+
return !r2 || r2.length >= e2 ? t2 : '' + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
47
|
+
},
|
|
48
|
+
v = {
|
|
49
|
+
s: m,
|
|
50
|
+
z: function (t2) {
|
|
51
|
+
var e2 = -t2.utcOffset(),
|
|
52
|
+
n2 = Math.abs(e2),
|
|
53
|
+
r2 = Math.floor(n2 / 60),
|
|
54
|
+
i2 = n2 % 60;
|
|
55
|
+
return (e2 <= 0 ? '+' : '-') + m(r2, 2, '0') + ':' + m(i2, 2, '0');
|
|
56
|
+
},
|
|
57
|
+
m: function t2(e2, n2) {
|
|
58
|
+
if (e2.date() < n2.date()) return -t2(n2, e2);
|
|
59
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()),
|
|
60
|
+
i2 = e2.clone().add(r2, f),
|
|
61
|
+
s2 = n2 - i2 < 0,
|
|
62
|
+
u2 = e2.clone().add(r2 + (s2 ? -1 : 1), f);
|
|
63
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
64
|
+
},
|
|
65
|
+
a: function (t2) {
|
|
66
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
67
|
+
},
|
|
68
|
+
p: function (t2) {
|
|
69
|
+
return (
|
|
70
|
+
{ M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h }[t2] ||
|
|
71
|
+
String(t2 || '')
|
|
72
|
+
.toLowerCase()
|
|
73
|
+
.replace(/s$/, '')
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
u: function (t2) {
|
|
77
|
+
return void 0 === t2;
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
g = 'en',
|
|
81
|
+
D = {};
|
|
82
|
+
D[g] = M;
|
|
83
|
+
var p = function (t2) {
|
|
84
|
+
return t2 instanceof _;
|
|
85
|
+
},
|
|
86
|
+
S = function t2(e2, n2, r2) {
|
|
87
|
+
var i2;
|
|
88
|
+
if (!e2) return g;
|
|
89
|
+
if ('string' == typeof e2) {
|
|
90
|
+
var s2 = e2.toLowerCase();
|
|
91
|
+
D[s2] && (i2 = s2), n2 && ((D[s2] = n2), (i2 = s2));
|
|
92
|
+
var u2 = e2.split('-');
|
|
93
|
+
if (!i2 && u2.length > 1) return t2(u2[0]);
|
|
94
|
+
} else {
|
|
95
|
+
var a2 = e2.name;
|
|
96
|
+
(D[a2] = e2), (i2 = a2);
|
|
97
|
+
}
|
|
98
|
+
return !r2 && i2 && (g = i2), i2 || (!r2 && g);
|
|
99
|
+
},
|
|
100
|
+
w = function (t2, e2) {
|
|
101
|
+
if (p(t2)) return t2.clone();
|
|
102
|
+
var n2 = 'object' == typeof e2 ? e2 : {};
|
|
103
|
+
return (n2.date = t2), (n2.args = arguments), new _(n2);
|
|
104
|
+
},
|
|
105
|
+
O = v;
|
|
106
|
+
(O.l = S),
|
|
107
|
+
(O.i = p),
|
|
108
|
+
(O.w = function (t2, e2) {
|
|
109
|
+
return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
110
|
+
});
|
|
111
|
+
var _ = (function () {
|
|
112
|
+
function M2(t2) {
|
|
113
|
+
(this.$L = S(t2.locale, null, true)), this.parse(t2);
|
|
114
|
+
}
|
|
115
|
+
var m2 = M2.prototype;
|
|
116
|
+
return (
|
|
117
|
+
(m2.parse = function (t2) {
|
|
118
|
+
(this.$d = (function (t3) {
|
|
119
|
+
var e2 = t3.date,
|
|
120
|
+
n2 = t3.utc;
|
|
121
|
+
if (null === e2) return new Date(NaN);
|
|
122
|
+
if (O.u(e2)) return new Date();
|
|
123
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
124
|
+
if ('string' == typeof e2 && !/Z$/i.test(e2)) {
|
|
125
|
+
var r2 = e2.match($);
|
|
126
|
+
if (r2) {
|
|
127
|
+
var i2 = r2[2] - 1 || 0,
|
|
128
|
+
s2 = (r2[7] || '0').substring(0, 3);
|
|
129
|
+
return n2
|
|
130
|
+
? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2))
|
|
131
|
+
: new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return new Date(e2);
|
|
135
|
+
})(t2)),
|
|
136
|
+
(this.$x = t2.x || {}),
|
|
137
|
+
this.init();
|
|
138
|
+
}),
|
|
139
|
+
(m2.init = function () {
|
|
140
|
+
var t2 = this.$d;
|
|
141
|
+
(this.$y = t2.getFullYear()),
|
|
142
|
+
(this.$M = t2.getMonth()),
|
|
143
|
+
(this.$D = t2.getDate()),
|
|
144
|
+
(this.$W = t2.getDay()),
|
|
145
|
+
(this.$H = t2.getHours()),
|
|
146
|
+
(this.$m = t2.getMinutes()),
|
|
147
|
+
(this.$s = t2.getSeconds()),
|
|
148
|
+
(this.$ms = t2.getMilliseconds());
|
|
149
|
+
}),
|
|
150
|
+
(m2.$utils = function () {
|
|
151
|
+
return O;
|
|
152
|
+
}),
|
|
153
|
+
(m2.isValid = function () {
|
|
154
|
+
return !(this.$d.toString() === l);
|
|
155
|
+
}),
|
|
156
|
+
(m2.isSame = function (t2, e2) {
|
|
157
|
+
var n2 = w(t2);
|
|
158
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
159
|
+
}),
|
|
160
|
+
(m2.isAfter = function (t2, e2) {
|
|
161
|
+
return w(t2) < this.startOf(e2);
|
|
162
|
+
}),
|
|
163
|
+
(m2.isBefore = function (t2, e2) {
|
|
164
|
+
return this.endOf(e2) < w(t2);
|
|
165
|
+
}),
|
|
166
|
+
(m2.$g = function (t2, e2, n2) {
|
|
167
|
+
return O.u(t2) ? this[e2] : this.set(n2, t2);
|
|
168
|
+
}),
|
|
169
|
+
(m2.unix = function () {
|
|
170
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
171
|
+
}),
|
|
172
|
+
(m2.valueOf = function () {
|
|
173
|
+
return this.$d.getTime();
|
|
174
|
+
}),
|
|
175
|
+
(m2.startOf = function (t2, e2) {
|
|
176
|
+
var n2 = this,
|
|
177
|
+
r2 = !!O.u(e2) || e2,
|
|
178
|
+
h2 = O.p(t2),
|
|
179
|
+
l2 = function (t3, e3) {
|
|
180
|
+
var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
181
|
+
return r2 ? i2 : i2.endOf(a);
|
|
182
|
+
},
|
|
183
|
+
$2 = function (t3, e3) {
|
|
184
|
+
return O.w(n2.toDate()[t3].apply(n2.toDate('s'), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
185
|
+
},
|
|
186
|
+
y2 = this.$W,
|
|
187
|
+
M3 = this.$M,
|
|
188
|
+
m3 = this.$D,
|
|
189
|
+
v2 = 'set' + (this.$u ? 'UTC' : '');
|
|
190
|
+
switch (h2) {
|
|
191
|
+
case c:
|
|
192
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
193
|
+
case f:
|
|
194
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
195
|
+
case o:
|
|
196
|
+
var g2 = this.$locale().weekStart || 0,
|
|
197
|
+
D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
198
|
+
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
199
|
+
case a:
|
|
200
|
+
case d:
|
|
201
|
+
return $2(v2 + 'Hours', 0);
|
|
202
|
+
case u:
|
|
203
|
+
return $2(v2 + 'Minutes', 1);
|
|
204
|
+
case s:
|
|
205
|
+
return $2(v2 + 'Seconds', 2);
|
|
206
|
+
case i:
|
|
207
|
+
return $2(v2 + 'Milliseconds', 3);
|
|
208
|
+
default:
|
|
209
|
+
return this.clone();
|
|
210
|
+
}
|
|
211
|
+
}),
|
|
212
|
+
(m2.endOf = function (t2) {
|
|
213
|
+
return this.startOf(t2, false);
|
|
214
|
+
}),
|
|
215
|
+
(m2.$set = function (t2, e2) {
|
|
216
|
+
var n2,
|
|
217
|
+
o2 = O.p(t2),
|
|
218
|
+
h2 = 'set' + (this.$u ? 'UTC' : ''),
|
|
219
|
+
l2 = ((n2 = {}),
|
|
220
|
+
(n2[a] = h2 + 'Date'),
|
|
221
|
+
(n2[d] = h2 + 'Date'),
|
|
222
|
+
(n2[f] = h2 + 'Month'),
|
|
223
|
+
(n2[c] = h2 + 'FullYear'),
|
|
224
|
+
(n2[u] = h2 + 'Hours'),
|
|
225
|
+
(n2[s] = h2 + 'Minutes'),
|
|
226
|
+
(n2[i] = h2 + 'Seconds'),
|
|
227
|
+
(n2[r] = h2 + 'Milliseconds'),
|
|
228
|
+
n2)[o2],
|
|
229
|
+
$2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
230
|
+
if (o2 === f || o2 === c) {
|
|
231
|
+
var y2 = this.clone().set(d, 1);
|
|
232
|
+
y2.$d[l2]($2), y2.init(), (this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d);
|
|
233
|
+
} else l2 && this.$d[l2]($2);
|
|
234
|
+
return this.init(), this;
|
|
235
|
+
}),
|
|
236
|
+
(m2.set = function (t2, e2) {
|
|
237
|
+
return this.clone().$set(t2, e2);
|
|
238
|
+
}),
|
|
239
|
+
(m2.get = function (t2) {
|
|
240
|
+
return this[O.p(t2)]();
|
|
241
|
+
}),
|
|
242
|
+
(m2.add = function (r2, h2) {
|
|
243
|
+
var d2,
|
|
244
|
+
l2 = this;
|
|
245
|
+
r2 = Number(r2);
|
|
246
|
+
var $2 = O.p(h2),
|
|
247
|
+
y2 = function (t2) {
|
|
248
|
+
var e2 = w(l2);
|
|
249
|
+
return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
250
|
+
};
|
|
251
|
+
if ($2 === f) return this.set(f, this.$M + r2);
|
|
252
|
+
if ($2 === c) return this.set(c, this.$y + r2);
|
|
253
|
+
if ($2 === a) return y2(1);
|
|
254
|
+
if ($2 === o) return y2(7);
|
|
255
|
+
var M3 = ((d2 = {}), (d2[s] = e), (d2[u] = n), (d2[i] = t), d2)[$2] || 1,
|
|
256
|
+
m3 = this.$d.getTime() + r2 * M3;
|
|
257
|
+
return O.w(m3, this);
|
|
258
|
+
}),
|
|
259
|
+
(m2.subtract = function (t2, e2) {
|
|
260
|
+
return this.add(-1 * t2, e2);
|
|
261
|
+
}),
|
|
262
|
+
(m2.format = function (t2) {
|
|
263
|
+
var e2 = this,
|
|
264
|
+
n2 = this.$locale();
|
|
265
|
+
if (!this.isValid()) return n2.invalidDate || l;
|
|
266
|
+
var r2 = t2 || 'YYYY-MM-DDTHH:mm:ssZ',
|
|
267
|
+
i2 = O.z(this),
|
|
268
|
+
s2 = this.$H,
|
|
269
|
+
u2 = this.$m,
|
|
270
|
+
a2 = this.$M,
|
|
271
|
+
o2 = n2.weekdays,
|
|
272
|
+
f2 = n2.months,
|
|
273
|
+
h2 = function (t3, n3, i3, s3) {
|
|
274
|
+
return (t3 && (t3[n3] || t3(e2, r2))) || i3[n3].slice(0, s3);
|
|
275
|
+
},
|
|
276
|
+
c2 = function (t3) {
|
|
277
|
+
return O.s(s2 % 12 || 12, t3, '0');
|
|
278
|
+
},
|
|
279
|
+
d2 =
|
|
280
|
+
n2.meridiem ||
|
|
281
|
+
function (t3, e3, n3) {
|
|
282
|
+
var r3 = t3 < 12 ? 'AM' : 'PM';
|
|
283
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
284
|
+
},
|
|
285
|
+
$2 = {
|
|
286
|
+
YY: String(this.$y).slice(-2),
|
|
287
|
+
YYYY: this.$y,
|
|
288
|
+
M: a2 + 1,
|
|
289
|
+
MM: O.s(a2 + 1, 2, '0'),
|
|
290
|
+
MMM: h2(n2.monthsShort, a2, f2, 3),
|
|
291
|
+
MMMM: h2(f2, a2),
|
|
292
|
+
D: this.$D,
|
|
293
|
+
DD: O.s(this.$D, 2, '0'),
|
|
294
|
+
d: String(this.$W),
|
|
295
|
+
dd: h2(n2.weekdaysMin, this.$W, o2, 2),
|
|
296
|
+
ddd: h2(n2.weekdaysShort, this.$W, o2, 3),
|
|
297
|
+
dddd: o2[this.$W],
|
|
298
|
+
H: String(s2),
|
|
299
|
+
HH: O.s(s2, 2, '0'),
|
|
300
|
+
h: c2(1),
|
|
301
|
+
hh: c2(2),
|
|
302
|
+
a: d2(s2, u2, true),
|
|
303
|
+
A: d2(s2, u2, false),
|
|
304
|
+
m: String(u2),
|
|
305
|
+
mm: O.s(u2, 2, '0'),
|
|
306
|
+
s: String(this.$s),
|
|
307
|
+
ss: O.s(this.$s, 2, '0'),
|
|
308
|
+
SSS: O.s(this.$ms, 3, '0'),
|
|
309
|
+
Z: i2
|
|
310
|
+
};
|
|
311
|
+
return r2.replace(y, function (t3, e3) {
|
|
312
|
+
return e3 || $2[t3] || i2.replace(':', '');
|
|
313
|
+
});
|
|
314
|
+
}),
|
|
315
|
+
(m2.utcOffset = function () {
|
|
316
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
317
|
+
}),
|
|
318
|
+
(m2.diff = function (r2, d2, l2) {
|
|
319
|
+
var $2,
|
|
320
|
+
y2 = O.p(d2),
|
|
321
|
+
M3 = w(r2),
|
|
322
|
+
m3 = (M3.utcOffset() - this.utcOffset()) * e,
|
|
323
|
+
v2 = this - M3,
|
|
324
|
+
g2 = O.m(this, M3);
|
|
325
|
+
return (
|
|
326
|
+
(g2 =
|
|
327
|
+
(($2 = {}),
|
|
328
|
+
($2[c] = g2 / 12),
|
|
329
|
+
($2[f] = g2),
|
|
330
|
+
($2[h] = g2 / 3),
|
|
331
|
+
($2[o] = (v2 - m3) / 6048e5),
|
|
332
|
+
($2[a] = (v2 - m3) / 864e5),
|
|
333
|
+
($2[u] = v2 / n),
|
|
334
|
+
($2[s] = v2 / e),
|
|
335
|
+
($2[i] = v2 / t),
|
|
336
|
+
$2)[y2] || v2),
|
|
337
|
+
l2 ? g2 : O.a(g2)
|
|
338
|
+
);
|
|
339
|
+
}),
|
|
340
|
+
(m2.daysInMonth = function () {
|
|
341
|
+
return this.endOf(f).$D;
|
|
342
|
+
}),
|
|
343
|
+
(m2.$locale = function () {
|
|
344
|
+
return D[this.$L];
|
|
345
|
+
}),
|
|
346
|
+
(m2.locale = function (t2, e2) {
|
|
347
|
+
if (!t2) return this.$L;
|
|
348
|
+
var n2 = this.clone(),
|
|
349
|
+
r2 = S(t2, e2, true);
|
|
350
|
+
return r2 && (n2.$L = r2), n2;
|
|
351
|
+
}),
|
|
352
|
+
(m2.clone = function () {
|
|
353
|
+
return O.w(this.$d, this);
|
|
354
|
+
}),
|
|
355
|
+
(m2.toDate = function () {
|
|
356
|
+
return new Date(this.valueOf());
|
|
357
|
+
}),
|
|
358
|
+
(m2.toJSON = function () {
|
|
359
|
+
return this.isValid() ? this.toISOString() : null;
|
|
360
|
+
}),
|
|
361
|
+
(m2.toISOString = function () {
|
|
362
|
+
return this.$d.toISOString();
|
|
363
|
+
}),
|
|
364
|
+
(m2.toString = function () {
|
|
365
|
+
return this.$d.toUTCString();
|
|
366
|
+
}),
|
|
367
|
+
M2
|
|
368
|
+
);
|
|
369
|
+
})(),
|
|
370
|
+
T = _.prototype;
|
|
371
|
+
return (
|
|
372
|
+
(w.prototype = T),
|
|
373
|
+
[
|
|
374
|
+
['$ms', r],
|
|
375
|
+
['$s', i],
|
|
376
|
+
['$m', s],
|
|
377
|
+
['$H', u],
|
|
378
|
+
['$W', a],
|
|
379
|
+
['$M', f],
|
|
380
|
+
['$y', c],
|
|
381
|
+
['$D', d]
|
|
382
|
+
].forEach(function (t2) {
|
|
383
|
+
T[t2[1]] = function (e2) {
|
|
384
|
+
return this.$g(e2, t2[0], t2[1]);
|
|
385
|
+
};
|
|
386
|
+
}),
|
|
387
|
+
(w.extend = function (t2, e2) {
|
|
388
|
+
return t2.$i || (t2(e2, _, w), (t2.$i = true)), w;
|
|
389
|
+
}),
|
|
390
|
+
(w.locale = S),
|
|
391
|
+
(w.isDayjs = p),
|
|
392
|
+
(w.unix = function (t2) {
|
|
393
|
+
return w(1e3 * t2);
|
|
394
|
+
}),
|
|
395
|
+
(w.en = D[g]),
|
|
396
|
+
(w.Ls = D),
|
|
397
|
+
(w.p = {}),
|
|
398
|
+
w
|
|
399
|
+
);
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
export default require_dayjs_min();
|
|
404
|
+
//# sourceMappingURL=dayjs.js.map
|
|
@@ -4,121 +4,117 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { queryParams, deepMerge, page } from '../function/index';
|
|
6
6
|
class Router {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
constructor() {
|
|
8
|
+
// 原始属性定义
|
|
9
|
+
this.config = {
|
|
10
|
+
type: 'navigateTo',
|
|
11
|
+
url: '',
|
|
12
|
+
delta: 1, // navigateBack页面后退时,回退的层数
|
|
13
|
+
params: {}, // 传递的参数
|
|
14
|
+
animationType: 'pop-in', // 窗口动画,只在APP有效
|
|
15
|
+
animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
|
|
16
|
+
intercept: false // 是否需要拦截
|
|
17
|
+
};
|
|
18
|
+
// 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
|
|
19
|
+
// 这里在构造函数中进行this绑定
|
|
20
|
+
this.route = this.route.bind(this);
|
|
21
|
+
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
// 判断url前面是否有"/",如果没有则加上,否则无法跳转
|
|
24
|
+
addRootPath(url) {
|
|
25
|
+
return url[0] === '/' ? url : `/${url}`;
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
// 整合路由参数
|
|
29
|
+
mixinParam(url, params) {
|
|
30
|
+
url = url && this.addRootPath(url);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
// 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
|
|
42
|
-
query = queryParams(params)
|
|
43
|
-
return url += query
|
|
32
|
+
// 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
|
|
33
|
+
// 如果有url中有get参数,转换后无需带上"?"
|
|
34
|
+
let query = '';
|
|
35
|
+
if (/.*\/.*\?.*=.*/.test(url)) {
|
|
36
|
+
// object对象转为get类型的参数
|
|
37
|
+
query = queryParams(params, false);
|
|
38
|
+
// 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
|
|
39
|
+
return (url += `&${query}`);
|
|
44
40
|
}
|
|
41
|
+
// 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
|
|
42
|
+
query = queryParams(params);
|
|
43
|
+
return (url += query);
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
// 对外的方法名称
|
|
47
|
+
async route(options = {}, params = {}) {
|
|
48
|
+
// 合并用户的配置和内部的默认配置
|
|
49
|
+
let mergeConfig = {};
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
if (typeof options === 'string') {
|
|
52
|
+
// 如果options为字符串,则为route(url, params)的形式
|
|
53
|
+
mergeConfig.url = this.mixinParam(options, params);
|
|
54
|
+
mergeConfig.type = 'navigateTo';
|
|
55
|
+
} else {
|
|
56
|
+
mergeConfig = deepMerge(this.config, options);
|
|
57
|
+
// 否则正常使用mergeConfig中的url和params进行拼接
|
|
58
|
+
mergeConfig.url = this.mixinParam(options.url, options.params);
|
|
59
|
+
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
// 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题
|
|
62
|
+
if (mergeConfig.url === page()) return;
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
if (params.intercept) {
|
|
65
|
+
this.config.intercept = params.intercept;
|
|
66
|
+
}
|
|
67
|
+
// params参数也带给拦截器
|
|
68
|
+
mergeConfig.params = params;
|
|
69
|
+
// 合并内外部参数
|
|
70
|
+
mergeConfig = deepMerge(this.config, mergeConfig);
|
|
71
|
+
// 判断用户是否定义了拦截器
|
|
72
|
+
// if (typeof routeIntercept === 'function') {
|
|
73
|
+
if (typeof uni.$u.routeIntercept === 'function') {
|
|
74
|
+
// 定一个promise,根据用户执行resolve(true)或者resolve(false)来决定是否进行路由跳转
|
|
75
|
+
const isNext = await new Promise((resolve, reject) => {
|
|
76
|
+
// routeIntercept(mergeConfig, resolve);
|
|
77
|
+
uni.$u.routeIntercept(mergeConfig, resolve);
|
|
78
|
+
});
|
|
79
|
+
// 如果isNext为true,则执行路由跳转
|
|
80
|
+
isNext && this.openPage(mergeConfig);
|
|
81
|
+
} else {
|
|
82
|
+
this.openPage(mergeConfig);
|
|
82
83
|
}
|
|
84
|
+
}
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
if (config.type == 'navigateBack' || config.type == 'back') {
|
|
117
|
-
uni.navigateBack({
|
|
118
|
-
delta
|
|
119
|
-
})
|
|
120
|
-
}
|
|
86
|
+
// 执行路由跳转
|
|
87
|
+
openPage(config) {
|
|
88
|
+
// 解构参数
|
|
89
|
+
const { url, type, delta, animationType, animationDuration } = config;
|
|
90
|
+
if (config.type == 'navigateTo' || config.type == 'to') {
|
|
91
|
+
uni.navigateTo({
|
|
92
|
+
url,
|
|
93
|
+
animationType,
|
|
94
|
+
animationDuration
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (config.type == 'redirectTo' || config.type == 'redirect') {
|
|
98
|
+
uni.redirectTo({
|
|
99
|
+
url
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (config.type == 'switchTab' || config.type == 'tab') {
|
|
103
|
+
uni.switchTab({
|
|
104
|
+
url
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (config.type == 'reLaunch' || config.type == 'launch') {
|
|
108
|
+
uni.reLaunch({
|
|
109
|
+
url
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (config.type == 'navigateBack' || config.type == 'back') {
|
|
113
|
+
uni.navigateBack({
|
|
114
|
+
delta
|
|
115
|
+
});
|
|
121
116
|
}
|
|
117
|
+
}
|
|
122
118
|
}
|
|
123
119
|
|
|
124
|
-
export default
|
|
120
|
+
export default new Router().route;
|