extjs touch ajax 交互,遮罩,提示

前端之家收集整理的这篇文章主要介绍了extjs touch ajax 交互,遮罩,提示前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
tiger_request_num = 0;
Ext.override(Ext.data.Connection,{
    request: Ext.Function.createSequence(Ext.data.Connection.prototype.request,function () {
        if (tiger_request_num == 0) {

            Ext.Viewport.add({xtype:'loadmask',message:'正在努力与后台交互...',id:'tigerleq-panel-mask'  //赋给它id  
            }); 

        }
        tiger_request_num++;
    }),onUploadComplete: Ext.Function.createSequence(Ext.data.Connection.prototype.onUploadComplete,function () {

        tiger_request_num--;
        if (tiger_request_num == 0) {
            Ext.Viewport.remove(Ext.getCmp('panel-mask'));
        }
    }),onComplete: Ext.Function.createSequence(Ext.data.Connection.prototype.onComplete,function () {

        tiger_request_num--;
        if (tiger_request_num == 0) {
            Ext.Viewport.remove(Ext.getCmp('tigerleq-panel-mask'));
        }
    })
});
原文链接:https://www.f2er.com/ajax/164716.html

猜你在找的Ajax相关文章