Browse Source

JSY-8352 fix:DownListGroupItem中文字高亮

es6
Guyi 3 years ago
parent
commit
285c0ec6f7
  1. 4
      src/less/widget/downlist/popup.downlist.less
  2. 10
      src/widget/downlist/item.downlistgroup.js

4
src/less/widget/downlist/popup.downlist.less

@ -3,6 +3,10 @@
.bi-down-list-popup { .bi-down-list-popup {
& .list-group-item-text { & .list-group-item-text {
max-width: 203px; max-width: 203px;
&.active {
color: @color-bi-text-highlight;
}
} }
& .bi-down-list-item { & .bi-down-list-item {
& .list-item-text { & .list-item-text {

10
src/widget/downlist/item.downlistgroup.js

@ -16,12 +16,14 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
var o = this.options; var o = this.options;
var self = this; var self = this;
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.text_button",
cls: "list-group-item-text", cls: "list-group-item-text",
textAlign: "left", textAlign: "left",
text: o.text, text: o.text,
value: o.value, value: o.value,
height: o.height height: o.height,
disableSelected: true,
selected: this._digest(o.value)
}); });
this.icon1 = BI.createWidget({ this.icon1 = BI.createWidget({
@ -114,7 +116,9 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
}, },
setValue: function (v) { setValue: function (v) {
this.icon1.setSelected(this._digest(v)); const selected = this._digest(v);
this.icon1.setSelected(selected);
this.text.setSelected(selected);
} }
}); });
BI.DownListGroupItem.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListGroupItem.EVENT_CHANGE = "EVENT_CHANGE";

Loading…
Cancel
Save