mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-10-09 18:49:57 +08:00
✨添加登录页,添加页面加载动画
This commit is contained in:
parent
6d347324ef
commit
396e1df0c0
@ -1,17 +1,42 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
|
<meta
|
||||||
|
content="vab,vab官网,后台管理框架,vue后台管理框架,vue-admin-beautiful,vue-admin-beautiful-pro,vue-admin-beautiful官网,vue-admin-beautiful文档,vue-element-admin,vue-element-admin官网,vue-element-admin文档,vue-admin,vue-admin官网,vue-admin文档"
|
||||||
|
name="keywords"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
content="<%= VUE_APP_TITLE %>官网与文档基于vue-admin-beautiful-pro构建,简称vab(是一款超棒的vue+element中后台前端快速开发框架),QQ群972435319,作者:<%= VUE_APP_AUTHOR %>"
|
||||||
|
name="description"
|
||||||
|
/>
|
||||||
|
<meta content="<%= VUE_APP_AUTHOR %>" name="author" />
|
||||||
|
<link href="<%= BASE_URL %>static/css/loading.css" rel="stylesheet" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<strong>
|
||||||
|
We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
|
||||||
|
properly without JavaScript enabled. Please enable it to continue.
|
||||||
|
</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app">
|
||||||
|
<div class="first-loading-wrp">
|
||||||
|
<div class="loading-wrp">
|
||||||
|
<span class="dot dot-spin">
|
||||||
|
<i></i>
|
||||||
|
<i></i>
|
||||||
|
<i></i>
|
||||||
|
<i></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h1><%= VUE_APP_TITLE %></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
96
public/static/css/loading.css
Normal file
96
public/static/css/loading.css
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
.first-loading-wrp {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 90vh;
|
||||||
|
min-height: 90vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-loading-wrp > h1 {
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-loading-wrp .loading-wrp {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 98px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: inline-block;
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
font-size: 64px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
animation: antRotate 1.2s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot i {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
background-color: #1890ff;
|
||||||
|
border-radius: 100%;
|
||||||
|
opacity: 0.3;
|
||||||
|
transform: scale(0.75);
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
animation: antSpinMove 1s infinite linear alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot i:nth-child(1) {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot i:nth-child(2) {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
-webkit-animation-delay: 0.4s;
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot i:nth-child(3) {
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
-webkit-animation-delay: 0.8s;
|
||||||
|
animation-delay: 0.8s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot i:nth-child(4) {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
-webkit-animation-delay: 1.2s;
|
||||||
|
animation-delay: 1.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes antRotate {
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(405deg);
|
||||||
|
transform: rotate(405deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes antRotate {
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(405deg);
|
||||||
|
transform: rotate(405deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes antSpinMove {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes antSpinMove {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
BIN
src/assets/login_images/login_background.png
Normal file
BIN
src/assets/login_images/login_background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
BIN
src/assets/login_images/login_form.png
Normal file
BIN
src/assets/login_images/login_form.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
@ -21,7 +21,7 @@ module.exports = {
|
|||||||
//是否显示logo,不显示时设置false,显示时请填写remixIcon图标名称,暂时只支持设置remixIcon
|
//是否显示logo,不显示时设置false,显示时请填写remixIcon图标名称,暂时只支持设置remixIcon
|
||||||
logo: "vuejs-fill",
|
logo: "vuejs-fill",
|
||||||
//标题 (包括初次加载雪花屏的标题 页面的标题 浏览器的标题)
|
//标题 (包括初次加载雪花屏的标题 页面的标题 浏览器的标题)
|
||||||
title: "vue-admin-beautiful",
|
title: "vue-admin-beautiful-antdv",
|
||||||
//标题分隔符
|
//标题分隔符
|
||||||
titleSeparator: " - ",
|
titleSeparator: " - ",
|
||||||
//标题是否反转 如果为false:"page - title",如果为ture:"title - page"
|
//标题是否反转 如果为false:"page - title",如果为ture:"title - page"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
@click="handleFoldSideBar"
|
@click="handleFoldSideBar"
|
||||||
></div>
|
></div>
|
||||||
<a-layout-sider
|
<a-layout-sider
|
||||||
|
width="250"
|
||||||
v-model:collapsed="collapse"
|
v-model:collapsed="collapse"
|
||||||
:trigger="null"
|
:trigger="null"
|
||||||
collapsible
|
collapsible
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<h3>登录页样式未开发,点击登录即可进入首页</h3>
|
<a-row>
|
||||||
<a-form
|
<a-col :xs="24" :md="11" :sm="24" :lg="14" :xl="14"></a-col>
|
||||||
layout="inline"
|
<a-col :xs="24" :sm="24" :md="12" :lg="9" :xl="6">
|
||||||
:model="form"
|
<div class="login-container-form">
|
||||||
@submit="handleSubmit"
|
<div class="login-container-title">
|
||||||
@submit.prevent
|
{{ title }}
|
||||||
>
|
</div>
|
||||||
|
<a-form :model="form" @submit="handleSubmit" @submit.prevent>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-input v-model:value="form.username" placeholder="Username">
|
<a-input v-model:value="form.username" placeholder="Username">
|
||||||
<template v-slot:prefix>
|
<template v-slot:prefix>
|
||||||
@ -33,12 +34,22 @@
|
|||||||
>
|
>
|
||||||
登录
|
登录
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<div class="login-container-tips">
|
||||||
|
基于vue{{ dependencies["vue"] }}
|
||||||
|
+ ant-design-vue
|
||||||
|
{{ dependencies["ant-design-vue"] }}开发
|
||||||
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xs="24" :md="11" :sm="24" :lg="14" :xl="14"></a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from "vuex";
|
import { dependencies, devDependencies } from "*/package.json";
|
||||||
|
import { mapActions, mapGetters } from "vuex";
|
||||||
import { UserOutlined, LockOutlined } from "@ant-design/icons-vue";
|
import { UserOutlined, LockOutlined } from "@ant-design/icons-vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -54,8 +65,16 @@
|
|||||||
password: "",
|
password: "",
|
||||||
},
|
},
|
||||||
redirect: undefined,
|
redirect: undefined,
|
||||||
|
dependencies: dependencies,
|
||||||
|
devDependencies: devDependencies,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters({
|
||||||
|
logo: "settings/logo",
|
||||||
|
title: "settings/title",
|
||||||
|
}),
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler(route) {
|
handler(route) {
|
||||||
@ -67,6 +86,9 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.form.username = "admin";
|
this.form.username = "admin";
|
||||||
this.form.password = "123456";
|
this.form.password = "123456";
|
||||||
|
setTimeout(() => {
|
||||||
|
this.handleSubmit();
|
||||||
|
}, 500000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({
|
...mapActions({
|
||||||
@ -84,3 +106,43 @@
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.login-container {
|
||||||
|
height: 100vh;
|
||||||
|
background: url("~@/assets/login_images/login_background.png");
|
||||||
|
background-size: cover;
|
||||||
|
&-form {
|
||||||
|
width: calc(100% - 40px);
|
||||||
|
height: 380px;
|
||||||
|
padding: 4vh;
|
||||||
|
margin-top: calc((100vh - 380px) / 2);
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-left: 20px;
|
||||||
|
background: url("~@/assets/login_images/login_form.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 2px 8px 0 rgba(7, 17, 27, 0.06);
|
||||||
|
}
|
||||||
|
&-title {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
&-tips {
|
||||||
|
margin-top: 10px;
|
||||||
|
color: rgba(255, 255, 255, 0.856);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.ant-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 45px;
|
||||||
|
}
|
||||||
|
.ant-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 99px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user