-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
tag BODY modification #188
Comments
I will need an example to help you.
…On Wed, 1 Feb 2017 at 20:19, Oleg Bogdanov ***@***.***> wrote:
how to modify the tag BODY?
as described in the documentation https://github.com/declandewet/vue-meta
changes are not applied
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#188>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3OFOt9H9JOiBMriqp9M66UdwPd0_mtks5rYNrLgaJpZM4L0RX1>
.
|
|
<script>
export default {
head: {
bodyAttrs: {
class: 'home-page home page page-id-4 page-template page-template-template-homepage page-template-template-homepage-php'
}
}
}
</script> Please read nuxt documentation |
Hello ! This works perfectly thanks @atinux :) However, i'm using some custom page transitions and while page elements are leaving, body classes are removed and replaced only when the new page is done :( There is a small moment where there is no classes at all. You know if there is a way to trigger bodyAttrs: { class } when transition Thanks 👍 |
@proov If you make that export default {
data () {
return {
dataLoaded: false
}
},
head () {
return {
bodyAttrs: {
class: this.dataLoaded ? 'home-page home page page-id-4 page-template page-template-template-homepage page-template-template-homepage-php' : ''
}
}
},
// fetch data in some hook and set this.dataLoaded to true.
} |
@atinux you save my lot of time.. thanks :-) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
how to modify the tag BODY?
as described in the documentation https://github.com/declandewet/vue-meta
changes are not applied
The text was updated successfully, but these errors were encountered: