Answer the question
In order to leave comments, you need to log in
How to give a component to a template through an object?
I want to put a component or component reference in an object:
<script>
import contractTable from '~/components/table/contractTable.vue'
import debtorTable from '~/components/search/debtorTable.vue'
export default {
components: {
contractTable,
debtorTable
},
data() {
return {
menuItems: [
{ title: "Таблицы", component: contractTable },
{ title: "Поиск", component: debtorTable }
]
}
}
}
</script>
<v-tab-item
v-for="items in menuItems">
{{ items.component }} //вот сюда он должен отдавать сомпонент
</v-tab-item>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question