首页 新闻 会员 周边

求助,EasyUI问题

0
悬赏园豆:20 [已解决问题] 解决于 2014-06-24 10:07

EasyUI  tree  有没有办法选择父节点子节点不全选,不使用treegrid。

学之乐的主页 学之乐 | 初学一级 | 园豆:33
提问于:2014-06-23 22:04
< >
分享
最佳答案
0
NameTypeDescriptionDefault
cascadeCheck boolean Defines if to cascade check. true

cascadeCheck为false就满足你的要求。

收获园豆:20
HaibinZhao | 菜鸟二级 |园豆:243 | 2014-06-24 00:41
其他回答(1)
0


        $('#tt').tree({
            url: url,
            method: "GET",
            checkbox: true,
            lines: true,
            cascadeCheck: false,
            onCheck: function (node, checked) {
                if (checked) {
                    var node1 = $(this).tree('getParent', node.target);
                    if (node1 != null) {
                        $(this).tree('check', node1.target);
                    }
                } else {
                    var nodeC = $(this).tree('getChildren', node.target);
                        $.each(nodeC, function () {
                            $('#tt').tree('uncheck', this.target);
                        });
                }

            }
        });

学之乐 | 园豆:33 (初学一级) | 2014-06-24 10:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册