Browse Source

KERNEL-11911 feat: label组件默认使用text作为tooltip,仅对label生效,不影响html_label

es6
zsmj 2 years ago
parent
commit
1bd7c58af0
  1. 17
      src/base/single/label/abstract.label.js
  2. 17
      src/base/single/label/label.js

17
src/base/single/label/abstract.label.js

@ -24,23 +24,6 @@
});
},
getTitle: function () {
var title = this.options.title;
var text = this.options.text;
if (BI.isFunction(title)) {
return title();
}
if (BI.isNotNull(title)) {
return title;
}
if (BI.isFunction(text)) {
return text();
}
return text;
},
_createJson: function () {
var o = this.options;

17
src/base/single/label/label.js

@ -10,6 +10,23 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
keyword: "",
},
getTitle: function () {
var title = this.options.title;
var text = this.options.text;
if (BI.isFunction(title)) {
return title();
}
if (BI.isNotNull(title)) {
return title;
}
if (BI.isFunction(text)) {
return text();
}
return text;
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},

Loading…
Cancel
Save