首页 > 其他 > 详细

【vue 】You cannot set a form field before rendering a field associated with the value. 错误解决办法

时间:2020-04-30 16:49:57      阅读:1712      评论:0      收藏:0      [点我收藏+]

根据错误信息:不能设置一个表单值,在渲染一个字段之前。

发生问题所在:点击修改按钮,在表单中放入值,并弹出时报错。

 

处理办法:

this.$nextTick(() => {
// 放入值代码
})

nextTick() 是一个回调函数,意思是在某个元素渲染之后再进行操作。个人理解,可能有些不对。

【vue 】You cannot set a form field before rendering a field associated with the value. 错误解决办法

原文:https://www.cnblogs.com/helei1993/p/12809597.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!