Javascript 是否可以在Ext.grid.column.Action中垂直对齐
使用extjs action列,我可以水平居中放置action列的图标,但是我无法垂直对齐图标,这导致了一个奇怪的布局Javascript 是否可以在Ext.grid.column.Action中垂直对齐,javascript,css,extjs,extjs4,Javascript,Css,Extjs,Extjs4,使用extjs action列,我可以水平居中放置action列的图标,但是我无法垂直对齐图标,这导致了一个奇怪的布局 { xtype: 'actioncolumn', tooltip: this.self.QUICKLOOK_TOOLTIP, tdCls: 'action-column', isDisabled: function(view, rowIndex, colIndex, item, record) {
{
xtype: 'actioncolumn',
tooltip: this.self.QUICKLOOK_TOOLTIP,
tdCls: 'action-column',
isDisabled: function(view, rowIndex, colIndex, item, record) {
return !this.quicklookable(record);
},
getClass: function(value, metaData, record) {
return this.quicklookable(record) ? 'bui-icon quicklook' : '';
},
itemId: 'activityListOpenQuicklook',
width: 50,
align: 'center',
handler: function(grid, rowIndex, colIndex, item, evt, record, row) {
this.fireEvent('openQuicklook', record);
},
scope: this
}
有没有人能解决如何使用action column组件进行垂直对齐的问题
最好的方法是添加
垂直对齐:中间对齐代码>到您的CSS,如下所示:
.x-grid-cell.action-column {
vertical-align: middle;
}
忘了这个还开着,谢谢你回复我。是的,这样做就可以了,但它会改写所有ext网格的行为方式。最好添加一个外部cls和一个!覆盖ext base CSS的重要标志不需要!本例中的重要标志。如果您只希望它出现在特定网格的action列中,则始终可以使用.specific grid class.x-grid-cell.action列
选择器。