Merge pull request !13 from 覃杰/auto-8533815-develop-1628562904646
This commit is contained in:
覃杰 2021-08-10 02:35:19 +00:00 committed by Gitee
commit fb22a9c876
8 changed files with 96 additions and 75 deletions

View File

@ -12,6 +12,7 @@
"element-ui": "^2.15.5",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vue-wechat-title": "^2.0.7",
"vuex": "^3.4.0"
},
"devDependencies": {

View File

@ -1,17 +1,25 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="icon" href="./favicon.ico">
<title></title>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
</html>

View File

@ -1,41 +1,17 @@
<template>
<div id="app">
<el-button type="success">成功</el-button>
<el-button type="success">成功按钮111</el-button>
<hello-world></hello-world>
<!-- 使用vue-wechat-title动态修改title -->
<router-view v-wechat-title="$route.meta.title" />
</div>
</template>
<script>
import HelloWorld from "@/components/HelloWorld.vue";
export default {
name: "Home",
components: {
HelloWorld,
}
};
</script>
<style>
<style scoped>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
"Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
#nav {
padding: 30px;
}
#nav a {
font-weight: bold;
color: #2c3e50;
}
#nav a.router-link-exact-active {
color: #42b983;
}
</style>
</style>

View File

@ -4,9 +4,12 @@ import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueWechatTitle from 'vue-wechat-title';
Vue.use(ElementUI);
Vue.use(VueWechatTitle);
// 阻止启动生产消息
Vue.config.productionTip = false
new Vue({

View File

@ -1,22 +1,14 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/about',
name: 'About',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
name: 'Login',
component: () => import('../views/login/index.vue'),
meta: { title: '安全培训 - 登陆' }
}
]

View File

@ -1,5 +0,0 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>

View File

@ -1,18 +0,0 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
export default {
name: 'Home',
components: {
HelloWorld
}
}
</script>

64
src/views/login/index.vue Normal file
View File

@ -0,0 +1,64 @@
<template>
<div class="login_main">
<div class="login">
<div class="login_title">安全培训系统登录</div>
<div class="login_form">
<el-input placeholder="用户名" v-model="input1">
<template slot="prepend">Http://</template>
</el-input>
<el-input placeholder="密码" v-model="input1">
<template slot="prepend">Http://</template>
</el-input>
<el-link
href="javascript:void(0)"
:underline="false"
icon="el-icon-edit"
>忘记密码</el-link
>
<el-button type="primary"> </el-button>
</div>
</div>
</div>
</template>
<style scoped>
.login_main {
width: 100%;
height: 100%;
background-color: #f2f6fc;
position: absolute;
}
.login {
width: 500px;
height: auto;
margin: 100px auto;
border-radius: 4px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
.login_title {
width: 100%;
height: 60px;
font-size: 24px;
font-weight: bold;
text-align: center;
line-height: 60px;
}
/* border-bottom: 1px solid #ccc; */
.login_form {
width: 90%;
margin: 0 auto;
}
.el-input {
margin-top: 20px;
}
.el-link {
margin-top: 20px;
float: right;
}
.el-button {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
}
</style>