@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
|
@@ -1,214 +1,214 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
2
|
+
'uicon-level': '\ue693',
|
|
3
|
+
'uicon-column-line': '\ue68e',
|
|
4
|
+
'uicon-checkbox-mark': '\ue807',
|
|
5
|
+
'uicon-folder': '\ue7f5',
|
|
6
|
+
'uicon-movie': '\ue7f6',
|
|
7
|
+
'uicon-star-fill': '\ue669',
|
|
8
|
+
'uicon-star': '\ue65f',
|
|
9
|
+
'uicon-phone-fill': '\ue64f',
|
|
10
|
+
'uicon-phone': '\ue622',
|
|
11
|
+
'uicon-apple-fill': '\ue881',
|
|
12
|
+
'uicon-chrome-circle-fill': '\ue885',
|
|
13
|
+
'uicon-backspace': '\ue67b',
|
|
14
|
+
'uicon-attach': '\ue632',
|
|
15
|
+
'uicon-cut': '\ue948',
|
|
16
|
+
'uicon-empty-car': '\ue602',
|
|
17
|
+
'uicon-empty-coupon': '\ue682',
|
|
18
|
+
'uicon-empty-address': '\ue646',
|
|
19
|
+
'uicon-empty-favor': '\ue67c',
|
|
20
|
+
'uicon-empty-permission': '\ue686',
|
|
21
|
+
'uicon-empty-news': '\ue687',
|
|
22
|
+
'uicon-empty-search': '\ue664',
|
|
23
|
+
'uicon-github-circle-fill': '\ue887',
|
|
24
|
+
'uicon-rmb': '\ue608',
|
|
25
|
+
'uicon-person-delete-fill': '\ue66a',
|
|
26
|
+
'uicon-reload': '\ue788',
|
|
27
|
+
'uicon-order': '\ue68f',
|
|
28
|
+
'uicon-server-man': '\ue6bc',
|
|
29
|
+
'uicon-search': '\ue62a',
|
|
30
|
+
'uicon-fingerprint': '\ue955',
|
|
31
|
+
'uicon-more-dot-fill': '\ue630',
|
|
32
|
+
'uicon-scan': '\ue662',
|
|
33
|
+
'uicon-share-square': '\ue60b',
|
|
34
|
+
'uicon-map': '\ue61d',
|
|
35
|
+
'uicon-map-fill': '\ue64e',
|
|
36
|
+
'uicon-tags': '\ue629',
|
|
37
|
+
'uicon-tags-fill': '\ue651',
|
|
38
|
+
'uicon-bookmark-fill': '\ue63b',
|
|
39
|
+
'uicon-bookmark': '\ue60a',
|
|
40
|
+
'uicon-eye': '\ue613',
|
|
41
|
+
'uicon-eye-fill': '\ue641',
|
|
42
|
+
'uicon-mic': '\ue64a',
|
|
43
|
+
'uicon-mic-off': '\ue649',
|
|
44
|
+
'uicon-calendar': '\ue66e',
|
|
45
|
+
'uicon-calendar-fill': '\ue634',
|
|
46
|
+
'uicon-trash': '\ue623',
|
|
47
|
+
'uicon-trash-fill': '\ue658',
|
|
48
|
+
'uicon-play-left': '\ue66d',
|
|
49
|
+
'uicon-play-right': '\ue610',
|
|
50
|
+
'uicon-minus': '\ue618',
|
|
51
|
+
'uicon-plus': '\ue62d',
|
|
52
|
+
'uicon-info': '\ue653',
|
|
53
|
+
'uicon-info-circle': '\ue7d2',
|
|
54
|
+
'uicon-info-circle-fill': '\ue64b',
|
|
55
|
+
'uicon-question': '\ue715',
|
|
56
|
+
'uicon-error': '\ue6d3',
|
|
57
|
+
'uicon-close': '\ue685',
|
|
58
|
+
'uicon-checkmark': '\ue6a8',
|
|
59
|
+
'uicon-android-circle-fill': '\ue67e',
|
|
60
|
+
'uicon-android-fill': '\ue67d',
|
|
61
|
+
'uicon-ie': '\ue87b',
|
|
62
|
+
'uicon-IE-circle-fill': '\ue889',
|
|
63
|
+
'uicon-google': '\ue87a',
|
|
64
|
+
'uicon-google-circle-fill': '\ue88a',
|
|
65
|
+
'uicon-setting-fill': '\ue872',
|
|
66
|
+
'uicon-setting': '\ue61f',
|
|
67
|
+
'uicon-minus-square-fill': '\ue855',
|
|
68
|
+
'uicon-plus-square-fill': '\ue856',
|
|
69
|
+
'uicon-heart': '\ue7df',
|
|
70
|
+
'uicon-heart-fill': '\ue851',
|
|
71
|
+
'uicon-camera': '\ue7d7',
|
|
72
|
+
'uicon-camera-fill': '\ue870',
|
|
73
|
+
'uicon-more-circle': '\ue63e',
|
|
74
|
+
'uicon-more-circle-fill': '\ue645',
|
|
75
|
+
'uicon-chat': '\ue620',
|
|
76
|
+
'uicon-chat-fill': '\ue61e',
|
|
77
|
+
'uicon-bag-fill': '\ue617',
|
|
78
|
+
'uicon-bag': '\ue619',
|
|
79
|
+
'uicon-error-circle-fill': '\ue62c',
|
|
80
|
+
'uicon-error-circle': '\ue624',
|
|
81
|
+
'uicon-close-circle': '\ue63f',
|
|
82
|
+
'uicon-close-circle-fill': '\ue637',
|
|
83
|
+
'uicon-checkmark-circle': '\ue63d',
|
|
84
|
+
'uicon-checkmark-circle-fill': '\ue635',
|
|
85
|
+
'uicon-question-circle-fill': '\ue666',
|
|
86
|
+
'uicon-question-circle': '\ue625',
|
|
87
|
+
'uicon-share': '\ue631',
|
|
88
|
+
'uicon-share-fill': '\ue65e',
|
|
89
|
+
'uicon-shopping-cart': '\ue621',
|
|
90
|
+
'uicon-shopping-cart-fill': '\ue65d',
|
|
91
|
+
'uicon-bell': '\ue609',
|
|
92
|
+
'uicon-bell-fill': '\ue640',
|
|
93
|
+
'uicon-list': '\ue650',
|
|
94
|
+
'uicon-list-dot': '\ue616',
|
|
95
|
+
'uicon-zhihu': '\ue6ba',
|
|
96
|
+
'uicon-zhihu-circle-fill': '\ue709',
|
|
97
|
+
'uicon-zhifubao': '\ue6b9',
|
|
98
|
+
'uicon-zhifubao-circle-fill': '\ue6b8',
|
|
99
|
+
'uicon-weixin-circle-fill': '\ue6b1',
|
|
100
|
+
'uicon-weixin-fill': '\ue6b2',
|
|
101
|
+
'uicon-twitter-circle-fill': '\ue6ab',
|
|
102
|
+
'uicon-twitter': '\ue6aa',
|
|
103
|
+
'uicon-taobao-circle-fill': '\ue6a7',
|
|
104
|
+
'uicon-taobao': '\ue6a6',
|
|
105
|
+
'uicon-weibo-circle-fill': '\ue6a5',
|
|
106
|
+
'uicon-weibo': '\ue6a4',
|
|
107
|
+
'uicon-qq-fill': '\ue6a1',
|
|
108
|
+
'uicon-qq-circle-fill': '\ue6a0',
|
|
109
|
+
'uicon-moments-circel-fill': '\ue69a',
|
|
110
|
+
'uicon-moments': '\ue69b',
|
|
111
|
+
'uicon-qzone': '\ue695',
|
|
112
|
+
'uicon-qzone-circle-fill': '\ue696',
|
|
113
|
+
'uicon-baidu-circle-fill': '\ue680',
|
|
114
|
+
'uicon-baidu': '\ue681',
|
|
115
|
+
'uicon-facebook-circle-fill': '\ue68a',
|
|
116
|
+
'uicon-facebook': '\ue689',
|
|
117
|
+
'uicon-car': '\ue60c',
|
|
118
|
+
'uicon-car-fill': '\ue636',
|
|
119
|
+
'uicon-warning-fill': '\ue64d',
|
|
120
|
+
'uicon-warning': '\ue694',
|
|
121
|
+
'uicon-clock-fill': '\ue638',
|
|
122
|
+
'uicon-clock': '\ue60f',
|
|
123
|
+
'uicon-edit-pen': '\ue612',
|
|
124
|
+
'uicon-edit-pen-fill': '\ue66b',
|
|
125
|
+
'uicon-email': '\ue611',
|
|
126
|
+
'uicon-email-fill': '\ue642',
|
|
127
|
+
'uicon-minus-circle': '\ue61b',
|
|
128
|
+
'uicon-minus-circle-fill': '\ue652',
|
|
129
|
+
'uicon-plus-circle': '\ue62e',
|
|
130
|
+
'uicon-plus-circle-fill': '\ue661',
|
|
131
|
+
'uicon-file-text': '\ue663',
|
|
132
|
+
'uicon-file-text-fill': '\ue665',
|
|
133
|
+
'uicon-pushpin': '\ue7e3',
|
|
134
|
+
'uicon-pushpin-fill': '\ue86e',
|
|
135
|
+
'uicon-grid': '\ue673',
|
|
136
|
+
'uicon-grid-fill': '\ue678',
|
|
137
|
+
'uicon-play-circle': '\ue647',
|
|
138
|
+
'uicon-play-circle-fill': '\ue655',
|
|
139
|
+
'uicon-pause-circle-fill': '\ue654',
|
|
140
|
+
'uicon-pause': '\ue8fa',
|
|
141
|
+
'uicon-pause-circle': '\ue643',
|
|
142
|
+
'uicon-eye-off': '\ue648',
|
|
143
|
+
'uicon-eye-off-outline': '\ue62b',
|
|
144
|
+
'uicon-gift-fill': '\ue65c',
|
|
145
|
+
'uicon-gift': '\ue65b',
|
|
146
|
+
'uicon-rmb-circle-fill': '\ue657',
|
|
147
|
+
'uicon-rmb-circle': '\ue677',
|
|
148
|
+
'uicon-kefu-ermai': '\ue656',
|
|
149
|
+
'uicon-server-fill': '\ue751',
|
|
150
|
+
'uicon-coupon-fill': '\ue8c4',
|
|
151
|
+
'uicon-coupon': '\ue8ae',
|
|
152
|
+
'uicon-integral': '\ue704',
|
|
153
|
+
'uicon-integral-fill': '\ue703',
|
|
154
|
+
'uicon-home-fill': '\ue964',
|
|
155
|
+
'uicon-home': '\ue965',
|
|
156
|
+
'uicon-hourglass-half-fill': '\ue966',
|
|
157
|
+
'uicon-hourglass': '\ue967',
|
|
158
|
+
'uicon-account': '\ue628',
|
|
159
|
+
'uicon-plus-people-fill': '\ue626',
|
|
160
|
+
'uicon-minus-people-fill': '\ue615',
|
|
161
|
+
'uicon-account-fill': '\ue614',
|
|
162
|
+
'uicon-thumb-down-fill': '\ue726',
|
|
163
|
+
'uicon-thumb-down': '\ue727',
|
|
164
|
+
'uicon-thumb-up': '\ue733',
|
|
165
|
+
'uicon-thumb-up-fill': '\ue72f',
|
|
166
|
+
'uicon-lock-fill': '\ue979',
|
|
167
|
+
'uicon-lock-open': '\ue973',
|
|
168
|
+
'uicon-lock-opened-fill': '\ue974',
|
|
169
|
+
'uicon-lock': '\ue97a',
|
|
170
|
+
'uicon-red-packet-fill': '\ue690',
|
|
171
|
+
'uicon-photo-fill': '\ue98b',
|
|
172
|
+
'uicon-photo': '\ue98d',
|
|
173
|
+
'uicon-volume-off-fill': '\ue659',
|
|
174
|
+
'uicon-volume-off': '\ue644',
|
|
175
|
+
'uicon-volume-fill': '\ue670',
|
|
176
|
+
'uicon-volume': '\ue633',
|
|
177
|
+
'uicon-red-packet': '\ue691',
|
|
178
|
+
'uicon-download': '\ue63c',
|
|
179
|
+
'uicon-arrow-up-fill': '\ue6b0',
|
|
180
|
+
'uicon-arrow-down-fill': '\ue600',
|
|
181
|
+
'uicon-play-left-fill': '\ue675',
|
|
182
|
+
'uicon-play-right-fill': '\ue676',
|
|
183
|
+
'uicon-rewind-left-fill': '\ue679',
|
|
184
|
+
'uicon-rewind-right-fill': '\ue67a',
|
|
185
|
+
'uicon-arrow-downward': '\ue604',
|
|
186
|
+
'uicon-arrow-leftward': '\ue601',
|
|
187
|
+
'uicon-arrow-rightward': '\ue603',
|
|
188
|
+
'uicon-arrow-upward': '\ue607',
|
|
189
|
+
'uicon-arrow-down': '\ue60d',
|
|
190
|
+
'uicon-arrow-right': '\ue605',
|
|
191
|
+
'uicon-arrow-left': '\ue60e',
|
|
192
|
+
'uicon-arrow-up': '\ue606',
|
|
193
|
+
'uicon-skip-back-left': '\ue674',
|
|
194
|
+
'uicon-skip-forward-right': '\ue672',
|
|
195
|
+
'uicon-rewind-right': '\ue66f',
|
|
196
|
+
'uicon-rewind-left': '\ue671',
|
|
197
|
+
'uicon-arrow-right-double': '\ue68d',
|
|
198
|
+
'uicon-arrow-left-double': '\ue68c',
|
|
199
|
+
'uicon-wifi-off': '\ue668',
|
|
200
|
+
'uicon-wifi': '\ue667',
|
|
201
|
+
'uicon-empty-data': '\ue62f',
|
|
202
|
+
'uicon-empty-history': '\ue684',
|
|
203
|
+
'uicon-empty-list': '\ue68b',
|
|
204
|
+
'uicon-empty-page': '\ue627',
|
|
205
|
+
'uicon-empty-order': '\ue639',
|
|
206
|
+
'uicon-man': '\ue697',
|
|
207
|
+
'uicon-woman': '\ue69c',
|
|
208
|
+
'uicon-man-add': '\ue61c',
|
|
209
|
+
'uicon-man-add-fill': '\ue64c',
|
|
210
|
+
'uicon-man-delete': '\ue61a',
|
|
211
|
+
'uicon-man-delete-fill': '\ue66a',
|
|
212
|
+
'uicon-zh': '\ue70a',
|
|
213
|
+
'uicon-en': '\ue692'
|
|
214
|
+
};
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
/* #endif */
|
|
27
27
|
/* #ifdef MP-QQ || MP-TOUTIAO || MP-BAIDU || MP-KUAISHOU || MP-XHS */
|
|
28
28
|
@font-face {
|
|
29
|
-
font-family:
|
|
30
|
-
src: url(
|
|
29
|
+
font-family: 'uicon-iconfont';
|
|
30
|
+
src: url('https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf') format('truetype');
|
|
31
31
|
}
|
|
32
32
|
/* #endif */
|
|
33
33
|
.u-icon {
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
/* #ifndef APP-NVUE */
|
|
87
87
|
line-height: 1;
|
|
88
88
|
/* #endif */
|
|
89
|
-
}
|
|
89
|
+
}
|
|
@@ -53,7 +53,7 @@ import { addUnit, addStyle } from '../../libs/function/index';
|
|
|
53
53
|
* @property {Object} customStyle icon的样式,对象形式
|
|
54
54
|
* @event {Function} click 点击图标时触发
|
|
55
55
|
* @event {Function} touchstart 事件触摸时触发
|
|
56
|
-
* @example <
|
|
56
|
+
* @example <up-icon name="photo" color="#2979ff" size="28"></up-icon>
|
|
57
57
|
*/
|
|
58
58
|
export default {
|
|
59
59
|
name: 'u-icon',
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="u-icon" @tap="clickHandler" :class="['wu-icon--' + labelPos]">
|
|
3
|
+
<!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 -->
|
|
4
|
+
<text v-if="label !== '' && (labelPos == 'left' || labelPos == 'top')" class="u-icon__label" :style="labelStyle">
|
|
5
|
+
{{ label }}
|
|
6
|
+
</text>
|
|
7
|
+
<image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode" :style="[imgStyle, addStyle(customStyle)]"></image>
|
|
8
|
+
<text v-else class="u-icon__icon" :class="uClasses" :style="[iconStyle, addStyle(customStyle)]" :hover-class="hoverClass">
|
|
9
|
+
{{ icon }}
|
|
10
|
+
</text>
|
|
11
|
+
<!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 -->
|
|
12
|
+
<text v-if="label !== '' && (labelPos == 'right' || labelPos == 'bottom')" class="u-icon__label" :style="labelStyle">
|
|
13
|
+
{{ label }}
|
|
14
|
+
</text>
|
|
15
|
+
</view>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import { mpMixin } from '../../libs/mixin/mpMixin.js';
|
|
19
|
+
import { mixin } from '../../libs/mixin/mixin.js';
|
|
20
|
+
// #ifdef APP-NVUE
|
|
21
|
+
// nvue通过weex的dom模块引入字体,相关文档地址如下:
|
|
22
|
+
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
|
|
23
|
+
import iconUrl from './wuicons.ttf';
|
|
24
|
+
const domModule = weex.requireModule('dom');
|
|
25
|
+
domModule.addRule('fontFace', {
|
|
26
|
+
fontFamily: 'wuicon-iconfont',
|
|
27
|
+
src: "url('" + iconUrl + "')"
|
|
28
|
+
});
|
|
29
|
+
// #endif
|
|
30
|
+
// 引入图标名称,已经对应的unicode
|
|
31
|
+
import icons from './icons';
|
|
32
|
+
import props from './props.js';
|
|
33
|
+
/**
|
|
34
|
+
* icon 图标
|
|
35
|
+
* @description 基于字体的图标集,包含了大多数常见场景的图标。
|
|
36
|
+
* @tutorial https://wuui.cn/zh-CN/components/icon.html
|
|
37
|
+
* @property {String} name 图标名称,若带有 `/` 或遵循 `base64` 图片格式,会被认为是图片图标,则文字图标相关属性会失效。
|
|
38
|
+
* @property {String} color 图标颜色,可接受主题色 (默认 color: #606266 )
|
|
39
|
+
* @property {String | Number} size 图标字体大小,单位px/rpx (默认 '16px' )
|
|
40
|
+
* @property {Boolean} bold 是否显示粗体 (默认 false )
|
|
41
|
+
* @property {String | Number} index 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
|
42
|
+
* @property {String} hoverClass 图标按下去的样式类,用法同uni的view组件的hoverClass参数,详情见官网
|
|
43
|
+
* @property {String} customPrefix 自定义扩展前缀,方便用户扩展自己的图标库 (默认 'wuicon' )
|
|
44
|
+
* @property {String | Number} label 图标右侧的label文字
|
|
45
|
+
* @property {String} labelPos label相对于图标的位置(默认 'right' )
|
|
46
|
+
* @value top 上方
|
|
47
|
+
* @value bottom 下方
|
|
48
|
+
* @value left 左侧
|
|
49
|
+
* @value right 右侧
|
|
50
|
+
* @property {String | Number} labelSize label字体大小,单位px (默认 '15px' )
|
|
51
|
+
* @property {String} labelColor 图标右侧的label文字颜色 ( 默认 color['wu-content-color'] )
|
|
52
|
+
* @property {String | Number} space label与图标的距离,单位px (默认 '3px' )
|
|
53
|
+
* @property {String} imgMode image组件的mode,详见:[image](https://uniapp.dcloud.net.cn/component/image.html#image)
|
|
54
|
+
* @property {String | Number} width 显示图片小图标时的宽度
|
|
55
|
+
* @property {String | Number} height 显示图片小图标时的高度
|
|
56
|
+
* @property {String | Number} top 图标在垂直方向上的定位 用于解决某些情况下,让图标垂直居中的用途 (默认 0 )
|
|
57
|
+
* @property {Boolean} stop 是否阻止事件传播 (默认 false )
|
|
58
|
+
* @property {Object} customStyle icon的样式,对象形式
|
|
59
|
+
* @event {Function} click 点击图标时触发
|
|
60
|
+
* @event {Function} touchstart 事件触摸时触发
|
|
61
|
+
* @example <up-icon name="photo" color="#2979ff" size="28"></up-icon>
|
|
62
|
+
*/
|
|
63
|
+
export default {
|
|
64
|
+
name: 'wu-icon',
|
|
65
|
+
emits: ['click'],
|
|
66
|
+
mixins: [mpMixin, mixin, props],
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
colorType: ['primary', 'success', 'info', 'error', 'warning']
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
uClasses() {
|
|
74
|
+
let classes = [];
|
|
75
|
+
classes.push(this.customPrefix);
|
|
76
|
+
classes.push(this.customPrefix + '-' + this.name);
|
|
77
|
+
// 主题色,通过类配置
|
|
78
|
+
if (this.color && this.colorType.includes(this.color)) classes.push('wu-icon__icon--' + this.color);
|
|
79
|
+
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
|
|
80
|
+
// 故需将其拆成一个字符串的形式,通过空格隔开各个类名
|
|
81
|
+
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
|
|
82
|
+
classes = classes.join(' ');
|
|
83
|
+
//#endif
|
|
84
|
+
return classes;
|
|
85
|
+
},
|
|
86
|
+
iconStyle() {
|
|
87
|
+
let style = {};
|
|
88
|
+
style = {
|
|
89
|
+
fontSize: this.$w.addUnit(this.size),
|
|
90
|
+
lineHeight: this.$w.addUnit(this.size),
|
|
91
|
+
fontWeight: this.bold ? 'bold' : 'normal',
|
|
92
|
+
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
|
|
93
|
+
top: this.$w.addUnit(this.top)
|
|
94
|
+
};
|
|
95
|
+
// 非主题色值时,才当作颜色值
|
|
96
|
+
if (this.color && !this.colorType.includes(this.color)) style.color = this.color;
|
|
97
|
+
return style;
|
|
98
|
+
},
|
|
99
|
+
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
|
|
100
|
+
isImg() {
|
|
101
|
+
const isBase64 = this.name.indexOf('data:') > -1 && this.name.indexOf('base64') > -1;
|
|
102
|
+
return this.name.indexOf('/') !== -1 || isBase64;
|
|
103
|
+
},
|
|
104
|
+
imgStyle() {
|
|
105
|
+
let style = {};
|
|
106
|
+
// 如果设置width和height属性,则优先使用,否则使用size属性
|
|
107
|
+
style.width = this.width ? this.$w.addUnit(this.width) : this.$w.addUnit(this.size);
|
|
108
|
+
style.height = this.height ? this.$w.addUnit(this.height) : this.$w.addUnit(this.size);
|
|
109
|
+
return style;
|
|
110
|
+
},
|
|
111
|
+
// 通过图标名,查找对应的图标
|
|
112
|
+
icon() {
|
|
113
|
+
// 如果内置的图标中找不到对应的图标,就直接返回name值,因为用户可能传入的是unicode代码
|
|
114
|
+
const code = icons['wuicon-' + this.name];
|
|
115
|
+
if (['wuicon'].indexOf(this.customPrefix) > -1) {
|
|
116
|
+
return code ? unescape(`%u${code}`) : this.name;
|
|
117
|
+
} else {
|
|
118
|
+
// #ifndef APP-NVUE
|
|
119
|
+
return '';
|
|
120
|
+
// #endif
|
|
121
|
+
// #ifdef APP-NVUE
|
|
122
|
+
return unescape(`%u${this.name}`);
|
|
123
|
+
// #endif
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
// label样式
|
|
127
|
+
labelStyle() {
|
|
128
|
+
let style = {
|
|
129
|
+
color: this.labelColor,
|
|
130
|
+
fontSize: this.$w.addUnit(this.labelSize),
|
|
131
|
+
marginLeft: this.labelPos == 'right' ? this.$w.addUnit(this.space) : 0,
|
|
132
|
+
marginTop: this.labelPos == 'bottom' ? this.$w.addUnit(this.space) : 0,
|
|
133
|
+
marginRight: this.labelPos == 'left' ? this.$w.addUnit(this.space) : 0,
|
|
134
|
+
marginBottom: this.labelPos == 'top' ? this.$w.addUnit(this.space) : 0
|
|
135
|
+
};
|
|
136
|
+
return style;
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
methods: {
|
|
140
|
+
clickHandler(e) {
|
|
141
|
+
this.$emit('click', this.index);
|
|
142
|
+
// 是否阻止事件冒泡
|
|
143
|
+
this.stop && this.preventEvent(e);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<style scoped></style>
|