xitons.vue
3.0 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<template>
<div>
<div class="transport-box">
<div class="fahuo">
<ul class="ul-list">
<li
v-for="(item, index) in addlist"
:key="index"
:class="active == index ? 'liks' : 'lik'"
@click="li(index)"
>
<img
:src="item.activeUrl"
class="fa-img"
alt=""
v-if="active == index"
/>
<img :src="item.url" class="fa-img" alt="" v-else />
{{ item.text }}
</li>
</ul>
</div>
</div>
<Tabbar :actives="4"></Tabbar>
<Yon v-if="fai"></Yon>
<Pei v-if="peii"></Pei>
<Pai v-if="paii"></Pai>
<Zhuan v-if="zhuan"></Zhuan>
</div>
</template>
<script>
import Tabbar from "../tabbar.vue";
import Yon from "../xiton/yonhu.vue";
import Pei from "../xiton/gon.vue";
import Pai from "../xiton/xi.vue";
import Zhuan from "../xiton/duan.vue";
export default {
components: {
Tabbar,
Yon,
Pei,
Pai,
Zhuan
},
data() {
return {
addlist: [
{
url: require("../../assets/21.png"),
activeUrl: require("../../assets/9.png"),
text: "用户管理",
},
{
url: require("../../assets/14.png"),
activeUrl: require("../../assets/4.png"),
text: "功能权限管理",
},
{
url: require("../../assets/20.png"),
activeUrl: require("../../assets/8.png"),
text: "系统消息设置",
},
{
url: require("../../assets/17.png"),
activeUrl: require("../../assets/3.png"),
text: "手机短信设置",
}
],
active: "0",
fai: true,
peii: false,
paii: false,
zhuan:false,
fayun:false,
zaitu:false,
sonda:false,
jies:false
};
},
methods: {
//tab切换
li(index) {
this.active = index;
if (this.active == 0) {
this.fai = true;
this.peii = false;
this.paii = false;
this.zhuan = false
this.fayun = false
this.zaitu = false
this.sonda = false
this.jies = false
} else if (this.active == 1) {
this.peii = true;
this.fai = false;
this.paii = false;
this.zhuan = false
this.fayun = false
this.zaitu = false
this.sonda = false
this.jies = false
} else if (this.active == 2) {
this.fai = false;
this.peii = false;
this.paii = true;
this.zhuan = false
this.fayun = false
this.zaitu = false
this.sonda = false
this.jies = false
}else if(this.active == 3){
this.fai = false;
this.peii = false;
this.paii = false;
this.zhuan = true
this.fayun = false
this.zaitu = false
this.sonda = false
this.jies = false
}
console.log(index);
},
},
};
</script>
<style scoped>
@import "../../css/transport.css";
</style>