Browse Source

feature: text支持响应式

es6
guy 3 years ago
parent
commit
9b57198de3
  1. 6
      src/base/single/1.text.js

6
src/base/single/1.text.js

@ -76,7 +76,11 @@
this.text = this;
}
var text = this._getShowText();
var text = BI.isFunction(o.text) ? this.__watch(o.text, function (context, newValue) {
self.setText(newValue);
}, {
deep: true
}) : o.text;
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) {
this.setText(text);

Loading…
Cancel
Save