feat(share): add loading mask
This commit is contained in:
parent
d92be1e979
commit
06ff3180e5
|
@ -5,6 +5,7 @@
|
||||||
>
|
>
|
||||||
<view id="shareContainer" class="share-container">
|
<view id="shareContainer" class="share-container">
|
||||||
<!-- 默认场景 -->
|
<!-- 默认场景 -->
|
||||||
|
<div class="loading-mask" v-if="loading"></div>
|
||||||
<DefaultSharePage
|
<DefaultSharePage
|
||||||
v-if="isDefaultScene"
|
v-if="isDefaultScene"
|
||||||
:qrCodeImage="qrCodeImage"
|
:qrCodeImage="qrCodeImage"
|
||||||
|
@ -66,6 +67,7 @@ export default {
|
||||||
generatedImageUrl: '',
|
generatedImageUrl: '',
|
||||||
userInfo: uni.getStorageSync('User'),
|
userInfo: uni.getStorageSync('User'),
|
||||||
sourceVisible: true,
|
sourceVisible: true,
|
||||||
|
loading: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -151,7 +153,7 @@ export default {
|
||||||
this.sourceVisible = false
|
this.sourceVisible = false
|
||||||
})
|
})
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
this.loading = false
|
||||||
if (this.isWechat) {
|
if (this.isWechat) {
|
||||||
// 微信环境:设置图片供长按保存
|
// 微信环境:设置图片供长按保存
|
||||||
this.generatedImageUrl = dataUrl
|
this.generatedImageUrl = dataUrl
|
||||||
|
@ -184,6 +186,15 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
.loading-mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 微信环境全屏覆盖样式 */
|
/* 微信环境全屏覆盖样式 */
|
||||||
|
|
Loading…
Reference in New Issue