perf: 登录页

登录页改动,语言选择功能未实现
This commit is contained in:
陈劲松
2020-02-18 21:31:39 +08:00
parent 90981fca4a
commit c8420fa808
5 changed files with 88 additions and 144 deletions

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="30px" height="27px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1090 -737 )">
<path d="M 30 19.5943053208275 C 29.9711583333333 20.9438560308555 28.8528894086021 22.0377313464236 27.4734765591398 22.0377313464236 L 26.2247422311828 22.0377313464236 L 26.2247422311828 24.4810323018934 C 26.2247422311828 25.830374526648 25.1063028225806 26.9242915497896 23.7271030913979 27 L 2.49738341397849 27 C 1.1181410483871 26.9242081609397 0 25.830374526648 0 24.4809489130435 L 0 7.37788393232819 C 0 6.0285 1.11809841397849 4.93466636570827 2.49738341397849 4.93466639200561 L 3.74624561827957 4.93466639200561 L 3.74624561827957 2.4912403401122 C 3.74624561827957 1.14168963008415 4.86438666666667 0.0480227734922861 6.24397 0 L 27.4735191935484 0 C 28.8529320430108 0.0480227734922861 29.9712435752688 1.14168963008415 30 2.4912403401122 L 30 19.5943053208275 Z M 23.7271456989247 6.15621261395512 L 2.49738341397849 6.15621261395512 C 1.8077622311828 6.15621261395512 1.24869169354839 6.70312944424965 1.24869172043011 7.37788393232819 L 1.24869172043011 24.4809489130435 C 1.24869172043011 25.1555783309958 1.80776225806452 25.7026619389902 2.49738341397849 25.7026619389902 L 23.7271456989247 25.7026619389902 C 24.4167668817204 25.7026619389902 24.9758374193548 25.1555783309958 25 24.4809489130435 L 25 7.37788393232819 C 24.9758374193548 6.70312941795231 24.4167668817204 6.15621261395512 23.7271456989247 6.15621261395512 Z M 28.7223387634409 2.4912403401122 C 28.7223387634409 1.81648582573633 28.1632682258065 1.26969409186536 27.4734765591398 1.26969411816269 L 6.24392739247312 1.26969411816269 C 5.55409309139785 1.26969411816269 4.99502258064516 1.81648585203366 4.99502258064516 2.4912403401122 L 4.99502258064516 5 L 23.7271456989247 5 C 25.1064306989247 4.93466639200561 26.2249553494624 6.02850002629734 26 7.37788393232819 L 26 20.8159766392006 L 27.4736470698925 20.8159766392006 C 28.1632682526882 20.8159766392006 28.7223387903226 20.2688930312062 28.7223387634409 19.5943053208275 L 28.7223387634409 2.49107356241234 Z " fill-rule="nonzero" fill="#31759c" stroke="none" transform="matrix(1 0 0 1 1090 737 )" />
</g>
</svg>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="29px" height="27px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1134 -737 )">
<path d="M 29 19.5943053208275 C 28.9721197222222 20.9438560308555 27.8911264283154 22.0377313464236 26.5576940071685 22.0377313464236 L 25.35058415681 22.0377313464236 L 25.35058415681 24.4810323018934 C 25.35058415681 25.830374526648 24.269426061828 26.9242915497896 22.9361996550179 27 L 2.41413730017921 27 C 1.08086968010753 26.9242081609397 0 25.830374526648 0 24.4809489130435 L 0 7.37788393232819 C 0 6.0285 1.08082846684588 4.93466636570827 2.41413730017921 4.93466639200561 L 3.62137076433692 4.93466639200561 L 3.62137076433692 2.4912403401122 C 3.62137076433692 1.14168963008415 4.70224044444445 0.0480227734922861 6.03583766666667 0 L 26.5577352204301 0 C 27.8911676415771 0.0480227734922861 28.9722021227599 1.14168963008415 29 2.4912403401122 L 29 19.5943053208275 Z M 22.9362408422939 6.15621261395512 L 2.41413730017921 6.15621261395512 C 1.74750349014337 6.15621261395512 1.20706863709677 6.70312944424965 1.20706866308244 7.37788393232819 L 1.20706866308244 24.4809489130435 C 1.20706866308244 25.1555783309958 1.74750351612903 25.7026619389902 2.41413730017921 25.7026619389902 L 22.9362408422939 25.7026619389902 C 23.6028746523297 25.7026619389902 24.1433095053763 25.1555783309958 24 24.4809489130435 L 24 7.37788393232819 C 24.1433095053763 6.70312941795231 23.6028746523297 6.15621261395512 22.9362408422939 6.15621261395512 Z M 27.7649274713262 2.4912403401122 C 27.7649274713262 1.81648582573633 27.2244926182796 1.26969409186536 26.5576940071685 1.26969411816269 L 6.03579647939068 1.26969411816269 C 5.36895665501792 1.26969411816269 4.82852182795699 1.81648585203366 4.82852182795699 2.4912403401122 L 4.82852182795699 5 L 22.9362408422939 5 C 24.2695496756272 4.93466639200561 25.350790171147 6.02850002629734 25 7.37788393232819 L 25 20.8159766392006 L 26.5578588342294 20.8159766392006 C 27.2244926442652 20.8159766392006 27.7649274973118 20.2688930312062 27.7649274713262 19.5943053208275 L 27.7649274713262 2.49107356241234 Z " fill-rule="nonzero" fill="#000000" stroke="none" fill-opacity="0.603921568627451" transform="matrix(1 0 0 1 1134 737 )" />
</g>
</svg>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,37 +1,20 @@
<template> <template>
<div class="login"> <div class="login">
<div class="model"> <div class="model"></div>
<div class='login-right'> <div class="logo"><img height="155" src="../../assets/img/logo-big.png"></div>
<div class="login-content"> <div class='login-box'>
<div class="login-title">NEZHA</div> <div class="login-label"></div>
<div class="login-label" style="padding-top: 35px;">User Name</div> <div class="login-input">
<div class="login-input"> <input v-model="loginData.username" ></input>
<input v-model="loginData.username" class="inputL"></input> </div>
</div> <div class="login-label"></div>
<div class="login-label">Password</div> <div class="login-input">
<div class="login-input"> <input v-model="loginData.password" type="password"></input>
<input v-model="loginData.password" type="password" class="inputL" @keyup.enter="login"></input> </div>
</div> <div class="login-foot">
<div class="login-button"> <button @click="login" class="login-btn" id="login">Login</button>
<button @click="login" id="login">Login</button> <div class="login-foot-langs">
</div> <i class="nz-icon nz-icon-lang-en"></i><i class="nz-icon nz-icon-arrow-down"></i>
<div class="login-foot">
<div class="login-foot-remember"></div>
<div class="login-foot-langs">
<div @click="changeLang('en')" class="login-foot-lang" :class="{'login-foot-lang-active': lang == 'en'}">
<img v-if="lang == 'en'" src="../../assets/img/lang-box-active.svg"/>
<img v-if="lang != 'en'" src="../../assets/img/lang-box.svg"/>
<span class="lang-name lang-name-en" id="lang-en">EN</span>
<div v-if="lang == 'en'" class="lang-active-model"></div>
</div>
<div @click="changeLang('cn')" class="login-foot-lang" :class="{'login-foot-lang-active': lang == 'cn'}">
<img v-if="lang == 'cn'" src="../../assets/img/lang-box-active.svg"/>
<img v-if="lang != 'cn'" src="../../assets/img/lang-box.svg"/>
<span class="lang-name" id="lang-ch"></span>
<div v-if="lang == 'cn'" class="lang-active-model"></div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -81,117 +64,90 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.login { .login {
background-image: url("../../assets/img/login-background.png"); background-image: url("../../assets/img/login-background.png");
background-size: 100% 100%; background-size: cover;
position: relative;
} }
.model { .model {
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: rgba(0, 0, 0, 0.737); background-color: rgba(130, 130, 135, 0.4);
} position: absolute;
button { top: 0;
width: 80%; left: 0;
padding-top: 10px; z-index: 1;
padding-bottom: 12px;
background: #31759c;
border-radius: 270px;
font-size: 18px;
box-shadow: none;
outline: none;
border: none;
color: #fff;
display: block;
margin: 0 auto;
margin-top: 50px;
cursor: pointer;
}
button:hover {
background-color: #5c9fc4;
} }
.login-right { .logo {
position: relative;
width: 500px;
height: 475px;
margin: auto;
overflow: hidden;
padding: 250px 0 0 0;
}
.login-title {
position: absolute; position: absolute;
font-size: 90px; top: 25%;
font-weight: 400; left: 50%;
transform: translateX(-50%);
z-index: 2;
}
.login-box {
width: 460px;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 50%;
height: 100%;
z-index: 2;
}
.login-box .login-input {
padding: 20px 0;
height: 60px;
}
.login-box .login-input input {
height: 100%;
width: calc(100% - 30px);
background-color: rgba(0, 0, 0, 0.55);
padding-left: 30px;
font-size: 20px;
border: none;
outline: none;
color: white; color: white;
top: 60px; border-radius: 4px;
width: 100%;
text-align: center;
}
.login-label {
margin-left: 10%;
font-size: 14px;
color: rgba(0, 0, 0, 0.6);
}
.login-input {
height: 30px;
margin: 28px 0 16px 10%;
width: 80%;
border-bottom: 2px solid rgba(0, 0, 0, 0.6);
}
.login-foot {
position: absolute;
bottom: 30px;
width: 100%;
}
.login-foot>div {
display: inline-block;
}
.login-foot-langs {
float: right;
padding-right: 10%;
}
.login-foot-lang {
display: inline-block;
margin-left: 8px;
cursor: pointer;
position: relative;
}
.lang-active-model {
width: 19px;
height: 16px;
position: absolute;
border-radius: 2px;
background-color: rgba(49, 117, 156, 0.27);
top: 8px;
left: 9px;
}
.lang-name {
position: absolute;
left: 6px;
top: 7px;
font-size: 13px;
font-weight: bold;
color: #656565;
}
.lang-name-en {
left: 4px;
}
.login-foot-lang-active .lang-name {
color: #31759c;
}
.login-input input {
outline: none;
border: none;
width: 100%;
height: 100%;
font-size: 14px;
} }
.login-content { .login-foot {
background: #fff; padding-top: 45px;
width: 100%; display: flex;
height: 100%; justify-content: space-between;
border-radius: 10px; }
.login-btn {
color: white;
border-radius: 3px;
background-image: $btn-normal-background-color;
border: none;
outline: none;
height: 44px;
width: 320px;
cursor: pointer;
font-size: 14px;
box-shadow: 0 2px 3px 2px rgba(0, 0, 0, 0.30);
}
.login-foot-langs {
position: relative;
cursor: pointer;
}
.login-foot-langs .nz-icon-lang-en, .login-foot-langs .nz-icon-lang-zh {
font-size: 40px;
color: white;
margin-right: 30px;
}
.nz-icon-arrow-down, .nz-icon-arrow-up {
position: absolute;
font-size: 18px;
color: white;
top: 50%;
right: 0;
transform: translateY(-50%);
} }
</style> </style>