Merge pull request '邓洁: 登录框大小' (#161) from dengjie into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/161
This commit is contained in:
@@ -1,47 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-box" id="login-box">
|
<div class="login-box" id="login-box">
|
||||||
<el-form
|
<el-form
|
||||||
:model="loginForm"
|
:model="loginForm"
|
||||||
ref="formInstance"
|
ref="formInstance"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="65px"
|
label-width="65px"
|
||||||
>
|
>
|
||||||
<h3>FateVerse</h3>
|
<h3>Tunnel Cloud</h3>
|
||||||
<el-form-item prop="username" label="账号">
|
<el-form-item prop="username" label="账号">
|
||||||
<el-input v-model="loginForm.username" :prefix-icon="User"></el-input>
|
<el-input v-model="loginForm.username" :prefix-icon="User"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password" label="密码">
|
<el-form-item prop="password" label="密码">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
type="password"
|
type="password"
|
||||||
:prefix-icon="Lock"
|
:prefix-icon="Lock"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" label="验证码">
|
<el-form-item prop="code" label="验证码">
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.code"
|
v-model="loginForm.code"
|
||||||
:prefix-icon="key"
|
:prefix-icon="key"
|
||||||
@keyup.enter.native="handleLogin(formInstance)"
|
@keyup.enter.native="handleLogin(formInstance)"
|
||||||
></el-input>
|
></el-input>
|
||||||
<img :src="codeImg" alt="" @click="getCode" />
|
<img :src="codeImg" alt="" @click="getCode"/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleLogin(formInstance)" type="primary"
|
<el-button @click="handleLogin(formInstance)" type="primary">登录
|
||||||
>登录</el-button
|
</el-button>
|
||||||
>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRouter } from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import { getCodeImg } from "../../api/login";
|
import {getCodeImg} from "../../api/login";
|
||||||
import { useAuthStore } from "@/store/userstore";
|
import {useAuthStore} from "@/store/userstore";
|
||||||
import { ElLoading } from "element-plus";
|
import {ElLoading} from "element-plus";
|
||||||
import { User, Lock, Key } from "@element-plus/icons-vue";
|
import {User, Lock, Key} from "@element-plus/icons-vue";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
@@ -53,9 +53,9 @@ const loginForm = reactive({
|
|||||||
const codeImg = ref("");
|
const codeImg = ref("");
|
||||||
const formInstance = ref();
|
const formInstance = ref();
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
username: [{ required: true, message: "请输入账户名", trigger: "blur" }],
|
username: [{required: true, message: "请输入账户名", trigger: "blur"}],
|
||||||
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
password: [{required: true, message: "请输入密码", trigger: "blur"}],
|
||||||
code: [{ required: true, message: "请输入验证码", trigger: "blur" }],
|
code: [{required: true, message: "请输入验证码", trigger: "blur"}],
|
||||||
});
|
});
|
||||||
|
|
||||||
//获取二维码
|
//获取二维码
|
||||||
@@ -98,14 +98,27 @@ onBeforeUnmount(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-button){
|
||||||
|
font-size:22px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item__label) {
|
||||||
|
width: 80px!important;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
:deep(.el-input__wrapper ) {
|
||||||
|
padding: 5px 11px;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
.login-box {
|
.login-box {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #4158d0;
|
background-color: #4158d0;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
43deg,
|
43deg,
|
||||||
#4158d0 0%,
|
#4158d0 0%,
|
||||||
#c850c0 46%,
|
#c850c0 46%,
|
||||||
#ffcc70 100%
|
#ffcc70 100%
|
||||||
);
|
);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -128,17 +141,20 @@ onBeforeUnmount(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
// width: ;
|
// width: ;
|
||||||
flex: 2;
|
flex: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 32px;
|
height: 45px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user