Extjs6.0到6.2升级问题

ZhangLN_Best 2018-05-13 07:19:44
编辑回答0浏览75
公司的项目,原先是用ExtJs6.0写的,升级到6.2之后gridpanel滑动时就会卡顿,我用了bufferdstore的方法去写还是不行,主要部分代码如下
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 '女';
}
}
});


Ext.define('CallCenter.store.ContactsStore', {
extend: 'CallCenter.store.BasicStore',
// extend: 'Ext.data.BufferedStore',
model: 'CallCenter.model.Contacts',
autoLoad: false,
// leadingBufferZone: 300,
// pageSize: 50,
pagesize: 5,
proxy: {
type:'ajax',
url: 'others/contacts/xContactsWin/queryContacts',
extraParams:{
},
actionMethods: {
create: 'POST',
read: 'POST',
update: 'POST',
destroy: 'POST'
},
reader: {
type:'json'
,rootProperty: 'listData'
,totalProperty: 'totalSize'
},
enablePaging: true
},
listeners : {
load : function(store) {
}
}
});
...全文
844 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

87,955

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧