Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout feature doesn't work #517

Closed
5 tasks done
mamboer opened this issue Dec 3, 2023 · 3 comments
Closed
5 tasks done

layout feature doesn't work #517

mamboer opened this issue Dec 3, 2023 · 3 comments

Comments

@mamboer
Copy link

mamboer commented Dec 3, 2023

Describe the bug

Sub-pages always use the ‘default’ layout, even if a different layout name is set in the meta.

Reproduction:

  1. Checkout the code of the main branch from https://github.com/antfu/vitesse
  2. Add a test.vue layout in the src/layouts/ folder
<template>
  <h1>Test Layout</h1>
  <RouterView />
</template>
  1. Add a test page src/pages/test/index.vue, and specifed it's layout to test
<template>
  <h1>Test Title</h1>
</template>

<route lang="yaml">
meta:
  layout: test
</route>
  1. Run the app via pnpm i && pnpm dev
  2. Visit http://localhost:3333/test/ in the browser
  3. Comfirm that the test page doesn't use the test layout

Reproduction project

https://github.com/mamboer/vitesse

Just checkout the code and run it.

Reproduction

https://github.com/mamboer/vitesse

System Info

System:
    OS: macOS 14.1.2
    CPU: (8) arm64 Apple M2
    Memory: 97.30 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.11.0 - /Volumes/Pluto/dev/github/mamboer/vitesse/node_modules/.bin/pnpm
  Browsers:
    Chrome: 119.0.6045.199
    Safari: 17.1.2

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@JohnCampionJr
Copy link
Collaborator

This is an issue in vite-plugin-vue-layouts:
JohnCampionJr/vite-plugin-vue-layouts#120

I'm working on it; hope to have an update in the next day or two.

@JohnCampionJr
Copy link
Collaborator

I have released 0.9.0, it should fix this.

@mamboer
Copy link
Author

mamboer commented Dec 6, 2023

Nice job 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants