hasDynamicKeys = true
if (exp) {
if (isVBind) {
- // #10696 in case a v-bind object contains ref
- pushRefVForMarker()
- // have to merge early for compat build check
- pushMergeArg()
if (__COMPAT__) {
+ // have to merge early for compat build check
+ pushMergeArg()
// 2.x v-bind object order compat
if (__DEV__) {
const hasOverridableKeys = mergeArgs.some(arg => {
}
}
+ // #10696 in case a v-bind object contains ref
+ pushRefVForMarker()
+ pushMergeArg()
mergeArgs.push(exp)
} else {
// v-on="obj" -> toHandlers(obj)
).toHaveBeenWarned()
})
+test('should not warn COMPILER_V_BIND_OBJECT_ORDER work with vFor', () => {
+ const vm = new Vue({
+ template: `<div><div v-bind="{ id: 'bar', class: 'baz' }" v-for="item in 5" /></div>`,
+ }).$mount()
+ expect(vm.$el).toBeInstanceOf(HTMLDivElement)
+ expect(
+ CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER,
+ ).not.toHaveBeenWarned()
+})
+
test('COMPILER_V_ON_NATIVE', () => {
const spy = vi.fn()
const vm = new Vue({