ExtJS是否提供了一种在标题前显示标题标题图标而不是默认行为的方法?
默认Behviour:
---------------
| + Tab 1 |
---------------
必需的行为:
---------------
| Tab 1 + |
---------------
代码示例:
Ext.create('Ext.tab.Panel', {
plain: true,
items: [{
title: "Tab 1",
iconCls: "icon-class-plus",
}, {
title: "Tab 2",
}],
renderTo: Ext.getBody()
});
icon-class-plus是一个CSS类,包含&:after伪元素,用于设置加号的字形图标。
答案 0 :(得分:3)
使用iconAlign
配置:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.tab.Panel', {
items: [{
title: "Tab 1",
iconCls: "x-fa fa-car",
iconAlign: 'right'
}],
renderTo: Ext.getBody()
});
}
});