Open Monstermash28425R1 opened 4 months ago
May I ask if you have resolved it
I found that explicitly setting a layout for each layer of directory structure resolved my similar issues.
E.g. having a meta layout set for pages/auth/index.vue
above would allow pages/auth/login/index.vue
to have a non-default meta layout work properly in my projects.
Yeah, I have that problem too.
"I found the solution to this problem. I am using a combination of this and the (unplugin-vue-router) package. you need to change the folder structure of the pages to look like this:
"It means creating an index.vue file for each nested folder where you want to have its pages."
Next, you need to specify the layout of the pages in all layers, including layout: default:
pages/tickets/index.vue : (required)
<script setup>
definePage({
meta: {
layout: "default",
},
});
</script>
then, inside pages/tickets/new/index.vue :
<script setup>
definePage({
meta: {
layout: "add",
},
});
</script>
"I'm having issues with the plugin when working with nested pages. For instance, at the top-level, the plugin works fine, and at the second level too. However, when configuring a third level (pages/auth/login/index.vue), the plugin stops working. Could it be because the URLs are generated as 'childrens'?"