This commit is contained in:
zpc 2025-06-13 17:45:09 +08:00
parent d29d6d8722
commit 34dfd1cb58

View File

@ -1,5 +1,7 @@
<template>
<uni-popup ref="popup" type="center" maskBackgroundColor="rgba(0,0,0,0.9)" @touchmove.stop.prevent="">
<view v-if="visible"
style="width: 100vw;height: 100vh;background-color:rgba(0,0,0,0.9) ;position: fixed;top: 0px;left: 0px;z-index: 9999;display: flex;justify-content: center;align-items: center;"
@touchmove.stop.prevent="">
<view v-if="visible" class="preview-popup" @touchmove.stop.prevent="moveHandle">
<!-- 翻转卡片容器 -->
<view class="flip-container" :class="{ 'flipped': showList }">
@ -22,7 +24,8 @@
<!-- 加载中状态 -->
<view class="loading-container center" v-if="loading">
<view class="loading-icon">
<image :src="$img('/static/img/loading.gif')" mode="aspectFit" @error="handleLoadingError"></image>
<image :src="$img('/static/img/loading.gif')" mode="aspectFit" @error="handleLoadingError">
</image>
<view class="loading-dot" v-if="loadingError"></view>
</view>
<view class="loading-text">加载中...</view>
@ -39,7 +42,7 @@
</view>
<!-- 补齐空白格保证每行3个 -->
<view v-for="n in 3 - row.length" :key="'empty-' + n" class="item empty"></view>
</view>
<view style="height:20rpx;width: 100%;"></view>
</scroll-view>
@ -70,7 +73,8 @@
<image :src="$img('/static/img/close.png')" lazy-load></image>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
@ -248,30 +252,12 @@ export default {
open() {
this.visible = true;
this.$nextTick(() => {
if (this.$refs.popup) {
//
setTimeout(() => {
this.$refs.popup.open();
}, 50);
} else {
console.error('popup ref不存在请检查组件是否正确挂载');
//
setTimeout(() => {
if (this.$refs.popup) {
this.$refs.popup.open();
}
}, 300);
}
});
},
//
closePopup() {
this.visible = false;
if (this.$refs.popup) {
this.$refs.popup.close();
}
this.$emit('close');
},
@ -386,7 +372,7 @@ export default {
height: 610rpx;
padding-top: 5rpx;
padding-left: 8rpx;
.row {
display: flex;