失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > value=“btnMsg“ conflicts with v-model on the same element because the latter already expands to

value=“btnMsg“ conflicts with v-model on the same element because the latter already expands to

时间:2018-08-28 16:16:35

相关推荐

value=“btnMsg“ conflicts with v-model on the same element because the latter already expands to

vue 项目,运行时报错:

- :value="btnMsg" conflicts with v-model on the same element because the latter already expands to a value binding internally

解释:

:value="btnMsg", 与同一元素上的v-model冲突,因为后者已在内部扩展为值绑定。

出错代码:

<input class="test-btn ui-fr" type="button" name="yanzheng" v-model="btnMsg" :value="btnMsg" :disabled="!mailVerifyStatus" @click="mailVerify()">

解决:

将:value="btnMsg" 改为:name="btnMsg", 即:

<input class="test-btn ui-fr" type="button" name="yanzheng" v-model="btnMsg" :name="btnMsg" :disabled="!mailVerifyStatus" @click="mailVerify()">

如果觉得《value=“btnMsg“ conflicts with v-model on the same element because the latter already expands to》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。