LoginTabs.vue
1.1 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
<template>
<div class="login_tabs">
<router-link to="/user/login/phone" :class="{active:type==1}">
手机号登录
<div class="bottom-border-1" v-show="type==1"></div>
</router-link>
<router-link to="/user/login/username" :class="{active:type==2}">
账号密码登录
<div class="bottom-border-2" v-show="type==2"></div>
</router-link>
</div>
</template>
<script>
export default {
name: 'LoginTabs',
props: {
type: {
type: Number,
default: 1
}
},
}
</script>
<style lang="less" scoped>
.login_tabs {
display: flex;
justify-content: center;
position: relative;
a {
position: relative;
color: #6c6c6c;
font-size: 16px;
width: 120px;
height: 30px;
text-align: center;
border-bottom: 1px solid #ccc;
&.active {
color: #106abc;
}
}
.bottom-border-1 {
position: absolute;
width: 80px;
border-bottom: 3px solid #106abc;
top: 26px;
left: 20px;
}
.bottom-border-2 {
position: absolute;
width: 80px;
border-bottom: 3px solid #106abc;
top: 26px;
right: 20px;
}
}
</style>