zoukankan      html  css  js  c++  java
  • extjs 树前面的多选框选中状态修改

    在treepanel的事件中添加:

     1                    listeners: {
     2                            
     3 //                            itemdbclick:{                            
     4 //                                fn: function(view, record, item, index, e,obj){
     5 //                                    alert('dbclick');e.stopEvent;
     6 //                                },
     7 //                                scope: this
     8 //                            }
     9 //                            ,
    10 //                             itemclick: {
    11 //                                    fn: function(view, record, item, index, e,obj){
    12 //                                            alert(record.data.id+':'+record.data.text);
    13 //                                            e.stopEvent;
    14 //                                        },
    15 //                                    scope: this
    16 //                            },
    17                             checkchange: {
    18                                 fn: function(node,checked,obj) {
    19 
    20                                       if(checked)
    21                                       {
    22                                           var pNode = node.parentNode;
    23                                           for(;pNode!=null;pNode=pNode.parentNode)
    24                                           {
    25                                             pNode.set('checked',checked);
    26                                           }
    27                                       }
    28 
    29                                       if(node.childNodes.length>0)
    30                                       {
    31                                          node.cascade(function(node){
    32                                             node.set('checked',checked);
    33                                          });
    34                                       }
    35 
    36                                 }
    37                             }
  • 相关阅读:
    flutter canvas 简单绘画直线
    Yapi 部署及遇到的坑
    flutter 时间选择器第三方插件返回时间格式说明
    windows + flutter + vscode 连接其他模拟器
    flutter 配置环境
    flutter 返回键监听
    flutter 自定义主题切换
    flutter Provide 状态管理篇
    flutter 本地存储 (shared_preferences)
    JS做倒计时的例题
  • 原文地址:https://www.cnblogs.com/baishahe/p/2514984.html
Copyright © 2011-2022 走看看