bottomNav.vue
2.46 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// 底部导航 组件
<template>
<div class="container">
<div class="wrapper">
<div class="nav-box" :class="[isYZT?'selected':'no-selected']" @click="jumpNav('isYZT')">
<span>一张图</span>
</div>
<div class="nav-box" :class="[isCGSC?'selected':'no-selected']" @click="jumpNav('isCGSC')">
<span>成果审查管理</span>
</div>
<div class="nav-box" :class="[isSSJD?'selected':'no-selected']" @click="jumpNav('isSSJD')">
<span>实施监督预警</span>
</div>
<div class="nav-box" :class="[isPGJG?'selected':'no-selected']" @click="jumpNav('isPGJG')">
<span>批后监管</span>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'bottomNav',
components: {},
data() {
return {
isYZT: true, // 一张图
isCGSC: false, // 成果审查管理
isSSJD: false, // 实施监督预警
isPGJG: false, // 批后监管
flagArr: ['isYZT', 'isCGSC', 'isSSJD', 'isPGJG']
}
},
mounted() {},
methods: {
jumpNav(val) {
this.flagArr.forEach(ele => {
if (ele == val) this[val] = true;
else this[ele] = false;
});
},
}
}
</script>
<style scoped>
.container {
width: 100%;
}
.wrapper {
width: 50%;
margin: 0 auto;
display: flex;
justify-content: space-around;
font-size: 24px;
color: #FFFFFF;
cursor: pointer;
}
.nav-box {
width: 306px !important;
text-align: center;
cursor: pointer;
}
.selected {
background-image: url('../assets/一张图/bg-选中.png');
background-size: 100% 100%;
background-repeat: no-repeat;
height: 39.2px;
}
.selected span {
display: inline-block;
transform: translateY(-15.2px);
font-size: 30px;
}
.no-selected {
background-image: url('../assets/一张图/bg-未选中.png');
background-size: 100% 100%;
background-repeat: no-repeat;
height: 24px;
transform: translateY(16px);
}
.no-selected span {
display: inline-block;
transform: translateY(-17.2px);
font-size: 24px;
}
</style>