iView简介
官网:http://v1.iviewui.com/
文档:https://www.iviewui.com/docs/introduce
iView在列表中显示图片
export default {
data () {
return {
defaultImg:require('@/assets/images/defaultImg.jpg'),
}
}
}
columns: [
{
title: '课程封面',
key: 'courseLogo',
width: 200,
render:(h) =>{
return h('img',{
attrs : {
src : defaultImg
},
style : {
width : '100px',
height : '100px'
}
})
}
}
]
效果如图: