-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfull-img.vue
64 lines (60 loc) · 1.24 KB
/
full-img.vue
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
<template>
<div class="fullImg flex justify-center align-center">
<div class="img" @click="screenShow=true">
<img :src="url" :class="fit" >
</div>
<transition name="slide-fade">
<div class="fullScreenImg flex justify-center align-center" v-if="screenShow" @click="screenShow=false">
<img :src="url" :class="fit">
</div>
</transition>
</div>
</template>
<script>
export default {
name: "fullScreen",
props:['url','fit'],
data(){
return{
screenShow:false
}
}
}
</script>
<style lang="scss" scoped>
/*图片显示方式*/
.fill{
object-fit: fill;
}
.cover{
object-fit: cover;
}
.contain{
object-fit: contain;
}
.fullImg{
.img{
width: 100%;
height: 100%;
img{
width: 100%;
height: 100%;
}
}
.fullScreenImg {
background: rgba(0,0,0,0.7);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 100px;
z-index: 9;
img{
height: 600px;
width: 450px;
/*box-shadow: 0 0 3px #ddd;*/
}
}
}
</style>