在vue2中,父组件给子组件传递数据,子组件通过props来接收
props: {
// eslint-disable-next-line no-unused-expressions, no-undef
item: {
type: Object
},
proList
}
此时针对proList会报错
此时只需要给proList加个类型判断即可
页面也可以正常渲染出来
在vue2中,父组件给子组件传递数据,子组件通过props来接收
props: {
// eslint-disable-next-line no-unused-expressions, no-undef
item: {
type: Object
},
proList
}
此时针对proList会报错
此时只需要给proList加个类型判断即可
页面也可以正常渲染出来