M
M
Maxim Zolotoy2019-05-10 22:42:04
Vue.js
Maxim Zolotoy, 2019-05-10 22:42:04

How to dynamically set a tag in a view component?

Who used all sorts of vuetify must have seen that you can do props tag="li" and so on.
Depending on this, the required tag is set in the component template.
How can this be implemented at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grinat, 2019-05-10
@spacenear

Vuetify uses the render function, in which the first parameter is a text string with the name of the tag.
If in tempalte, then through component, in is tag name

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question