
treepanel 加拖动
plugins: {
ptype: 'treeviewdragdrop',
containerScroll :true,
}
2)加增加和删除保存按钮
增加就在treestore增加一条,位置通过控件拖动确认
//页面左边的导航菜单树var leftPanel = new Ext.tree.TreePanel({
region : 'west',
split : true,
containerScroll : true,
autoScroll : true,
animate : true,
rootVisible : false,
collapsible : true,
title : '功能菜单',
loader : new Ext.tree.TreeLoader(),
height : 500,
width : 200
})
var root = new Ext.tree.AsyncTreeNode({
text : '菜单',
id : '0'
})
leftPanel.setRootNode(root)
leftPanel.on('beforeload', function(node) {
leftPanel.loader.dataUrl =loadMenuUrl+'&pid='+ node.id // 定义子节点的Loader
})
click : ( Node node, Ext.EventObject e )Fires when a node is clicked
Listeners will be called with the following arguments:
* node : Node
The node
* e : Ext.EventObject
The event object
tree.on("click",function())})
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)