根据当前的value值比较 进行返回label (主要是从中间的 | 管道符进行转换 )
<template slot-scope="scope" slot="authSources">
<div>{{ scope.row.authSources | filterPersonType(sourceList) }}</div>
</template>
sourceList: [
{
label: "全部",
value: "",
},
{
label: "移动端APP",
value: 0,
},
{
label: "微信小程序",
value: 1,
},
{
label: "微信公众号",
value: 2,
},
{
label: "支付宝小程序",
value: 3,
},
],
filters:{
filterPersonType(value,options){
const option = options.find(opt => opt.value == value);
return option ? option.label : '';
},
},