问题:render函数构建多个元素(记录一下)

具体的render函数写法可参照这位大佬https://www.jianshu.com/p/fd62147ab67c

{
    title: "操作",
    fixed: "right",
    render(row) {
      return h("div", [
        h(NSwitch, {
          value: value,
          // 监测switch的改变
          onUpdateValue:(value)=>{ handleChange(row,index,value)},
        }),
        h(
          NButton,
          {
            tertiary: true,
            type: "primary",
            // onClick: () => play(row)
          },
          { default: () => "Button" }
        ),
      ])
    },
  },

 

posted @ 2022-04-14 17:20  ling'er  阅读(321)  评论(0)    收藏  举报