解决Invalid prop: type check failed for prop "model". Expected Object, got Array问题

Vue项目前端页面报错:“Invalid prop: type check failed for prop “model”. Expected Object, got Array ”


错误原因是:期望对象,得到的是数组

从后台获取的数据是List类型,需要把它改为Object

原代码为:

let infoList = res.infoList;

改为:

let infoList = res.infoList[0];

你可能感兴趣的:(解决Invalid prop: type check failed for prop "model". Expected Object, got Array问题)