当前位置: 代码迷 >> Web前端 >> EXT中的apply步骤
  详细解决方案

EXT中的apply步骤

热度:62   发布时间:2012-10-18 13:46:56.0
EXT中的apply方法
Ext.apply = function(o, c, defaults){

    if(defaults){

        // no "this" reference for friendly out of scope calls

        Ext.apply(o, defaults);

    }

    if(o && c && typeof c == 'object'){

        for(var p in c){

            o[p] = c[p];

        }

    }

    return o;

};
该方法的作用就是复杂类的属性和方法,同时,如果有默认的新的配置属性的话,就给o给附上。
  相关解决方案