Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object v-bind taking precedence over earlier attributes #2059

Closed
skirtles-code opened this issue Sep 6, 2020 · 2 comments
Closed

Object v-bind taking precedence over earlier attributes #2059

skirtles-code opened this issue Sep 6, 2020 · 2 comments

Comments

@skirtles-code
Copy link
Contributor

Version

3.0.0-rc.10

Reproduction link

https://jsfiddle.net/skirtle/f78Lhcmt/

Steps to reproduce

The important section is this:

<my-child abc="specific" v-bind="{ abc: 'object' }" />

Note that abc is set in two different ways.

What is expected?

In Vue 2 the value of abc would have been 'specific'.

What is actually happening?

abc is 'object'.

The order of the attributes now matters.

I also experimented with using :abc for the first attribute but it doesn't seem to matter whether the prop is static or dynamic.


I know this topic has been discussed several times before but I haven't been able to find any official confirmation that this has been changed intentionally.

A look through the tests seems to suggest that this is being tested, so my guess is that it is an intentional change.

The most recent discussion I could find on this topic was 3 weeks ago. vue#11594. While that was a discussion about Vue 2 it does seem odd that the change in Vue 3 wasn't mentioned if it is indeed an intentional change.

@yyx990803
Copy link
Member

Yes, this is an intentional change (v-bind appearance order now affects merge result) and we should document it in the migration guide.

@CyberAP
Copy link
Contributor

CyberAP commented Sep 28, 2020

I have suggested a change that might be able to fix that: vuejs/rfcs#215

@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants