According to the table a column element ui return parameters, the display content determination

Background data line_type: 1 or 2
with the corresponding type: WAN, LAN

<el-table-column
    prop="line_type"
     label="线路类型"
     show-overflow-tooltip
     :formatter="formtype">
</el-table-column>
methods:{
	//判断线路类型,返回对应文字
	formtype(row, column, cellValue){
		 if (cellValue == 1){
	              return '广域网';
	          }else if (cellValue == 2){
	              return '局域网';
	          }
	},
}
Published 47 original articles · won praise 4 · Views 6677

Guess you like

Origin blog.csdn.net/lifangfang0607/article/details/103122101