html
<template slot-scope="scope">
<p class="msg_status" :class="handleClass(scope.row.status_str)"><em class="icon_status"></em><span>{{scope.row.status_str}}</span></p>
</template>
js
computed: {
handleClass () {
return function (status) {
switch (status) {
case '未查看':
return 'status_no_view'
case '已查看':
return 'status_already_view'
case '已取消':
return 'status_cancel'
case '已过期':
return 'status_overdue'
}
}
}
}
网友评论