首页 > 其他 > 详细

ant-design-vue Warning: You cannot set a form field before rendering a field associated with the value.

时间:2021-04-16 12:40:18      阅读:38      评论:0      收藏:0      [点我收藏+]

使用了表单的方法setFieldsValue(),来设置一组输入控件的值,传入的值为object,但是传入的值要和表单的值一一对应,能少传不能多传

const fieldValues = {name:‘winyh‘, age:20} 当 name=age 的表单项并没有渲染在页面时就会报错!

form.setFieldsValue(fieldValues)

  

ant-design-vue Warning: You cannot set a form field before rendering a field associated with the value.

原文:https://www.cnblogs.com/winyh/p/14666050.html

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