1、title模板,change,blur事件
{
title: '原价',
key: 'old_price',
align: 'center',
render: (h, params) => {
return h(
'i-Input',
{
props: {
value: params.row.old_price
},
on: {
'on-change': (e) => {
params.row.old_price = e.target.value
this.data[params.index] = params.row
},
'on-blur': (e) => {
this.updateFoo('old_price', params)
}
}
}
)
}
},
2、methods方法
updateData(str, params) {
this.current = this.data[params.index][str]
}