簡體   English   中英

extjs 網格面板上的滾動問題

[英]extjs problem with scroll on grid panel

您好,我在網格上滾動時遇到問題。
這是代碼(其中沒有什么花哨或特別之處)

Ext.define('grid.list',{
    alias:'widget.grid.list',
    extend: 'Ext.grid.Panel',
    title: 'list',
    frame:true,
    width:325,
    store: new axs.dry.cargo.data.store.list,
    queryMode: 'remote',
    style:{
        cursor: 'default'
    },
    viewConfig: {
        autoScroll: true
    },
    features:[Ext.create('Ext.grid.feature.Grouping',{
        groupHeaderTpl: '{name}'
    })],
    columns: [
    {
        text: 'Name',
        flex: true,
        dataIndex: 'name',
        sortable: false
    }
    ],
    initComponent:function(){
        this.on('beforerender',function(){
            this.store.load();
        });
        grid.list.superclass.initComponent.apply(this,arguments)
    }
})

網格看起來不錯,滾動條顯示在滾動條上,但 extjs 生成了一個真正問題的 DIV。 因為那個 div 我不能點擊滾動條因為透明的 DIV 在它上面....這是這個無用的 DIV 的代碼

<div id="gridscroller-1032" class="x-component x-scroller x-scroller-vertical x-component-default x-docked x-docked-right x-component-docked-right x-component-default-docked-right" style="width: 17px; height: 297px; left: 302px; top: 47px; " role="presentation"><div class="x-stretcher" id="ext-gen1392" style="width: 1px; height: 2953px; "></div></div>

我聽說這個 div 是為“不定式網格”生成的,但是......
你能幫我解決好問題嗎(通過選擇它的 ID 來刪除元素不是一個好的解決方案)

PS。 當我刪除我的 grid.list 元素的固定寬度時,問題就消失了......但是它開始顯示看起來很難看的水平滾動條,我只能通過將寬度設置為固定大小來刪除它。

PS2。 我使用的是默認的 css 文件,沒有特殊的 styles 或任何東西。

問題自行解決。 我已經將我的表單集成到主項目中並且出現了滾動條......我不知道為什么會這樣,也許是 extjs 錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM