Popup.vue
1.34 KB
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>
<van-popup :value="value" @input="val=>this.$emit('input',val)" position="right" :style="{ height: '100%',width: '85%' }">
<div class="filter_container">
<div :style="{paddingTop: GStatusBarHeight+'px',height: '85vh',overflowY:'scroll'}">
<slot />
</div>
<div class="button">
<div class="btn reset" @click="handleReset">重置</div>
<div class="btn sure" @click="handleSure">确定</div>
</div>
</div>
</van-popup>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
name: 'Popup',
props: {
value: Boolean,
},
computed: {
...mapGetters('common', ['GStatusBarHeight']),
},
methods: {
handleReset() {
this.$emit('reset')
},
handleSure() {
this.$emit('sure')
}
}
}
</script>
<style lang="less" scoped>
.filter_container {
display: flex;
flex-direction: column;
padding: 50px 15px;
height: 100%;
}
.button {
display: flex;
align-items: flex-end;
flex: 1;
justify-content: space-between;
.btn {
width: 43%;
display: flex;
justify-content: center;
align-items: center;
height: 45px;
font-size: 15px;
border-radius: 5px;
}
.reset {
background-color: #f6f6f6;
color: #666;
}
.sure {
background-image: linear-gradient(to right, #25a3df, #106abc);
color: #fff;
}
}
</style>