Browse Source

Pull request #2531: 无JIRA任务 feature: text支持响应式

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

* commit '9b57198de3b9decd569dbb1bceaab7ad23a23def':
  feature: text支持响应式
es6
guy 3 years ago
parent
commit
e14adf161f
  1. 6
      src/base/single/1.text.js

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

@ -76,7 +76,11 @@
this.text = this; 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 // 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);

Loading…
Cancel
Save