@gmcb/uv-ui 0.2.26
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/CHANGELOG.md +295 -0
- package/LICENSE +21 -0
- package/README.md +164 -0
- package/components/uv-action-sheet/props.js +50 -0
- package/components/uv-action-sheet/uv-action-sheet.vue +280 -0
- package/components/uv-album/uv-album.vue +312 -0
- package/components/uv-alert/props.js +45 -0
- package/components/uv-alert/uv-alert.vue +246 -0
- package/components/uv-avatar/props.js +85 -0
- package/components/uv-avatar/uv-avatar.vue +182 -0
- package/components/uv-avatar-group/props.js +53 -0
- package/components/uv-avatar-group/uv-avatar-group.vue +106 -0
- package/components/uv-back-top/props.js +58 -0
- package/components/uv-back-top/uv-back-top.vue +116 -0
- package/components/uv-badge/props.js +73 -0
- package/components/uv-badge/uv-badge.vue +176 -0
- package/components/uv-button/nvue.scss +46 -0
- package/components/uv-button/props.js +163 -0
- package/components/uv-button/uv-button.vue +529 -0
- package/components/uv-button/vue.scss +93 -0
- package/components/uv-calendar/calendar.js +546 -0
- package/components/uv-calendar/header.vue +104 -0
- package/components/uv-calendar/month.vue +616 -0
- package/components/uv-calendar/props.js +145 -0
- package/components/uv-calendar/uv-calendar.vue +390 -0
- package/components/uv-calendars/calendar-body.vue +376 -0
- package/components/uv-calendars/calendar-item.vue +248 -0
- package/components/uv-calendars/calendar.js +546 -0
- package/components/uv-calendars/i18n/en.json +12 -0
- package/components/uv-calendars/i18n/index.js +8 -0
- package/components/uv-calendars/i18n/zh-Hans.json +12 -0
- package/components/uv-calendars/i18n/zh-Hant.json +12 -0
- package/components/uv-calendars/util.js +435 -0
- package/components/uv-calendars/uv-calendars.vue +452 -0
- package/components/uv-cell/props.js +116 -0
- package/components/uv-cell/uv-cell.vue +209 -0
- package/components/uv-cell-group/props.js +15 -0
- package/components/uv-cell-group/uv-cell-group.vue +63 -0
- package/components/uv-checkbox/props.js +70 -0
- package/components/uv-checkbox/uv-checkbox.vue +371 -0
- package/components/uv-checkbox-group/props.js +84 -0
- package/components/uv-checkbox-group/uv-checkbox-group.vue +119 -0
- package/components/uv-code/props.js +35 -0
- package/components/uv-code/uv-code.vue +136 -0
- package/components/uv-code-input/props.js +83 -0
- package/components/uv-code-input/uv-code-input.vue +272 -0
- package/components/uv-col/props.js +30 -0
- package/components/uv-col/uv-col.vue +165 -0
- package/components/uv-collapse/props.js +20 -0
- package/components/uv-collapse/uv-collapse.vue +86 -0
- package/components/uv-collapse-item/props.js +60 -0
- package/components/uv-collapse-item/uv-collapse-item.vue +228 -0
- package/components/uv-column-notice/props.js +61 -0
- package/components/uv-column-notice/uv-column-notice.vue +176 -0
- package/components/uv-count-down/props.js +25 -0
- package/components/uv-count-down/utils.js +62 -0
- package/components/uv-count-down/uv-count-down.vue +169 -0
- package/components/uv-count-to/props.js +60 -0
- package/components/uv-count-to/uv-count-to.vue +187 -0
- package/components/uv-datetime-picker/props.js +130 -0
- package/components/uv-datetime-picker/uv-datetime-picker.vue +355 -0
- package/components/uv-divider/props.js +45 -0
- package/components/uv-divider/uv-divider.vue +113 -0
- package/components/uv-drop-down/uv-drop-down.vue +135 -0
- package/components/uv-drop-down-item/uv-drop-down-item.vue +169 -0
- package/components/uv-drop-down-popup/uv-drop-down-popup.vue +242 -0
- package/components/uv-empty/props.js +60 -0
- package/components/uv-empty/uv-empty.vue +126 -0
- package/components/uv-form/props.js +46 -0
- package/components/uv-form/uv-form.vue +209 -0
- package/components/uv-form/valid.js +1343 -0
- package/components/uv-form-item/props.js +49 -0
- package/components/uv-form-item/uv-form-item.vue +226 -0
- package/components/uv-gap/props.js +25 -0
- package/components/uv-gap/uv-gap.vue +36 -0
- package/components/uv-grid/props.js +20 -0
- package/components/uv-grid/uv-grid.vue +100 -0
- package/components/uv-grid-item/props.js +15 -0
- package/components/uv-grid-item/uv-grid-item.vue +223 -0
- package/components/uv-icon/icons.js +160 -0
- package/components/uv-icon/props.js +90 -0
- package/components/uv-icon/uv-icon.vue +226 -0
- package/components/uv-icon/uvicons.ttf +0 -0
- package/components/uv-image/props.js +100 -0
- package/components/uv-image/uv-image.vue +296 -0
- package/components/uv-index-anchor/props.js +30 -0
- package/components/uv-index-anchor/uv-index-anchor.vue +98 -0
- package/components/uv-index-item/uv-index-item.vue +87 -0
- package/components/uv-index-list/props.js +30 -0
- package/components/uv-index-list/uv-index-list.vue +461 -0
- package/components/uv-input/props.js +175 -0
- package/components/uv-input/uv-input.vue +348 -0
- package/components/uv-keyboard/props.js +95 -0
- package/components/uv-keyboard/uv-keyboard.vue +180 -0
- package/components/uv-keyboard-car/props.js +24 -0
- package/components/uv-keyboard-car/uv-keyboard-car.vue +347 -0
- package/components/uv-keyboard-number/props.js +19 -0
- package/components/uv-keyboard-number/uv-keyboard-number.vue +201 -0
- package/components/uv-line/props.js +34 -0
- package/components/uv-line/uv-line.vue +60 -0
- package/components/uv-line-progress/props.js +29 -0
- package/components/uv-line-progress/uv-line-progress.vue +146 -0
- package/components/uv-link/props.js +40 -0
- package/components/uv-link/uv-link.vue +83 -0
- package/components/uv-list/uv-list.vue +147 -0
- package/components/uv-list-item/uv-list-item.vue +535 -0
- package/components/uv-load-more/props.js +95 -0
- package/components/uv-load-more/uv-load-more.vue +152 -0
- package/components/uv-loading-icon/props.js +67 -0
- package/components/uv-loading-icon/uv-loading-icon.vue +347 -0
- package/components/uv-loading-page/props.js +55 -0
- package/components/uv-loading-page/uv-loading-page.vue +96 -0
- package/components/uv-modal/props.js +90 -0
- package/components/uv-modal/uv-modal.vue +245 -0
- package/components/uv-navbar/props.js +89 -0
- package/components/uv-navbar/uv-navbar.vue +245 -0
- package/components/uv-no-network/props.js +20 -0
- package/components/uv-no-network/uv-no-network.vue +222 -0
- package/components/uv-notice-bar/props.js +76 -0
- package/components/uv-notice-bar/uv-notice-bar.vue +110 -0
- package/components/uv-notify/props.js +45 -0
- package/components/uv-notify/uv-notify.vue +220 -0
- package/components/uv-number-box/props.js +118 -0
- package/components/uv-number-box/uv-number-box.vue +397 -0
- package/components/uv-overlay/props.js +25 -0
- package/components/uv-overlay/uv-overlay.vue +85 -0
- package/components/uv-parse/node/node.vue +576 -0
- package/components/uv-parse/parser.js +1335 -0
- package/components/uv-parse/uv-parse.vue +498 -0
- package/components/uv-pick-color/colors.js +217 -0
- package/components/uv-pick-color/props.js +47 -0
- package/components/uv-pick-color/uv-pick-color.vue +551 -0
- package/components/uv-picker/props.js +95 -0
- package/components/uv-picker/uv-picker.vue +329 -0
- package/components/uv-popup/keypress.js +45 -0
- package/components/uv-popup/uv-popup.vue +537 -0
- package/components/uv-preview-video/uv-preview-video.vue +52 -0
- package/components/uv-qrcode/cache.js +1 -0
- package/components/uv-qrcode/gcanvas/bridge/bridge-weex.js +241 -0
- package/components/uv-qrcode/gcanvas/context-2d/FillStyleLinearGradient.js +18 -0
- package/components/uv-qrcode/gcanvas/context-2d/FillStylePattern.js +8 -0
- package/components/uv-qrcode/gcanvas/context-2d/FillStyleRadialGradient.js +17 -0
- package/components/uv-qrcode/gcanvas/context-2d/RenderingContext.js +666 -0
- package/components/uv-qrcode/gcanvas/context-webgl/ActiveInfo.js +11 -0
- package/components/uv-qrcode/gcanvas/context-webgl/Buffer.js +21 -0
- package/components/uv-qrcode/gcanvas/context-webgl/Framebuffer.js +21 -0
- package/components/uv-qrcode/gcanvas/context-webgl/GLenum.js +298 -0
- package/components/uv-qrcode/gcanvas/context-webgl/GLmethod.js +142 -0
- package/components/uv-qrcode/gcanvas/context-webgl/GLtype.js +23 -0
- package/components/uv-qrcode/gcanvas/context-webgl/Program.js +21 -0
- package/components/uv-qrcode/gcanvas/context-webgl/Renderbuffer.js +21 -0
- package/components/uv-qrcode/gcanvas/context-webgl/RenderingContext.js +1191 -0
- package/components/uv-qrcode/gcanvas/context-webgl/Shader.js +22 -0
- package/components/uv-qrcode/gcanvas/context-webgl/ShaderPrecisionFormat.js +11 -0
- package/components/uv-qrcode/gcanvas/context-webgl/Texture.js +22 -0
- package/components/uv-qrcode/gcanvas/context-webgl/UniformLocation.js +22 -0
- package/components/uv-qrcode/gcanvas/context-webgl/classUtils.js +3 -0
- package/components/uv-qrcode/gcanvas/env/canvas.js +74 -0
- package/components/uv-qrcode/gcanvas/env/image.js +96 -0
- package/components/uv-qrcode/gcanvas/env/tool.js +24 -0
- package/components/uv-qrcode/gcanvas/index.js +39 -0
- package/components/uv-qrcode/props.js +85 -0
- package/components/uv-qrcode/qrcode.js +34 -0
- package/components/uv-qrcode/queue.js +41 -0
- package/components/uv-qrcode/uv-qrcode.vue +1038 -0
- package/components/uv-radio/props.js +65 -0
- package/components/uv-radio/uv-radio.vue +349 -0
- package/components/uv-radio-group/props.js +89 -0
- package/components/uv-radio-group/uv-radio-group.vue +115 -0
- package/components/uv-rate/props.js +73 -0
- package/components/uv-rate/uv-rate.vue +274 -0
- package/components/uv-read-more/props.js +62 -0
- package/components/uv-read-more/uv-read-more.vue +162 -0
- package/components/uv-row/props.js +20 -0
- package/components/uv-row/uv-row.vue +95 -0
- package/components/uv-row-notice/props.js +40 -0
- package/components/uv-row-notice/uv-row-notice.vue +341 -0
- package/components/uv-safe-bottom/uv-safe-bottom.vue +67 -0
- package/components/uv-scroll-list/nvue.js +29 -0
- package/components/uv-scroll-list/props.js +35 -0
- package/components/uv-scroll-list/scrollWxs.wxs +51 -0
- package/components/uv-scroll-list/uv-scroll-list.vue +218 -0
- package/components/uv-search/props.js +127 -0
- package/components/uv-search/uv-search.vue +311 -0
- package/components/uv-skeleton/props.js +65 -0
- package/components/uv-skeleton/uv-skeleton.vue +250 -0
- package/components/uv-skeletons/uv-skeletons.vue +247 -0
- package/components/uv-slider/props.js +58 -0
- package/components/uv-slider/uv-slider.vue +58 -0
- package/components/uv-status-bar/props.js +8 -0
- package/components/uv-status-bar/uv-status-bar.vue +54 -0
- package/components/uv-steps/props.js +40 -0
- package/components/uv-steps/uv-steps.vue +83 -0
- package/components/uv-steps-item/props.js +25 -0
- package/components/uv-steps-item/uv-steps-item.vue +347 -0
- package/components/uv-sticky/props.js +41 -0
- package/components/uv-sticky/uv-sticky.vue +223 -0
- package/components/uv-subsection/props.js +54 -0
- package/components/uv-subsection/uv-subsection.vue +269 -0
- package/components/uv-swipe-action/props.js +10 -0
- package/components/uv-swipe-action/uv-swipe-action.vue +65 -0
- package/components/uv-swipe-action-item/index - backup.wxs +256 -0
- package/components/uv-swipe-action-item/index.wxs +225 -0
- package/components/uv-swipe-action-item/nvue - backup.js +264 -0
- package/components/uv-swipe-action-item/nvue.js +182 -0
- package/components/uv-swipe-action-item/props.js +40 -0
- package/components/uv-swipe-action-item/uv-swipe-action-item.vue +200 -0
- package/components/uv-swipe-action-item/wxs.js +15 -0
- package/components/uv-swiper/props.js +136 -0
- package/components/uv-swiper/uv-swiper.vue +263 -0
- package/components/uv-swiper-indicator/props.js +30 -0
- package/components/uv-swiper-indicator/uv-swiper-indicator.vue +112 -0
- package/components/uv-switch/props.js +58 -0
- package/components/uv-switch/uv-switch.vue +182 -0
- package/components/uv-tabbar/props.js +50 -0
- package/components/uv-tabbar/uv-tabbar.vue +146 -0
- package/components/uv-tabbar-item/props.js +40 -0
- package/components/uv-tabbar-item/uv-tabbar-item.vue +146 -0
- package/components/uv-tabs/props.js +71 -0
- package/components/uv-tabs/uv-tabs.vue +391 -0
- package/components/uv-tags/props.js +104 -0
- package/components/uv-tags/uv-tags.vue +379 -0
- package/components/uv-text/props.js +113 -0
- package/components/uv-text/uv-text.vue +218 -0
- package/components/uv-text/value.js +87 -0
- package/components/uv-textarea/props.js +138 -0
- package/components/uv-textarea/uv-textarea.vue +238 -0
- package/components/uv-toast/uv-toast.vue +292 -0
- package/components/uv-toolbar/props.js +40 -0
- package/components/uv-toolbar/uv-toolbar.vue +109 -0
- package/components/uv-tooltip/props.js +60 -0
- package/components/uv-tooltip/uv-tooltip.vue +372 -0
- package/components/uv-transition/createAnimation.js +131 -0
- package/components/uv-transition/props.js +31 -0
- package/components/uv-transition/uv-transition.vue +320 -0
- package/components/uv-upload/mixin.js +22 -0
- package/components/uv-upload/props.js +130 -0
- package/components/uv-upload/utils.js +151 -0
- package/components/uv-upload/uv-upload.vue +488 -0
- package/components/uv-vtabs/props.js +79 -0
- package/components/uv-vtabs/uv-vtabs.vue +438 -0
- package/components/uv-vtabs-item/uv-vtabs-item.vue +68 -0
- package/components/uv-waterfall/props.js +69 -0
- package/components/uv-waterfall/uv-waterfall.vue +265 -0
- package/index.js +82 -0
- package/index.scss +7 -0
- package/libs/config/config.js +34 -0
- package/libs/css/color.scss +32 -0
- package/libs/css/common.scss +100 -0
- package/libs/css/components.scss +23 -0
- package/libs/css/variable.scss +111 -0
- package/libs/css/vue.scss +40 -0
- package/libs/function/colorGradient.js +134 -0
- package/libs/function/compress.js +27 -0
- package/libs/function/debounce.js +29 -0
- package/libs/function/digit.js +167 -0
- package/libs/function/index.js +734 -0
- package/libs/function/platform.js +75 -0
- package/libs/function/test.js +287 -0
- package/libs/function/throttle.js +30 -0
- package/libs/luch-request/adapters/index.js +132 -0
- package/libs/luch-request/core/InterceptorManager.js +51 -0
- package/libs/luch-request/core/Request.js +201 -0
- package/libs/luch-request/core/buildFullPath.js +20 -0
- package/libs/luch-request/core/defaults.js +33 -0
- package/libs/luch-request/core/dispatchRequest.js +6 -0
- package/libs/luch-request/core/mergeConfig.js +126 -0
- package/libs/luch-request/core/settle.js +16 -0
- package/libs/luch-request/helpers/buildURL.js +64 -0
- package/libs/luch-request/helpers/combineURLs.js +14 -0
- package/libs/luch-request/helpers/isAbsoluteURL.js +14 -0
- package/libs/luch-request/index.d.ts +197 -0
- package/libs/luch-request/index.js +2 -0
- package/libs/luch-request/utils/clone.js +264 -0
- package/libs/luch-request/utils.js +135 -0
- package/libs/mixin/button.js +13 -0
- package/libs/mixin/mixin.js +172 -0
- package/libs/mixin/mpMixin.js +8 -0
- package/libs/mixin/mpShare.js +13 -0
- package/libs/mixin/openType.js +47 -0
- package/libs/mixin/touch.js +59 -0
- package/libs/util/dayjs.js +216 -0
- package/libs/util/route.js +126 -0
- package/package.json +28 -0
- package/theme.scss +43 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'uvicon-level': 'e68f',
|
|
3
|
+
'uvicon-checkbox-mark': 'e659',
|
|
4
|
+
'uvicon-folder': 'e694',
|
|
5
|
+
'uvicon-movie': 'e67c',
|
|
6
|
+
'uvicon-star-fill': 'e61e',
|
|
7
|
+
'uvicon-star': 'e618',
|
|
8
|
+
'uvicon-phone-fill': 'e6ac',
|
|
9
|
+
'uvicon-phone': 'e6ba',
|
|
10
|
+
'uvicon-apple-fill': 'e635',
|
|
11
|
+
'uvicon-backspace': 'e64d',
|
|
12
|
+
'uvicon-attach': 'e640',
|
|
13
|
+
'uvicon-empty-data': 'e671',
|
|
14
|
+
'uvicon-empty-address': 'e68a',
|
|
15
|
+
'uvicon-empty-favor': 'e662',
|
|
16
|
+
'uvicon-empty-car': 'e657',
|
|
17
|
+
'uvicon-empty-order': 'e66b',
|
|
18
|
+
'uvicon-empty-list': 'e672',
|
|
19
|
+
'uvicon-empty-search': 'e677',
|
|
20
|
+
'uvicon-empty-permission': 'e67d',
|
|
21
|
+
'uvicon-empty-news': 'e67e',
|
|
22
|
+
'uvicon-empty-history': 'e685',
|
|
23
|
+
'uvicon-empty-coupon': 'e69b',
|
|
24
|
+
'uvicon-empty-page': 'e60e',
|
|
25
|
+
'uvicon-empty-wifi-off': 'e6cc',
|
|
26
|
+
'uvicon-reload': 'e627',
|
|
27
|
+
'uvicon-order': 'e695',
|
|
28
|
+
'uvicon-server-man': 'e601',
|
|
29
|
+
'uvicon-search': 'e632',
|
|
30
|
+
'uvicon-more-dot-fill': 'e66f',
|
|
31
|
+
'uvicon-scan': 'e631',
|
|
32
|
+
'uvicon-map': 'e665',
|
|
33
|
+
'uvicon-map-fill': 'e6a8',
|
|
34
|
+
'uvicon-tags': 'e621',
|
|
35
|
+
'uvicon-tags-fill': 'e613',
|
|
36
|
+
'uvicon-eye': 'e664',
|
|
37
|
+
'uvicon-eye-fill': 'e697',
|
|
38
|
+
'uvicon-eye-off': 'e69c',
|
|
39
|
+
'uvicon-eye-off-outline': 'e688',
|
|
40
|
+
'uvicon-mic': 'e66d',
|
|
41
|
+
'uvicon-mic-off': 'e691',
|
|
42
|
+
'uvicon-calendar': 'e65c',
|
|
43
|
+
'uvicon-trash': 'e623',
|
|
44
|
+
'uvicon-trash-fill': 'e6ce',
|
|
45
|
+
'uvicon-play-left': 'e6bf',
|
|
46
|
+
'uvicon-play-right': 'e6b3',
|
|
47
|
+
'uvicon-minus': 'e614',
|
|
48
|
+
'uvicon-plus': 'e625',
|
|
49
|
+
'uvicon-info-circle': 'e69f',
|
|
50
|
+
'uvicon-info-circle-fill': 'e6a7',
|
|
51
|
+
'uvicon-question-circle': 'e622',
|
|
52
|
+
'uvicon-question-circle-fill': 'e6bc',
|
|
53
|
+
'uvicon-close': 'e65a',
|
|
54
|
+
'uvicon-checkmark': 'e64a',
|
|
55
|
+
'uvicon-checkmark-circle': 'e643',
|
|
56
|
+
'uvicon-checkmark-circle-fill': 'e668',
|
|
57
|
+
'uvicon-setting': 'e602',
|
|
58
|
+
'uvicon-setting-fill': 'e6d0',
|
|
59
|
+
'uvicon-heart': 'e6a2',
|
|
60
|
+
'uvicon-heart-fill': 'e68b',
|
|
61
|
+
'uvicon-camera': 'e642',
|
|
62
|
+
'uvicon-camera-fill': 'e650',
|
|
63
|
+
'uvicon-more-circle': 'e69e',
|
|
64
|
+
'uvicon-more-circle-fill': 'e684',
|
|
65
|
+
'uvicon-chat': 'e656',
|
|
66
|
+
'uvicon-chat-fill': 'e63f',
|
|
67
|
+
'uvicon-bag': 'e647',
|
|
68
|
+
'uvicon-error-circle': 'e66e',
|
|
69
|
+
'uvicon-error-circle-fill': 'e655',
|
|
70
|
+
'uvicon-close-circle': 'e64e',
|
|
71
|
+
'uvicon-close-circle-fill': 'e666',
|
|
72
|
+
'uvicon-share': 'e629',
|
|
73
|
+
'uvicon-share-fill': 'e6bb',
|
|
74
|
+
'uvicon-share-square': 'e6c4',
|
|
75
|
+
'uvicon-shopping-cart': 'e6cb',
|
|
76
|
+
'uvicon-shopping-cart-fill': 'e630',
|
|
77
|
+
'uvicon-bell': 'e651',
|
|
78
|
+
'uvicon-bell-fill': 'e604',
|
|
79
|
+
'uvicon-list': 'e690',
|
|
80
|
+
'uvicon-list-dot': 'e6a9',
|
|
81
|
+
'uvicon-zhifubao-circle-fill': 'e617',
|
|
82
|
+
'uvicon-weixin-circle-fill': 'e6cd',
|
|
83
|
+
'uvicon-weixin-fill': 'e620',
|
|
84
|
+
'uvicon-qq-fill': 'e608',
|
|
85
|
+
'uvicon-qq-circle-fill': 'e6b9',
|
|
86
|
+
'uvicon-moments-circel-fill': 'e6c2',
|
|
87
|
+
'uvicon-moments': 'e6a0',
|
|
88
|
+
'uvicon-car': 'e64f',
|
|
89
|
+
'uvicon-car-fill': 'e648',
|
|
90
|
+
'uvicon-warning-fill': 'e6c7',
|
|
91
|
+
'uvicon-warning': 'e6c1',
|
|
92
|
+
'uvicon-clock-fill': 'e64b',
|
|
93
|
+
'uvicon-clock': 'e66c',
|
|
94
|
+
'uvicon-edit-pen': 'e65d',
|
|
95
|
+
'uvicon-edit-pen-fill': 'e679',
|
|
96
|
+
'uvicon-email': 'e673',
|
|
97
|
+
'uvicon-email-fill': 'e683',
|
|
98
|
+
'uvicon-minus-circle': 'e6a5',
|
|
99
|
+
'uvicon-plus-circle': 'e603',
|
|
100
|
+
'uvicon-plus-circle-fill': 'e611',
|
|
101
|
+
'uvicon-file-text': 'e687',
|
|
102
|
+
'uvicon-file-text-fill': 'e67f',
|
|
103
|
+
'uvicon-pushpin': 'e6d1',
|
|
104
|
+
'uvicon-pushpin-fill': 'e6b6',
|
|
105
|
+
'uvicon-grid': 'e68c',
|
|
106
|
+
'uvicon-grid-fill': 'e698',
|
|
107
|
+
'uvicon-play-circle': 'e6af',
|
|
108
|
+
'uvicon-play-circle-fill': 'e62a',
|
|
109
|
+
'uvicon-pause-circle-fill': 'e60c',
|
|
110
|
+
'uvicon-pause': 'e61c',
|
|
111
|
+
'uvicon-pause-circle': 'e696',
|
|
112
|
+
'uvicon-gift-fill': 'e6b0',
|
|
113
|
+
'uvicon-gift': 'e680',
|
|
114
|
+
'uvicon-kefu-ermai': 'e660',
|
|
115
|
+
'uvicon-server-fill': 'e610',
|
|
116
|
+
'uvicon-coupon-fill': 'e64c',
|
|
117
|
+
'uvicon-coupon': 'e65f',
|
|
118
|
+
'uvicon-integral': 'e693',
|
|
119
|
+
'uvicon-integral-fill': 'e6b1',
|
|
120
|
+
'uvicon-home-fill': 'e68e',
|
|
121
|
+
'uvicon-home': 'e67b',
|
|
122
|
+
'uvicon-account': 'e63a',
|
|
123
|
+
'uvicon-account-fill': 'e653',
|
|
124
|
+
'uvicon-thumb-down-fill': 'e628',
|
|
125
|
+
'uvicon-thumb-down': 'e60a',
|
|
126
|
+
'uvicon-thumb-up': 'e612',
|
|
127
|
+
'uvicon-thumb-up-fill': 'e62c',
|
|
128
|
+
'uvicon-lock-fill': 'e6a6',
|
|
129
|
+
'uvicon-lock-open': 'e68d',
|
|
130
|
+
'uvicon-lock-opened-fill': 'e6a1',
|
|
131
|
+
'uvicon-lock': 'e69d',
|
|
132
|
+
'uvicon-red-packet': 'e6c3',
|
|
133
|
+
'uvicon-photo-fill': 'e6b4',
|
|
134
|
+
'uvicon-photo': 'e60d',
|
|
135
|
+
'uvicon-volume-off-fill': 'e6c8',
|
|
136
|
+
'uvicon-volume-off': 'e6bd',
|
|
137
|
+
'uvicon-volume-fill': 'e624',
|
|
138
|
+
'uvicon-volume': 'e605',
|
|
139
|
+
'uvicon-download': 'e670',
|
|
140
|
+
'uvicon-arrow-up-fill': 'e636',
|
|
141
|
+
'uvicon-arrow-down-fill': 'e638',
|
|
142
|
+
'uvicon-play-left-fill': 'e6ae',
|
|
143
|
+
'uvicon-play-right-fill': 'e6ad',
|
|
144
|
+
'uvicon-arrow-downward': 'e634',
|
|
145
|
+
'uvicon-arrow-leftward': 'e63b',
|
|
146
|
+
'uvicon-arrow-rightward': 'e644',
|
|
147
|
+
'uvicon-arrow-upward': 'e641',
|
|
148
|
+
'uvicon-arrow-down': 'e63e',
|
|
149
|
+
'uvicon-arrow-right': 'e63c',
|
|
150
|
+
'uvicon-arrow-left': 'e646',
|
|
151
|
+
'uvicon-arrow-up': 'e633',
|
|
152
|
+
'uvicon-skip-back-left': 'e6c5',
|
|
153
|
+
'uvicon-skip-forward-right': 'e61f',
|
|
154
|
+
'uvicon-arrow-left-double': 'e637',
|
|
155
|
+
'uvicon-man': 'e675',
|
|
156
|
+
'uvicon-woman': 'e626',
|
|
157
|
+
'uvicon-en': 'e6b8',
|
|
158
|
+
'uvicon-twitte': 'e607',
|
|
159
|
+
'uvicon-twitter-circle-fill': 'e6cf'
|
|
160
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 图标类名
|
|
4
|
+
name: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ''
|
|
7
|
+
},
|
|
8
|
+
// 图标颜色,可接受主题色
|
|
9
|
+
color: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ''
|
|
12
|
+
},
|
|
13
|
+
// 字体大小,单位px
|
|
14
|
+
size: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: '16px'
|
|
17
|
+
},
|
|
18
|
+
// 是否显示粗体
|
|
19
|
+
bold: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
// 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
|
24
|
+
index: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
default: null
|
|
27
|
+
},
|
|
28
|
+
// 触摸图标时的类名
|
|
29
|
+
hoverClass: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ''
|
|
32
|
+
},
|
|
33
|
+
// 自定义扩展前缀,方便用户扩展自己的图标库
|
|
34
|
+
customPrefix: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'uvicon'
|
|
37
|
+
},
|
|
38
|
+
// 图标右边或者下面的文字
|
|
39
|
+
label: {
|
|
40
|
+
type: [String, Number],
|
|
41
|
+
default: ''
|
|
42
|
+
},
|
|
43
|
+
// label的位置,只能右边或者下边
|
|
44
|
+
labelPos: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: 'right'
|
|
47
|
+
},
|
|
48
|
+
// label的大小
|
|
49
|
+
labelSize: {
|
|
50
|
+
type: [String, Number],
|
|
51
|
+
default: '15px'
|
|
52
|
+
},
|
|
53
|
+
// label的颜色
|
|
54
|
+
labelColor: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: '#606266'
|
|
57
|
+
},
|
|
58
|
+
// label与图标的距离
|
|
59
|
+
space: {
|
|
60
|
+
type: [String, Number],
|
|
61
|
+
default: '3px'
|
|
62
|
+
},
|
|
63
|
+
// 图片的mode
|
|
64
|
+
imgMode: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'aspectFit'
|
|
67
|
+
},
|
|
68
|
+
// 用于显示图片小图标时,图片的宽度
|
|
69
|
+
width: {
|
|
70
|
+
type: [String, Number],
|
|
71
|
+
default: ''
|
|
72
|
+
},
|
|
73
|
+
// 用于显示图片小图标时,图片的高度
|
|
74
|
+
height: {
|
|
75
|
+
type: [String, Number],
|
|
76
|
+
default: ''
|
|
77
|
+
},
|
|
78
|
+
// 用于解决某些情况下,让图标垂直居中的用途
|
|
79
|
+
top: {
|
|
80
|
+
type: [String, Number],
|
|
81
|
+
default: 0
|
|
82
|
+
},
|
|
83
|
+
// 是否阻止事件传播
|
|
84
|
+
stop: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false
|
|
87
|
+
},
|
|
88
|
+
...uni.$uv?.props?.icon
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="uv-icon"
|
|
4
|
+
@tap="clickHandler"
|
|
5
|
+
:class="['uv-icon--' + labelPos]"
|
|
6
|
+
>
|
|
7
|
+
<image
|
|
8
|
+
class="uv-icon__img"
|
|
9
|
+
v-if="isImg"
|
|
10
|
+
:src="name"
|
|
11
|
+
:mode="imgMode"
|
|
12
|
+
:style="[imgStyle, $uv.addStyle(customStyle)]"
|
|
13
|
+
></image>
|
|
14
|
+
<text
|
|
15
|
+
v-else
|
|
16
|
+
class="uv-icon__icon"
|
|
17
|
+
:class="uClasses"
|
|
18
|
+
:style="[iconStyle, $uv.addStyle(customStyle)]"
|
|
19
|
+
:hover-class="hoverClass"
|
|
20
|
+
>{{icon}}</text>
|
|
21
|
+
<!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 -->
|
|
22
|
+
<text
|
|
23
|
+
v-if="label !== ''"
|
|
24
|
+
class="uv-icon__label"
|
|
25
|
+
:style="{
|
|
26
|
+
color: labelColor,
|
|
27
|
+
fontSize: $uv.addUnit(labelSize),
|
|
28
|
+
marginLeft: labelPos == 'right' ? $uv.addUnit(space) : 0,
|
|
29
|
+
marginTop: labelPos == 'bottom' ? $uv.addUnit(space) : 0,
|
|
30
|
+
marginRight: labelPos == 'left' ? $uv.addUnit(space) : 0,
|
|
31
|
+
marginBottom: labelPos == 'top' ? $uv.addUnit(space) : 0
|
|
32
|
+
}"
|
|
33
|
+
>{{ label }}</text>
|
|
34
|
+
</view>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
39
|
+
import mixin from '../../libs/mixin/mixin.js'
|
|
40
|
+
// #ifdef APP-NVUE
|
|
41
|
+
// nvue通过weex的dom模块引入字体,相关文档地址如下:
|
|
42
|
+
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
|
|
43
|
+
import iconUrl from './uvicons.ttf';
|
|
44
|
+
const domModule = weex.requireModule('dom')
|
|
45
|
+
domModule.addRule('fontFace', {
|
|
46
|
+
'fontFamily': "uvicon-iconfont",
|
|
47
|
+
'src': "url('" + iconUrl + "')"
|
|
48
|
+
})
|
|
49
|
+
// #endif
|
|
50
|
+
// 引入图标名称,已经对应的unicode
|
|
51
|
+
import icons from './icons';
|
|
52
|
+
import props from './props.js';
|
|
53
|
+
/**
|
|
54
|
+
* icon 图标
|
|
55
|
+
* @description 基于字体的图标集,包含了大多数常见场景的图标。
|
|
56
|
+
* @tutorial https://www.uvui.cn/components/icon.html
|
|
57
|
+
* @property {String} name 图标名称,见示例图标集
|
|
58
|
+
* @property {String} color 图标颜色,可接受主题色 (默认 color['uv-content-color'] )
|
|
59
|
+
* @property {String | Number} size 图标字体大小,单位px (默认 '16px' )
|
|
60
|
+
* @property {Boolean} bold 是否显示粗体 (默认 false )
|
|
61
|
+
* @property {String | Number} index 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
|
62
|
+
* @property {String} hoverClass 图标按下去的样式类,用法同uni的view组件的hoverClass参数,详情见官网
|
|
63
|
+
* @property {String} customPrefix 自定义扩展前缀,方便用户扩展自己的图标库 (默认 'uicon' )
|
|
64
|
+
* @property {String | Number} label 图标右侧的label文字
|
|
65
|
+
* @property {String} labelPos label相对于图标的位置,只能right或bottom (默认 'right' )
|
|
66
|
+
* @property {String | Number} labelSize label字体大小,单位px (默认 '15px' )
|
|
67
|
+
* @property {String} labelColor 图标右侧的label文字颜色 ( 默认 color['uv-content-color'] )
|
|
68
|
+
* @property {String | Number} space label与图标的距离,单位px (默认 '3px' )
|
|
69
|
+
* @property {String} imgMode 图片的mode
|
|
70
|
+
* @property {String | Number} width 显示图片小图标时的宽度
|
|
71
|
+
* @property {String | Number} height 显示图片小图标时的高度
|
|
72
|
+
* @property {String | Number} top 图标在垂直方向上的定位 用于解决某些情况下,让图标垂直居中的用途 (默认 0 )
|
|
73
|
+
* @property {Boolean} stop 是否阻止事件传播 (默认 false )
|
|
74
|
+
* @property {Object} customStyle icon的样式,对象形式
|
|
75
|
+
* @event {Function} click 点击图标时触发
|
|
76
|
+
* @event {Function} touchstart 事件触摸时触发
|
|
77
|
+
* @example <uv-icon name="photo" color="#2979ff" size="28"></uv-icon>
|
|
78
|
+
*/
|
|
79
|
+
export default {
|
|
80
|
+
name: 'uv-icon',
|
|
81
|
+
emits: ['click'],
|
|
82
|
+
mixins: [mpMixin, mixin, props],
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
colorType: [
|
|
86
|
+
'primary',
|
|
87
|
+
'success',
|
|
88
|
+
'info',
|
|
89
|
+
'error',
|
|
90
|
+
'warning'
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
uClasses() {
|
|
96
|
+
let classes = []
|
|
97
|
+
classes.push(this.customPrefix)
|
|
98
|
+
classes.push(this.customPrefix + '-' + this.name)
|
|
99
|
+
// 主题色,通过类配置
|
|
100
|
+
if (this.color && this.colorType.includes(this.color)) classes.push('uv-icon__icon--' + this.color)
|
|
101
|
+
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
|
|
102
|
+
// 故需将其拆成一个字符串的形式,通过空格隔开各个类名
|
|
103
|
+
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
|
|
104
|
+
classes = classes.join(' ')
|
|
105
|
+
//#endif
|
|
106
|
+
return classes
|
|
107
|
+
},
|
|
108
|
+
iconStyle() {
|
|
109
|
+
let style = {}
|
|
110
|
+
style = {
|
|
111
|
+
fontSize: this.$uv.addUnit(this.size),
|
|
112
|
+
lineHeight: this.$uv.addUnit(this.size),
|
|
113
|
+
fontWeight: this.bold ? 'bold' : 'normal',
|
|
114
|
+
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
|
|
115
|
+
top: this.$uv.addUnit(this.top)
|
|
116
|
+
}
|
|
117
|
+
// 非主题色值时,才当作颜色值
|
|
118
|
+
if (this.color && !this.colorType.includes(this.color)) style.color = this.color
|
|
119
|
+
return style
|
|
120
|
+
},
|
|
121
|
+
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
|
|
122
|
+
isImg() {
|
|
123
|
+
const isBase64 = this.name.indexOf('data:') > -1 && this.name.indexOf('base64') > -1;
|
|
124
|
+
return this.name.indexOf('/') !== -1 || isBase64;
|
|
125
|
+
},
|
|
126
|
+
imgStyle() {
|
|
127
|
+
let style = {}
|
|
128
|
+
// 如果设置width和height属性,则优先使用,否则使用size属性
|
|
129
|
+
style.width = this.width ? this.$uv.addUnit(this.width) : this.$uv.addUnit(this.size)
|
|
130
|
+
style.height = this.height ? this.$uv.addUnit(this.height) : this.$uv.addUnit(this.size)
|
|
131
|
+
return style
|
|
132
|
+
},
|
|
133
|
+
// 通过图标名,查找对应的图标
|
|
134
|
+
icon() {
|
|
135
|
+
// 如果内置的图标中找不到对应的图标,就直接返回name值,因为用户可能传入的是unicode代码
|
|
136
|
+
const code = icons['uvicon-' + this.name];
|
|
137
|
+
// #ifdef APP-NVUE
|
|
138
|
+
if(!code) {
|
|
139
|
+
return code ? unescape(`%u${code}`) : ['uvicon'].indexOf(this.customPrefix) > -1 ? unescape(`%u${this.name}`) : '';
|
|
140
|
+
}
|
|
141
|
+
// #endif
|
|
142
|
+
return code ? unescape(`%u${code}`) : ['uvicon'].indexOf(this.customPrefix) > -1 ? this.name : '';
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
methods: {
|
|
146
|
+
clickHandler(e) {
|
|
147
|
+
this.$emit('click', this.index)
|
|
148
|
+
// 是否阻止事件冒泡
|
|
149
|
+
this.stop && this.preventEvent(e)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<style lang="scss" scoped>
|
|
156
|
+
@import '../../libs/css/components.scss';
|
|
157
|
+
@import '../../libs/css/color.scss';
|
|
158
|
+
// 变量定义
|
|
159
|
+
$uv-icon-primary: $uv-primary !default;
|
|
160
|
+
$uv-icon-success: $uv-success !default;
|
|
161
|
+
$uv-icon-info: $uv-info !default;
|
|
162
|
+
$uv-icon-warning: $uv-warning !default;
|
|
163
|
+
$uv-icon-error: $uv-error !default;
|
|
164
|
+
$uv-icon-label-line-height: 1 !default;
|
|
165
|
+
/* #ifndef APP-NVUE */
|
|
166
|
+
// 非nvue下加载字体
|
|
167
|
+
@font-face {
|
|
168
|
+
font-family: 'uvicon-iconfont';
|
|
169
|
+
src: url('./uvicons.ttf') format('truetype');
|
|
170
|
+
}
|
|
171
|
+
/* #endif */
|
|
172
|
+
.uv-icon {
|
|
173
|
+
/* #ifndef APP-NVUE */
|
|
174
|
+
display: flex;
|
|
175
|
+
/* #endif */
|
|
176
|
+
align-items: center;
|
|
177
|
+
&--left {
|
|
178
|
+
flex-direction: row-reverse;
|
|
179
|
+
align-items: center;
|
|
180
|
+
}
|
|
181
|
+
&--right {
|
|
182
|
+
flex-direction: row;
|
|
183
|
+
align-items: center;
|
|
184
|
+
}
|
|
185
|
+
&--top {
|
|
186
|
+
flex-direction: column-reverse;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
}
|
|
189
|
+
&--bottom {
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
}
|
|
193
|
+
&__icon {
|
|
194
|
+
font-family: uvicon-iconfont;
|
|
195
|
+
position: relative;
|
|
196
|
+
@include flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
&--primary {
|
|
199
|
+
color: $uv-icon-primary;
|
|
200
|
+
}
|
|
201
|
+
&--success {
|
|
202
|
+
color: $uv-icon-success;
|
|
203
|
+
}
|
|
204
|
+
&--error {
|
|
205
|
+
color: $uv-icon-error;
|
|
206
|
+
}
|
|
207
|
+
&--warning {
|
|
208
|
+
color: $uv-icon-warning;
|
|
209
|
+
}
|
|
210
|
+
&--info {
|
|
211
|
+
color: $uv-icon-info;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
&__img {
|
|
215
|
+
/* #ifndef APP-NVUE */
|
|
216
|
+
height: auto;
|
|
217
|
+
will-change: transform;
|
|
218
|
+
/* #endif */
|
|
219
|
+
}
|
|
220
|
+
&__label {
|
|
221
|
+
/* #ifndef APP-NVUE */
|
|
222
|
+
line-height: $uv-icon-label-line-height;
|
|
223
|
+
/* #endif */
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 图片地址
|
|
4
|
+
src: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ''
|
|
7
|
+
},
|
|
8
|
+
// 裁剪模式
|
|
9
|
+
mode: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'aspectFill'
|
|
12
|
+
},
|
|
13
|
+
// 宽度,单位任意
|
|
14
|
+
width: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: '300'
|
|
17
|
+
},
|
|
18
|
+
// 高度,单位任意
|
|
19
|
+
height: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: '225'
|
|
22
|
+
},
|
|
23
|
+
// 图片形状,circle-圆形,square-方形
|
|
24
|
+
shape: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'square'
|
|
27
|
+
},
|
|
28
|
+
// 圆角,单位任意
|
|
29
|
+
radius: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: 0
|
|
32
|
+
},
|
|
33
|
+
// 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
|
|
34
|
+
lazyLoad: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
// 是否开启observer懒加载,nvue不生效
|
|
39
|
+
observeLazyLoad: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
// 开启长按图片显示识别微信小程序码菜单
|
|
44
|
+
showMenuByLongpress: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true
|
|
47
|
+
},
|
|
48
|
+
// 加载中的图标,或者小图片
|
|
49
|
+
loadingIcon: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: 'photo'
|
|
52
|
+
},
|
|
53
|
+
// 加载失败的图标,或者小图片
|
|
54
|
+
errorIcon: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'error-circle'
|
|
57
|
+
},
|
|
58
|
+
// 是否显示加载中的图标或者自定义的slot
|
|
59
|
+
showLoading: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
},
|
|
63
|
+
// 是否显示加载错误的图标或者自定义的slot
|
|
64
|
+
showError: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
// 是否需要淡入效果
|
|
69
|
+
fade: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: true
|
|
72
|
+
},
|
|
73
|
+
// 只支持网络资源,只对微信小程序有效
|
|
74
|
+
webp: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
77
|
+
},
|
|
78
|
+
// 过渡时间,单位ms
|
|
79
|
+
duration: {
|
|
80
|
+
type: [String, Number],
|
|
81
|
+
default: 500
|
|
82
|
+
},
|
|
83
|
+
// 背景颜色,用于深色页面加载图片时,为了和背景色融合
|
|
84
|
+
bgColor: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: '#f3f4f6'
|
|
87
|
+
},
|
|
88
|
+
// nvue模式下 是否直接显示,在uv-list等cell下面使用就需要设置
|
|
89
|
+
cellChild: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
92
|
+
},
|
|
93
|
+
// 是否压缩图片
|
|
94
|
+
compress: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: true
|
|
97
|
+
},
|
|
98
|
+
...uni.$uv?.props?.image
|
|
99
|
+
}
|
|
100
|
+
}
|