Introduction to iView
Official website: http://v1.iviewui.com/
Document: https://www.iviewui.com/docs/introduce
iView list renders data according to state
In the list display of iView, it is often necessary to display data text according to the status.
columns: [
{
title: '课程类型',
key: 'courseType',
width: 100,
render:(h,params) => {
let texts = ''
if(params.row.publicLevel == 1){
texts = '实践'
}else if(params.row.publicLevel == 2){
texts = '实验'
}else if(params.row.publicLevel == 3){
texts = '实训'
}
return h('div',{
},texts)
}
}
]
The effect is as follows: