今天在子组件设置默认值的时候出现以下错误:
Invalid default value for prop "duoduanList": Props with type Object/Array must use a factory function to return the default value
问题显示:
组件是默认值报错:Props with type Object/Array must use a factory function to return the default value
产生问题的出处
组件是默认值报错:Props with type Object/Array must use a factory function to return the default value
解决办法 props传递数据的时候,默认值如果是数组或者对象,应该使用一个函数返回默认值
组件是默认值报错:Props with type Object/Array must use a factory function to return the default value

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2021-09-01
  • 2021-11-24
  • 2021-12-02
  • 2021-06-04
  • 2022-01-22
猜你喜欢
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2021-04-04
  • 2021-12-16
相关资源
相似解决方案