提交 bf618998 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

增加canvas背景图

上级 7f4352c6
...@@ -11639,6 +11639,14 @@ ...@@ -11639,6 +11639,14 @@
"vue-style-loader": "^4.1.0" "vue-style-loader": "^4.1.0"
} }
}, },
"vue-particle-line": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/vue-particle-line/-/vue-particle-line-0.1.4.tgz",
"integrity": "sha512-l5qvk5R3VJrAU8G1JTJPGG610/R4kmutayb2F0SZp2qA4lo2pxImK7R+IgEcMGpJ5r1qg5K4c719IRwnPJokoA==",
"requires": {
"vue": "^2.5.21"
}
},
"vue-router": { "vue-router": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"qs": "^6.8.0", "qs": "^6.8.0",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-particle-line": "^0.1.4",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.1", "vuex": "^3.1.1",
"vuex-persist": "^2.1.0" "vuex-persist": "^2.1.0"
......
...@@ -5,6 +5,12 @@ import ElementUI from 'element-ui'; ...@@ -5,6 +5,12 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI); Vue.use(ElementUI);
// 引入封装的router // 引入封装的router
import vueParticleLine from 'vue-particle-line'
import 'vue-particle-line/dist/vue-particle-line.css'
Vue.use(vueParticleLine)
// canvas背景插件
import router from '@/router/index' import router from '@/router/index'
import '@/permission' import '@/permission'
import { store } from '@/store/index' import { store } from '@/store/index'
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
data() { data() {
return { return {
active: '', active: '',
isCollapse: false isCollapse: true
} }
}, },
methods: { methods: {
......
<template> <template>
<el-container class="login-box">
<el-main> <el-container class="login-regist-box">
<vue-particle-line>
</vue-particle-line>
<el-main class="login-box">
<el-form :model="loginForm" :rules="rules" label-width="100px" ref="loginForm" status-icon> <el-form :model="loginForm" :rules="rules" label-width="100px" ref="loginForm" status-icon>
<el-form-item label="用户名" prop="username"> <el-form-item label="用户名" prop="username">
<el-input v-model="loginForm.username"></el-input> <el-input v-model="loginForm.username"></el-input>
...@@ -11,9 +14,10 @@ ...@@ -11,9 +14,10 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button @click="submitForm"></el-button> <el-button @click="submitForm" style="float:right;width:calc(100% - 100px)"></el-button>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
...@@ -75,7 +79,15 @@ export default { ...@@ -75,7 +79,15 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.login-box { .login-regist-box {
background: #409eff; background: #409eff;
height: 100vh;
.login-box{
width: 40vw;
position: absolute;
left: 50%;
margin-left: -22vw;
top:25vh;
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<el-container class="login-box"> <el-container class="login-regist-box">
<el-main> <vue-particle-line>
</vue-particle-line>
<el-main class="login-box">
<el-form :model="registForm" :rules="rules" label-width="100px" ref="registForm" status-icon> <el-form :model="registForm" :rules="rules" label-width="100px" ref="registForm" status-icon>
<el-form-item label="用户名" prop="username"> <el-form-item label="用户名" prop="username">
<el-input v-model="registForm.username"></el-input> <el-input v-model="registForm.username"></el-input>
...@@ -16,7 +18,7 @@ ...@@ -16,7 +18,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button @click="submitForm">注册</el-button> <el-button style="float:right;width:calc(100% - 100px)" @click="submitForm">注册</el-button>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
...@@ -94,8 +96,16 @@ export default { ...@@ -94,8 +96,16 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style lang="scss">
.login-box { .login-regist-box {
background: #409eff; background: #409eff;
} height: 100vh;
.login-box{
width: 40vw;
position: absolute;
left: 50%;
margin-left: -22vw;
top:25vh;
}
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册