Browse Source

Pull request #1460: 无JIRA任务 整理一下

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

* commit '69769a40034160a143576fc80b0a76bf79e82ff9':
  bugfix
es6
guy 4 years ago
parent
commit
2f74a86220
  1. 10
      src/base/single/text.js

10
src/base/single/text.js

@ -3,6 +3,7 @@
* @class BI.Text
* @extends BI.Single
*/
!(function () {
BI.Text = BI.inherit(BI.Single, {
props: {
@ -152,7 +153,16 @@ BI.Text = BI.inherit(BI.Single, {
BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword);
}
});
var formatters = [];
BI.Text.addTextFormatter = function (formatter) {
formatters.push(formatter);
};
BI.Text.formatText = function (text) {
for (var i = 0, len = formatters.length; i < len; i++) {
text = formatters[i](text);
}
return text;
};
BI.shortcut("bi.text", BI.Text);
}());

Loading…
Cancel
Save