Browse Source

无jira SearchTextValueCombo 的布局修正

es6
zsmj 3 years ago
parent
commit
46a7c0406b
  1. 7
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  2. 6
      src/less/base/trigger/trigger.searchtextvalue.less
  3. 8
      src/less/base/trigger/trigger.text.less

7
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -23,11 +23,16 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
self.populate(newValue);
}) : o.items;
var height = BI.isNumeric(o.height) ? (o.height - (o.simple ? 1 : 2)) : o.height;
var width = BI.isNumeric(o.width) ? (o.width - 2) : o.width;
return {
type: "bi.combo",
cls: (o.simple ? "bi-border-bottom" : "bi-border") + " bi-focus-shadow",
container: o.container,
adjustLength: 2,
height: height,
width: width,
toggle: false,
ref: function () {
self.combo = this;
@ -40,7 +45,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
self.trigger = this;
},
items: o.items,
height: o.height - (o.simple ? 1 : 2),
height: height,
text: o.text,
defaultText: o.defaultText,
value: o.value,

6
src/less/base/trigger/trigger.searchtextvalue.less

@ -5,7 +5,11 @@
color: @color-bi-text-error-text-trigger;
}
&:where(:not(&:hover)) .clear-button {
.clear-button {
display: none;
}
&:hover .clear-button {
display: block;
}
}

8
src/less/base/trigger/trigger.text.less

@ -4,8 +4,12 @@
&.error .select-text-label {
color: @color-bi-text-error-text-trigger;
}
&:where(:not(&:hover)) .clear-button {
.clear-button {
display: none;
}
&:hover .clear-button {
display: block;
}
}

Loading…
Cancel
Save