Answer the question
In order to leave comments, you need to log in
VUE JS [NUXT JS] Why is the component not visible?
This is in /layouts/master.vue
// So to speak, the basis
Here I include the header component
<template>
<div>
<header/>
<div class="test">test</div>
<nuxt/>
</div>
</template>
<script>
import Header from '~components/Header.vue'
export default {
components: {
Header
}
}
</script>
<template>
<div>
<p>Hi from {{ name }}</p>
<nuxt-link to="/test">Home page</nuxt-link>
</div>
</template>
<script>
export default {
layout: 'master',
asyncData ({ req }) {
return {
name: req ? 'server' : 'client'
}
}
}
</script>
<template>
<div>Тестовый компонент</div>
</template>
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