yaminncco / vue-sidebar-menu

A Vue.js Sidebar Menu Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[help] hidden hr separator

ILOG9 opened this issue · comments

I have tried to add an hr to separate the elements as indicated by the demo folder, however it does not work

and here is an example of use

const menu = [ { component: { template: '<hr style="border-color: rgba(0, 0, 0, 0.1); margin: 20px;">' } } ]

As you navigate through the code, you can see that the li tag that corresponds to the component position in the array appears with a comment.

note: for the above example i have replaced `` with '' so that github doesn't break

Thanks for the help!

Can you show more code, do you have any error/warn?

You can use render function

import { h } from 'vue'
const separator = h('hr', {
  style: {
    borderColor: 'rgba(0, 0, 0, 0.1)',
    margin: '20px'
  }
})

That was exactly what I needed, thanks for your time