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 bodyAttrs keys to have values as array or object. #231

Closed
moltar opened this issue Jul 10, 2018 · 1 comment
Closed

Allow bodyAttrs keys to have values as array or object. #231

moltar opened this issue Jul 10, 2018 · 1 comment

Comments

@moltar
Copy link

moltar commented Jul 10, 2018

Problem:

Setting bodyAttrs.class in a component, and then a layout (Nuxt) will not merge them properly, as both values are strings. The component seems to always win.

Solution:

Allow bodyAttrs keys to have values as array or object.

This would allow deepmerge module to merge the values correctly.

Then a rendered version would just concat with a space or something like that.

E.g.:

    bodyAttrs: {
      class: ['foo', 'bar']
    }

OR

    bodyAttrs: {
      class: { foo: true, bar: true }
    }
@pimlie pimlie added the pending label Mar 8, 2019
pimlie added a commit to pimlie/vue-meta that referenced this issue Mar 8, 2019
@pimlie pimlie added target: v2 and removed pending labels Mar 8, 2019
@pimlie pimlie closed this as completed in 01edc8c Apr 20, 2019
@pimlie
Copy link
Collaborator

pimlie commented Apr 20, 2019

This issue has been closed as changes for it are included in the v2 release candidate. Please help us testing the release candidate and report any follow-ups in a new issue

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

No branches or pull requests

3 participants