是否有可能在Ext.grid.column.Action
问题描述:
http://docs.sencha.com/extjs/4.0.7/#!/api/Ext.grid.column.Action是否有可能在Ext.grid.column.Action
垂直对齐使用一个ExtJS操作列我能为行动柱水平居中的图标,但我无法垂直对齐图标,这导致了奇怪的外观布局。
{
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
}
有没有人有如何垂直对齐使用动作列组件的解决方案?
答
最好的办法是增加vertical-align: middle;
你的CSS,像这样:
.x-grid-cell.action-column {
vertical-align: middle;
}
答
不知道它的工作,但也许你可以给一个尝试添加style
并使用CSS vertical-align
:
style: {
vertical-align: "middle"
}
+0
感谢您的尝试,但这并没有奏效。我不得不重写在我的iconCls css中的定位(这不是正确的方式,所以我仍然保持这个打开状态。) –
忘记这仍然是开放的,谢谢你回到我身边。是的,它会这样做,但它会覆盖所有分机网格的行为方式。最好添加一个带有!重要标志的外部cls以覆盖ext base css –
在这种情况下不需要'!important'标志。如果你只想在特定网格的action列中使用,你总是可以使用'.specific-grid-class .x-grid-cell.action-column'选择器。 – MarthyM