yaminncco / vue-sidebar-menu

A Vue.js Sidebar Menu Component
MIT License
654 stars 193 forks source link

Adding link to footer? #259

Closed calicoder77 closed 1 year ago

calicoder77 commented 1 year ago

Good day,

Just wondering if it is possible to access the footer like we do the header in:

const menu = [
    {
        header: 'Sidebar menu',
        hiddenOnCollapse: true,
    }
]

I'm trying to add an icon and link in there but not sure if that is supported?

Thanks again.

yaminncco commented 1 year ago

You can use footer slot

<sidebar-menu>
  <template #footer>footer</template>
</sidebar-menu>
calicoder77 commented 1 year ago

You can use footer slot

<sidebar-menu>
  <template #footer>footer</template>
</sidebar-menu>

Good morning @yaminncco, unfortunately I tried that and get an error of v-slot directive must be owned by a custom element, but template is not.

yaminncco commented 1 year ago

Can you show me how you're using the component

calicoder77 commented 1 year ago

Works now, thanks @yaminncco. I had a self-closing tag /> on my previous <sidebar-menu> and adding the <sidebar-menu> allows the 1st tip you gave to work well.