如果是HTML渲染的话,我知道怎么去使用,但项目需要用了elementUI框架,好多东西都封装好了。
//过滤器
filters: {
statusFormat: function(value) {
if( value == 1){
return '正常';
}
else if( value == 2){
return '锁定';
}
else if( value == 0){
return '审核中';
}
}
}
//不用elementUI
<tr v-for="(item,index) in infoData">
<td>{{item.status|statusFormat}}</td>
</tr>
//用了elementUI
<el-table-column prop="status" label="STATUS" sortable></el-table-column>
这叫我怎么用啊,全是一些封装好的东西。