Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一棵带有常规节点的树,还有一些添加了 Class1 的节点:
添加类:“custom1”
如何防止在 custom1 节点上丢弃并允许在所有其他(常规)节点上丢弃?
在 onDrop 处理程序中添加一行以检查目标节点的 data.addClass:
onDrop: function(node, sourceNode, hitMode, ui, draggable) { if( node.data.addClass == 'custom1'){ return; } // move the source }