iView displays pictures in the list

Introduction to iView

Official website: http://v1.iviewui.com/
Document: https://www.iviewui.com/docs/introduce

iView displays pictures in the list

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'
                             }
                           })
                        }
                    }
      ]

The effect is as follows:
Insert picture description here

Guess you like

Origin blog.csdn.net/u010312671/article/details/106568145