@zfqh/uniapp 0.1.1
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 +16 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/docs/api/apis/core.md +189 -0
- package/docs/api/apis/index.md +82 -0
- package/docs/api/apis/request.md +369 -0
- package/docs/api/configs/api.md +32 -0
- package/docs/api/configs/app.md +43 -0
- package/docs/api/configs/brand.md +43 -0
- package/docs/api/configs/cdn.md +35 -0
- package/docs/api/configs/color.md +144 -0
- package/docs/api/configs/env.md +120 -0
- package/docs/api/configs/index.md +394 -0
- package/docs/api/configs/link.md +33 -0
- package/docs/api/configs/log.md +27 -0
- package/docs/api/configs/mp.md +34 -0
- package/docs/api/configs/navigate.md +27 -0
- package/docs/api/configs/page.md +32 -0
- package/docs/api/configs/path.md +27 -0
- package/docs/api/configs/storage.md +24 -0
- package/docs/api/configs/tabbar.md +29 -0
- package/docs/api/configs/toast.md +35 -0
- package/docs/api/configs/update.md +25 -0
- package/docs/api/configs/upload.md +45 -0
- package/docs/api/configs/ver.md +32 -0
- package/docs/api/configs/web.md +28 -0
- package/docs/api/hooks/index.md +182 -0
- package/docs/api/hooks/useI18n.md +27 -0
- package/docs/api/hooks/useOverlay.md +37 -0
- package/docs/api/hooks/usePopup.md +35 -0
- package/docs/api/hooks/useVersion.md +23 -0
- package/docs/api/index.md +269 -0
- package/docs/api/mixins/app.md +29 -0
- package/docs/api/mixins/badge.md +23 -0
- package/docs/api/mixins/debounce.md +32 -0
- package/docs/api/mixins/deep.md +29 -0
- package/docs/api/mixins/index.md +23 -0
- package/docs/api/mixins/login.md +22 -0
- package/docs/api/mixins/model.md +26 -0
- package/docs/api/mixins/redirect.md +26 -0
- package/docs/api/mixins/share.md +29 -0
- package/docs/api/mixins/show.md +27 -0
- package/docs/api/mixins/webview.md +27 -0
- package/docs/api/modules/app.md +30 -0
- package/docs/api/modules/dict.md +28 -0
- package/docs/api/modules/im.md +22 -0
- package/docs/api/modules/index.md +44 -0
- package/docs/api/modules/launch.md +26 -0
- package/docs/api/modules/location.md +25 -0
- package/docs/api/modules/login.md +35 -0
- package/docs/api/modules/network.md +26 -0
- package/docs/api/modules/system.md +29 -0
- package/docs/api/utils/audio.md +84 -0
- package/docs/api/utils/consts.md +201 -0
- package/docs/api/utils/cos.md +269 -0
- package/docs/api/utils/debounce.md +89 -0
- package/docs/api/utils/file.md +78 -0
- package/docs/api/utils/index.md +547 -0
- package/docs/api/utils/locale.md +32 -0
- package/docs/api/utils/message.md +81 -0
- package/docs/api/utils/navigate.md +267 -0
- package/docs/api/utils/pages.md +205 -0
- package/docs/api/utils/permission.md +28 -0
- package/docs/api/utils/permit.md +62 -0
- package/docs/api/utils/query.md +89 -0
- package/docs/api/utils/request.md +34 -0
- package/docs/api/utils/storage.md +145 -0
- package/docs/api/utils/subscribe.md +77 -0
- package/docs/api/utils/throttle.md +101 -0
- package/docs/api/utils/toast.md +164 -0
- package/docs/api/utils/uni.md +28 -0
- package/docs/api/utils/update.md +165 -0
- package/docs/components/g-back-button.md +76 -0
- package/docs/components/g-checkbox-list.md +101 -0
- package/docs/components/g-container.md +93 -0
- package/docs/components/g-data-list.md +106 -0
- package/docs/components/g-dot-text.md +79 -0
- package/docs/components/g-env.md +75 -0
- package/docs/components/g-float.md +83 -0
- package/docs/components/g-grid-image.md +91 -0
- package/docs/components/g-grid-swiper.md +99 -0
- package/docs/components/g-icon.md +106 -0
- package/docs/components/g-mask.md +82 -0
- package/docs/components/g-money.md +90 -0
- package/docs/components/g-more.md +78 -0
- package/docs/components/g-page-container.md +170 -0
- package/docs/components/g-permission-popup.md +117 -0
- package/docs/components/g-polyline-chat.md +102 -0
- package/docs/components/g-polyline-view.md +67 -0
- package/docs/components/g-popup.md +144 -0
- package/docs/components/g-refresh-view.md +118 -0
- package/docs/components/g-render-image.md +83 -0
- package/docs/components/g-search.md +120 -0
- package/docs/components/g-share-photo.md +77 -0
- package/docs/components/g-share-view.md +83 -0
- package/docs/components/g-share-weixin.md +81 -0
- package/docs/components/g-skeleton-view.md +71 -0
- package/docs/components/g-skeleton.md +64 -0
- package/docs/components/g-tag-editor.md +134 -0
- package/docs/components/g-timer.md +72 -0
- package/docs/components/g-trtc-room.md +116 -0
- package/docs/components/g-trtc-tui.md +84 -0
- package/docs/components/g-trtc.md +124 -0
- package/docs/components/g-upload.md +117 -0
- package/docs/components/g-waterfall.md +84 -0
- package/docs/components/index.md +109 -0
- package/docs/components/styles/base-styles.md +367 -0
- package/docs/components/styles/global-vars.md +150 -0
- package/docs/components/usage.md +112 -0
- package/docs/faq/index.md +78 -0
- package/docs/guide/getting-started.md +195 -0
- package/docs/guide/project-frame.md +297 -0
- package/docs/index.md +80 -0
- package/lib/apis/core.d.ts +12 -0
- package/lib/apis/core.js +13 -0
- package/lib/apis/index.d.ts +2 -0
- package/lib/apis/index.js +2 -0
- package/lib/apis/request.d.ts +4 -0
- package/lib/apis/request.js +27 -0
- package/lib/components/g-back-button/g-back-button.vue +141 -0
- package/lib/components/g-checkbox-list/g-checkbox-list.vue +156 -0
- package/lib/components/g-container/g-container.vue +159 -0
- package/lib/components/g-data-list/g-data-list.vue +192 -0
- package/lib/components/g-dot-text/g-dot-text.vue +114 -0
- package/lib/components/g-env/g-env.vue +123 -0
- package/lib/components/g-float/g-float.vue +131 -0
- package/lib/components/g-grid-image/g-grid-image.vue +84 -0
- package/lib/components/g-grid-swiper/g-grid-swiper.vue +224 -0
- package/lib/components/g-icon/g-icon.vue +72 -0
- package/lib/components/g-mask/g-mask.vue +126 -0
- package/lib/components/g-money/g-money.vue +174 -0
- package/lib/components/g-more/g-more.vue +68 -0
- package/lib/components/g-page-container/g-page-container.vue +470 -0
- package/lib/components/g-permission-popup/g-permission-popup.vue +80 -0
- package/lib/components/g-polyline-chat/g-polyline-chat.vue +255 -0
- package/lib/components/g-polyline-view/g-polyline-view.vue +104 -0
- package/lib/components/g-popup/g-popup.vue +449 -0
- package/lib/components/g-refresh-view/g-refresh-view.vue +213 -0
- package/lib/components/g-render-image/g-render-image.vue +222 -0
- package/lib/components/g-search/g-search.vue +274 -0
- package/lib/components/g-share-photo/g-share-photo.vue +75 -0
- package/lib/components/g-share-view/g-share-view.vue +157 -0
- package/lib/components/g-share-weixin/g-share-weixin.vue +106 -0
- package/lib/components/g-skeleton/g-skeleton.vue +55 -0
- package/lib/components/g-skeleton-view/g-skeleton-view.vue +78 -0
- package/lib/components/g-tag-editor/g-tag-editor.vue +482 -0
- package/lib/components/g-timer/g-timer.vue +61 -0
- package/lib/components/g-trtc/g-trtc.vue +347 -0
- package/lib/components/g-trtc-room/g-trtc-room.vue +524 -0
- package/lib/components/g-trtc-room/iconfont.scss +59 -0
- package/lib/components/g-trtc-tui/g-trtc-tui.vue +245 -0
- package/lib/components/g-upload/g-upload.vue +294 -0
- package/lib/components/g-waterfall/g-waterfall.vue +101 -0
- package/lib/configs/api.d.ts +7 -0
- package/lib/configs/api.js +6 -0
- package/lib/configs/app.d.ts +26 -0
- package/lib/configs/app.js +50 -0
- package/lib/configs/brand.d.ts +22 -0
- package/lib/configs/brand.js +26 -0
- package/lib/configs/cdn.d.ts +13 -0
- package/lib/configs/cdn.js +12 -0
- package/lib/configs/color.d.ts +62 -0
- package/lib/configs/color.js +66 -0
- package/lib/configs/env.d.ts +37 -0
- package/lib/configs/env.js +71 -0
- package/lib/configs/index.d.ts +170 -0
- package/lib/configs/index.js +82 -0
- package/lib/configs/link.d.ts +11 -0
- package/lib/configs/link.js +3 -0
- package/lib/configs/log.d.ts +9 -0
- package/lib/configs/log.js +8 -0
- package/lib/configs/mp.d.ts +15 -0
- package/lib/configs/mp.js +9 -0
- package/lib/configs/navigate.d.ts +17 -0
- package/lib/configs/navigate.js +5 -0
- package/lib/configs/page.d.ts +18 -0
- package/lib/configs/page.js +14 -0
- package/lib/configs/path.d.ts +11 -0
- package/lib/configs/path.js +10 -0
- package/lib/configs/storage.d.ts +7 -0
- package/lib/configs/storage.js +6 -0
- package/lib/configs/tabbar.d.ts +7 -0
- package/lib/configs/tabbar.js +6 -0
- package/lib/configs/toast.d.ts +18 -0
- package/lib/configs/toast.js +29 -0
- package/lib/configs/update.d.ts +45 -0
- package/lib/configs/update.js +6 -0
- package/lib/configs/upload.d.ts +30 -0
- package/lib/configs/upload.js +7 -0
- package/lib/configs/ver.d.ts +8 -0
- package/lib/configs/ver.js +28 -0
- package/lib/configs/web.d.ts +5 -0
- package/lib/configs/web.js +2 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.js +4 -0
- package/lib/hooks/useI18n.d.ts +2 -0
- package/lib/hooks/useI18n.js +19 -0
- package/lib/hooks/useOverlay.d.ts +1 -0
- package/lib/hooks/useOverlay.js +17 -0
- package/lib/hooks/usePopup.d.ts +1 -0
- package/lib/hooks/usePopup.js +14 -0
- package/lib/hooks/useVersion.d.ts +6 -0
- package/lib/hooks/useVersion.js +21 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.js +33 -0
- package/lib/mixins/app.d.ts +14 -0
- package/lib/mixins/app.js +105 -0
- package/lib/mixins/badge.d.ts +24 -0
- package/lib/mixins/badge.js +44 -0
- package/lib/mixins/debounce.d.ts +6 -0
- package/lib/mixins/debounce.js +11 -0
- package/lib/mixins/deep.d.ts +6 -0
- package/lib/mixins/deep.js +8 -0
- package/lib/mixins/index.d.ts +8 -0
- package/lib/mixins/index.js +8 -0
- package/lib/mixins/login.d.ts +4 -0
- package/lib/mixins/login.js +25 -0
- package/lib/mixins/model.d.ts +22 -0
- package/lib/mixins/model.js +29 -0
- package/lib/mixins/redirect.d.ts +8 -0
- package/lib/mixins/redirect.js +94 -0
- package/lib/mixins/share.d.ts +15 -0
- package/lib/mixins/share.js +55 -0
- package/lib/mixins/show.d.ts +9 -0
- package/lib/mixins/show.js +16 -0
- package/lib/mixins/webview.d.ts +26 -0
- package/lib/mixins/webview.js +225 -0
- package/lib/modules/app.d.ts +5 -0
- package/lib/modules/app.js +19 -0
- package/lib/modules/dict.d.ts +8 -0
- package/lib/modules/dict.js +43 -0
- package/lib/modules/im.d.ts +6 -0
- package/lib/modules/im.js +105 -0
- package/lib/modules/index.d.ts +8 -0
- package/lib/modules/index.js +8 -0
- package/lib/modules/launch.d.ts +5 -0
- package/lib/modules/launch.js +32 -0
- package/lib/modules/location.d.ts +5 -0
- package/lib/modules/location.js +57 -0
- package/lib/modules/login.d.ts +5 -0
- package/lib/modules/login.js +72 -0
- package/lib/modules/network.d.ts +5 -0
- package/lib/modules/network.js +39 -0
- package/lib/modules/system.d.ts +5 -0
- package/lib/modules/system.js +65 -0
- package/lib/styles/animate-vue.scss +3 -0
- package/lib/styles/animate.scss +27 -0
- package/lib/styles/bg-vue.scss +21 -0
- package/lib/styles/bg.scss +93 -0
- package/lib/styles/border.scss +218 -0
- package/lib/styles/flex-nvue.scss +64 -0
- package/lib/styles/flex-vue.scss +75 -0
- package/lib/styles/font.scss +59 -0
- package/lib/styles/index.scss +25 -0
- package/lib/styles/layout-nvue.scss +24 -0
- package/lib/styles/layout-vue.scss +30 -0
- package/lib/styles/layout.scss +76 -0
- package/lib/styles/opacity.scss +10 -0
- package/lib/styles/reset-vue.scss +46 -0
- package/lib/styles/shadow.scss +12 -0
- package/lib/styles/sizing-vue.scss +21 -0
- package/lib/styles/sizing.scss +21 -0
- package/lib/styles/spacing.scss +234 -0
- package/lib/styles/text-nvue.scss +21 -0
- package/lib/styles/text-vue.scss +70 -0
- package/lib/styles/text.scss +122 -0
- package/lib/styles/var.module.scss +29 -0
- package/lib/utils/audio.d.ts +14 -0
- package/lib/utils/audio.js +43 -0
- package/lib/utils/consts.d.ts +30 -0
- package/lib/utils/consts.js +52 -0
- package/lib/utils/cos.d.ts +15 -0
- package/lib/utils/cos.js +140 -0
- package/lib/utils/debounce.d.ts +2 -0
- package/lib/utils/debounce.js +30 -0
- package/lib/utils/file.d.ts +28 -0
- package/lib/utils/file.js +292 -0
- package/lib/utils/index.d.ts +166 -0
- package/lib/utils/index.js +485 -0
- package/lib/utils/locale.d.ts +6 -0
- package/lib/utils/locale.js +19 -0
- package/lib/utils/message.d.ts +9 -0
- package/lib/utils/message.js +63 -0
- package/lib/utils/navigate.d.ts +27 -0
- package/lib/utils/navigate.js +183 -0
- package/lib/utils/pages.d.ts +21 -0
- package/lib/utils/pages.js +79 -0
- package/lib/utils/permission.d.ts +16 -0
- package/lib/utils/permission.js +291 -0
- package/lib/utils/permit.d.ts +30 -0
- package/lib/utils/permit.js +181 -0
- package/lib/utils/query.d.ts +13 -0
- package/lib/utils/query.js +14 -0
- package/lib/utils/request.d.ts +8 -0
- package/lib/utils/request.js +126 -0
- package/lib/utils/storage.d.ts +53 -0
- package/lib/utils/storage.js +145 -0
- package/lib/utils/subscribe.d.ts +7 -0
- package/lib/utils/subscribe.js +94 -0
- package/lib/utils/throttle.d.ts +2 -0
- package/lib/utils/throttle.js +32 -0
- package/lib/utils/toast.d.ts +17 -0
- package/lib/utils/toast.js +66 -0
- package/lib/utils/uni.d.ts +1 -0
- package/lib/utils/uni.js +147 -0
- package/lib/utils/update.d.ts +9 -0
- package/lib/utils/update.js +376 -0
- package/package.json +49 -0
- package/types/index.d.ts +25 -0
- package/types/virtual.d.ts +1 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="flex flex-col pt-20rpx pl-20rpx pr-20rpx" :style="[customStyle]">
|
|
3
|
+
<view v-if="title" class="w-full pl-20rpx">
|
|
4
|
+
<text class="font-bold" :style="[titleStyle]"> {{ title }} </text>
|
|
5
|
+
</view>
|
|
6
|
+
<view class="w-full flex flex-wrap">
|
|
7
|
+
<template v-for="item in buttons" :key="item.type">
|
|
8
|
+
<g-share-weixin
|
|
9
|
+
v-if="hasWeixin && item.type === 'weixin'"
|
|
10
|
+
:text="item.text"
|
|
11
|
+
:custom="item.custom"
|
|
12
|
+
:customStyle="itemStyle"
|
|
13
|
+
:data="item.data"
|
|
14
|
+
@confirm="click(item)"
|
|
15
|
+
/>
|
|
16
|
+
<g-share-photo
|
|
17
|
+
v-else-if="hasPhoto && item.type === 'photo'"
|
|
18
|
+
:text="item.text"
|
|
19
|
+
:custom="item.custom"
|
|
20
|
+
:customStyle="itemStyle"
|
|
21
|
+
@confirm="click(item)"
|
|
22
|
+
/>
|
|
23
|
+
</template>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
<!-- #ifndef APP -->
|
|
27
|
+
<g-mask v-if="hasWeixin" :show="show" @click="show = false">
|
|
28
|
+
<view class="share-guide" :style="[guideStyle]">
|
|
29
|
+
<image :src="arrow" style="width: auto; height: 160rpx" mode="heightFix" />
|
|
30
|
+
<view class="pr-80rpx"> {{ shareTips }} </view>
|
|
31
|
+
</view>
|
|
32
|
+
</g-mask>
|
|
33
|
+
<!-- #endif -->
|
|
34
|
+
<g-render-image v-if="hasPhoto" :domId="domId" :successTips="successTips" :saveTips="saveTips" ref="render" />
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { WEBVIEW_ENV } from '../../utils/consts';
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
props: {
|
|
42
|
+
domId: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: '',
|
|
45
|
+
},
|
|
46
|
+
title: {
|
|
47
|
+
type: [String, Boolean],
|
|
48
|
+
default: '分享至:',
|
|
49
|
+
},
|
|
50
|
+
successTips: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '已保存到相册',
|
|
53
|
+
},
|
|
54
|
+
saveTips: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: '长按图片保存到相册',
|
|
57
|
+
},
|
|
58
|
+
shareTips: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: '点击分享至微信',
|
|
61
|
+
},
|
|
62
|
+
titleSize: {
|
|
63
|
+
type: [String, Number],
|
|
64
|
+
default: 14,
|
|
65
|
+
},
|
|
66
|
+
titleColor: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '',
|
|
69
|
+
},
|
|
70
|
+
gutter: {
|
|
71
|
+
type: [String, Number],
|
|
72
|
+
default: 20,
|
|
73
|
+
},
|
|
74
|
+
customStyle: {
|
|
75
|
+
type: Object,
|
|
76
|
+
default: () => ({}),
|
|
77
|
+
},
|
|
78
|
+
buttons: {
|
|
79
|
+
type: Array,
|
|
80
|
+
default: () => [
|
|
81
|
+
{
|
|
82
|
+
type: 'photo',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: 'weixin',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
data() {
|
|
91
|
+
return {
|
|
92
|
+
arrow:
|
|
93
|
+
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAADLCAMAAADurnmnAAAAOVBMVEVHcEz///////////////////////////////////////////////////////////////////////99PJZNAAAAE3RSTlMAD8wYB9f24O3mIT6PZVEuerej0GYvbAAABfVJREFUeNrtnemymzoQhK2NTYCQ3v9hr3Yk8JJTqRtPV50ZITb/+Oi0BoGd5PFAiYUP7gEZjA/DsECSW08+aEBy6QZU9COSDzse+Tagou+ZfNjQyPWEiq7nQj4cWORmrOTDCkuOhb6ohhxqJrDwlnywOOSiJx84DrkdQNGXK/kwomo+DBOq5j4YSm2ZfA5Ti75gkEfmKV1ASYAJu+FTK/qUF4BZbyBv8twgP3XUanoKPkwHAHlBvlwA8fmXHgvrVFZlg/gkZh9P6OGynkjPBLY5izxNzUbZJzwTkIm8i6HdIXs7lcf8nLjuU72dsvWu+SWI3k6F+0hO9J5k7GdymvckzQN5ob9exZwbwXuS3FUGnmPWjbk9ME2WYGkZT8jQms3cUqdIlpZCd25chI8piT1XuHlOOme+fi9vprWhNUDtfALPlbvuzRk8BqWHDbmpjPVG9nJgmgkVdrGO8x9E/QOgUx2NHXu0+dluE1Sqo9z5/MMgUh3ZoeYfhyBhFjf+nHzUJMwyzj9PAiVGBLNE1ce52fjcf3vuKLXNMmYtU3f2Y7Pqj7uvj8+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PyCQi6XZBRdwHHIjdaVOwbK0xwr5BqNXNzIBYzNvbNbcMNgbB5Sm7iOHUOxuanQaY1SWpbCm9j9skgQm5suPDzIAGUXch8gNhc38IWhmOUqOobNJQvkPn2Y3AQGuajAZQ1jlhSN6CDkomLXwDALE8stBIjL7wFhFvYEHMIswJJ78tQQJS/wJRkAufSSC7FckmF45Z4QkgsRFE9L2UaQ3HvlBF8qvsQAvwdDMPlTcPqSM1TJk1eu9AwEnAVy1iZ9r8grck4EcJbaRXL64IlTnKvUJAI4y7Cs6QDAW94TnrhXZAZ/EhCCPwtJHFxCgssEfoWPxwDA5ZNEAH+Rkjx31+pCHDz/PyKXnjz4Q74L6ncgTO435ABP+qDcAT3kpT1A4sqOFFHm1BBD1g6Q+zf+YfwHxDic0LbQMKwAAAAASUVORK5CYII=',
|
|
94
|
+
show: false,
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
computed: {
|
|
98
|
+
hasPhoto({ buttons }) {
|
|
99
|
+
return buttons.find(({ type }) => type === 'photo') != null;
|
|
100
|
+
},
|
|
101
|
+
hasWeixin({ buttons }) {
|
|
102
|
+
// #ifdef H5
|
|
103
|
+
if (window.electron) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
// #endif
|
|
107
|
+
return buttons.find(({ type }) => ['weixin', 'timeline'].includes(type)) != null;
|
|
108
|
+
},
|
|
109
|
+
guideStyle() {
|
|
110
|
+
if (WEBVIEW_ENV.mp) {
|
|
111
|
+
return {
|
|
112
|
+
top: '80rpx',
|
|
113
|
+
right: '180rpx',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return {};
|
|
117
|
+
},
|
|
118
|
+
titleStyle({ titleColor, titleSize }) {
|
|
119
|
+
return {
|
|
120
|
+
color: titleColor,
|
|
121
|
+
fontSize: uni.$uv.addUnit(titleSize),
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
itemStyle({ gutter }) {
|
|
125
|
+
return {
|
|
126
|
+
padding: `${uni.$uv.addUnit(gutter)}`,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
methods: {
|
|
131
|
+
click(data) {
|
|
132
|
+
// #ifndef APP
|
|
133
|
+
if (!WEBVIEW_ENV.app && ['weixin', 'timeline'].includes(data.type)) {
|
|
134
|
+
this.show = true;
|
|
135
|
+
setTimeout(() => {
|
|
136
|
+
this.show = false;
|
|
137
|
+
}, 1500);
|
|
138
|
+
}
|
|
139
|
+
// #endif
|
|
140
|
+
if (data.type === 'photo') {
|
|
141
|
+
this.$refs.render.download();
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<style lang="scss" scoped>
|
|
149
|
+
.share-guide {
|
|
150
|
+
text-align: right;
|
|
151
|
+
position: fixed;
|
|
152
|
+
top: 80rpx;
|
|
153
|
+
right: 80rpx;
|
|
154
|
+
color: #fff;
|
|
155
|
+
z-index: 19920604;
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="flex justify-center flex-col" :style="[customStyle]" @tap.stop="$uv.throttle(click)">
|
|
3
|
+
<image :src="url" :style="[style]" mode="heightFix" />
|
|
4
|
+
<text v-if="text" :style="[textStyle]"> {{ text }} </text>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import { WEBVIEW_ENV } from '../../utils/consts';
|
|
10
|
+
import { TYPES } from '../../utils/message';
|
|
11
|
+
import toast from '../../utils/toast';
|
|
12
|
+
import { postMessage } from '../../utils';
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
props: {
|
|
16
|
+
size: {
|
|
17
|
+
type: [Number, String],
|
|
18
|
+
default: 40,
|
|
19
|
+
},
|
|
20
|
+
url: {
|
|
21
|
+
type: String,
|
|
22
|
+
default:
|
|
23
|
+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dHSevAZlVP4Bi6FnS/gMCN9Hg6FPPoMLAo6HLs8vkB5rzLS+DIROsTPPGBBMTprnQuhW6knf9Lh0JQ3SlS6yWrBpVJaawG7MdfobyCq54cUTGHErdsvmjq5HLGgYGfc4gJQyWXa0ShetggbBbf5QQ+goL+PA2ZDfXI7TIXxAJke+nArAmIuSxg3EzPOJX8gYridK4tvHgHQHyOozhvOQ1EutZ2ZsZVdGjRww3nBYtpza2ODjI57Jycp3G8eWIT7eC6E4JzHFFjFKDAILB4hV8WscmDw3psepfDF5/uvZvdfHvOc+frr7fdfwL9/RAAPMf79WATy4MHSd4+W/pTH3cOv13gVNwLeV4/7oB4tIlfS14L6A8TbR6b3D3W/f+x8/2CcpIPxfzu6hx8XsrM/f1yAnz8C69Tnjx/J3knKZLi2SwAAAABJRU5ErkJggg==',
|
|
24
|
+
},
|
|
25
|
+
text: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '微信好友',
|
|
28
|
+
},
|
|
29
|
+
fontSize: {
|
|
30
|
+
type: [Number, String],
|
|
31
|
+
default: 13,
|
|
32
|
+
},
|
|
33
|
+
color: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: '',
|
|
36
|
+
},
|
|
37
|
+
data: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({}),
|
|
40
|
+
},
|
|
41
|
+
space: {
|
|
42
|
+
type: [Number, String],
|
|
43
|
+
default: 4,
|
|
44
|
+
},
|
|
45
|
+
custom: {
|
|
46
|
+
type: Function,
|
|
47
|
+
default: null,
|
|
48
|
+
},
|
|
49
|
+
customStyle: {
|
|
50
|
+
type: Object,
|
|
51
|
+
default: () => ({}),
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
computed: {
|
|
55
|
+
style({ size }) {
|
|
56
|
+
const value = uni.$uv.addUnit(size);
|
|
57
|
+
return {
|
|
58
|
+
width: value,
|
|
59
|
+
height: value,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
textStyle({ fontSize, color, space }) {
|
|
63
|
+
return {
|
|
64
|
+
fontSize: uni.$uv.addUnit(fontSize),
|
|
65
|
+
marginTop: uni.$uv.addUnit(space),
|
|
66
|
+
color,
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
click() {
|
|
72
|
+
if (typeof this.custom === 'function') {
|
|
73
|
+
this.custom(this.data);
|
|
74
|
+
} else {
|
|
75
|
+
const options = {
|
|
76
|
+
...this.data,
|
|
77
|
+
provider: 'weixin',
|
|
78
|
+
scene: 'WXSceneSession',
|
|
79
|
+
};
|
|
80
|
+
// #ifdef APP-PLUS
|
|
81
|
+
uni.share({
|
|
82
|
+
...options,
|
|
83
|
+
fail: (res) => {
|
|
84
|
+
const { errCode } = res;
|
|
85
|
+
if (errCode === -100) {
|
|
86
|
+
toast.error('微信未安装');
|
|
87
|
+
} else {
|
|
88
|
+
toast.error('分享失败');
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
// #endif
|
|
93
|
+
// #ifdef H5
|
|
94
|
+
if (WEBVIEW_ENV.app) {
|
|
95
|
+
postMessage({
|
|
96
|
+
type: TYPES.SHARE_PAGE,
|
|
97
|
+
payload: options,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// #endif
|
|
101
|
+
this.$emit('confirm');
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="skeleton" :style="[style]">
|
|
3
|
+
<scroll-view scroll-y class="skeleton-scroll">
|
|
4
|
+
<slot name="default"></slot>
|
|
5
|
+
</scroll-view>
|
|
6
|
+
</view>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import color from '../../configs/color';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
props: {
|
|
14
|
+
customStyle: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => ({}),
|
|
17
|
+
},
|
|
18
|
+
height: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'auto',
|
|
21
|
+
},
|
|
22
|
+
bgColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: () => color.bgColor,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
computed: {
|
|
28
|
+
style() {
|
|
29
|
+
return Object.assign(
|
|
30
|
+
{
|
|
31
|
+
height: this.height,
|
|
32
|
+
backgroundColor: this.bgColor,
|
|
33
|
+
},
|
|
34
|
+
this.customStyle,
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style lang="scss" scoped>
|
|
42
|
+
.skeleton {
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 0;
|
|
45
|
+
left: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
z-index: 999;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
&-scroll {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="skeletonView" :style="[style]">
|
|
3
|
+
<slot name="default"></slot>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
customStyle: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({}),
|
|
13
|
+
},
|
|
14
|
+
borderRadius: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: 0,
|
|
17
|
+
},
|
|
18
|
+
bgColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: '#e5e5e5',
|
|
21
|
+
},
|
|
22
|
+
width: {
|
|
23
|
+
type: [String, Number],
|
|
24
|
+
default: 'auto',
|
|
25
|
+
},
|
|
26
|
+
height: {
|
|
27
|
+
type: [String, Number],
|
|
28
|
+
default: 20,
|
|
29
|
+
},
|
|
30
|
+
marginTop: {
|
|
31
|
+
type: [String, Number],
|
|
32
|
+
default: 0,
|
|
33
|
+
},
|
|
34
|
+
marginLeft: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: 0,
|
|
37
|
+
},
|
|
38
|
+
marginRight: {
|
|
39
|
+
type: [String, Number],
|
|
40
|
+
default: 0,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
style() {
|
|
45
|
+
return {
|
|
46
|
+
borderRadius: uni.$uv.addUnit(this.borderRadius),
|
|
47
|
+
backgroundColor: this.bgColor,
|
|
48
|
+
width: uni.$uv.addUnit(this.width),
|
|
49
|
+
height: uni.$uv.addUnit(this.height),
|
|
50
|
+
marginTop: uni.$uv.addUnit(this.marginTop),
|
|
51
|
+
marginLeft: uni.$uv.addUnit(this.marginLeft),
|
|
52
|
+
marginRight: uni.$uv.addUnit(this.marginRight),
|
|
53
|
+
...this.customStyle,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<style lang="scss" scoped>
|
|
61
|
+
.skeletonView {
|
|
62
|
+
animation-duration: 1.5s;
|
|
63
|
+
animation-name: animate-fade;
|
|
64
|
+
animation-timing-function: ease-in-out;
|
|
65
|
+
animation-iteration-count: infinite;
|
|
66
|
+
}
|
|
67
|
+
@keyframes animate-fade {
|
|
68
|
+
0% {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
50% {
|
|
72
|
+
opacity: 0.4;
|
|
73
|
+
}
|
|
74
|
+
100% {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</style>
|