ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

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

在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}
返回列表