<el-table-column label="输入输出字段" width="200">
<template slot-scope="scope">
<span>{{scope.row.columnDatas | ellipsis}}</span>
</template>
</el-table-column>
添加filters
export default {
filters: {
ellipsis(value) {
if (!value) return "";
if (value.length > 22) {
return value.slice(0, 22) + "...";
}
return value;
}
},
}