We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I need help using this line mentioned in the documentation on how to change a layout dynamically:
export default { layout: (ctx) => ctx.$device.isMobile ? 'mobile' : 'default' }
<script setup> definePageMeta({ layout: (ctx) => (ctx.$device.isMobile ? 'mobile' : 'default'), }); </script> <template> <main> ... </main> </template>
vite_ssr_import_6.default[props.name] is not a function
Invalid layout (ctx) => (ctx.$device.isMobile ? 'mobile' : 'default') selected. [Vue warn]: Invalid prop: type check failed for prop "name". Expected String | Boolean, got Function
(ctx) => (ctx.$device.isMobile ? 'mobile' : 'default')
Where do I place this? My guess is initalizing as a plugin or to create a middleware...
default.vue
mobile.vue
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I need help using this line mentioned in the documentation on how to change a layout dynamically:
Tried
index.vue
Error
Question
Where do I place this? My guess is initalizing as a plugin or to create a middleware...
Goal
default.vue
andmobile.vue
The text was updated successfully, but these errors were encountered: