[Doc] Use layouts with `<script setup>`
See original GitHub issueThe doc is not very clear. https://v3.nuxtjs.org/docs/directory-structure/layouts
There should probably be an exemple for both <script setup>
and the options API for every Nuxt feature.
I’d think I’d have to use the new <NuxtLayout> component, but the it says you have to disable something using the option API.
<script>
export default {
layout: false,
};
</script>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
<script setup> | Vue.js
<script setup> is a compile-time syntactic sugar for using Composition API inside Single-File Components (SFCs). It is the recommended syntax if you are ......
Read more >How to set persistent layout in <script setup>? #1164 - GitHub
This currently the best way to manually set layouts using the <script setup>. If however, you want to set the layout automatically by...
Read more >Customize window layouts and personalize document tabs
Learn how to customize tabs and windows in Visual Studio to create layouts that work best for your development workflows.
Read more >Using layout property in <script setup> tag - Stack Overflow
Is there any way to use layout property of ...
Read more >Lesson #5: Layout Mode & Design - Layout Script Triggers
When you're working in FileMaker's Layout Mode, you're likely in the process of designing how users will interact with your solution's data.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you misunderstand the functionality of
<script setup>
. This is just another way to express thesetup()
function in Vue 3. Just simply combine<script setup>
with normal<script>
(for any additional component options).e.g.:
You can look more into this in the below link https://v3.vuejs.org/api/sfc-script-setup.html#usage-alongside-normal-script
I think the doc should be more clear about that, a lot of people will switch from Vue 2 to Vue 3 when Nuxt 3 launch and it might be complicated to constantly switch doc. Maybe put a reference to the Vue 3 doc when applicable ?