vue3.x版本
利用插槽将图片插入表格中
<el-table-column prop="img" label="图片">
<template v-slot="scope">
<img :src="scope.row.img" width="90" height="90">
</template>
</el-table-column>
例如:
data(){
data() { return { imgs: [ {img: require(‘@/assets/images/views/login-logo.png‘) }, {img: require(‘@/assets/images/views/login-logo.png‘) }, {img: require(‘@/assets/images/views/login-logo.png‘) }, ] } }
}
效果图: