cols: [
{ width: 250,
align: 'center',
renderHeader: (createElement, {col}) => {
return createElement('Select', {
props: {
value: this.visitRecordData.identifierDataIndexType,
transfer:true
},
on: {
'on-change': (value) => {
this.visitRecordData.identifierDataIndexType = value
}
},
style: {
width: '150px',
}
}, [
createElement('Option', {
props: {
value: 'usual'
},
style: {
fontWeight: 'normal'
}
}, '名字'),
createElement('Option', {
props: {
value: 'official'
},
style: {
fontWeight: 'normal'
}
}, '年龄'),
])
},
render: (createElement, {row}) => {
let showText=row.identifier && row.identifier.find(item=>{
return item.use===this.visitRecordData.identifierDataIndexType
}).value
return createElement("span", {}, showText?showText:"")
}
},
]
接口返回的参数
最后的效果