dabocaiqq 2018-05-27 04:40 采纳率: 63.3%
浏览 843
已采纳

用ExtJs6.0写的,升级到6.2之后gridpanel滑动时就会卡顿,代码如下,求解决

用ExtJs6.0写的,升级到6.2之后gridpanel滑动时就会卡顿,代码如下,求解决

Ext.define('CallCenter.view.main.ContactsGrid', {
extend: 'Ext.grid.Panel',
xtype: 'xContactsGrid',
frame: true,
selType:'checkboxmodel',
selModel: {
checkOnly: true,
mode:'SIMPLE',
// pruneRemoved: false
},
// plugins: [{
// ptype: 'bufferedrenderer'
// }],
loadMask: true, //加载数据时有遮罩效果
controller:'contactsGrid',
cls:'widgtcol gridHeadBtn',
overflowY:'auto',
listeners:{
beforedestroy:'clearStore'
},
initComponent: function(){
var pluginExpanded = true;
var store = Ext.getStore('ContactsStore');
store.removeAll();
Ext.apply(this, {
store: store,
columns: [
{
text: '联系人',
dataIndex: 'name',
flex: 1,
align:'center',
xtype: 'widgetcolumn',
widget: {
xtype: 'button',
listeners: {
click: 'modifyContacts'
}
}
},
{
text: '性别',
dataIndex: 'sex',
flex: 1,
align:'center',
renderer:this.renderSex
},
{
text: '固定电话(分机)',
dataIndex: 'landingTele',
flex: 1,
align:'center',
xtype: 'widgetcolumn',
widget: {
xtype: 'button',
listeners: {
click: 'callTel'
}

                }
            },
            {
                text: '手机号码',
                dataIndex: 'mobile',
                flex: 1,
                align:'center',
                xtype: 'widgetcolumn',
                widget: {
                    xtype: 'button',
                    listeners: {
                        click: 'callMobile'
                    }

                }
            },
            {
                text: '其他号码',
                dataIndex: 'otherPhone',
                flex: 1,
                align:'center',
                xtype: 'widgetcolumn',
                widget: {
                    xtype: 'button',
                    listeners: {
                        click: 'callOtherPhone'
                    }

                }
            },
            {
                text: '传真号',
                dataIndex: 'faxNo',
                flex: 1,
                align:'center'
            },
            {
                text: '邮箱',
                dataIndex: 'email',
                flex: 1,
                align:'center'
            }
        ],
        dockedItems: [{
            xtype: 'toolbar',
            dock: 'top',
            items: [
                {
                    xtype: 'button',
                    text: '批量删除',
                    icon:'resources/images/delete.png',
                    style:{
                        marginLeft:'10px'
                    },
                    listeners:{
                        click:'deleteClick'
                    }
                },{
                    xtype: 'button',
                    text: '新建联系人',
                    icon:'resources/images/add.png',
                    style:{
                        marginLeft:'10px'
                    },
                    listeners:{
                        click:'addContacts'
                    }
                },{
                    xtype: 'button',
                    text: '导出联系人',
                    icon:'resources/images/export.png',
                    style:{
                        marginLeft:'10px'
                    },
                    listeners:{
                        click:'downloadDemo'
                    }
                },{
                    xtype: 'button',
                    text: '导入联系人',
                    icon:'resources/images/import.png',
                    style:{
                        marginLeft:'10px'
                    },
                    listeners:{
                        click:'showImportWin'
                    }
                }
            ]
        }]/*,
         bbar: Ext.create('Ext.PagingToolbar', {
         store: store,
         displayInfo: true,
         displayMsg: '当前显示 {0} - {1} of {2}',
         emptyMsg: "当前无数据",
         plugins: new CallCenter.ux.PageSize()
         })*/
    });
    this.callParent();
},
renderSex:function(value){
    if(value == 0){
        return '男';
    }else if(value == 1){
        return '女';
    }
}

});

  • 写回答

2条回答 默认 最新

  • Go 旅城通票 2018-06-10 03:04
    关注

    extjs这种性能问题最好是取官网问了。。框架太大了。。出问题不要检查

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突