How can I make a component similar to vue-router router-link
where I get the tag via props to render my template ?
<my-component tag="ul">
</my-component>
Would render:
<ul>
anything inside my-component
</ul>
You can use a built-in component
element like so:
<component is="ul" class="foo" style="color:red">
anything inside component
</component>
See: https://vuejs.org/v2/guide/components.html#Dynamic-Components