ShowHide.vue
860 字节
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
<template>
<div class="details">
<van-popup v-model="showHidden" round position="bottom" :style="{ height: '20%' }" close-on-click-overlay @hide="show" >
<button class="btn" >相机</button>
<button class="btn" @click="go">相册</button>
<button class="btn" @click="hide">取消</button>
</van-popup>
</div>
</template>
<script>
export default {
name: 'Details',
props: {
},
data () {
return {
showHidden : ''
}
},
methods :{
go () {
this.$router.push('/myAlbum')
},
hide () {
this.showHidden = false
}
}
}
</script>
<style lang="scss" scoped>
button{
width:100%;
height:0.45rem;
font-size:.25rem;
text-align:center;
line-height:.45rem;
display:block;
}
</style>