花式树禁用节点的复选框选择
Fancy tree disable checkbox selection for nodes
花式树
我们想要的是根据我们添加的自定义 类 禁用复选框。
例如:
renderNode: function(event, data) {
if(!data.node.folder) {
$(data.node.span).addClass("custom-class");
}
$(".custom-class").css({ // css to disable checkbox});
}
您不能仅使用 css 禁用复选框(只需切换或调暗图像)。
而是使用 api:
node.unselectable = true;
node.render();
花式树
我们想要的是根据我们添加的自定义 类 禁用复选框。
例如:
renderNode: function(event, data) {
if(!data.node.folder) {
$(data.node.span).addClass("custom-class");
}
$(".custom-class").css({ // css to disable checkbox});
}
您不能仅使用 css 禁用复选框(只需切换或调暗图像)。 而是使用 api:
node.unselectable = true;
node.render();