iview Tree组件点击高亮
程序员文章站
2024-03-12 20:05:44
...
.selectTreeClass{
background:#ebf7ff;
}
renderContent(h: any, {root , node, data }: any) {
return h(“div”,{
style: {
width: “90%”,
float:“right”,
cursor:“pointer”,
padding:“3px”,
},
attrs:{
class:(data.nodeKey == 0 ? ‘show selectTreeClass’:‘show’)
},
on: {
click: () => {
(this as any).oilPoint(root, node, data);
}
}
},
[
h("div",[
h("Icon", {
props: {
type: "ios-folder",
size:"16"
},
style: {
marginRight: "8px",
float:"left",
color:'#add0f6',
}
}),
h("span",{
style: {
marginRight: "30px",
float:"left",
},
on: {
click: (e:any) => {
$(".show").removeClass("selectTreeClass");
$(e.target).parents(".show").addClass("selectTreeClass");
(this as any).showModal(root, node, data);
}
}
}, data.title)
]),
]
);
},
上一篇: @Import 注解
下一篇: Apache Hive 数据导出