computed: {
getStatus: {
get() {
return function (status) {
switch(status){
case 0:
return '使用中';
case 1:
return '库存';
case 2:
return '报废';
case 3:
return '丢失';
}
}
}
}
},
<el-table-column prop="status" label="状态" width="120">
<template slot-scope="scope">
{{getStatus(scope.row.status)}}
</template>
</el-table-column>
网友评论