v-model是vue中的语法糖,在render中使用的话需要分解为value,oninput
render: (h, scope) => {
return h('div',{},[
h('el-switch',{
props:{
activeColor:"#13ce66",
inactiveColor:"#ff4949",
value:scope.row.status==1?true:false
},
on:{
input:(value)=>{
// scope.row.status=value,
this.changeStatus(scope.row)
}
}
})
]
)
},