【发布时间】:2017-04-20 20:31:19
【问题描述】:
在我的 extjs6 网格中,我的列标题不适合空间。如何仅在列标题中进行自动换行?这是我尝试过的方法,但不起作用。
xtype: 'grid',
title: 'Daily Performance',
itemId: 'performanceAccountDailyGridID',
bind: {
store: '{myDailyPerformanceAccountStore}'
},
margin: '10px 0px 10px 0px',
ui: 'featuredpanel-framed',
cls: 'custom-gridPerformance',
height: 400,
width: 800,
columns: [
{
header: 'Filedate',
dataIndex: 'filedate',
flex: 1
},
css
.custom-gridPerformance .x-column-header-inner .x-column-header-text {
white-space: normal;
}
【问题讨论】:
-
.custom-gridPerformance x-column-header {永远不会匹配任何东西,这是一个错字吗? -
不是错字。只是不确定用于编辑标题的正确格式。应该是什么?
-
因为
x-column-header没有.前缀,所以它不匹配类名,它会尝试匹配标签名称为<x-column-header>的标签 -
所以我只需要放一个 .在 x 列之前?