拓冰建站拓冰建站
首页 / 资讯中心 / 正文

在el-table-column上过滤数据,进行格式化处理

1.使用:formatterformatterColumn属性el-table-column :formatterformatterColumn aligncenter label名称 min-width200 propname/el-table-column2.formatterColumn方法formatterColumn(col,row){let value col[row.property]if( value undefined || value null || value.length 0){return /}switch (row.property){case name :value value.split(市)[0]break;case dataTime :value dayjs(value).format(YYYY-MM-DD)break;case isShow :if(value 1){value 是}else {value 否}break;}return value}
分享:

看完干货,该让你的企业上线了

免费需求沟通 · 48 小时内出具建站方案 · 河南本地可上门