# el-table设置默认值 el-table-column默认值  第一列和第三列都是根据后端接口返回的数据,中间的系统标识需要设置默认值, 在methods定义函数方法 ```js // 类型格式化 caseTypeNamesFormat (row) { console.log(row,"row") row.caseTypeNames ? showProp = row.caseTypeNames : showProp = '门户网站' return showProp }, ``` ```html
``` 在el-table-column中使用 `:formatter="caseTypeNamesFormat"`方法 ## 快照 - https://img.cdn.apipost.cn/upload/user/0/log/818a7088-f3ec-4cfc-a30a-38a1f412cde1.png - https://i3.wp.com/img.cdn.apipost.cn/upload/user/0/log/818a7088-f3ec-4cfc-a30a-38a1f412cde1.png - https://788910.xyz/api/snapshot?p=e4701e894dd83691fbe997d7bc351fae&u=https://img.cdn.apipost.cn/upload/user/0/log/818a7088-f3ec-4cfc-a30a-38a1f412cde1.png