A
A
AkifPetrov2019-01-28 12:49:34
Vue.js
AkifPetrov, 2019-01-28 12:49:34

Is it possible to make a default template for a single file component?

Hi, I have a loop that renders a number of single-file .vue components on a page:

<component
    :key="component"
    :is="component"
    v-for="component in components"
></component>

Tell me, is it possible to determine that there is no section inside one of these components <template></template>and use some "default template" instead?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nvdfxx, 2019-01-30
@nvdfxx

And how do components without template work for you?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question