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

Allow passing imported variables to definePage #317

Open
puyt opened this issue Feb 15, 2024 · 1 comment
Open

Allow passing imported variables to definePage #317

puyt opened this issue Feb 15, 2024 · 1 comment
Labels
⚡️ enhancement improvement over an existing feature

Comments

@puyt
Copy link

puyt commented Feb 15, 2024

Is there any way to use the other methods provided by vue-router for passing props to the Route component? e.g. Function Mode

I used to convert my route parameters to Numbers in the route itself rather than in my component:

{
  path: '/users/:id',
  props: (route) => parseToNumbers(route.params, ['id']),
}

with definePage, I can only use the Boolean Mode.

@posva posva changed the title Question: passing props to Route component Allow passing imported variables to definePage Feb 16, 2024
@settings settings bot removed the enhancement label Feb 21, 2024
@posva posva added the ⚡️ enhancement improvement over an existing feature label Feb 21, 2024
@soknifedev

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡️ enhancement improvement over an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants