Browse Source

Pull request #2562: 无JIRA任务 chore: bugfix

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '23358ef74d274372bb2e20ff40e065de5844e1ff':
  chore: bugfix
es6
guy 3 years ago
parent
commit
6db7cb65b0
  1. 25
      src/core/4.widget.js

25
src/core/4.widget.js

@ -297,10 +297,15 @@
},
_initVisual: function () {
var o = this.options;
var self = this, o = this.options;
if (o.invisible) {
// 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
this.element.css("display", "none");
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");
}
}
},
@ -308,10 +313,20 @@
var self = this, o = this.options;
if (o.disabled || o.invalid) {
if (this.options.disabled) {
this.setEnable(false);
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) {
this.setValid(false);
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) {

Loading…
Cancel
Save