Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

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

@moltar

Description

@moltar

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 }
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions