//As long as you want to configure the viewConfig in the treepanel, if it is Between two trees, both trees must be configured
viewConfig:{
plugins:{
ptype:'treeviewdragdrop',
appendOnly:true //Only non-leaf nodes can be dragged
},
listeners:{//Listener
drop:function(node,data,overModel,dropPosition,options){
//Ajax operation synchronizes data to the background database
alert("Move:" data.records[0].get('text') " to: " overModel.get("text"));
},
beforedrop:function(node,data, overModel,dropPosition,dropFunction,options){
// if(overModel.get("leaf")){ //Target node
// overModel.set('leaf',false);
/ / }
}
}
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn