简体   繁体   English

拖放后Kendo UI Treeview Sprite消失

[英]Kendo UI Treeview sprite goes away after drag&drop

I'm trying to generate a Kendo UI treeview markup and make use of dragging and dropping nodes around. 我正在尝试生成Kendo UI树视图标记,并利用周围的拖放节点。 The problem is that after I drop a node onto another the sprite span element disappears. 问题是在将一个节点放到另一个节点后,sprite span元素消失了。

Initial HTML markup: 初始HTML标记:

<li>
   <span class='k-sprite'></span>
   <span class='node-text'>Node1</span>
</li>

And here's how a node looks like after dragging & dropping: 这是拖放后的节点外观:

<li role="treeitem" class="k-item k-last" data-uid="054713f5-5ba3-444e-a322-72bf86d53ad5" aria-selected="true">
   <div class="k-bot">
     <span class="k-in k-state-selected">Node4</span>
   </div>
</li>

Here's a fiddle: http://jsfiddle.net/BX4VC/ 这是一个小提琴: http : //jsfiddle.net/BX4VC/

Any idea on how to help Kendo parse the HTML correctly so it preserves the elements inside the node after dragging them around? 关于如何帮助Kendo正确解析HTML以便在拖动它们之后将其保留在节点内的任何想法?

Thank you! 谢谢!

There is special handling of the k-sprite class, due to its relation to the spriteCssClass field of the treeview items. 由于k-sprite类与treeview项的spriteCssClass字段相关,因此对其进行了特殊处理。 If you set an icon class, the spans will be persisted, as seen in the updated fiddle . 如果设置了图标类,则跨度将保持不变,如更新的小提琴中所示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM