Vue: :class bindings multiples classes on a string and arrays

Created on 5 May 2016  路  1Comment  路  Source: vuejs/vue

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/

Most helpful comment

This has been fixed in the dev branch and will be working as expected in the next release.

>All comments

This has been fixed in the dev branch and will be working as expected in the next release.

Was this page helpful?
0 / 5 - 0 ratings