Element UI手册: 中文文档: github地址:
1:components 新建页面
2:打开app.vue 写代码
复制代码{ { item.navItem }}
3:路由index.js
import Vue from 'vue'import Router from 'vue-router'import HelloWorld from '@/components/HelloWorld'import ServiceHall from '@/components/ServiceHall'import Management from '@/components/Management'import User from '@/components/User'import Personnel from '@/components/Personnel'import Alarm from '@/components/Alarm'Vue.use(Router)export default new Router({ routes: [ { path: '/', name: 'HelloWorld', component: HelloWorld }, { path: '/components/ServiceHall', name: 'ServiceHall', component: ServiceHall }, { path: '/components/Management', name: 'Management', component: Management }, { path: '/components/User', name: 'User', component: User },{ path: '/components/Personnel', name: 'Personnel', component: Personnel },{ path: '/components/Alarm', name: 'Alarm', component: Alarm } ]})复制代码
4:新页面的内容,我写的比较简单,需要自己写下功能需求所在的代码
我是权限管理页面复制代码
5:效果就可以看了
原文作者:祈澈姑娘