iView 在Table組件中添加圖片

{
title: “商品圖片”,
key: “commodityPhoto”,
align: ‘center’,
render: (h, params) => {
return h(‘img’, {
style: {//設置樣式
width: ‘100px’,
‘height’: ‘80px’,
‘border-radius’: ‘5%’
},
attrs: {//設置屬性
src: ‘http://localhost:8888/’ + params.row.commodityPhoto
}
});
}
}在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章