guy 8 years ago
parent
commit
ea531c9a42
  1. 17
      bi/case.js
  2. 11
      bi/core.js
  3. 4
      demo/version.js
  4. 17
      docs/case.js
  5. 11
      docs/core.js
  6. 4
      docs/demo.js
  7. 17
      src/case/zclip/zclip.js
  8. 11
      src/core/widget.js

17
bi/case.js

@ -11743,17 +11743,18 @@ BI.ZeroClip = BI.inherit(BI.BasicButton, {
afterCopy: BI.emptyFn afterCopy: BI.emptyFn
}) })
}, },
_init: function () { _init: function () {
BI.ZeroClip.superclass._init.apply(this, arguments); BI.ZeroClip.superclass._init.apply(this, arguments);
var self = this, o = this.options; },
BI.nextTick(function () { mounted: function () {
self.element.zclip({ var self = this, o = this.options;
path: BI.resourceURL + "/ZeroClipboard.swf", this.element.zclip({
copy: o.copy, path: BI.resourceURL + "/ZeroClipboard.swf",
beforeCopy: o.beforeCopy, copy: o.copy,
afterCopy: o.afterCopy beforeCopy: o.beforeCopy,
}); afterCopy: o.afterCopy
}); });
} }
}); });

11
bi/core.js

@ -4365,9 +4365,10 @@ BI.Widget = BI.inherit(BI.OB, {
this._initRoot(); this._initRoot();
this._initElementWidth(); this._initElementWidth();
this._initElementHeight(); this._initElementHeight();
this._initVisualEffects(); this._initVisual();
this._initState(); this._initState();
this._initElement(); this._initElement();
this._initEffects();
this.created && this.created(); this.created && this.created();
}, },
@ -4422,21 +4423,23 @@ BI.Widget = BI.inherit(BI.OB, {
} }
}, },
_initVisualEffects: function () { _initVisual: function () {
var o = this.options; var o = this.options;
if (o.invisible) { if (o.invisible) {
//用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 //用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
this.element.css("display", "none"); this.element.css("display", "none");
} }
},
_initEffects: function () {
var o = this.options;
if (o.disabled || o.invalid) { if (o.disabled || o.invalid) {
// BI.nextTick(BI.bind(function () {
if (this.options.disabled) { if (this.options.disabled) {
this.setEnable(false); this.setEnable(false);
} }
if (this.options.invalid) { if (this.options.invalid) {
this.setValid(false); this.setValid(false);
} }
// }, this));
} }
}, },

4
demo/version.js

@ -6,6 +6,6 @@ BI.i18n = {
"BI-Basic_OK": "确定" "BI-Basic_OK": "确定"
}; };
BI.servletURL = "dist/"; BI.servletURL = "docs/";
BI.resourceURL = "dist/resource/"; BI.resourceURL = "docs/resource/";
BI.i18n = {}; BI.i18n = {};

17
docs/case.js

@ -11743,17 +11743,18 @@ BI.ZeroClip = BI.inherit(BI.BasicButton, {
afterCopy: BI.emptyFn afterCopy: BI.emptyFn
}) })
}, },
_init: function () { _init: function () {
BI.ZeroClip.superclass._init.apply(this, arguments); BI.ZeroClip.superclass._init.apply(this, arguments);
var self = this, o = this.options; },
BI.nextTick(function () { mounted: function () {
self.element.zclip({ var self = this, o = this.options;
path: BI.resourceURL + "/ZeroClipboard.swf", this.element.zclip({
copy: o.copy, path: BI.resourceURL + "/ZeroClipboard.swf",
beforeCopy: o.beforeCopy, copy: o.copy,
afterCopy: o.afterCopy beforeCopy: o.beforeCopy,
}); afterCopy: o.afterCopy
}); });
} }
}); });

11
docs/core.js

@ -14367,9 +14367,10 @@ BI.Widget = BI.inherit(BI.OB, {
this._initRoot(); this._initRoot();
this._initElementWidth(); this._initElementWidth();
this._initElementHeight(); this._initElementHeight();
this._initVisualEffects(); this._initVisual();
this._initState(); this._initState();
this._initElement(); this._initElement();
this._initEffects();
this.created && this.created(); this.created && this.created();
}, },
@ -14424,21 +14425,23 @@ BI.Widget = BI.inherit(BI.OB, {
} }
}, },
_initVisualEffects: function () { _initVisual: function () {
var o = this.options; var o = this.options;
if (o.invisible) { if (o.invisible) {
//用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 //用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
this.element.css("display", "none"); this.element.css("display", "none");
} }
},
_initEffects: function () {
var o = this.options;
if (o.disabled || o.invalid) { if (o.disabled || o.invalid) {
// BI.nextTick(BI.bind(function () {
if (this.options.disabled) { if (this.options.disabled) {
this.setEnable(false); this.setEnable(false);
} }
if (this.options.invalid) { if (this.options.invalid) {
this.setValid(false); this.setValid(false);
} }
// }, this));
} }
}, },

4
docs/demo.js

@ -6,8 +6,8 @@ BI.i18n = {
"BI-Basic_OK": "确定" "BI-Basic_OK": "确定"
}; };
BI.servletURL = "dist/"; BI.servletURL = "docs/";
BI.resourceURL = "dist/resource/"; BI.resourceURL = "docs/resource/";
BI.i18n = {};$(function () { BI.i18n = {};$(function () {
var ref; var ref;
BI.createWidget({ BI.createWidget({

17
src/case/zclip/zclip.js

@ -13,17 +13,18 @@ BI.ZeroClip = BI.inherit(BI.BasicButton, {
afterCopy: BI.emptyFn afterCopy: BI.emptyFn
}) })
}, },
_init: function () { _init: function () {
BI.ZeroClip.superclass._init.apply(this, arguments); BI.ZeroClip.superclass._init.apply(this, arguments);
var self = this, o = this.options; },
BI.nextTick(function () { mounted: function () {
self.element.zclip({ var self = this, o = this.options;
path: BI.resourceURL + "/ZeroClipboard.swf", this.element.zclip({
copy: o.copy, path: BI.resourceURL + "/ZeroClipboard.swf",
beforeCopy: o.beforeCopy, copy: o.copy,
afterCopy: o.afterCopy beforeCopy: o.beforeCopy,
}); afterCopy: o.afterCopy
}); });
} }
}); });

11
src/core/widget.js

@ -45,9 +45,10 @@ BI.Widget = BI.inherit(BI.OB, {
this._initRoot(); this._initRoot();
this._initElementWidth(); this._initElementWidth();
this._initElementHeight(); this._initElementHeight();
this._initVisualEffects(); this._initVisual();
this._initState(); this._initState();
this._initElement(); this._initElement();
this._initEffects();
this.created && this.created(); this.created && this.created();
}, },
@ -102,21 +103,23 @@ BI.Widget = BI.inherit(BI.OB, {
} }
}, },
_initVisualEffects: function () { _initVisual: function () {
var o = this.options; var o = this.options;
if (o.invisible) { if (o.invisible) {
//用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 //用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
this.element.css("display", "none"); this.element.css("display", "none");
} }
},
_initEffects: function () {
var o = this.options;
if (o.disabled || o.invalid) { if (o.disabled || o.invalid) {
// BI.nextTick(BI.bind(function () {
if (this.options.disabled) { if (this.options.disabled) {
this.setEnable(false); this.setEnable(false);
} }
if (this.options.invalid) { if (this.options.invalid) {
this.setValid(false); this.setValid(false);
} }
// }, this));
} }
}, },

Loading…
Cancel
Save