Browse Source

feature: disabled

es6
guy 3 years ago
parent
commit
f02a4d2e70
  1. 8
      src/core/4.widget.js

8
src/core/4.widget.js

@ -570,11 +570,11 @@
throw new Error("组件:组件名已存在,不能进行添加"); throw new Error("组件:组件名已存在,不能进行添加");
} }
widget._setParent && widget._setParent(this); widget._setParent && widget._setParent(this);
if (!this.options.disabled) { if (this.options.disabled) {
widget.options && (widget.options.disabled = false); widget.options && (widget.options.disabled = true);
} }
if (!this.options.invalid) { if (this.options.invalid) {
widget.options && (widget.options.invalid = false); widget.options && (widget.options.invalid = true);
} }
widget.on(BI.Events.DESTROY, function () { widget.on(BI.Events.DESTROY, function () {
BI.remove(self._children, this); BI.remove(self._children, this);

Loading…
Cancel
Save