gpt4 book ai didi

javascript - jstree 仅当单击复选框而不是标签时才检查取消选中

转载 作者:行者123 更新时间:2023-12-02 13:43:17 25 4
gpt4 key购买 nike

我已经使用 jsTree 渲染了 TreeView ,如何仅在单击复选框图标而不是节点标签时选中/取消选中节点?

最佳答案

我找到了自己问题的答案
设置以下属性后,它的行为符合预期。

        $('#testTree').jstree({ 
core: {
data: getData,
check_callback: false
},
checkbox: {
three_state : false,
whole_node : false,//Used to check/uncheck node only if clicked on checkbox icon, and not on the whole node including label
tie_selection : false
},
plugins: ['checkbox']
})

关于javascript - jstree 仅当单击复选框而不是标签时才检查取消选中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43014176/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com