Warning: You cannot set a form field before rendering a field associated with the value. You can

目前不清楚原理:解决方法是使用this.$nextTick(()=>{ })方法

created() {
  this.productIn=this.$route.query.productIn
  let productCode = this.productIn.productCode

  this.$nextTick(()=>{
    this.form.setFieldsValue({
      productCode: productCode
    })
  })
},

猜你喜欢

转载自blog.csdn.net/qq_37375667/article/details/111504550
今日推荐