naive-ui-admin icon indicating copy to clipboard operation
naive-ui-admin copied to clipboard

Third level of menu entries

Open clabnet opened this issue 3 years ago • 1 comments

Hi, I would show a menu with three levels : Catalogs > Factory > Stand I have this code :

const routeName = 'catalogs';

const routes: Array<RouteRecordRaw> = [
  {
    path: '',
    name: routeName,
    component: Layout,
    redirect: `${routeName}`,
    meta: {
      sort: 80,
    },
    children: [
      {
        path: 'catalogs',
        name: `${routeName}_catalog`,
        component: ParentLayout,
        meta: {
          title: 'Catalogs',
        },
        children: [{
          path: 'factory',
          name: `${routeName}_catalog_factory`,
          component: ParentLayout,
          meta: {
            title: 'Factory',
          },
          children: [{
            path: 'stand',
            name: `${routeName}_catalog_factory_stand`,
            component: IFrame,
            meta: {
              title: 'Stand',
              frameSrc: 'http://mysite.com',
            },
          }],
        }]
      }]
  },
];

On the top Breadcrumb I show correctly 3 levels : Catalogs / Factory / Stand,

But on the left side I can see only 2 menu entries : Catalogs and Stand.

Please can you show me where I wrong ?

I'm crazying with menu nesting levels. Thanks in advance,

clabnet avatar Jun 30 '22 16:06 clabnet

You can try alwaysShow set to false This is because there is only one submenu at the last level of the menu, and the program automatically removes the hierarchy

jekip avatar Jul 13 '22 00:07 jekip