五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

vue-實現(xiàn)用戶的登錄頁面

2023-04-17 00:55 作者:蕪湖小量化  | 我要投稿

html部分

<!DOCTYPE html>
<html lang="en">
<head>
? ?<meta charset="UTF-8">
? ?<meta name="viewport" content="width=device-width, initial-scale=1.0">
? ?<title>登錄</title>
? ?<link rel="stylesheet" href="login.css">
? ?<script src="vue.js"></script>
</head>
<body>
? ?<div id="Application" style="text-align: center;">
? ? ? ?<div class="content">
? ? ? ? ? ?<h1>{{title}}</h1>
? ? ? ? ? ?<div class="account" style="font-size: 14px" v-if="noLogin">賬號:<input style="font-family: 楷體, sans-serif; font-size: 12px" v-model="userName" placeholder="請輸入昵稱~" type="text" /></div>
? ? ? ? ? ?<div class="password" style="font-size: 14px" v-if="noLogin">密碼:<input style="font-family: 楷體, sans-serif; font-size: 12px" v-model="password" placeholder="請輸入密碼~" type="password" /></div>
? ? ? ? ? ?<div class="login" style="font-size: 14px" v-on:click="click">{{buttonTitle}}</div>
? ? ? ?</div>
? ?</div>
? ?<script>
? ? ? ?const App = {
? ? ? ? ? ?data () {
? ? ? ? ? ? ? ?return {
? ? ? ? ? ? ? ? ? ?title:"賬戶登錄",
? ? ? ? ? ? ? ? ? ?noLogin:true,
? ? ? ? ? ? ? ? ? ?userName:"",
? ? ? ? ? ? ? ? ? ?password:"",
? ? ? ? ? ? ? ? ? ?buttonTitle:"登錄"
? ? ? ? ? ? ? ?}
? ? ? ? ? ?},
? ? ? ? ? ?methods: {
? ? ? ? ? ? ? ?click() {
? ? ? ? ? ? ? ? ? ?if (this.noLogin) {
? ? ? ? ? ? ? ? ? ? ? ?this.login()
? ? ? ? ? ? ? ? ? ?} else {
? ? ? ? ? ? ? ? ? ? ? ?this.logout()
? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ?},
? ? ? ? ? ? ? ?// 登錄
? ? ? ? ? ? ? ?login() {
? ? ? ? ? ? ? ? ? ?// 判斷賬號密碼是否為空
? ? ? ? ? ? ? ? ? ?if (this.userName.length > 0 && this.password.length > 0) {
? ? ? ? ? ? ? ? ? ? ? ?// 登錄提示后刷新頁面
? ? ? ? ? ? ? ? ? ? ? ?alert(`userName:${this.userName} password:********`)
? ? ? ? ? ? ? ? ? ? ? ?this.noLogin = false
? ? ? ? ? ? ? ? ? ? ? ?this.title = `賬戶:${this.userName}`
? ? ? ? ? ? ? ? ? ? ? ?this.buttonTitle = "注銷"
? ? ? ? ? ? ? ? ? ? ? ?this.userName = ""
? ? ? ? ? ? ? ? ? ? ? ?this.password = ""
? ? ? ? ? ? ? ? ? ?} else {
? ? ? ? ? ? ? ? ? ? ? ?alert("請輸入賬號密碼")
? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ?},
? ? ? ? ? ? ? ?// 登出
? ? ? ? ? ? ? ?logout() {
? ? ? ? ? ? ? ? ? ?// 清空登錄數(shù)據(jù)
? ? ? ? ? ? ? ? ? ?this.noLogin = true
? ? ? ? ? ? ? ? ? ?this.title = `賬戶登錄`
? ? ? ? ? ? ? ? ? ?this.buttonTitle = "登錄"
? ? ? ? ? ? ? ?}
? ? ? ? ? ?}
? ? ? ?}
? ? ? ?Vue.createApp(App).mount("#Application")
? ?</script>
</body>
</html>

css 部分

#Application{
? ?margin: auto;
? ?width: 400px;
? ?height: 200px;
? ?background-image:linear-gradient(90deg, #b0dcef 0%, #d3e9ef 50%, #d3e9ef 50%, #b0dcef 100%);
? ?display: flex;
? ?position: relative;
}

h1{
? ?font-family: 楷體, sans-serif;
? ?font-size: 16px;
? ?color: #7ab2cb;
}

.content{
? ?width: 300px;
? ?height: 150px;
? ?margin: auto;
}
.account{
? ?margin-top: 5px;
}
.password{
? ?margin-top: 5px;
}
.login{
? ?width: 40px;
? ?height: 16px;
? ?margin: 15px auto;
? ?border: #948d8d solid 2px;
? ?background-color: #de9de5;
? ?font-family: 楷體, sans-serif;
? ?font-weight: bold;
}

.login:hover{
? ?border-color: #4f5152;
}

登錄界面
輸入密碼后登錄成功


vue-實現(xiàn)用戶的登錄頁面的評論 (共 條)

分享到微博請遵守國家法律
财经| 沐川县| 石门县| 观塘区| 昭通市| 临泽县| 宜宾市| 云和县| 博野县| 马关县| 巫溪县| 武功县| 嘉祥县| 泰来县| 白山市| 旬阳县| 射洪县| 临沂市| 锡林郭勒盟| 疏附县| 昭觉县| 株洲县| 鄂伦春自治旗| 塔河县| 中超| 铜梁县| 武冈市| 五寨县| 三台县| 波密县| 莱阳市| 乌鲁木齐县| 乌审旗| 靖西县| 右玉县| 东源县| 富蕴县| 延寿县| 桃江县| 增城市| 九龙坡区|