Mr.Shi
2023-09-12 1c7a0f0f76551c5a5360b1c54e5bd7fec44d9cae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<template>
    <div class="preview">
        <div class="preview_close" @click="closes">
            <u-icon name="close" size="20"></u-icon>
        </div>
        <div class="preview_content">
            <u-swiper :list="list" :autoplay="false" :height="300" bgColor="rgba(0,0,0,0)" :current="current"></u-swiper>
        </div>
    </div>
</template>
 
<script>
    export default {
        props: {
            list: {
                type: Array,
                default: []
            },
            current: {
                type: Number,
                default: 0
            }
        },
        methods: {
            closes() {
                this.$emit('close')
            }
        }
    }
</script>
 
<style lang="scss" scoped>
.preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    .preview_close {
        position: fixed;
        right: 50rpx;
        top: 50rpx;
        width: 70rpx;
        height: 70rpx;
        border-radius: 50%;
        background: #B2B2B2;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99999;
    }
    .preview_content::v-deep {
        position: relative;
        top: 50%;
        left: 0;
        transform: translate(0, -50%);
        .u-swiper {
            width: 100%;
            height: 300rpx !important;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }
}
</style>