首页目录创建

This commit is contained in:
chenxiaoxi
2021-05-07 13:47:40 +08:00
parent 312057f04d
commit 12fcbb0fbd
8 changed files with 54 additions and 24 deletions
+11 -1
View File
@@ -6,6 +6,7 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/layouts'
import Home from '@/views/home'
import EmptyLayout from '@/layouts/EmptyLayout'
import { publicPath, routerMode } from '@/config'
@@ -38,6 +39,15 @@ export const constantRoutes = [
export const asyncRoutes = [
{
path: '/',
component: Home,
meta: {
title: '首页',
icon: 'home',
affix: true,
},
},
{
path: '/index',
component: Layout,
redirect: 'index',
children: [
@@ -46,7 +56,7 @@ export const asyncRoutes = [
name: 'Index',
component: () => import('@/views/index/index'),
meta: {
title: '页',
title: '页',
icon: 'home',
affix: true,
},