o2oa api: x-游戏厅捕鱼达人

source

mwf.xdesktop.requireapp("process.xform", "$module", null, false);
/** @class div 容器组件。
 * @o2cn 容器组件
 * @example
 * //可以在脚本中获取该组件
 * //方法1:
 * var div = this.form.get("name"); //获取组件
 * //方法2
 * var div = this.target; //在组件事件脚本中获取
 * @extends mwf.xapplication.process.xform.$module
 * @o2category formcomponents
 * @o2range {process|cms|portal}
 * @hideconstructor
 */
mwf.xapplication.process.xform.elcontainer = mwf.appelcontainer =  new class({
    extends: mwf.app$module,
    _loaduserinterface: function(){
        this.node.addclass("o2_vue");
        var asides = this.node.getelements("aside");
        var headers = this.node.getelements("header");
        var mains = this.node.getelements("main");
        var footers = this.node.getelements("footer");
        if (!this.asides || !this.asides.length) this.asides = [];
        if (!this.headers || !this.headers.length) this.headers = [];
        if (!this.mains || !this.mains.length) this.mains = [];
        if (!this.footers || !this.footers.length) this.footers = [];
        asides.each(function(aside){  this.asides.push(this._loadsubmodule(aside)); }.bind(this));
        headers.each(function(header){  this.headers.push(this._loadsubmodule(header)); }.bind(this));
        mains.each(function(main){  this.mains.push(this._loadsubmodule(main)); }.bind(this));
        footers.each(function(footer){  this.footers.push(this._loadsubmodule(footer)); }.bind(this));
    },
    _loadsubmodule: function(node){
        var json = this.form._getdomjson(node);
        var module = null;
        if (json){
            var container = this;
            module = this.form._loadmodule(json, node, function(){
                this.container = container;
            });
            this.form.modules.push(module);
        }
        return module;
    }
});
mwf.xapplication.process.xform.elcontainer$main = mwf.appelcontainer$main =  new class({
    extends: mwf.app$module
});
mwf.xapplication.process.xform.elcontainer$aside = mwf.appelcontainer$aside =  new class({
    extends: mwf.app$module,
    _loaduserinterface: function(){
        var css = object.clone(this.form.css["el-container-aside"]);
        if (this.json.recoverystyles){
            var keys = object.keys(css);
            keys.foreach(function(key){
                if (this.json.recoverystyles[key]) delete css[key];
            }.bind(this))
        }
        this.node.setstyles(css);
    }
});
mwf.xapplication.process.xform.elcontainer$header = mwf.appelcontainer$header =  new class({
    extends: mwf.app$module,
    _loaduserinterface: function(){
        var css = object.clone(this.form.css["el-container-header"]);
        if (this.json.recoverystyles){
            var keys = object.keys(css);
            keys.foreach(function(key){
                if (this.json.recoverystyles[key]) delete css[key];
            }.bind(this))
        }
        this.node.setstyles(css);
        //this.node.setstyles(this.form.css["el-container-header"]);
    }
});
mwf.xapplication.process.xform.elcontainer$footer = mwf.appelcontainer$footer =  new class({
    extends: mwf.app$module,
    _loaduserinterface: function(){
        var css = object.clone(this.form.css["el-container-footer"]);
        if (this.json.recoverystyles){
            var keys = object.keys(css);
            keys.foreach(function(key){
                if (this.json.recoverystyles[key]) delete css[key];
            }.bind(this))
        }
        this.node.setstyles(css);
        //this.node.setstyles(this.form.css["el-container-footer"]);
    }
});
网站地图