renderContent(h, { node, data, store }) {
return h('span',{class:'custom-tree-node error'},
[
h('span',[
h('span',{domProps:{
innerHTML:node.data.label
}}),
h('span',{class:'oper'},[
h('img',{domProps:{
src:"<%=path%>/images/tree-add.png"
},
on: {
click: () => {
this.append(node.data)
}
}
}),
h('img',{domProps:{
src:"<%=path%>/images/tree-edit.png"
},
on: {
click: () => {
this.edit(node,node.data)
}
}
}),
h('img',{domProps:{
src:"<%=path%>/images/tree-delete.png"
},
on: {
click: () => {
this.remove(node,node.data)
}
}
})
])
])
])
}
el-tree render-content 非jsx实现方法,
猜你喜欢
转载自blog.csdn.net/shixueyan_fendou/article/details/103593676
今日推荐
周排行