1、建立路由
router>index.js下建立新路由
const routes = [
{
path: '/login',
component: () => import('../views/Login.vue')
}
]
2、新建页面
views下新建Login.vue 登录页面
<template>
<el-form
:model="loginForm"
class="login-container"
><!-- 双向绑定数据管理 -->
<h3>系统登录</h3>
<el-form-item>
<el-input type="input" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item>
<el-input type="password" placeholder="请输入密码"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary">登录</el-button>
</el-form-item>
</el-form>
</template>