Extjs4ツリーの追加クリックイベント


    var treeLocal = new Ext.tree.TreePanel({
        title: '选择框',
        root: {
            text: '选择菜单',
            expanded: true,
            leaf: false,
            children: [
                { text: '小小菜单', leaf: true }
            ]
        },
        listeners: {
            itemclick: function () {
                alert("6666666");
            }
        }

    });


ツリーの基本操作イベント

ExtJS 树事件

//ディレクトリツリークリックイベント
'itemclick':function(view、rcd、item、idx、event、eOpts){
var dirid = rcd.get( 'id'); //ノードID
var dirtype = rcd.raw.dirtype ; //カスタムデータ

//ディレクトリツリーのダブルクリックイベント
'itemdblclick':function(view、rcd、item、idx、event、eOpts){
var dirid = rcd.get( 'id'); //ノードID
var dirtype = rcd.raw.dirtype ; //カスタムデータ
}、
//
電話番号イベント'itemcontextmenu':function(view、rcd、item、idx、event、eOpts){
event.preventDefault();
this.showTreeItemMenu(rcd、event); //カスタム処理関数
}

おすすめ

転載: www.cnblogs.com/LY-CS/p/12749598.html