@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,148 @@
|
|
|
1
|
+
// const defaultOption = {
|
|
2
|
+
// duration: 300,
|
|
3
|
+
// timingFunction: 'linear',
|
|
4
|
+
// delay: 0,
|
|
5
|
+
// transformOrigin: '50% 50% 0'
|
|
6
|
+
// }
|
|
7
|
+
// #ifdef APP-NVUE
|
|
8
|
+
const nvueAnimation = uni.requireNativePlugin('animation');
|
|
9
|
+
// #endif
|
|
10
|
+
class MPAnimation {
|
|
11
|
+
constructor(options, _this) {
|
|
12
|
+
this.options = options;
|
|
13
|
+
// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
|
|
14
|
+
this.animation = uni.createAnimation({
|
|
15
|
+
...options
|
|
16
|
+
});
|
|
17
|
+
this.currentStepAnimates = {};
|
|
18
|
+
this.next = 0;
|
|
19
|
+
this.$ = _this;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_nvuePushAnimates(type, args) {
|
|
23
|
+
let aniObj = this.currentStepAnimates[this.next];
|
|
24
|
+
let styles = {};
|
|
25
|
+
if (!aniObj) {
|
|
26
|
+
styles = {
|
|
27
|
+
styles: {},
|
|
28
|
+
config: {}
|
|
29
|
+
};
|
|
30
|
+
} else {
|
|
31
|
+
styles = aniObj;
|
|
32
|
+
}
|
|
33
|
+
if (animateTypes1.includes(type)) {
|
|
34
|
+
if (!styles.styles.transform) {
|
|
35
|
+
styles.styles.transform = '';
|
|
36
|
+
}
|
|
37
|
+
let unit = '';
|
|
38
|
+
if (type === 'rotate') {
|
|
39
|
+
unit = 'deg';
|
|
40
|
+
}
|
|
41
|
+
styles.styles.transform += `${type}(${args + unit}) `;
|
|
42
|
+
} else {
|
|
43
|
+
styles.styles[type] = `${args}`;
|
|
44
|
+
}
|
|
45
|
+
this.currentStepAnimates[this.next] = styles;
|
|
46
|
+
}
|
|
47
|
+
_animateRun(styles = {}, config = {}) {
|
|
48
|
+
let ref = this.$.$refs['ani'].ref;
|
|
49
|
+
if (!ref) return;
|
|
50
|
+
return new Promise((resolve, reject) => {
|
|
51
|
+
nvueAnimation.transition(
|
|
52
|
+
ref,
|
|
53
|
+
{
|
|
54
|
+
styles,
|
|
55
|
+
...config
|
|
56
|
+
},
|
|
57
|
+
(res) => {
|
|
58
|
+
resolve();
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
_nvueNextAnimate(animates, step = 0, fn) {
|
|
65
|
+
let obj = animates[step];
|
|
66
|
+
if (obj) {
|
|
67
|
+
let { styles, config } = obj;
|
|
68
|
+
this._animateRun(styles, config).then(() => {
|
|
69
|
+
step += 1;
|
|
70
|
+
this._nvueNextAnimate(animates, step, fn);
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
this.currentStepAnimates = {};
|
|
74
|
+
typeof fn === 'function' && fn();
|
|
75
|
+
this.isEnd = true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
step(config = {}) {
|
|
80
|
+
// #ifndef APP-NVUE
|
|
81
|
+
this.animation.step(config);
|
|
82
|
+
// #endif
|
|
83
|
+
// #ifdef APP-NVUE
|
|
84
|
+
this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config);
|
|
85
|
+
this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin;
|
|
86
|
+
this.next++;
|
|
87
|
+
// #endif
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
run(fn) {
|
|
92
|
+
// #ifndef APP-NVUE
|
|
93
|
+
this.$.animationData = this.animation.export();
|
|
94
|
+
this.$.timer = setTimeout(() => {
|
|
95
|
+
typeof fn === 'function' && fn();
|
|
96
|
+
}, this.$.durationTime);
|
|
97
|
+
// #endif
|
|
98
|
+
// #ifdef APP-NVUE
|
|
99
|
+
this.isEnd = false;
|
|
100
|
+
let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref;
|
|
101
|
+
if (!ref) return;
|
|
102
|
+
this._nvueNextAnimate(this.currentStepAnimates, 0, fn);
|
|
103
|
+
this.next = 0;
|
|
104
|
+
// #endif
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const animateTypes1 = [
|
|
109
|
+
'matrix',
|
|
110
|
+
'matrix3d',
|
|
111
|
+
'rotate',
|
|
112
|
+
'rotate3d',
|
|
113
|
+
'rotateX',
|
|
114
|
+
'rotateY',
|
|
115
|
+
'rotateZ',
|
|
116
|
+
'scale',
|
|
117
|
+
'scale3d',
|
|
118
|
+
'scaleX',
|
|
119
|
+
'scaleY',
|
|
120
|
+
'scaleZ',
|
|
121
|
+
'skew',
|
|
122
|
+
'skewX',
|
|
123
|
+
'skewY',
|
|
124
|
+
'translate',
|
|
125
|
+
'translate3d',
|
|
126
|
+
'translateX',
|
|
127
|
+
'translateY',
|
|
128
|
+
'translateZ'
|
|
129
|
+
];
|
|
130
|
+
const animateTypes2 = ['opacity', 'backgroundColor'];
|
|
131
|
+
const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
|
|
132
|
+
animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
|
|
133
|
+
MPAnimation.prototype[type] = function (...args) {
|
|
134
|
+
// #ifndef APP-NVUE
|
|
135
|
+
this.animation[type](...args);
|
|
136
|
+
// #endif
|
|
137
|
+
// #ifdef APP-NVUE
|
|
138
|
+
this._nvuePushAnimates(type, args);
|
|
139
|
+
// #endif
|
|
140
|
+
return this;
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export function createAnimation(option, _this) {
|
|
145
|
+
if (!_this) return;
|
|
146
|
+
clearTimeout(_this.timer);
|
|
147
|
+
return new MPAnimation(option, _this);
|
|
148
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 是否展示组件
|
|
4
|
+
show: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: false
|
|
7
|
+
},
|
|
8
|
+
// 使用的动画模式
|
|
9
|
+
mode: {
|
|
10
|
+
type: [Array, String, null],
|
|
11
|
+
default() {
|
|
12
|
+
return 'fade';
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
// 动画的执行时间,单位ms
|
|
16
|
+
duration: {
|
|
17
|
+
type: [String, Number],
|
|
18
|
+
default: 300
|
|
19
|
+
},
|
|
20
|
+
// 使用的动画过渡函数
|
|
21
|
+
timingFunction: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'ease-out'
|
|
24
|
+
},
|
|
25
|
+
// 自定义class属性
|
|
26
|
+
customClass: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ''
|
|
29
|
+
},
|
|
30
|
+
...uni.$w?.props?.transition
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- #ifndef APP-NVUE -->
|
|
3
|
+
<view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</view>
|
|
6
|
+
<!-- #endif -->
|
|
7
|
+
<!-- #ifdef APP-NVUE -->
|
|
8
|
+
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick">
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</view>
|
|
11
|
+
<!-- #endif -->
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { createAnimation } from './createAnimation';
|
|
16
|
+
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
17
|
+
import { mixin } from '../../libs/mixin/mixin';
|
|
18
|
+
/**
|
|
19
|
+
* transition 过渡动画
|
|
20
|
+
* @description 过渡动画组件
|
|
21
|
+
* @tutorial https://ijry.github.io/uview-plus/components/transition.html
|
|
22
|
+
* @property {Boolean} show = [false|true] 控制组件显示或隐藏
|
|
23
|
+
* @property {Array|String} mode = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
|
|
24
|
+
* @value fade 渐隐渐出过渡
|
|
25
|
+
* @value slide-top 由上至下过渡
|
|
26
|
+
* @value slide-right 由右至左过渡
|
|
27
|
+
* @value slide-bottom 由下至上过渡
|
|
28
|
+
* @value slide-left 由左至右过渡
|
|
29
|
+
* @value zoom-in 由小到大过渡
|
|
30
|
+
* @value zoom-out 由大到小过渡
|
|
31
|
+
* @property {Number} duration 过渡动画持续时间,单位ms(默认300)
|
|
32
|
+
* @property {String} timingFunction 使用的动画过渡函数 (默认 'ease-out' )
|
|
33
|
+
* @property {Object} customStyle 自定义样式
|
|
34
|
+
* @property {String} customClass 自定义类名
|
|
35
|
+
* @event {Function} click 点击组件触发
|
|
36
|
+
* @event {Function} change 过渡动画结束时触发
|
|
37
|
+
*/
|
|
38
|
+
export default {
|
|
39
|
+
name: 'u-transition',
|
|
40
|
+
mixins: [mpMixin, mixin],
|
|
41
|
+
emits: ['click', 'change'],
|
|
42
|
+
props: {
|
|
43
|
+
// 是否展示组件
|
|
44
|
+
show: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
// 使用的动画模式
|
|
49
|
+
mode: {
|
|
50
|
+
type: [Array, String, null],
|
|
51
|
+
default() {
|
|
52
|
+
return 'fade';
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
// 动画的执行时间,单位ms
|
|
56
|
+
duration: {
|
|
57
|
+
type: [String, Number],
|
|
58
|
+
default: 300
|
|
59
|
+
},
|
|
60
|
+
// 使用的动画过渡函数
|
|
61
|
+
timingFunction: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'ease-out'
|
|
64
|
+
},
|
|
65
|
+
customClass: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ''
|
|
68
|
+
},
|
|
69
|
+
// nvue模式下 是否直接显示,在u-list等cell下面使用就需要设置
|
|
70
|
+
cellChild: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
isShow: false,
|
|
78
|
+
transform: '',
|
|
79
|
+
opacity: 1,
|
|
80
|
+
animationData: {},
|
|
81
|
+
durationTime: 300,
|
|
82
|
+
config: {}
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
watch: {
|
|
86
|
+
show: {
|
|
87
|
+
handler(newVal) {
|
|
88
|
+
if (newVal) {
|
|
89
|
+
this.open();
|
|
90
|
+
} else {
|
|
91
|
+
// 避免上来就执行 close,导致动画错乱
|
|
92
|
+
if (this.isShow) {
|
|
93
|
+
this.close();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
immediate: true
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
computed: {
|
|
101
|
+
// 生成样式数据
|
|
102
|
+
stylesObject() {
|
|
103
|
+
let styles = {
|
|
104
|
+
...this.customStyle,
|
|
105
|
+
'transition-duration': this.duration / 1000 + 's'
|
|
106
|
+
};
|
|
107
|
+
let transform = '';
|
|
108
|
+
for (let i in styles) {
|
|
109
|
+
let line = this.toLine(i);
|
|
110
|
+
transform += line + ':' + styles[i] + ';';
|
|
111
|
+
}
|
|
112
|
+
return transform;
|
|
113
|
+
},
|
|
114
|
+
// 初始化动画条件
|
|
115
|
+
transformStyles() {
|
|
116
|
+
return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
created() {
|
|
120
|
+
// 动画默认配置
|
|
121
|
+
this.config = {
|
|
122
|
+
duration: this.duration,
|
|
123
|
+
timingFunction: 'ease',
|
|
124
|
+
transformOrigin: '50% 50%',
|
|
125
|
+
delay: 0
|
|
126
|
+
};
|
|
127
|
+
this.durationTime = this.duration;
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
/**
|
|
131
|
+
* ref 触发 初始化动画
|
|
132
|
+
*/
|
|
133
|
+
init(obj = {}) {
|
|
134
|
+
if (obj.duration) {
|
|
135
|
+
this.durationTime = obj.duration;
|
|
136
|
+
}
|
|
137
|
+
this.animation = createAnimation(Object.assign(this.config, obj), this);
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* 点击组件触发回调
|
|
141
|
+
*/
|
|
142
|
+
onClick() {
|
|
143
|
+
this.$emit('click', {
|
|
144
|
+
detail: this.isShow
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* ref 触发 动画分组
|
|
149
|
+
* @param {Object} obj
|
|
150
|
+
*/
|
|
151
|
+
step(obj, config = {}) {
|
|
152
|
+
if (!this.animation) return;
|
|
153
|
+
for (let i in obj) {
|
|
154
|
+
try {
|
|
155
|
+
if (typeof obj[i] === 'object') {
|
|
156
|
+
this.animation[i](...obj[i]);
|
|
157
|
+
} else {
|
|
158
|
+
this.animation[i](obj[i]);
|
|
159
|
+
}
|
|
160
|
+
} catch (e) {
|
|
161
|
+
console.error(`方法 ${i} 不存在`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
this.animation.step(config);
|
|
165
|
+
return this;
|
|
166
|
+
},
|
|
167
|
+
/**
|
|
168
|
+
* ref 触发 执行动画
|
|
169
|
+
*/
|
|
170
|
+
run(fn) {
|
|
171
|
+
if (!this.animation) return;
|
|
172
|
+
this.animation.run(fn);
|
|
173
|
+
},
|
|
174
|
+
// 开始过度动画
|
|
175
|
+
open() {
|
|
176
|
+
clearTimeout(this.timer);
|
|
177
|
+
this.transform = '';
|
|
178
|
+
this.isShow = true;
|
|
179
|
+
let { opacity, transform } = this.styleInit(false);
|
|
180
|
+
if (typeof opacity !== 'undefined') {
|
|
181
|
+
this.opacity = opacity;
|
|
182
|
+
}
|
|
183
|
+
this.transform = transform;
|
|
184
|
+
// 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
|
|
185
|
+
this.$nextTick(() => {
|
|
186
|
+
// TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
|
|
187
|
+
this.timer = setTimeout(() => {
|
|
188
|
+
this.animation = createAnimation(this.config, this);
|
|
189
|
+
this.tranfromInit(false).step();
|
|
190
|
+
this.animation.run();
|
|
191
|
+
this.$emit('change', {
|
|
192
|
+
detail: this.isShow
|
|
193
|
+
});
|
|
194
|
+
}, 20);
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
// 关闭过度动画
|
|
198
|
+
close(type) {
|
|
199
|
+
if (!this.animation) return;
|
|
200
|
+
this.tranfromInit(true)
|
|
201
|
+
.step()
|
|
202
|
+
.run(() => {
|
|
203
|
+
this.isShow = false;
|
|
204
|
+
this.animationData = null;
|
|
205
|
+
this.animation = null;
|
|
206
|
+
let { opacity, transform } = this.styleInit(false);
|
|
207
|
+
this.opacity = opacity || 1;
|
|
208
|
+
this.transform = transform;
|
|
209
|
+
this.$emit('change', {
|
|
210
|
+
detail: this.isShow
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
},
|
|
214
|
+
// 处理动画开始前的默认样式
|
|
215
|
+
styleInit(type) {
|
|
216
|
+
let styles = {
|
|
217
|
+
transform: ''
|
|
218
|
+
};
|
|
219
|
+
let buildStyle = (type, mode) => {
|
|
220
|
+
if (mode === 'fade') {
|
|
221
|
+
styles.opacity = this.animationType(type)[mode];
|
|
222
|
+
} else {
|
|
223
|
+
styles.transform += this.animationType(type)[mode] + ' ';
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
if (typeof this.mode === 'string') {
|
|
227
|
+
buildStyle(type, this.mode);
|
|
228
|
+
} else {
|
|
229
|
+
this.mode.forEach((mode) => {
|
|
230
|
+
buildStyle(type, mode);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return styles;
|
|
234
|
+
},
|
|
235
|
+
// 处理内置组合动画
|
|
236
|
+
tranfromInit(type) {
|
|
237
|
+
let buildTranfrom = (type, mode) => {
|
|
238
|
+
let aniNum = null;
|
|
239
|
+
if (mode === 'fade') {
|
|
240
|
+
aniNum = type ? 0 : 1;
|
|
241
|
+
} else {
|
|
242
|
+
aniNum = type ? '-100%' : '0';
|
|
243
|
+
if (mode === 'zoom-in') {
|
|
244
|
+
aniNum = type ? 0.8 : 1;
|
|
245
|
+
}
|
|
246
|
+
if (mode === 'zoom-out') {
|
|
247
|
+
aniNum = type ? 1.2 : 1;
|
|
248
|
+
}
|
|
249
|
+
if (mode === 'slide-right') {
|
|
250
|
+
aniNum = type ? '100%' : '0';
|
|
251
|
+
}
|
|
252
|
+
if (mode === 'slide-bottom') {
|
|
253
|
+
aniNum = type ? '100%' : '0';
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
this.animation[this.animationMode()[mode]](aniNum);
|
|
258
|
+
};
|
|
259
|
+
if (typeof this.mode === 'string') {
|
|
260
|
+
buildTranfrom(type, this.mode);
|
|
261
|
+
} else {
|
|
262
|
+
this.mode.forEach((mode) => {
|
|
263
|
+
buildTranfrom(type, mode);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return this.animation;
|
|
268
|
+
},
|
|
269
|
+
animationType(type) {
|
|
270
|
+
return {
|
|
271
|
+
fade: type ? 1 : 0,
|
|
272
|
+
'slide-top': `translateY(${type ? '0' : '-100%'})`,
|
|
273
|
+
'slide-right': `translateX(${type ? '0' : '100%'})`,
|
|
274
|
+
'slide-bottom': `translateY(${type ? '0' : '100%'})`,
|
|
275
|
+
'slide-left': `translateX(${type ? '0' : '-100%'})`,
|
|
276
|
+
'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
|
|
277
|
+
'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
// 内置动画类型与实际动画对应字典
|
|
281
|
+
animationMode() {
|
|
282
|
+
return {
|
|
283
|
+
fade: 'opacity',
|
|
284
|
+
'slide-top': 'translateY',
|
|
285
|
+
'slide-right': 'translateX',
|
|
286
|
+
'slide-bottom': 'translateY',
|
|
287
|
+
'slide-left': 'translateX',
|
|
288
|
+
'zoom-in': 'scale',
|
|
289
|
+
'zoom-out': 'scale'
|
|
290
|
+
};
|
|
291
|
+
},
|
|
292
|
+
// 驼峰转中横线
|
|
293
|
+
toLine(name) {
|
|
294
|
+
return name.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
</script>
|
|
299
|
+
|
|
300
|
+
<style></style>
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
}
|
|
38
38
|
]"
|
|
39
39
|
/>
|
|
40
|
-
<
|
|
40
|
+
<up-icon
|
|
41
41
|
v-else
|
|
42
42
|
color="#80CBF9"
|
|
43
43
|
size="26"
|
|
44
44
|
:name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'file-text'"
|
|
45
|
-
></
|
|
45
|
+
></up-icon>
|
|
46
46
|
<view v-if="item.status === 'success'" class="u-upload__wrap__play" @tap="onClickPreview(item, index)">
|
|
47
47
|
<slot name="playIcon"></slot>
|
|
48
48
|
<up-icon v-if="!$slots['playIcon']" class="u-upload__wrap__play__icon" name="play-right" size="22px"></up-icon>
|
|
@@ -59,19 +59,19 @@
|
|
|
59
59
|
}
|
|
60
60
|
]"
|
|
61
61
|
>
|
|
62
|
-
<
|
|
62
|
+
<up-icon
|
|
63
63
|
color="#80CBF9"
|
|
64
64
|
size="26"
|
|
65
65
|
:name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'folder'"
|
|
66
|
-
></
|
|
66
|
+
></up-icon>
|
|
67
67
|
<text class="u-upload__wrap__preview__other__text">
|
|
68
68
|
{{ item.isVideo || (item.type && item.type === 'video') ? item.name || '视频' : item.name || '文件' }}
|
|
69
69
|
</text>
|
|
70
70
|
</view>
|
|
71
71
|
<view class="u-upload__status" v-if="item.status === 'uploading' || item.status === 'failed'">
|
|
72
72
|
<view class="u-upload__status__icon">
|
|
73
|
-
<
|
|
74
|
-
<
|
|
73
|
+
<up-icon v-if="item.status === 'failed'" name="close-circle" color="#ffffff" size="25" />
|
|
74
|
+
<up-loading-icon size="22" mode="circle" v-else />
|
|
75
75
|
</view>
|
|
76
76
|
<text v-if="item.message" class="u-upload__status__message">{{ item.message }}</text>
|
|
77
77
|
<up-gap class="u-upload__progress" height="3px" :style="{ width: item.progress + '%' }"></up-gap>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
@tap.stop="deleteItem(index)"
|
|
83
83
|
>
|
|
84
84
|
<view class="u-upload__deletable__icon">
|
|
85
|
-
<
|
|
85
|
+
<up-icon name="close" color="#ffffff" size="10"></up-icon>
|
|
86
86
|
</view>
|
|
87
87
|
</view>
|
|
88
88
|
<slot name="success">
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<!-- #endif -->
|
|
93
93
|
<!-- #ifndef APP-NVUE -->
|
|
94
94
|
<view class="u-upload__success__icon">
|
|
95
|
-
<
|
|
95
|
+
<up-icon name="checkmark" color="#ffffff" size="12"></up-icon>
|
|
96
96
|
</view>
|
|
97
97
|
<!-- #endif -->
|
|
98
98
|
</view>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
]"
|
|
123
123
|
>
|
|
124
|
-
<
|
|
124
|
+
<up-icon :name="uploadIcon" size="26" :color="uploadIconColor"></up-icon>
|
|
125
125
|
<text v-if="uploadText" class="u-upload__button__text">{{ uploadText }}</text>
|
|
126
126
|
</view>
|
|
127
127
|
</template>
|
|
@@ -185,7 +185,7 @@ import test from '../../libs/function/test';
|
|
|
185
185
|
* @event {Function} oversize 文件超出大小限制
|
|
186
186
|
* @event {Function} clickPreview 点击预览图片
|
|
187
187
|
* @event {Function} delete 删除图片
|
|
188
|
-
* @example <
|
|
188
|
+
* @example <up-upload :action="action" :fileList="fileList" ></up-upload>
|
|
189
189
|
*/
|
|
190
190
|
export default {
|
|
191
191
|
name: 'u-upload',
|