nuxt/vue-meta

bodyAttrs.class is do not expand properly

nyagihime opened this issue · 0 comments

I was hoping that if I set an array in bodyAttrs.class, it would be expanded with a space delimiter, but unfortunately it seems to be output with a comma delimiter and I cannot apply the style sheet correctly.

For example, set the following code:

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

The expected class value of body:

<body class="foo bar">

But here's my body class:

<body class="foo,bar">

Of course, I understand that it works if all classes are placed as a single space-delimited set of strings from the beginning, instead of in an array.

But there are many advantages to being able to pass arrays, so hopefully this problem will be fixed.

  • vue-meta: 3.0.0-alpha.10
  • vue: 3.3.4