vue中render()函数使用组件需要用到v-model

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)

                }

              }

            })

            ]

            )

          },
经验分享 程序员 微信小程序 职场和发展