[Vue warn]: Error in callback for watcher "fileList": "TypeError: Cannot create property 'uid' on string

 

element ui做自定义上传时,返回的url地址要放到列表里边,如果直接push就会报错

[Vue warn]: Error in callback for watcher "fileList": "TypeError: Cannot create property 'uid' on string

 

 所以正确写法应该是

[Vue warn]: Error in callback for watcher "fileList": "TypeError: Cannot create property 'uid' on string

 

 传一个对象过去,name是你要展示的名字

[Vue warn]: Error in callback for watcher "fileList": "TypeError: Cannot create property 'uid' on string

 

 就不会报错了

 

相关文章:

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