Login.vue
2.4 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
<script setup>
import { ref } from 'vue'
const username = ref('')
const password = ref('')
const onSubmit = (values) => {
console.log('submit', values)
}
</script>
<template>
<div class="counter">
<div style="height: 7%"></div>
<div class="ban">
<div class="left">
<h2>用户登录</h2>
<div class="login">
<van-form @submit="onSubmit">
<van-cell-group inset>
<van-field
v-model="username"
name="用户名"
label="用户名"
placeholder="用户名"
:rules="[{ required: true, message: '请填写用户名' }]"
/>
<van-field
v-model="password"
type="password"
name="密码"
label="密码"
placeholder="密码"
:rules="[{ required: true, message: '请填写密码' }]"
/>
</van-cell-group>
<div style="margin: 16px">
<van-button round block type="primary" native-type="submit"> 登录 </van-button>
</div>
</van-form>
</div>
<div class="msg">
<div class="left">其他登录方式 ></div>
<div class="right">手机验证码</div>
</div>
<div class="footer">
登录即表示同意平台 <span>《隐私政策》</span>和 <span>《用户协议》</span>
</div>
</div>
<div class="right">
</div>
</div>
</div>
</template>
<style lang="scss">
.counter {
width: 100%;
height: 100vh;
background-color: #f2f2f2;
.ban {
position: relative;
margin: 7% auto;
width: 800px;
height: 500px;
background-color: #fff;
border-radius: 50px;
h2 {
padding: 60px 0 0 40px;
}
.login {
margin-top: 60px;
width: 55%;
padding-left: 20px;
.van-field__left-icon {
padding-right: 20px;
}
}
.msg {
padding-left: 45px;
display: flex;
width: 50%;
justify-content: space-between;
align-items: center;
.left {
color: #bbc5d2;
}
.right {
color: #7888ff;
}
}
.footer {
position: fixed;
bottom: 85px;
left: 30%;
text-align: center;
font-size: 12px;
span {
color: #7888ff;
}
}
}
.right {
width: 40%;
}
}
</style>