-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Allow v-bind="$attrs" with v-on="$listeners" to work with v-model #6327
Allow v-bind="$attrs" with v-on="$listeners" to work with v-model #6327
Conversation
* build(release weex): ignore the file path of entries * [release] weex-vue-framework@2.4.2-weex.1
aecc154
to
1f89cc9
Compare
I just noticed some Weex tests are failing. I could easily make them pass, but due to the nature of the tests and my own lack of experience with Weex, I'm not confident this would actually guarantee working behavior. @Jinjiang Would you mind taking a look? Is it safe to update the tests, or is it possible my changes would break Weex? |
Seems |
@javoski Are you sure this would break Weex? I only try to access |
@chrisvfritz sorry it's still loading status in "$ bash build/ci.sh" part of the ci report (maybe my network problem). I will have a look in the deep. Just a moment please :-) |
@chrisvfritz This commit is fine. Currently you can just skip these failed test cases in weex. And @Hanks10100 and I will fix them later. |
@chrisvfritz After I confirmed that this feature will not destroy weex, I will modify those failed test cases and add the corresponding case in Weex. |
In Weex, the structure of the `<input>` element has a slight difference with Web, it doesn't have the `value` property but has `attr.value`. It should be considered when getting the value of input element.
@chrisvfritz I fixed the test case in Weex and send a PR (chrisvfritz#1) to your branch. The CI is passed. Your modification didn't break Weex, but not consider the difference of it. As I write in that PR:
|
Fix the test case in Weex and get the correct value of input element
Can this be merged? It would be a great help for wrapping inputs! |
See #6216 (comment) |
Yeah, I agree it felt a little hacky and certainly didn't cover every use case. Part of me was hoping you'd think of some small refactor that would simplify things, but we weren't lucky this time. 🙂 |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
v-model
to purposefully bind an element's value directly to a DOM Event, which I think would be strange.If adding a new feature, the PR's description includes:
I brought this up in #6216 a couple weeks ago and it didn't encounter any opposition, so here we go!
TLDR: Since
v-bind="$attrs"
andv-on="$listeners"
were added, a lot of people have been assuming that combining these should be sufficient to allowv-model
on the component. This PR makesv-model
work as users expect.