We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm not sure this is a real issue but I figured I'd mention it either way.
When there's a method with the same name as a data property they conflict in a weird way. The method call works at first, then doesn't.
Here's an example:
new Vue({ el: '#app', data: { id: 2, name: "Ted", color: "#000" }, methods: { color: function () { this.$data.color = '#f00'; } } });
<div id="app"> <div v-attr="data-id: id" v-style="color: color" v-on="click:color()"> {{ name }} </div> </div>
Here it is in a fiddle: http://jsfiddle.net/gk727vge/3/
The text was updated successfully, but these errors were encountered:
Both data properties and methods will be set on the instance, so the short answered is: don't use conflicting names :)
Sorry, something went wrong.
Makes sense! I just wanted to make sure it wasn't something more insidious.
No branches or pull requests
I'm not sure this is a real issue but I figured I'd mention it either way.
When there's a method with the same name as a data property they conflict in a weird way. The method call works at first, then doesn't.
Here's an example:
Here it is in a fiddle: http://jsfiddle.net/gk727vge/3/
The text was updated successfully, but these errors were encountered: