regression with :class and v-bind
Version
3.2.0-beta.2
Reproduction link
Steps to reproduce
As you can see in the SFC playground:
<template>
<button :class="{ btn: true }">1</button>
<button v-bind="{ disabled: true }" :class="{ btn: true }">2</button>
<button :class="{ btn: true }" v-bind="{ disabled: true }">3</button>
</template>
<style>
.btn {
color: red;
}
</style>
What is expected?
The first and second button do have the class btn
applied.
What is actually happening?
The last one, with v-bind
after :class
has a class [object Object]
.
This was spotted by @logaretm when I reported an issue that I believed to be in vee-validate, but it turns out to be a regression in vue-next. Downgrading to v3.1.3 makes it work again.