This commit is contained in:
asd
2021-11-01 22:14:41 +08:00
parent 494f0a1b0e
commit 195f7194c2
4 changed files with 106 additions and 14 deletions

View File

@@ -6,7 +6,10 @@
</template> </template>
<style> <style>
*{
margin: 0;
padding: 0;
}
</style> </style>
<script> <script>
// import "./utils/rem.js"; // import "./utils/rem.js";

View File

@@ -7,6 +7,11 @@ const routes: Array<RouteRecordRaw> = [
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue') component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
},
{
path:"/home",
name:"home",
component:()=>import('../views/Home.vue')
} }
] ]

View File

@@ -1,18 +1,84 @@
<template> <template>
<div class="home"> <div class="home">
<img alt="Vue logo" src="../assets/logo.png"> <div class="top">
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/> <div class="content">
<h1 class="biaoti">一对一系列课</h1>
<p class="word">量身订制轻松学</p>
</div>
<div class="right"></div>
</div>
<div class="navs">
<div class="nav-item">
<img src="../static/img/icon.png">
<p>名师推荐</p>
</div>
<div class="nav-item">
<img src="../static/img/icon.png">
<p>订阅专栏</p>
</div>
<div class="nav-item">
<img src="../static/img/icon.png">
<p>我的收藏</p>
</div>
<div class="nav-item">
<img src="../static/img/icon.png">
<p>下载管理</p>
</div>
</div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import HelloWorld from '@/components/HelloWorld.vue'; // @ is an alias to /src
export default defineComponent({ export default defineComponent({
name: 'Home', name: 'Home',
components: {
HelloWorld,
},
}); });
</script> </script>
<style lang="scss" scoped>
.home{
height: 100vh;
background:#F5F5F5;
.top{
width: 100%;
background: #5677FF;
padding-top:125px;
padding-bottom: 93px;
position: relative;
.content{
color:white;
font-size:49px;
margin-left: 118px;
.biaoti{
font-size:67px ;
margin-bottom: 41px;
}
}
.right{
width: 268px;
height: 277px;
background: gold;
position:absolute;
right:0;
bottom: 0;
}
}
.navs{
width: 900px;
height: 180px;
background: white;
margin:0 auto;
margin-top: 20px;
display: flex;
justify-content: space-around;
align-items: center;
text-align: center;
}
}
</style>

View File

@@ -1,22 +1,23 @@
<template> <template>
<div class="login"> <div class="login">
<div class="main"> <div class="main">
<img src="../static/img/logo.svg" alt=""> <img src="../static/img/logo.svg" alt="" class="logo">
<van-field <van-field
v-model="account" label="账号"
label="文本" placeholder="请输入账号"
placeholder="请输入用户名"
class="shuru" class="shuru"
label-align ="center" label-align ="center"
/> />
<van-field <van-field
v-model="account" label="密码"
label="文本" type="password"
placeholder="请输入密码" placeholder="请输入密码"
:border="true" :border="true"
class="shuru" class="shuru"
label-align ="center" label-align ="center"
/> />
<van-button type="primary" class="btn">登录</van-button>
</div> </div>
</div> </div>
</template> </template>
@@ -35,14 +36,31 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.login { .login {
height:90vh;
width: 100vw;
display: flex;
align-items: center;
.main { .main {
// background: red; //background: red;
width:628px; width:628px;
margin:0 auto; margin:0 auto;
text-align: center;
.shuru{ .shuru{
height:83px; height:83px;
width:628px; width:628px;
border-bottom:1px solid #eeeeee; border-bottom:1px solid #eeeeee;
margin-bottom:60px;
}
.logo{
width:190px;
height:190px;
margin-bottom: 90px;
}
.btn{
width:600px;
height:90px;
border-radius:90px;
margin-top: 20px;
} }
} }
} }