如何覆盖网格单元上的x-grid-cell-inner CSS(Ext JS)?

egdjgwm8  于 2022-09-26  发布在  其他
关注(0)|答案(1)|浏览(166)

我正在尝试覆盖网格中的内部单元格空白属性。设置cls:“自定义网格”不会更改样式。请帮忙。我的CSS文件:

div.custom-grid div.x-grid-cell-inner {
  white-space: normal; /* changed from nowrap */
}

定义:

Ext.define('My.Panel', {
    extend: 'Ext.grid.Panel',
    cls:'custom-grid' //tried this didn't work
    loadMask: false,    
    scrollable: true,    
    frame: true,

    initComponent: function () {
        let me = this;
        let store = 'base.store.notes'; 
        me.store = store;
        me.columns = [
            {header:Text.Shoppers, width: 100, dataIndex: 'shoppers'},
            {header:Text.Id, width: 100,  dataIndex: 'val'},
        ];

        me.callParent(arguments);
    }
wi3ka0sx

wi3ka0sx1#

第一个div是错误的。它应该是这样的:

.custom-grid div.x-grid-cell-inner {
  white-space: normal; /* changed from nowrap */
}

相关问题