iview table表格如何添加点击事件

应该如何在账单编号这一列添加点击事件,在数据上点击,感谢各位

 columns1: [
        {
          title: '账单编号',
          key: 'billCode',
          className: "fistCol",
        //   render: (h, params) => {
              
        //       return h('div',{
                
        //       })
            
        //   },
        },

image.png
image.png

阅读 3k
2 个回答
render: (h, params) => {
    return h("div", {
        props: {},
        style: {},
        on: {
            click: (e) => {console.log(e)}
        }
    })
}
render: (h, params) => {
    return h("div", {
        style: {
            color:'blue'
        },
        on: {
            click(e) {console.log(params.row)}
            }
        },
        params.row.billCode
    )
}
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题