vue中为computed计算属性传参遇到的问题,已解决
<el-table-column label="制定人">
<template slot-scope="scope">
{{user(scope.row)}}
</template>
</el-table-column>
computed: {
user: function() {
return function(row) {
console.log(row, “ddddddddd”);
const zdry = this.userInfo.filter(item => {
return item.ID == row.uid;
});
console.log(zdry,“tttt”);
return zdry[0].USERNAME;
};
}
},