Browse Source

chore: bugfix

es6
guy 3 years ago
parent
commit
048f11dcc2
  1. 17
      src/core/4.widget.js

17
src/core/4.widget.js

@ -291,23 +291,38 @@
},
_initVisual: function () {
var o = this.options;
var self = this, o = this.options;
if (o.invisible) {
var invisible = BI.isFunction(o.invisible) ? this.__watch(o.invisible, function (newValue) {
self.setVisible(!newValue);
}) : o.invisible;
if (invisible) {
// 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
this.element.css("display", "none");
}
}
},
_initEffects: function () {
var self = this, o = this.options;
if (o.disabled || o.invalid) {
if (this.options.disabled) {
var disabled = BI.isFunction(o.disabled) ? this.__watch(o.disabled, function (newValue) {
self.setEnable(!newValue);
}) : o.disabled;
if (disabled) {
this.setEnable(false);
}
}
if (this.options.invalid) {
var invalid = BI.isFunction(o.invalid) ? this.__watch(o.invalid, function (newValue) {
self.setEnable(!newValue);
}) : o.invalid;
if (invalid) {
this.setValid(false);
}
}
}
if (o.effect) {
if (BI.isArray(o.effect)) {
if (BI.isArray(o.effect[0])) {

Loading…
Cancel
Save