From 75538d7cdc57fd4526a2e40233bfe1aeba5d8d4e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Dec 2020 16:46:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8A=A0=E5=BB=B6=E8=BF=9F=E5=8A=A0=E8=BD=BD=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/x_component_Selector/package.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/o2web/source/x_component_Selector/package.js b/o2web/source/x_component_Selector/package.js index edfc806aa5..55eee76a43 100644 --- a/o2web/source/x_component_Selector/package.js +++ b/o2web/source/x_component_Selector/package.js @@ -16,7 +16,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({ "categoryType": "unit", "dutyUnitLevelBy" : "duty" }, - initialize: function(container, options){ + initialize: function(container, options, delayLoad){ //MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false); this.loading = true; this.setOptions(options); @@ -25,7 +25,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({ if( this.options.types && typeOf(this.options.types) === "array" && this.options.types.length > 0 ){ MWF.xDesktop.requireApp("Selector", "MultipleSelector", function() { this.selector = new MWF.xApplication.Selector.MultipleSelector(this.container, this.options ); - this.selector.load(); + if( delayLoad !== true )this.selector.load(); this.loading = false; }.bind(this)); }else{ @@ -34,25 +34,25 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({ if ((type.toLowerCase()==="unit") && (this.options.unitType)){ MWF.xDesktop.requireApp("Selector", "UnitWithType", function(){ this.selector = new MWF.xApplication.Selector.UnitWithType(this.container, options); - this.selector.load(); + if( delayLoad !== true )this.selector.load(); this.loading = false; }.bind(this)); }else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) && this.options.categoryType.toLowerCase()==="duty"){ MWF.xDesktop.requireApp("Selector", "IdentityWidthDuty", function(){ this.selector = new MWF.xApplication.Selector.IdentityWidthDuty(this.container, options); - this.selector.load(); + if( delayLoad !== true )this.selector.load(); this.loading = false; }.bind(this)); }else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) ){ //&& this.options.categoryType.toLowerCase()==="unit" MWF.xDesktop.requireApp("Selector", "IdentityWidthDutyCategoryByUnit", function(){ this.selector = new MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit(this.container, options); - this.selector.load(); + if( delayLoad !== true )this.selector.load(); this.loading = false; }.bind(this)); }else{ MWF.xDesktop.requireApp("Selector", type, function(){ this.selector = new MWF.xApplication.Selector[type](this.container, options); - this.selector.load(); + if( delayLoad !== true )this.selector.load(); this.loading = false; }.bind(this)); } -- GitLab