Skip to content

关于一级路由配置的设计建议 #854

@zyan1226

Description

@zyan1226

image

请使用meta.single属性配置

注意:name和path不可重复

{

    path: '/dashboard1',

    component: Layout,

    redirect: '/dashboard1/base',

    name: 'dashboard1',

    meta: {

      title: '单节点仪表盘',

      icon: shallowRef(DashboardIcon),

      orderNo: 0,

      single: true,

    },

    children: [

      {

        path: 'base',

        name: 'DashboardBase1',

        component: () => import('@/pages/dashboard/base/index.vue'),

      },

    ],

  },

  {

    path: '/dashboard2',

    component: Layout,

    redirect: '/dashboard2/base',

    name: 'dashboard2',

    meta: {

      title: '单节点仪表盘2',

      icon: shallowRef(DashboardIcon),

      orderNo: 0,

      single: true,

    },

    children: [

      {

        path: 'base',

        name: 'DashboardBase2',

        component: () => import('@/pages/dashboard/base/index.vue'),

      },

    ],

  },

Originally posted by @timi137137 in #772

一个一级菜单直接对应一个内容区的页面,为什么需要“两级”的配置来实现该效果?请考虑该设计是否合理?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions