我使用 4.2.1 和来自 BoxSelect 的 BoxSelect 扩展
那里的例子在标签中显示了一个关闭图标:
在 4.2.1 中我有这个示例代码:
{
name: 'tags',
itemId: 'tags',
xtype: 'boxselect',
fieldLabel: "${cn.message(code: 'tags')}",
forceSelection: false,
createNewOnEnter: true,
createNewOnBlur: true,
store: 'States',
queryMode: 'local',
valueField: 'abbr',
displayField: 'name',
filterPickList: true,
pinList: false,
growMax: 120,
typeAhead: true,
}
看起来像这样:
是不是4.2.1版本的缘故,关闭图标不显示了?
还是我缺少某些设置?
我尝试了经典、灰色和海王星主题。
已解决
missing close icon 给出的解决方案正在为我工作。
感谢@DoubleDouble 指出该页面。
将其添加到 BoxSelect.css 中即可解决:
.x-boxselect-item-close {
width : 11px;
height : 11px;
background-image: url(http://cdn.sencha.io/ext-4.2.0-gpl/resources/ext-theme-classic/images/tab/tab-default-close.gif);
filter : progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
opacity : 0.6;
top : 2px;
right : 2px;
}
.x-boxselect-list {
margin:0px;
}
现在看起来像这样:
最佳答案
Boxselect 已针对 ExtJS 4.1 更新
看看 Sencha 论坛帖子,我相信更远的地方(也许从后面开始)人们发布一些其他代码来修改它以在 4.2 中更好地工作
也就是说,即使进行了这些更改,我也无法让 BoxSelect 以我想要的方式为我自己的项目工作。希望你的运气比我好!
编辑
第 18 页似乎有您的特定问题
关于ExtJS - BoxSelect 关闭图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23274343/