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

[Whoami][#145] - add pageLayout to Layout in vite config. #157

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

whoooami
Copy link

@whoooami whoooami commented Oct 1, 2024

I add pageLayout options to vite Layout try to solve jsx layout problem such like.

  Layouts({
      defaultLayout: 'default',
      layoutsDirs: 'src/**/layouts',
      pagesDirs: [],
      pageLayout: [
        { path: '/me', layout: 'home' },
        { path: '/about', layout: 'default' },
      ],
    })

But the fantastic thing happen.
for example:
layout:
default: has header, RouterView -> nothing, sider, footer.
home: only text [Home layout]

problem:
when I request /about, it's show default layout with about normal.
But when I request /me, it's show home layout with me content in default layout.

expect:
request /me, show layout home layout with me content.

refer to #144

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

Successfully merging this pull request may close these issues.

1 participant