How can vue, like the router-link component, set a tag attribute value and then generate the corresponding html tag?

how does vue, like the router-link component, set a tag attribute value and then generate the corresponding html tag?

for example:

<component tag="li"></component>

generate

  • tags

    Mar.16,2021

    just write it this way

    <component :is="'a'"></component>
    <component :is="'h2'"></component>
    <component :is="'li'"></component>
    Menu