[英]How to change drag'n drop tooltip text in ExtJs?
I have two grids, where I defined drag and drop plugin like this: 我有两个网格,我在这里定义拖放插件,如下所示:
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'secondGridDDGroup',
dropGroup: 'firstGridDDGroup'
},
now, when I drag an item from one grid to another I see text "1 selected row" - how can I change this text? 现在,当我将一个项目从一个网格拖到另一个网格时,我看到文本“1个选定的行” - 如何更改此文本?
Use dragText
config: 使用
dragText
配置:
The text to show while dragging.
拖动时显示的文本。
Two placeholders can be used in the text:
文本中可以使用两个占位符:
- {0} The number of selected items.
{0}所选项目的数量。
- {1} 's' when more than 1 items (only useful for English).
{1}'s'超过1项(仅对英语有用)。
Defaults to: '{0} selected row{1}'
默认为:'{0}选中的行{1}'
It is possible to set it dynamically using the onNodeOver event and something like: 可以使用onNodeOver事件动态设置它,例如:
dd.proxy.update("<span>Custom HTML here</span>");
Make sure you include a HTML tag as update() method calls setStyle. 确保包含HTML标记,因为update()方法调用setStyle。
See http://docs.sencha.com/extjs/6.0.1/classic/Ext.dd.StatusProxy.html#method-update 请参阅http://docs.sencha.com/extjs/6.0.1/classic/Ext.dd.StatusProxy.html#method-update
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.