Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

左侧菜单都是一级菜单的,可以提供一个配置的例子? #772

Closed
zohar888444 opened this issue Oct 29, 2024 · 4 comments
Closed
Assignees
Labels
💭 Discussion This issue is discussion

Comments

@zohar888444
Copy link

这个功能解决了什么问题

业务需求全部的左侧菜单都是一级菜单,应该怎么配置呢

你建议的方案是什么

业务需求全部的左侧菜单都是一级菜单,应该怎么配置呢

Copy link
Contributor

👋 @zohar888444,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

♥️ 有劳 @timi137137 @liweijie0812 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @zohar888444

@timi137137 timi137137 added the 💭 Discussion This issue is discussion label Oct 29, 2024
@timi137137
Copy link
Collaborator

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'),
      },
    ],
  },

@zohar888444
Copy link
Author

谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 Discussion This issue is discussion
Projects
None yet
Development

No branches or pull requests

3 participants