diff --git a/bi/case.js b/bi/case.js index 240ab1d94..f9b5bc7f1 100644 --- a/bi/case.js +++ b/bi/case.js @@ -11743,17 +11743,18 @@ BI.ZeroClip = BI.inherit(BI.BasicButton, { afterCopy: BI.emptyFn }) }, + _init: function () { BI.ZeroClip.superclass._init.apply(this, arguments); - var self = this, o = this.options; + }, - BI.nextTick(function () { - self.element.zclip({ - path: BI.resourceURL + "/ZeroClipboard.swf", - copy: o.copy, - beforeCopy: o.beforeCopy, - afterCopy: o.afterCopy - }); + mounted: function () { + var self = this, o = this.options; + this.element.zclip({ + path: BI.resourceURL + "/ZeroClipboard.swf", + copy: o.copy, + beforeCopy: o.beforeCopy, + afterCopy: o.afterCopy }); } }); diff --git a/bi/core.js b/bi/core.js index b922588ac..b5300f68e 100644 --- a/bi/core.js +++ b/bi/core.js @@ -4365,9 +4365,10 @@ BI.Widget = BI.inherit(BI.OB, { this._initRoot(); this._initElementWidth(); this._initElementHeight(); - this._initVisualEffects(); + this._initVisual(); this._initState(); this._initElement(); + this._initEffects(); this.created && this.created(); }, @@ -4422,21 +4423,23 @@ BI.Widget = BI.inherit(BI.OB, { } }, - _initVisualEffects: function () { + _initVisual: function () { var o = this.options; if (o.invisible) { //用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 this.element.css("display", "none"); } + }, + + _initEffects: function () { + var o = this.options; if (o.disabled || o.invalid) { - // BI.nextTick(BI.bind(function () { if (this.options.disabled) { this.setEnable(false); } if (this.options.invalid) { this.setValid(false); } - // }, this)); } }, diff --git a/demo/version.js b/demo/version.js index 5e16777ec..b1075f22d 100644 --- a/demo/version.js +++ b/demo/version.js @@ -6,6 +6,6 @@ BI.i18n = { "BI-Basic_OK": "确定" }; -BI.servletURL = "dist/"; -BI.resourceURL = "dist/resource/"; +BI.servletURL = "docs/"; +BI.resourceURL = "docs/resource/"; BI.i18n = {}; \ No newline at end of file diff --git a/docs/case.js b/docs/case.js index 240ab1d94..f9b5bc7f1 100644 --- a/docs/case.js +++ b/docs/case.js @@ -11743,17 +11743,18 @@ BI.ZeroClip = BI.inherit(BI.BasicButton, { afterCopy: BI.emptyFn }) }, + _init: function () { BI.ZeroClip.superclass._init.apply(this, arguments); - var self = this, o = this.options; + }, - BI.nextTick(function () { - self.element.zclip({ - path: BI.resourceURL + "/ZeroClipboard.swf", - copy: o.copy, - beforeCopy: o.beforeCopy, - afterCopy: o.afterCopy - }); + mounted: function () { + var self = this, o = this.options; + this.element.zclip({ + path: BI.resourceURL + "/ZeroClipboard.swf", + copy: o.copy, + beforeCopy: o.beforeCopy, + afterCopy: o.afterCopy }); } }); diff --git a/docs/core.js b/docs/core.js index ce382815e..44c9a2757 100644 --- a/docs/core.js +++ b/docs/core.js @@ -14367,9 +14367,10 @@ BI.Widget = BI.inherit(BI.OB, { this._initRoot(); this._initElementWidth(); this._initElementHeight(); - this._initVisualEffects(); + this._initVisual(); this._initState(); this._initElement(); + this._initEffects(); this.created && this.created(); }, @@ -14424,21 +14425,23 @@ BI.Widget = BI.inherit(BI.OB, { } }, - _initVisualEffects: function () { + _initVisual: function () { var o = this.options; if (o.invisible) { //用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 this.element.css("display", "none"); } + }, + + _initEffects: function () { + var o = this.options; if (o.disabled || o.invalid) { - // BI.nextTick(BI.bind(function () { if (this.options.disabled) { this.setEnable(false); } if (this.options.invalid) { this.setValid(false); } - // }, this)); } }, diff --git a/docs/demo.js b/docs/demo.js index 3db7d7286..59416a304 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -6,8 +6,8 @@ BI.i18n = { "BI-Basic_OK": "确定" }; -BI.servletURL = "dist/"; -BI.resourceURL = "dist/resource/"; +BI.servletURL = "docs/"; +BI.resourceURL = "docs/resource/"; BI.i18n = {};$(function () { var ref; BI.createWidget({ diff --git a/src/case/zclip/zclip.js b/src/case/zclip/zclip.js index 7a7d99132..266cc68a6 100644 --- a/src/case/zclip/zclip.js +++ b/src/case/zclip/zclip.js @@ -13,17 +13,18 @@ BI.ZeroClip = BI.inherit(BI.BasicButton, { afterCopy: BI.emptyFn }) }, + _init: function () { BI.ZeroClip.superclass._init.apply(this, arguments); - var self = this, o = this.options; + }, - BI.nextTick(function () { - self.element.zclip({ - path: BI.resourceURL + "/ZeroClipboard.swf", - copy: o.copy, - beforeCopy: o.beforeCopy, - afterCopy: o.afterCopy - }); + mounted: function () { + var self = this, o = this.options; + this.element.zclip({ + path: BI.resourceURL + "/ZeroClipboard.swf", + copy: o.copy, + beforeCopy: o.beforeCopy, + afterCopy: o.afterCopy }); } }); diff --git a/src/core/widget.js b/src/core/widget.js index 3e217a5c3..dd9f56b3c 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -45,9 +45,10 @@ BI.Widget = BI.inherit(BI.OB, { this._initRoot(); this._initElementWidth(); this._initElementHeight(); - this._initVisualEffects(); + this._initVisual(); this._initState(); this._initElement(); + this._initEffects(); this.created && this.created(); }, @@ -102,21 +103,23 @@ BI.Widget = BI.inherit(BI.OB, { } }, - _initVisualEffects: function () { + _initVisual: function () { var o = this.options; if (o.invisible) { //用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 this.element.css("display", "none"); } + }, + + _initEffects: function () { + var o = this.options; if (o.disabled || o.invalid) { - // BI.nextTick(BI.bind(function () { if (this.options.disabled) { this.setEnable(false); } if (this.options.invalid) { this.setValid(false); } - // }, this)); } },