feat(share): add loading mask

This commit is contained in:
woody 2025-09-22 15:12:45 +08:00
parent d92be1e979
commit 06ff3180e5
1 changed files with 12 additions and 1 deletions

View File

@ -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;
}
} }
/* 微信环境全屏覆盖样式 */ /* 微信环境全屏覆盖样式 */