diff --git a/order-system/index.html b/order-system/index.html index 8888766..ef9d679 100644 --- a/order-system/index.html +++ b/order-system/index.html @@ -4,7 +4,8 @@ - Vite + Vue + TS + + 校园点餐系统
diff --git a/order-system/src/layout/Menu.vue b/order-system/src/layout/Menu.vue index 3a527fc..a58132f 100644 --- a/order-system/src/layout/Menu.vue +++ b/order-system/src/layout/Menu.vue @@ -39,6 +39,12 @@ --> + + + + + + diff --git a/order-system/src/router/index.ts b/order-system/src/router/index.ts index 85712a3..6804634 100644 --- a/order-system/src/router/index.ts +++ b/order-system/src/router/index.ts @@ -10,12 +10,22 @@ import Layout from '@/layout/Index.vue' const routes: Array = [ { - path: '/home', - name: 'home', //name中home大小写错误,第32次提交之前为大写 + // 通过redirect: '/dashboard'实现首页自动跳转 + path: '/', + // name: 'home', //name中home大小写错误,第32次提交之前为大写 component: Layout, + // 实现打开浏览器后自动跳转首页 + redirect: '/dashboard', + // 添加子页面路由 children: [ + // 添加首页面路由 + { + path: '/dashboard', + name: 'dashboard', + component: () => import('@/views/dashboard/Index.vue') + }, { path: '/banner', name: 'banner', diff --git a/order-system/src/views/dashboard/Index.vue b/order-system/src/views/dashboard/Index.vue new file mode 100644 index 0000000..8bf3445 --- /dev/null +++ b/order-system/src/views/dashboard/Index.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file