第一步先定义个
currentid:0
然后
{
title: '选择',
key: 'chose',
width: 70,
align: 'center',
render: (h, params) => {
let id = params.row.idjishi;
let flag = false;
if (this.currentid === id) {
flag = true
} else {
flag = false
}
let self = this
return h('div', [
h('Radio', {
props: {
value: flag
},
on: {
'on-change': () => {
self.currentid = id
this.id_jishi = params.row.idjishi
}
}
})
])
}
},