3333
This commit is contained in:
parent
d29d6d8722
commit
34dfd1cb58
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<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 v-if="visible" class="preview-popup" @touchmove.stop.prevent="moveHandle">
|
||||||
<!-- 翻转卡片容器 -->
|
<!-- 翻转卡片容器 -->
|
||||||
<view class="flip-container" :class="{ 'flipped': showList }">
|
<view class="flip-container" :class="{ 'flipped': showList }">
|
||||||
|
|
@ -22,7 +24,8 @@
|
||||||
<!-- 加载中状态 -->
|
<!-- 加载中状态 -->
|
||||||
<view class="loading-container center" v-if="loading">
|
<view class="loading-container center" v-if="loading">
|
||||||
<view class="loading-icon">
|
<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 class="loading-dot" v-if="loadingError"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="loading-text">加载中...</view>
|
<view class="loading-text">加载中...</view>
|
||||||
|
|
@ -39,7 +42,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 补齐空白格,保证每行3个 -->
|
<!-- 补齐空白格,保证每行3个 -->
|
||||||
<view v-for="n in 3 - row.length" :key="'empty-' + n" class="item empty"></view>
|
<view v-for="n in 3 - row.length" :key="'empty-' + n" class="item empty"></view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view style="height:20rpx;width: 100%;"></view>
|
<view style="height:20rpx;width: 100%;"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
@ -70,7 +73,8 @@
|
||||||
<image :src="$img('/static/img/close.png')" lazy-load></image>
|
<image :src="$img('/static/img/close.png')" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -248,30 +252,12 @@ export default {
|
||||||
open() {
|
open() {
|
||||||
this.visible = true;
|
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() {
|
closePopup() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
if (this.$refs.popup) {
|
|
||||||
this.$refs.popup.close();
|
|
||||||
}
|
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -386,7 +372,7 @@ export default {
|
||||||
height: 610rpx;
|
height: 610rpx;
|
||||||
padding-top: 5rpx;
|
padding-top: 5rpx;
|
||||||
padding-left: 8rpx;
|
padding-left: 8rpx;
|
||||||
|
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user