Answer the question
In order to leave comments, you need to log in
Why don't slots work in Nuxt.js?
Good afternoon!!!
There is an Articles component
<template lang="pug">
article.article
.article__wrapper
.container
slot(name="title")
<ToTop/>
.article__inner
slot(name="toc")
slot(name="text")
slot(name="files")
slot(name="doctors")
</template>
<script>
import ToTop from '@/components/to-top.vue';
export default {
components: {
ToTop,
},
};
</script>
main.main
Article
template(v:slot:title)
h1.article__title История Центральной районной больницы ст. Романовская
template(v:slot:text)
.article__text
.container
.article__strong
h2 Subtitle
...
<script>
import Article from '@/components/sections/article';
export default {
components: {
Article,
},
};
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