vue iview render里面 没有双向绑定 renderHeader 要序列化 反序列 一下
renderHeader: (h, params) => {
return [
h('RadioGroup', {
props: {
value: '3',
type: 'button'
},
on: {
'on-change': value => {
// params.index 行 params.column.key 列
this.tableData.some((item, index, arr) => {
item['rgOperation'] = value
})
let t = JSON.parse(JSON.stringify(this.tableData))
this.tableData = t
}
}
}, [
h('Radio', { props: { label: '1' } }, '覆盖'),
h('Radio', { props: { label: '2' } }, '追加'),
h('Radio', { props: { label: '3' } }, '忽略')
])
]
},