-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Vue warn]: Invalid prop: type check failed for prop "checked". Expected Boolean, got Event #1356
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
Comments
no problem Please try using https://www.antdv.com/components/checkbox-cn/#API vue.js |
However, `v-model` can work. pls review codesandbox demo.
and this is a bug in `vue 2.6.0-beta.1`
liudonghua <[email protected]> 于2019年10月30日周三 上午8:21写道:
… Hi @sendya <https://github.com/sendya> , I understand your answer, the
key is change v-model to checked and @change, write the following code
<a-checkbox
:checked="checkNick"
@change="e => checkNick = e.target.checked"
>Nickname is required</a-checkbox>
instead of
<a-checkbox v-model="checkNick">
Nickname is required
</a-checkbox>
However, that's just another way to skip the v-model in a-checkbox issue,
I can also change v-model to v-decorator style. It does not fix the
possible problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1356?email_source=notifications&email_token=ABJHO7QPF4RVWDV7IX6OPM3QRDHSLA5CNFSM4JGFJL52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECSQLKA#issuecomment-547685800>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJHO7QSARZV4TI33RZSOU3QRDHSLANCNFSM4JGFJL5Q>
.
|
@sendya Hi, I tried you codesanbox example, it's seems ok, but when you download and run locally, you will see the same errors in console. |
It's a bug existed from vue |
If I change https://codesandbox.io/s/vue-antd-template-cxwbr?fontsize=14 |
@sendya @tangjinzhou Does this issue fixed? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
1.4.2
Environment
Win 10 1903, Chrome 78, vue ^2.6.10
Reproduction link
https://github.com/liudonghua123/antd-demo
Steps to reproduce
What is expected?
No warn or error shown in console
What is actually happening?
The callback in model is called twice, the first one the value argument was a event object, the the second one with the correct true/false value.
The text was updated successfully, but these errors were encountered: