功能变化: 登录页样式优化

pull/57/head
李强 2022-05-13 23:30:11 +08:00
parent d4602e41ae
commit 177133726f
3 changed files with 166 additions and 162 deletions

View File

@ -3,33 +3,27 @@
</template>
<script>
import { mapActions, mapState } from 'vuex'
import { mapActions } from 'vuex'
import localeMixin from '@/locales/mixin.js'
import * as api from '@/views/system/login/api'
export default {
mixins: [localeMixin],
computed: {
...mapState('d2admin', {
siteName: (state) => state.settings.siteName, //
siteLogo: (state) =>
state.settings.siteLogo || require('./image/dvadmin.png'), // logo
loginBackground: (state) =>
state.settings.loginBackground || require('./image/bg.jpg'), //
copyright: (state) => state.settings.copyright, //
keepRecord: (state) => state.settings.keepRecord, //
helpUrl: (state) => state.settings.helpUrl, //
privacyUrl: (state) => state.settings.privacyUrl, //
clauseUrl: (state) => state.settings.clauseUrl, //
captchaState: (state) => state.settings.captchaState//
})
},
beforeCreate () {
//
this.$store.dispatch('d2admin/settings/init')
},
data () {
return {
siteName: this.systemConfig('login.site_name'), //
siteLogo: this.systemConfig('login.site_logo') || require('./image/dvadmin.png'), // logo
loginBackground: this.systemConfig('login.login_background') || require('./image/bg.jpg'), //
copyright: this.systemConfig('login.copyright'), //
keepRecord: this.systemConfig('login.keep_record'), //
helpUrl: this.systemConfig('login.help_url'), //
privacyUrl: this.systemConfig('login.privacy_url'), //
clauseUrl: this.systemConfig('login.clause_url'), //
captchaState: this.systemConfig('login.captcha_state'), //
processTitle: process.env.VUE_APP_TITLE || 'D2Admin',
backgroundImage: 'url(' + this.loginBackground + ')',
//
@ -73,8 +67,16 @@ export default {
]
}
},
mounted () {},
beforeDestroy () {},
mounted () {
document.onkeydown = () => {
var key = window.event.keyCode
if (key === 13) {
this.submit()
}
}
},
beforeDestroy () {
},
methods: {
...mapActions('d2admin/account', ['login']),
/**

View File

@ -114,7 +114,7 @@ img {
.page-login--logo{
margin: 0 auto;
top: 10px;
left: 52em;
left: 52%;
position: absolute;
}
/*-- //Reset-Code --*/
@ -231,7 +231,7 @@ img {
color: #444;
text-transform: capitalize;
}
h1 {
.w3_info h1 {
font-size: 36px;
font-weight: 600;
color: #fff;

View File

@ -1,12 +1,7 @@
<template>
<div
class="w3l-signinform"
:style="{
background:
'url(' +
(loginBackground || require('./image/bg.jpg')) +
') no-repeat center'
}"
:style="{background:'url(' +(loginBackground || require('./image/bg.jpg')) +') no-repeat center', backgroundSize: '100% 100%' }"
>
<!-- container -->
<div class="wrapper">
@ -19,9 +14,7 @@
<el-card shadow="always" class="card">
<el-tabs v-model="activeName">
<el-tab-pane label="账号密码登录" name="first" stretch>
<span slot="label"
><span style="margin: 30px">账号密码登录</span></span
>
<span slot="label"><span style="margin: 30px">账号密码登录</span></span>
<br/>
<el-form
ref="loginForm"
@ -139,8 +132,10 @@ export default {
activeName: 'first'
}
},
created () {},
mounted () {},
created () {
},
mounted () {
},
methods: {}
}
</script>
@ -155,27 +150,34 @@ export default {
font-size: 0;
overflow: hidden;
}
//
.page-login--quick {
margin-top: 20px;
}
.page-login--quick-user {
@extend %flex-center-col;
padding: 10px 0px;
border-radius: 4px;
&:hover {
background-color: $color-bg;
i {
color: $color-text-normal;
}
span {
color: $color-text-normal;
}
}
i {
font-size: 36px;
color: $color-text-sub;
}
span {
font-size: 12px;
margin-top: 10px;