render: (h, params) => {
const span = h('div',
{
class: 'cur urltext',
on: {
click: () => {
this.onDetail(params.row, 'wpbh');
}
}
},
params.row.wpbh
)
return h('el-tooltip', {
props: {
popperClass: 'shortpopper',
placement:"top",
content: params.row.wpbh
},
},[span])
}
h为接收的createElement()方法参数,[span]表示div为el-tooltip的子元素,子元素用数组包裹。