Forráskód Böngészése

默认路由为用户列表

wangzhiqiang 1 hónapja
szülő
commit
3b2da3c19f
3 módosított fájl, 8 hozzáadás és 4 törlés
  1. 4 2
      src/layout/Tabs/index.vue
  2. 2 1
      src/router/index.js
  3. 2 1
      src/router/modules/dashboard.js

+ 4 - 2
src/layout/Tabs/index.vue

@@ -63,8 +63,10 @@ export default defineComponent({
     const scrollbarDom = ref(null)
     const scrollLeft = ref(0)
     const defaultMenu = {
-      path: '/dashboard',
-      meta: { title: '首页', hideClose: false }
+      // path: '/dashboard',
+      // meta: { title: '首页', hideClose: false }
+      path: '/userModule/userList/index',
+      meta: { title: '用户列表' },
     }
     const contentFullScreen = computed(() => store.state.app.contentFullScreen)
     const currentDisabled = computed(() => route.path === defaultMenu.path)

+ 2 - 1
src/router/index.js

@@ -37,7 +37,8 @@ router.beforeEach((to, _from, next) => {
   if (store.state.user.token) {
     to.meta.title ? (changeTitle(to.meta.title)) : "" // 动态title
     if (to.path === '/login') {
-      next('/')
+      // next('/')
+      next('/userModule/userList/index')
       return
     }
     next()

+ 2 - 1
src/router/modules/dashboard.js

@@ -4,7 +4,8 @@ const route = [
   {
     path: '/',
     component: Layout,
-    redirect: '/dashboard',
+    // redirect: '/dashboard',
+    redirect: '/userModule/userList/index',
     meta: { title: '首页', icon: 'iconfont icon-home' },
     children: [
       {