vue antd 動態設置form表單的值

先來一波報錯

_this.props is undefined
You cannot set a form field before rendering a field associated with the value.

統一解決辦法爲:

異步0秒解決

setTimeout(() => {
  this.form.setFieldsValue({
     'screeningNo': '123'
   })
 }, 0)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章