使用render
函数,用一个if
来将数据进行渲染
{
title: '状态',
width: 80,
key: 'status',
align: 'center',
render: (h, params) => {
let texts = '';
if(params.row.status === 0){
texts = "下架"
}else {
texts = "上架"
}
return h('div', {
props: {
},
},texts)}
},
网友评论