Skip to content

:class bindings multiples classes on a string and arrays #2808

@ElMatella

Description

@ElMatella

Vue.js version

1.0.21

Hi, on the last Vue release, the following feature was added:

:class bindings now support using a string of multiple classes

So it works well for: <div :class="{ 'a b c': true }"></div>

but doesn't for <div :class="[ true ? 'a b c': 'd e' ]"></div>

Is there a particular reason?

Here is a jsFiddle reproducing: https://jsfiddle.net/o5u4utrp/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions