Browse Source

Pull request #2576: 无JIRA任务 chore: bugfix

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

* commit 'a99f85d4b654708720fa15d7d8482d2c2b02dbee':
  chore: bugfix
  chore: bugfix
  chore: bugfix
es6
guy 3 years ago
parent
commit
d56a67281c
  1. 9
      src/case/trigger/trigger.editor.js
  2. 9
      src/case/trigger/trigger.icon.text.js
  3. 12
      src/case/trigger/trigger.icon.text.select.js
  4. 14
      src/case/trigger/trigger.text.select.js
  5. 16
      src/case/trigger/trigger.text.select.small.js
  6. 24
      src/case/trigger/trigger.text.small.js

9
src/case/trigger/trigger.editor.js

@ -6,10 +6,6 @@
* @extends BI.Trigger * @extends BI.Trigger
*/ */
BI.EditorTrigger = BI.inherit(BI.Trigger, { BI.EditorTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
},
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments); var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
@ -61,10 +57,11 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.htape", type: "bi.horizontal_fill",
items: [ items: [
{ {
el: this.editor el: this.editor,
width: "fill"
}, { }, {
el: { el: {
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",

9
src/case/trigger/trigger.icon.text.js

@ -67,7 +67,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
}, },
{ {
el: this.text, el: this.text,
lgap: BI.isEmptyString(o.iconCls) ? 5 : 0 lgap: BI.isEmptyString(o.iconCls) ? 5 : 0,
width: "fill"
}, { }, {
el: this.trigerButton, el: this.trigerButton,
width: o.triggerWidth || o.height width: o.triggerWidth || o.height
@ -86,13 +87,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
var iconItem = this.wrapper.attr("items")[0]; var iconItem = this.wrapper.attr("items")[0];
var textItem = this.wrapper.attr("items")[1]; var textItem = this.wrapper.attr("items")[1];
if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) { if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) {
if(iconItem.width !== 0) { if (iconItem.width !== 0) {
iconItem.width = 0; iconItem.width = 0;
textItem.lgap = 5; textItem.lgap = 5;
this.wrapper.resize(); this.wrapper.resize();
} }
} else { } else {
if(iconItem.width !== (o.iconWrapperWidth || o.height)) { if (iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.iconWrapperWidth || o.height); iconItem.width = (o.iconWrapperWidth || o.height);
textItem.lgap = 0; textItem.lgap = 0;
this.wrapper.resize(); this.wrapper.resize();
@ -100,7 +101,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
} }
}, },
setTextCls: function(cls) { setTextCls: function (cls) {
var o = this.options; var o = this.options;
var oldCls = o.textCls; var oldCls = o.textCls;
o.textCls = cls; o.textCls = cls;

12
src/case/trigger/trigger.icon.text.select.js

@ -9,6 +9,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
height: 24, height: 24,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
textHgap: 0,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
iconCls: "" iconCls: ""
}); });
}, },
@ -23,6 +29,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
text: obj.text, text: obj.text,
textCls: obj.textCls, textCls: obj.textCls,
iconCls: obj.iconCls, iconCls: obj.iconCls,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
textTgap: o.textTgap,
textBgap: o.textBgap,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,

14
src/case/trigger/trigger.text.select.js

@ -10,7 +10,13 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger", baseCls: "bi-select-text-trigger",
height: 24 height: 24,
textHgap: 6,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
}); });
}, },
@ -25,6 +31,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
readonly: o.readonly, readonly: o.readonly,
text: obj.text, text: obj.text,
textCls: obj.textCls, textCls: obj.textCls,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
textTgap: o.textTgap,
textBgap: o.textBgap,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle warningTitle: o.warningTitle
}); });

16
src/case/trigger/trigger.text.select.small.js

@ -9,7 +9,13 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-small-select-text-trigger bi-border", baseCls: "bi-small-select-text-trigger bi-border",
height: 20 height: 20,
textHgap: 6,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
}); });
}, },
@ -23,7 +29,13 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
text: obj.text, text: obj.text,
cls: obj.cls cls: obj.cls,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
textTgap: o.textTgap,
textBgap: o.textBgap,
}); });
}, },

24
src/case/trigger/trigger.text.small.js

@ -5,15 +5,17 @@
* @extends BI.Trigger * @extends BI.Trigger
*/ */
BI.SmallTextTrigger = BI.inherit(BI.Trigger, { BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 6
},
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments); var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger", baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 20 height: 20,
textHgap: 6,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
}); });
}, },
@ -25,7 +27,12 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: o.text, text: o.text,
hgap: c.hgap hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
tgap: o.textTgap,
bgap: o.textBgap,
}); });
this.trigerButton = BI.createWidget({ this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
@ -34,10 +41,11 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.htape", type: "bi.horizontal_fill",
items: [ items: [
{ {
el: this.text el: this.text,
width: "fill"
}, { }, {
el: this.trigerButton, el: this.trigerButton,
width: o.triggerWidth || o.height width: o.triggerWidth || o.height

Loading…
Cancel
Save