nuxt-ui-pro / dashboard

A dashboard template made with Vue and Nuxt UI Pro.
https://dashboard-template.nuxt.dev
409 stars 91 forks source link

How UDashboardSidebarLinks supports menus with three or more layers #27

Open lhlyu opened 5 months ago

lhlyu commented 5 months ago

eg:

<UDashboardSidebarLinks :links="links"/>
const links = [{
    label: 'A',
    icon: 'i-heroicons-home',
}, {
    label: 'B',
    icon: 'i-heroicons-cog-8-tooth',
    children: [{
        label: 'C',
    }, {
        label: 'D',
        children: [{
            label: 'E',
        }]
    }],
}]

image

The second and third layers appear to be on the same layer, lacking necessary indentation.

benjamincanac commented 5 months ago

Indeed, it works only with one level of children at the moment! This can be an improvement.

lhlyu commented 5 months ago

Thank you, hope to see it sooner.