Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/router/router.js
es6
Kobi 3 years ago
parent
commit
9fbbff7dea
  1. 15
      changelog.md
  2. 2
      demo/less/face.less
  3. 2
      demo/less/index.less
  4. 2
      demo/less/main.less
  5. 2
      demo/less/north.less
  6. 2
      demo/less/preview.less
  7. 2
      demo/less/vm.less
  8. 2
      demo/less/west.less
  9. 2
      package.json
  10. 4
      private/less/app.less
  11. 4
      private/less/background.less
  12. 4
      private/less/font.less
  13. 4
      private/less/icon.less
  14. 4
      public/less/app.less
  15. 4
      public/less/background.less
  16. 4
      public/less/font.less
  17. 4
      public/less/icon.less
  18. 45
      src/base/single/input/input.js
  19. 1
      src/case/button/node/node.plus.js
  20. 162
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  21. 57
      src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js
  22. 30
      src/case/combo/textvaluecombo/combo.textvalue.js
  23. 2
      src/case/list/list.select.js
  24. 69
      src/case/trigger/trigger.text.js
  25. 29
      src/case/trigger/trigger.text.select.js
  26. 11
      src/core/system.js
  27. 71
      src/core/wrapper/layout.js
  28. 8
      src/core/wrapper/layout/adapt/absolute.center.js
  29. 34
      src/core/wrapper/layout/adapt/absolute.leftrightvertical.js
  30. 4
      src/core/wrapper/layout/adapt/adapt.table.js
  31. 8
      src/core/wrapper/layout/fill/auto.vtape.js
  32. 28
      src/core/wrapper/layout/fill/float.fill.horizontal.js
  33. 1
      src/core/wrapper/layout/flex/flex.horizontal.js
  34. 18
      src/core/wrapper/layout/flex/flex.leftrightvertical.center.js
  35. 1
      src/core/wrapper/layout/flex/flex.vertical.js
  36. 18
      src/core/wrapper/layout/float/float.absolute.leftrightvertical.js
  37. 36
      src/core/wrapper/layout/layout.flow.js
  38. 8
      src/core/wrapper/layout/layout.inline.js
  39. 24
      src/core/wrapper/layout/layout.tape.js
  40. 4
      src/core/wrapper/layout/layout.td.js
  41. 3
      src/core/wrapper/layout/sticky/sticky.horizontal.js
  42. 3
      src/core/wrapper/layout/sticky/sticky.vertical.js
  43. 2
      src/less/base/colorchooser/colorchooser.popup.less
  44. 2
      src/less/base/colorchooser/colorchooser.trigger.less
  45. 2
      src/less/base/colorchooser/colorpicker/button.colorpicker.less
  46. 2
      src/less/base/colorchooser/colorpicker/button.colorshow.less
  47. 2
      src/less/base/colorchooser/colorpicker/editor.colorpicker.less
  48. 4
      src/less/base/colorchooser/farbtastic/farbtastic.less
  49. 2
      src/less/base/combo/combo.bubble.less
  50. 41
      src/less/base/combo/combo.less
  51. 2
      src/less/base/combo/combo.searchtextvalue.less
  52. 2
      src/less/base/combo/combo.textvalue.icon.less
  53. 14
      src/less/base/combo/combo.textvalue.less
  54. 2
      src/less/base/combo/combo.textvaluecheck.less
  55. 2
      src/less/base/combo/combo.textvaluedownlist.less
  56. 2
      src/less/base/combo/popup.bubble.less
  57. 4
      src/less/base/dom.less
  58. 2
      src/less/base/editor/editor.search.less
  59. 2
      src/less/base/editor/editor.search.small.less
  60. 2
      src/less/base/foundation/bi.message.less
  61. 2
      src/less/base/layer/layer.multiselect.less
  62. 2
      src/less/base/layer/panel.less
  63. 2
      src/less/base/loader/sort.list.less
  64. 2
      src/less/base/pager/pager.all.count.less
  65. 2
      src/less/base/pager/pager.direction.less
  66. 2
      src/less/base/pager/pager.less
  67. 6
      src/less/base/pane.less
  68. 2
      src/less/base/segment/button.segment.less
  69. 2
      src/less/base/segment/segment.less
  70. 2
      src/less/base/single/button/button.half.less
  71. 2
      src/less/base/single/button/button.less
  72. 2
      src/less/base/single/button/item.singleselect.icontext.less
  73. 2
      src/less/base/single/button/switch.less
  74. 2
      src/less/base/single/editor/editor.multifile.less
  75. 2
      src/less/base/single/editor/editor.textarea.less
  76. 2
      src/less/base/single/html.less
  77. 2
      src/less/base/single/input/checkbox.less
  78. 2
      src/less/base/single/input/file.less
  79. 2
      src/less/base/single/input/input.less
  80. 2
      src/less/base/single/input/radio.less
  81. 2
      src/less/base/single/label.less
  82. 2
      src/less/base/single/text.less
  83. 2
      src/less/base/single/tip/tip.bubble.less
  84. 2
      src/less/base/single/tip/tip.less
  85. 2
      src/less/base/single/tip/tip.toast.less
  86. 2
      src/less/base/single/tip/tip.tooltip.less
  87. 2
      src/less/base/tree/tree.branch.less
  88. 2
      src/less/base/tree/tree.display.less
  89. 6
      src/less/base/tree/tree.expander.less
  90. 2
      src/less/base/tree/tree.list.display.less
  91. 2
      src/less/base/tree/ztree.less
  92. 2
      src/less/base/trigger/trigger.less
  93. 11
      src/less/base/trigger/trigger.searchtextvalue.less
  94. 2
      src/less/base/trigger/trigger.selecttext.less
  95. 2
      src/less/base/trigger/trigger.selecttextsmall.less
  96. 11
      src/less/base/trigger/trigger.text.less
  97. 2
      src/less/base/view/drawer.less
  98. 2
      src/less/base/view/popover.less
  99. 2
      src/less/base/view/popupview.less
  100. 2
      src/less/component/form/form.less
  101. Some files were not shown because too many files have changed in this diff Show More

15
changelog.md

@ -1,4 +1,19 @@
# 更新日志
3.0(2022-05)
- 下拉选择框支持清空
3.0(2022-03)
- 支持响应式
- 全面支持Typescript
- 增加JSX支持
- 布局组件支持更多动态特性
- 底层API支持动画
- 增加WebWorker支持
- 支持路由
- 插件支持版本控制
- Fix数据流支持proxy版本
2.0(2022-01)
- 提供自定义表单

2
demo/less/face.less

@ -1,4 +1,4 @@
@import "index";
@import "index.less";
.demo-face {
.face-config {

2
demo/less/index.less

@ -1 +1 @@
@import "../../src/less/index";
@import "../../src/less/index.less";

2
demo/less/main.less

@ -1,4 +1,4 @@
@import "index";
@import "index.less";
.layout-bg-white {
background-color: #ffffff;
}

2
demo/less/north.less

@ -1,4 +1,4 @@
@import "index";
@import "index.less";
.demo-north {
background-color: #3c8dbc;

2
demo/less/preview.less

@ -1,4 +1,4 @@
@import "index";
@import "index.less";
.demo-preview {
}

2
demo/less/vm.less

@ -1,4 +1,4 @@
@import "index";
@import "index.less";
.mvc-button {
&:hover, &.hover {

2
demo/less/west.less

@ -1,4 +1,4 @@
@import "index";
@import "index.less";
.demo-west {
}

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20220427103402",
"version": "2.0.20220513150627",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

4
private/less/app.less

@ -1,2 +1,2 @@
@import "../../src/less/resource/app";
@import "var";
@import "../../src/less/resource/app.less";
@import "var.less";

4
private/less/background.less

@ -1,2 +1,2 @@
@import "../../src/less/resource/background";
@import "var";
@import "../../src/less/resource/background.less";
@import "var.less";

4
private/less/font.less

@ -1,2 +1,2 @@
@import "../../src/less/resource/font";
@import "var";
@import "../../src/less/resource/font.less";
@import "var.less";

4
private/less/icon.less

@ -1,5 +1,5 @@
@import "../../src/less/resource/icon";
@import "var";
@import "../../src/less/resource/icon.less";
@import "var.less";

4
public/less/app.less

@ -1,2 +1,2 @@
@import "../../src/less/resource/app";
@import "var";
@import "../../src/less/resource/app.less";
@import "var.less";

4
public/less/background.less

@ -1,2 +1,2 @@
@import "../../src/less/resource/background";
@import "var";
@import "../../src/less/resource/background.less";
@import "var.less";

4
public/less/font.less

@ -1,2 +1,2 @@
@import "../../src/less/resource/font";
@import "var";
@import "../../src/less/resource/font.less";
@import "var.less";

4
public/less/icon.less

@ -1,5 +1,5 @@
@import "../../src/less/resource/icon";
@import "var";
@import "../../src/less/resource/icon.less";
@import "var.less";

45
src/base/single/input/input.js

@ -206,14 +206,29 @@ BI.Input = BI.inherit(BI.Single, {
this._lastValue = this.getValue();
},
_checkValidationOnValueChange: function () {
var o = this.options;
_checkValidationOnValueChange: function (callback) {
var self = this, o = this.options;
var v = this.getValue();
this.setValid(
(o.allowBlank === true && BI.trim(v) == "") || (
BI.isNotEmptyString(BI.trim(v)) && o.validationChecker.apply(this, [BI.trim(v)]) !== false
)
);
if (o.allowBlank === true && BI.trim(v) == "") {
this.setValid(true);
callback && callback();
return;
}
if (BI.trim(v) == "") {
this.setValid(false);
callback && callback();
return;
}
var checker = o.validationChecker.apply(this, [BI.trim(v)]);
if (checker instanceof Promise) {
checker.then(function (validate) {
self.setValid(validate !== false);
callback && callback();
})
} else {
this.setValid(checker !== false);
callback && callback();
}
},
focus: function () {
@ -245,14 +260,16 @@ BI.Input = BI.inherit(BI.Single, {
},
setValue: function (textValue) {
var self = this;
this.element.val(textValue);
BI.nextTick(BI.bind(function () {
this._checkValidationOnValueChange();
this._defaultState();
if (this.isValid()) {
this._lastValidValue = this._lastSubmitValue = this.getValue();
}
}, this));
BI.nextTick(function () {
self._checkValidationOnValueChange(function () {
self._defaultState();
if (self.isValid()) {
self._lastValidValue = self._lastSubmitValue = self.getValue();
}
});
});
},
getValue: function () {

1
src/case/button/node/node.plus.js

@ -15,7 +15,6 @@ BI.PlusGroupNode = BI.inherit(BI.NodeButton, {
id: "",
pId: "",
open: false,
iconWrapperWidth: null,
height: 24
});
},

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

@ -11,6 +11,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
items: [],
tipType: "",
warningTitle: "",
allowClear: false,
},
render: function () {
@ -21,105 +22,81 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
return {
type: "bi.absolute",
items: [{
type: "bi.combo",
cls: (o.simple ? "bi-border-bottom" : "bi-border") + " bi-focus-shadow",
container: o.container,
adjustLength: 2,
toggle: false,
ref: function () {
self.combo = this;
},
el: {
type: "bi.search_text_value_trigger",
cls: "search-text-value-trigger",
watermark: o.watermark,
ref: function () {
self.trigger = this;
},
items: o.items,
height: o.height - (o.simple ? 1 : 2),
text: o.text,
defaultText: o.defaultText,
value: o.value,
tipType: o.tipType,
warningTitle: o.warningTitle,
title: o.title,
allowClear: o.allowClear,
listeners: [{
eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,
action: function () {
self.setValue(this.getValue());
self.combo.hideView();
self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);
}
}, {
eventName: BI.SearchTextValueTrigger.EVENT_CLEAR,
action: function () {
self._clear();
self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);
}
}]
},
popup: {
el: {
type: "bi.combo",
cls: (o.simple ? "bi-border-bottom" : "bi-border") + " bi-focus-shadow",
container: o.container,
adjustLength: 2,
toggle: false,
type: "bi.text_value_combo_popup",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
value: o.value,
items: o.items,
ref: function () {
self.combo = this;
},
el: {
type: "bi.search_text_value_trigger",
cls: "search-text-value-trigger",
watermark: o.watermark,
ref: function () {
self.trigger = this;
},
items: o.items,
height: o.height - (o.simple ? 1 : 2),
text: o.text,
defaultText: o.defaultText,
value: o.value,
tipType: o.tipType,
warningTitle: o.warningTitle,
title: o.title,
listeners: [{
eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,
action: function () {
self.setValue(this.getValue());
self.combo.hideView();
self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);
}
}]
},
popup: {
el: {
type: "bi.text_value_combo_popup",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
value: o.value,
items: o.items,
ref: function () {
self.popup = this;
self.trigger.getSearcher().setAdapter(self.popup);
},
listeners: [{
eventName: BI.TextValueComboPopup.EVENT_CHANGE,
action: function () {
self.setValue(this.getValue());
self.combo.hideView();
self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);
}
}]
},
value: o.value,
maxHeight: 252,
minHeight: 25
self.popup = this;
self.trigger.getSearcher().setAdapter(self.popup);
},
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () {
self.trigger.stopEditing();
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
eventName: BI.TextValueComboPopup.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW);
}
}],
hideChecker: function (e) {
return self.triggerBtn.element.find(e.target).length === 0;
}
},
left: 0,
right: 0,
bottom: 0,
top: 0
}, {
el: {
type: "bi.trigger_icon_button",
cls: "trigger-icon-button",
ref: function () {
self.triggerBtn = this;
},
width: o.height,
height: o.height,
handler: function () {
if (self.combo.isViewVisible()) {
self.setValue(this.getValue());
self.combo.hideView();
} else {
self.combo.showView();
self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);
}
}
}]
},
right: 0,
bottom: 0,
top: 0
}]
value: o.value,
maxHeight: 252,
minHeight: 25
},
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () {
self.trigger.stopEditing();
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () {
self.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW);
}
}],
};
},
@ -130,6 +107,11 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}
},
_clear: function () {
this.trigger.attr("text", "");
this.setValue([]);
},
_checkError: function (v) {
if (BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {
this.trigger.options.tipType = "success";

57
src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js

@ -5,16 +5,32 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
props: function () {
return {
extraCls: "bi-search-text-value-trigger",
baseCls: "bi-search-text-value-trigger",
height: 24,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowClear: false,
};
},
render: function () {
var self = this, o = this.options;
var triggerButton = {
type: "bi.trigger_icon_button",
cls: "trigger-icon-button",
ref: function () {
self.triggerBtn = this;
},
width: o.height,
height: o.height,
width: 24,
};
var stateText = this._digest(o.value, o.items);
return {
type: "bi.htape",
type: "bi.horizontal_fill",
columnSize: ["fill", 24],
items: [
{
el: {
@ -30,7 +46,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
},
watermark: o.watermark,
defaultText: o.defaultText,
text: this._digest(o.value, o.items),
text: stateText,
value: o.value,
height: o.height,
tipText: ""
@ -55,10 +71,30 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
}]
}
}, {
el: {
type: "bi.layout",
width: 24
},
el: o.allowClear ? {
type: "bi.vertical_adapt",
horizontalAlign: "left",
scrollable: false,
items: [
{
el: {
type: "bi.icon_button",
ref: function (_ref) {
self.clearBtn = _ref;
},
cls: "close-h-font " + (o.allowClear ? "clear-button" : ""),
stopPropagation: true,
invisible: !BI.isNotEmptyString(stateText),
width: o.height,
handler: function () {
self.fireEvent(BI.SearchTextValueTrigger.EVENT_CLEAR);
},
},
}, {
el: triggerButton,
}
]
} : triggerButton,
width: 24
}
]
@ -100,7 +136,9 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
},
setValue: function (vals) {
this._setState(this._digest(vals, this.options.items));
var stateText = this._digest(vals, this.options.items);
this._setState(stateText);
this.options.allowClear && this.clearBtn.setVisible(BI.isNotEmptyString(stateText));
},
getValue: function () {
@ -111,4 +149,5 @@ BI.SearchTextValueTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchTextValueTrigger.EVENT_STOP = "EVENT_STOP";
BI.SearchTextValueTrigger.EVENT_START = "EVENT_START";
BI.SearchTextValueTrigger.EVENT_CHANGE = "EVENT_CHANGE";
BI.SearchTextValueTrigger.EVENT_CLEAR = "EVENT_CLEAR";
BI.shortcut("bi.search_text_value_trigger", BI.SearchTextValueTrigger);

30
src/case/combo/textvaluecombo/combo.textvalue.js

@ -12,6 +12,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
value: "",
allowClear: false,
});
},
@ -33,7 +34,17 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: o.height,
text: o.text,
value: o.value,
warningTitle: o.warningTitle
warningTitle: o.warningTitle,
allowClear: o.allowClear,
listeners: [
{
eventName: BI.SelectTextTrigger.EVENT_CLEAR,
action: function () {
self._clear();
self.fireEvent(BI.TextValueCombo.EVENT_CHANGE);
}
}
],
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -62,15 +73,20 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
minHeight: 25
}
});
if(BI.isKey(o.value)) {
if (BI.isKey(o.value)) {
this._checkError(o.value);
}
},
_clear: function () {
this.setValue();
},
_checkError: function (v) {
if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {
if (BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
this.element.removeClass("error");
this.trigger.element.removeClass("error");
} else {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
@ -78,10 +94,12 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
this.element.addClass("error");
this.trigger.element.addClass("error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
this.element.removeClass("error");
this.trigger.element.removeClass("error");
}
}
},

2
src/case/list/list.select.js

@ -94,7 +94,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
var hasNext = this.list.hasNext();
var isAlreadyAllSelected = this.toolbar.isSelected();
var isHalf = selectLength > 0 && notSelectLength > 0;
var allSelected = isAlreadyAllSelected;
var allSelected = selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected);
if (this.isAllSelected() === false) {
hasNext && (isHalf = selectLength > 0);

69
src/case/trigger/trigger.text.js

@ -7,25 +7,27 @@
*/
BI.TextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
props: function () {
var self = this;
var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
return {
baseCls: "bi-text-trigger",
height: 24,
textHgap: 6,
textCls: "",
allowClear: false,
title: function () {
return self.text.getText();
}
});
};
},
_init: function () {
BI.TextTrigger.superclass._init.apply(this, arguments);
render: function () {
var self = this, o = this.options, c = this._const;
this.text = BI.createWidget({
var text = {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "select-text-label" + (BI.isKey(o.textCls) ? (" " + o.textCls) : ""),
textAlign: "left",
height: o.height,
@ -39,32 +41,58 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
tgap: o.textTgap,
bgap: o.textBgap,
readonly: o.readonly
});
this.trigerButton = BI.createWidget({
};
var triggerButton = {
type: "bi.trigger_icon_button",
ref: function (_ref) {
self.triggerButton = _ref;
},
width: o.triggerWidth || o.height
});
};
BI.createWidget({
element: this,
return ({
type: "bi.horizontal_fill",
columnSize: ["fill", o.triggerWidth || o.height],
items: [
{
el: this.text,
el: text,
width: "fill"
}, {
el: this.trigerButton,
width: o.triggerWidth || o.height
el: o.allowClear ? {
type: "bi.vertical_adapt",
horizontalAlign: "left",
scrollable: false,
items: [
{
el: {
type: "bi.icon_button",
ref: function (_ref) {
self.clearBtn = _ref;
},
cls: "close-h-font " + (o.allowClear ? "clear-button" : ""),
stopPropagation: true,
width: o.triggerWidth || o.height,
invisible: !BI.isNotEmptyString(o.text),
handler: function () {
self.fireEvent(BI.TextTrigger.EVENT_CLEAR);
},
},
}, {
el: triggerButton,
}
]
} : triggerButton,
}
]
});
},
getTextor: function() {
getTextor: function () {
return this.text;
},
setTextCls: function(cls) {
setTextCls: function (cls) {
var o = this.options;
var oldCls = o.textCls;
o.textCls = cls;
@ -73,6 +101,9 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) {
this.text.setText(text);
if (this.options.allowClear) {
this.clearBtn.setVisible(BI.isNotEmptyString(text));
}
},
setTipType: function (v) {
@ -80,4 +111,6 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
this.options.tipType = v;
}
});
BI.TextTrigger.EVENT_CLEAR = "EVENT_CLEAR";
BI.shortcut("bi.text_trigger", BI.TextTrigger);

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

@ -11,6 +11,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger",
height: 24,
allowClear: false,
});
},
@ -32,11 +33,21 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
textTgap: o.textTgap,
textBgap: o.textBgap,
tipType: o.tipType,
warningTitle: o.warningTitle
warningTitle: o.warningTitle,
allowClear: o.allowClear,
listeners: [
{
eventName: BI.TextTrigger.EVENT_CLEAR,
action: function () {
self.setText("");
self.fireEvent(BI.SelectTextTrigger.EVENT_CLEAR);
}
}
]
});
},
_digest: function(vals, items){
_digest: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result = [];
@ -51,15 +62,20 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
return {
textCls: "",
text: result.join(",")
}
};
} else {
return {
textCls: "bi-water-mark",
text: BI.isFunction(o.text) ? o.text() : o.text
}
};
}
},
setText: function (text) {
this.options.text = text;
this.trigger.setText(text);
},
setValue: function (vals) {
var formatValue = this._digest(vals, this.options.items);
this.trigger.setTextCls(formatValue.textCls);
@ -67,10 +83,11 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
},
setTipType: function (v) {
this.options.tipType = v;
this.trigger.setTipType(v);
},
getTextor: function() {
getTextor: function () {
return this.trigger.getTextor();
},
@ -78,4 +95,6 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.options.items = items;
}
});
BI.SelectTextTrigger.EVENT_CLEAR = "EVENT_CLEAR";
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);

11
src/core/system.js

@ -7,6 +7,7 @@
!(function () {
var system = {
dependencies: {},
layoutOptimize: false,
responsiveMode: false,
workerMode: false,
size: {
@ -24,7 +25,7 @@
// 具体尺寸还没定,先写着
var sizeMap = {
"S": 10,
"M" : 20,
"M": 20,
"L": 24
};
@ -44,6 +45,10 @@
system.workerMode = !!mode;
};
this.setLayoutOptimize = function (layoutOptimize) {
system.layoutOptimize = layoutOptimize;
};
this.addDependency = function (moduleId, minVersion, maxVersion) {
system.dependencies[moduleId] = {
min: minVersion,
@ -77,6 +82,10 @@
return system.workerMode;
},
getLayoutOptimize: function () {
return system.layoutOptimize;
},
getDependencies: function () {
return system.dependencies;
}

71
src/core/wrapper/layout.js

@ -16,7 +16,7 @@ BI.Layout = BI.inherit(BI.Widget, {
scrolly: false, // true, false
items: [],
innerHgap: 0,
innerVgap: 0,
innerVgap: 0
};
},
@ -292,6 +292,43 @@ BI.Layout = BI.inherit(BI.Widget, {
return (gap > 0 && gap < 1) ? (gap * 100).toFixed(1) + "%" : gap / BI.pixRatio + BI.pixUnit;
},
_optimiseItemLgap: function (item) {
if (BI.Providers.getProvider("bi.provider.system").getLayoutOptimize()) {
return ((!item.type && item.el) ? item.lgap : item._lgap) || 0;
}
return (item._lgap || 0) + (item.lgap || 0);
},
_optimiseItemRgap: function (item) {
if (BI.Providers.getProvider("bi.provider.system").getLayoutOptimize()) {
return ((!item.type && item.el) ? item.rgap : item._rgap) || 0;
}
return (item._rgap || 0) + (item.rgap || 0);
},
_optimiseItemTgap: function (item) {
if (BI.Providers.getProvider("bi.provider.system").getLayoutOptimize()) {
return ((!item.type && item.el) ? item.tgap : item._tgap) || 0;
}
return (item._tgap || 0) + (item.tgap || 0);
},
_optimiseItemBgap: function (item) {
if (BI.Providers.getProvider("bi.provider.system").getLayoutOptimize()) {
return ((!item.type && item.el) ? item.bgap : item._bgap) || 0;
}
return (item._bgap || 0) + (item.bgap || 0);
},
_optimiseItemHgap: function (item) {
if (BI.Providers.getProvider("bi.provider.system").getLayoutOptimize()) {
return ((!item.type && item.el) ? item.hgap : item._hgap) || 0;
}
return (item._hgap || 0) + (item.hgap || 0);
},
_optimiseItemVgap: function (item) {
if (BI.Providers.getProvider("bi.provider.system").getLayoutOptimize()) {
return ((!item.type && item.el) ? item.vgap : item._vgap) || 0;
}
return (item._vgap || 0) + (item.vgap || 0);
},
_handleGap: function (w, item, hIndex, vIndex) {
var o = this.options;
var innerLgap, innerRgap, innerTgap, innerBgap;
@ -304,26 +341,26 @@ BI.Layout = BI.inherit(BI.Widget, {
innerTgap = vIndex === 0 ? o.innerVgap : 0;
innerBgap = vIndex === o.items.length - 1 ? o.innerVgap : 0;
}
if (o.vgap + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
var top = ((BI.isNull(vIndex) || vIndex === 0) ? o.vgap : 0) + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0);
if (o.vgap + o.tgap + innerTgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item) !== 0) {
var top = ((BI.isNull(vIndex) || vIndex === 0) ? o.vgap : 0) + o.tgap + innerTgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-top": this._optimiseGap(top)
});
}
if (o.hgap + o.lgap + innerLgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
var left = ((BI.isNull(hIndex) || hIndex === 0) ? o.hgap : 0) + o.lgap + innerLgap + (item.lgap || 0) + (item.hgap || 0);
if (o.hgap + o.lgap + innerLgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item) !== 0) {
var left = ((BI.isNull(hIndex) || hIndex === 0) ? o.hgap : 0) + o.lgap + innerLgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-left": this._optimiseGap(left)
});
}
if (o.hgap + o.rgap + innerRgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
var right = o.hgap + o.rgap + innerRgap + (item.rgap || 0) + (item.hgap || 0);
if (o.hgap + o.rgap + innerRgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item) !== 0) {
var right = o.hgap + o.rgap + innerRgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-right": this._optimiseGap(right)
});
}
if (o.vgap + o.bgap + innerBgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
var bottom = o.vgap + o.bgap + innerBgap + (item.bgap || 0) + (item.vgap || 0);
if (o.vgap + o.bgap + innerBgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item) !== 0) {
var bottom = o.vgap + o.bgap + innerBgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-bottom": this._optimiseGap(bottom)
});
@ -337,27 +374,27 @@ BI.Layout = BI.inherit(BI.Widget, {
innerLgap = innerRgap = o.innerHgap;
innerTgap = index === 0 ? o.innerVgap : 0;
innerBgap = index === o.items.length - 1 ? o.innerVgap : 0;
if (o.vgap + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
var top = (index === 0 ? o.vgap : 0) + (index === 0 ? o.tgap : 0) + innerTgap + (item.tgap || 0) + (item.vgap || 0);
if (o.vgap + o.tgap + innerTgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item) !== 0) {
var top = (index === 0 ? o.vgap : 0) + (index === 0 ? o.tgap : 0) + innerTgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-top": this._optimiseGap(top)
});
}
if (o.hgap + o.lgap + innerLgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
var left = o.hgap + o.lgap + innerLgap + (item.lgap || 0) + (item.hgap || 0);
if (o.hgap + o.lgap + innerLgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item) !== 0) {
var left = o.hgap + o.lgap + innerLgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-left": this._optimiseGap(left)
});
}
if (o.hgap + o.rgap + innerRgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
var right = o.hgap + o.rgap + innerRgap + (item.rgap || 0) + (item.hgap || 0);
if (o.hgap + o.rgap + innerRgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item) !== 0) {
var right = o.hgap + o.rgap + innerRgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-right": this._optimiseGap(right)
});
}
// 这里的代码是关键
if (o.vgap + o.hgap + o.bgap + innerBgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
var bottom = (index === o.items.length - 1 ? o.vgap : o.hgap) + (index === o.items.length - 1 ? o.bgap : 0) + innerBgap + (item.bgap || 0) + (item.vgap || 0);
if (o.vgap + o.hgap + o.bgap + innerBgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item) !== 0) {
var bottom = (index === o.items.length - 1 ? o.vgap : o.hgap) + (index === o.items.length - 1 ? o.bgap : 0) + innerBgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-bottom": this._optimiseGap(bottom)
});

8
src/core/wrapper/layout/adapt/absolute.center.js

@ -30,10 +30,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: this._optimiseGap(o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)),
right: this._optimiseGap(o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)),
top: this._optimiseGap(o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)),
bottom: this._optimiseGap(o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)),
left: this._optimiseGap(o.hgap + o.lgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item)),
right: this._optimiseGap(o.hgap + o.rgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item)),
top: this._optimiseGap(o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item)),
bottom: this._optimiseGap(o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item)),
margin: "auto"
});
return w;

34
src/core/wrapper/layout/adapt/absolute.leftrightvertical.js

@ -37,7 +37,7 @@ BI.AbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
_formatItems: function (items) {
var o = this.options;
var self = this, o = this.options;
var left, right;
if (BI.isArray(items)) {
BI.each(items, function (i, item) {
@ -56,17 +56,17 @@ BI.AbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
el: BI.stripEL(item),
width: item.width
};
if (o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
json.tgap = o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0);
if (o.lvgap + o.ltgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) !== 0) {
json.tgap = o.lvgap + o.ltgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item);
}
if (o.lhgap + o.llgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + (item.lgap || 0) + (item.hgap || 0);
if (o.lhgap + o.llgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item);
}
if (o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0);
if (o.lhgap + o.lrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
json.rgap = o.lhgap + o.lrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item);
}
if (o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
json.bgap = o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0);
if (o.lvgap + o.lbgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) !== 0) {
json.bgap = o.lvgap + o.lbgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item);
}
return json;
});
@ -75,17 +75,17 @@ BI.AbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
el: BI.stripEL(item),
width: item.width
};
if (o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
json.tgap = o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0);
if (o.rvgap + o.rtgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) !== 0) {
json.tgap = o.rvgap + o.rtgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item);
}
if (o.rhgap + o.rlgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.rhgap : 0) + o.rlgap + (item.lgap || 0) + (item.hgap || 0);
if (o.rhgap + o.rlgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
json.lgap = (i === 0 ? o.rhgap : 0) + o.rlgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item);
}
if (o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0);
if (o.rhgap + o.rrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
json.rgap = o.rhgap + o.rrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item);
}
if (o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
json.bgap = o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0);
if (o.rvgap + o.rbgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) !== 0) {
json.bgap = o.rvgap + o.rbgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item);
}
return json;
});

4
src/core/wrapper/layout/adapt/adapt.table.js

@ -70,8 +70,8 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
td.element.width(width);
}
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
var top = o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item),
bottom = o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item);
w.element.css("height", "calc(100% - " + this._optimiseGap(top + bottom) + ")");
}
// 对于表现为td的元素设置最大宽度,有几点需要注意

8
src/core/wrapper/layout/fill/auto.vtape.js

@ -60,10 +60,10 @@ BI.AutoVerticalTapeLayout = BI.inherit(BI.Layout, {
if (preRowSize === "") {
preRowSize = self.layout.getWidgetByName(self._getChildName(i - 1)).element.height();
}
top[i] = top[i - 1] + preRowSize + (items[i - 1].tgap || 0) + (items[i - 1].bgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
top[i] = top[i - 1] + preRowSize + self._optimiseItemTgap(items[i - 1]) + self._optimiseItemBgap(items[i - 1]) + 2 * self._optimiseItemVgap(items[i - 1]) + o.vgap + o.tgap + o.bgap;
}
w.element.css({
top: self._optimiseGap(top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap)
top: self._optimiseGap(top[i] + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) + o.vgap + o.tgap)
});
if (rowSize === "fill") {
@ -81,10 +81,10 @@ BI.AutoVerticalTapeLayout = BI.inherit(BI.Layout, {
if (nextRowSize === "") {
nextRowSize = self.layout.getWidgetByName(self._getChildName(i + 1)).element.height();
}
bottom[i] = bottom[i + 1] + nextRowSize + (items[i + 1].tgap || 0) + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
bottom[i] = bottom[i + 1] + nextRowSize + self._optimiseItemTgap(items[i + 1]) + self._optimiseItemBgap(items[i + 1]) + 2 * self._optimiseItemVgap(items[i + 1]) + o.vgap + o.tgap + o.bgap;
}
w.element.css({
bottom: self._optimiseGap(bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap),
bottom: self._optimiseGap(bottom[i] + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) + o.vgap + o.bgap),
});
if (rowSize === "fill") {

28
src/core/wrapper/layout/fill/float.fill.horizontal.js

@ -45,41 +45,41 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
} else {
var w = BI._lazyCreateWidget(item);
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
if (o.vgap + o.tgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) !== 0) {
w.element.css({
"margin-top": self._optimiseGap(o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0))
"margin-top": self._optimiseGap(o.vgap + o.tgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item))
});
}
if (desc) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
if (o.hgap + o.rgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
w.element.css({
"margin-right": self._optimiseGap((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0))
"margin-right": self._optimiseGap((i === o.items.length - 1 ? o.hgap : 0) + o.rgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item))
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
if (o.hgap + o.lgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
w.element.css({
"margin-left": self._optimiseGap(o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0))
"margin-left": self._optimiseGap(o.hgap + o.lgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item))
});
}
} else {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
if (o.hgap + o.lgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
w.element.css({
"margin-left": self._optimiseGap((i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0))
"margin-left": self._optimiseGap((i === 0 ? o.hgap : 0) + o.lgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item))
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
if (o.hgap + o.rgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
w.element.css({
"margin-right": self._optimiseGap(o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0))
"margin-right": self._optimiseGap(o.hgap + o.rgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item))
});
}
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
if (o.vgap + o.bgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) !== 0) {
w.element.css({
"margin-bottom": self._optimiseGap(o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0))
"margin-bottom": self._optimiseGap(o.vgap + o.bgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item))
});
}
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
var top = o.vgap + o.tgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item),
bottom = o.vgap + o.bgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item);
if (o.verticalAlign === BI.VerticalAlign.Stretch && BI.isNull(item.height)) {
w.element.css({
height: "calc(100% - " + self._optimiseGap(top + bottom) + ")"

1
src/core/wrapper/layout/flex/flex.horizontal.js

@ -81,7 +81,6 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
}
if (columnSize === "fill") {
w.element.addClass("f-f");
w.element.css({ minWidth: 0 });
}
w.element.addClass("c-e");
if (i === 0) {

18
src/core/wrapper/layout/flex/flex.leftrightvertical.center.js

@ -35,7 +35,7 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
_formatItems: function (items) {
var o = this.options;
var self = this, o = this.options;
var left, right;
if (BI.isArray(items)) {
BI.each(items, function (i, item) {
@ -53,17 +53,17 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
var json = {
el: BI.stripEL(item)
};
if (o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
json.tgap = o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0);
if (o.lvgap + o.ltgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) !== 0) {
json.tgap = o.lvgap + o.ltgap + self._optimiseItemTgap(item) + self._optimiseItemVgap(item);
}
if (o.lhgap + o.llgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + (item.lgap || 0) + (item.hgap || 0);
if (o.lhgap + o.llgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item);
}
if (o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0);
if (o.lhgap + o.lrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
json.rgap = o.lhgap + o.lrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item);
}
if (o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
json.bgap = o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0);
if (o.lvgap + o.lbgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) !== 0) {
json.bgap = o.lvgap + o.lbgap + self._optimiseItemBgap(item) + self._optimiseItemVgap(item);
}
return json;
});

1
src/core/wrapper/layout/flex/flex.vertical.js

@ -80,7 +80,6 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
}
if (rowSize === "fill") {
w.element.addClass("f-f");
w.element.css({ minHeight: 0 });
}
w.element.addClass("c-e");
if (i === 0) {

18
src/core/wrapper/layout/float/float.absolute.leftrightvertical.js

@ -38,7 +38,7 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
_formatItems: function (items) {
var o = this.options;
var self = this, o = this.options;
var left, right;
if (BI.isArray(items)) {
BI.each(items, function (i, item) {
@ -68,11 +68,11 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
// if (o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
// json.tgap = o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0);
// }
if (o.lhgap + o.llgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + (item.lgap || 0) + (item.hgap || 0);
if (o.lhgap + o.llgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item);
}
if (o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0);
if (o.lhgap + o.lrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
json.rgap = o.lhgap + o.lrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item);
}
// if (o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
// json.bgap = o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0);
@ -95,11 +95,11 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
// if (o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
// json.tgap = o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0);
// }
if (o.rhgap + o.rlgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.rhgap : 0) + o.rlgap + (item.lgap || 0) + (item.hgap || 0);
if (o.rhgap + o.rlgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) !== 0) {
json.lgap = (i === 0 ? o.rhgap : 0) + o.rlgap + self._optimiseItemLgap(item) + self._optimiseItemHgap(item);
}
if (o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0);
if (o.rhgap + o.rrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) !== 0) {
json.rgap = o.rhgap + o.rrgap + self._optimiseItemRgap(item) + self._optimiseItemHgap(item);
}
// if (o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
// json.bgap = o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0);

36
src/core/wrapper/layout/layout.flow.js

@ -56,26 +56,26 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.bottom)) {
w.element.css({bottom: BI.isNumber(item.bottom) ? this._optimiseGap(item.bottom) : item.bottom});
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
var top = o.vgap / 2 + o.tgap + (item.tgap || 0) + (item.vgap || 0);
if (o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item) !== 0) {
var top = o.vgap / 2 + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-top": this._optimiseGap(top)
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
var left = o.hgap / 2 + o.lgap + (item.lgap || 0) + (item.hgap || 0);
if (o.hgap + o.lgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item) !== 0) {
var left = o.hgap / 2 + o.lgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-left": this._optimiseGap(left)
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
var right = o.hgap / 2 + o.rgap + (item.rgap || 0) + (item.hgap || 0);
if (o.hgap + o.rgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item) !== 0) {
var right = o.hgap / 2 + o.rgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-right": this._optimiseGap(right)
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
var bottom = o.vgap / 2 + o.bgap + (item.bgap || 0) + (item.vgap || 0);
if (o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item) !== 0) {
var bottom = o.vgap / 2 + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-bottom": this._optimiseGap(bottom)
});
@ -148,24 +148,28 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.bottom)) {
w.element.css({bottom: BI.isNumber(item.bottom) ? item.bottom / BI.pixRatio + BI.pixUnit : item.bottom});
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
if (o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item) !== 0) {
var top = o.vgap / 2 + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-top": (o.vgap / 2 + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
"margin-top": this._optimiseGap(top)
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
if (o.hgap + o.lgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item) !== 0) {
var left = o.hgap / 2 + o.lgap + this._optimiseItemLgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-left": (o.hgap / 2 + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
"margin-left": this._optimiseGap(left)
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
if (o.hgap + o.rgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item) !== 0) {
var right = o.hgap / 2 + o.rgap + this._optimiseItemRgap(item) + this._optimiseItemHgap(item);
w.element.css({
"margin-right": (o.hgap / 2 + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit
"margin-right": this._optimiseGap(right)
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
if (o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item) !== 0) {
var bottom = o.vgap / 2 + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item);
w.element.css({
"margin-bottom": (o.vgap / 2 + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
"margin-bottom": this._optimiseGap(bottom)
});
}
return w;

8
src/core/wrapper/layout/layout.inline.js

@ -40,7 +40,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
@ -66,7 +66,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
autoCount++;
cz = 0;
}
gap += o.hgap + o.lgap + o.rgap + (o.items[k].lgap || 0) + (o.items[k].rgap || 0) + (o.items[k].hgap || 0);
gap += o.hgap + o.lgap + o.rgap + this._optimiseItemLgap(o.items[k]) + this._optimiseItemRgap(o.items[k]) + this._optimiseItemHgap(o.items[k]);
length += cz;
}
length = length > 0 && length < 1 ? (length * 100).toFixed(1) + "%" : length / BI.pixRatio + BI.pixUnit;
@ -84,8 +84,8 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
}
this._handleGap(w, item, i);
if (o.verticalAlign === BI.VerticalAlign.Stretch && BI.isNull(item.height)) {
var top = o.innerVgap + o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.innerVgap + o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
var top = o.innerVgap + o.vgap + o.tgap + this._optimiseItemTgap(item) + this._optimiseItemVgap(item),
bottom = o.innerVgap + o.vgap + o.bgap + this._optimiseItemBgap(item) + this._optimiseItemVgap(item);
var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : (top + bottom) / BI.pixRatio + BI.pixUnit;
w.element.css("height", "calc(100% - " + gap + ")");
}

24
src/core/wrapper/layout/layout.tape.js

@ -53,8 +53,8 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
}
w.element.css({
position: "absolute",
top: self._optimiseGap((item.vgap || 0) + (item.tgap || 0) + o.innerVgap + o.vgap + o.tgap),
bottom: self._optimiseGap((item.bgap || 0) + (item.vgap || 0) + o.innerVgap + o.vgap + o.bgap),
top: self._optimiseGap(self._optimiseItemTgap(item) + self._optimiseItemVgap(item) + o.innerVgap + o.vgap + o.tgap),
bottom: self._optimiseGap(self._optimiseItemBgap(item) + self._optimiseItemVgap(item) + o.innerVgap + o.vgap + o.bgap),
width: BI.isNumber(columnSize) ? self._optimiseGap(columnSize) : ""
});
if (o.verticalAlign === BI.VerticalAlign.Middle) {
@ -86,10 +86,10 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
}
if (BI.isNull(left[i])) {
var preColumnSize = o.columnSize.length > 0 ? o.columnSize[i - 1] : items[i - 1].width;
left[i] = left[i - 1] + preColumnSize + (items[i - 1].lgap || 0) + (items[i - 1].rgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
left[i] = left[i - 1] + preColumnSize + self._optimiseItemLgap(items[i - 1]) + self._optimiseItemRgap(items[i - 1]) + 2 * self._optimiseItemHgap(items[i - 1]) + o.hgap + o.lgap + o.rgap;
}
w.element.css({
left: self._optimiseGap(left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap)
left: self._optimiseGap(left[i] + self._optimiseItemLgap(item) + self._optimiseItemHgap(item) + o.hgap + o.lgap)
});
if (columnSize === "" || columnSize === "fill") {
@ -104,10 +104,10 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (BI.isNull(right[i])) {
var nextColumnSize = o.columnSize.length > 0 ? o.columnSize[i + 1] : items[i + 1].width;
right[i] = right[i + 1] + nextColumnSize + (items[i + 1].lgap || 0) + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
right[i] = right[i + 1] + nextColumnSize + self._optimiseItemLgap(items[i + 1]) + self._optimiseItemRgap(items[i + 1]) + 2 * self._optimiseItemHgap(items[i + 1]) + o.hgap + o.lgap + o.rgap;
}
w.element.css({
right: self._optimiseGap(right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap)
right: self._optimiseGap(right[i] + self._optimiseItemRgap(item) + self._optimiseItemHgap(item) + o.hgap + o.rgap)
});
if (columnSize === "" || columnSize === "fill") {
@ -178,8 +178,8 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
}
w.element.css({
position: "absolute",
left: self._optimiseGap((item.lgap || 0) + (item.hgap || 0) + o.innerHgap + o.hgap + o.lgap),
right: self._optimiseGap((item.hgap || 0) + (item.rgap || 0) + o.innerHgap + o.hgap + o.rgap),
left: self._optimiseGap(self._optimiseItemLgap(item) + self._optimiseItemHgap(item) + o.innerHgap + o.hgap + o.lgap),
right: self._optimiseGap(self._optimiseItemRgap(item) + self._optimiseItemHgap(item) + o.innerHgap + o.hgap + o.rgap),
height: BI.isNumber(rowSize) ? self._optimiseGap(rowSize) : ""
});
if (o.horizontalAlign === BI.HorizontalAlign.Center) {
@ -211,10 +211,10 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
}
if (BI.isNull(top[i])) {
var preRowSize = o.rowSize.length > 0 ? o.rowSize[i - 1] : items[i - 1].height;
top[i] = top[i - 1] + preRowSize + (items[i - 1].tgap || 0) + (items[i - 1].bgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
top[i] = top[i - 1] + preRowSize + self._optimiseItemTgap(items[i - 1]) + self._optimiseItemBgap(items[i - 1]) + 2 * self._optimiseItemVgap(items[i - 1]) + o.vgap + o.tgap + o.bgap;
}
w.element.css({
top: self._optimiseGap(top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap)
top: self._optimiseGap(top[i] + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) + o.vgap + o.tgap)
});
if (rowSize === "" || rowSize === "fill") {
@ -229,10 +229,10 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height;
if (BI.isNull(bottom[i])) {
var nextRowSize = o.rowSize.length > 0 ? o.rowSize[i + 1] : items[i + 1].height;
bottom[i] = bottom[i + 1] + nextRowSize + (items[i + 1].tgap || 0) + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
bottom[i] = bottom[i + 1] + nextRowSize + self._optimiseItemTgap(items[i + 1]) + self._optimiseItemBgap(items[i + 1]) + 2 * self._optimiseItemVgap(items[i + 1]) + o.vgap + o.tgap + o.bgap;
}
w.element.css({
bottom: self._optimiseGap(bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap)
bottom: self._optimiseGap(bottom[i] + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) + o.vgap + o.bgap)
});
if (rowSize === "" || rowSize === "fill") {

4
src/core/wrapper/layout/layout.td.js

@ -92,8 +92,8 @@ BI.TdLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < arr.length; i++) {
var w = BI._lazyCreateWidget(arr[i]);
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + o.tgap + (arr[i].tgap || 0) + (arr[i].vgap || 0),
bottom = o.vgap + o.bgap + (arr[i].bgap || 0) + (arr[i].vgap || 0);
var top = o.vgap + o.tgap + this._optimiseItemTgap(arr[i]) + this._optimiseItemVgap(arr[i]),
bottom = o.vgap + o.bgap + this._optimiseItemBgap(arr[i]) + this._optimiseItemVgap(arr[i]);
w.element.css("height", "calc(100% - " + this._optimiseGap(top + bottom) + ")");
}
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});

3
src/core/wrapper/layout/sticky/sticky.horizontal.js

@ -5,7 +5,8 @@ BI.HorizontalStickyLayout = BI.inherit(BI.FlexHorizontalLayout, {
props: function () {
return BI.extend(BI.HorizontalStickyLayout.superclass.props.apply(this, arguments), {
extraCls: "bi-h-sticky",
horizontalAlign: BI.HorizontalAlign.Stretch,
scrollx: true,
// horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch
});
},

3
src/core/wrapper/layout/sticky/sticky.vertical.js

@ -5,8 +5,9 @@ BI.VerticalStickyLayout = BI.inherit(BI.FlexVerticalLayout, {
props: function () {
return BI.extend(BI.VerticalStickyLayout.superclass.props.apply(this, arguments), {
extraCls: "bi-v-sticky",
scrolly: true,
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch
// verticalAlign: BI.VerticalAlign.Stretch
});
},

2
src/less/base/colorchooser/colorchooser.popup.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-color-chooser-popup {
& .disable-mask {

2
src/less/base/colorchooser/colorchooser.trigger.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-color-chooser-trigger {
.border-radius(2px);

2
src/less/base/colorchooser/colorpicker/button.colorpicker.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-color-picker-button {
& .color-picker-button-mask {

2
src/less/base/colorchooser/colorpicker/button.colorshow.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-color-chooser-show-button {
&.active, &:active {

2
src/less/base/colorchooser/colorpicker/editor.colorpicker.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-color-picker-editor {
& .color-picker-editor-display {

4
src/less/base/colorchooser/farbtastic/farbtastic.less

@ -1,5 +1,5 @@
@import "../../../index";
@import "../../../image";
@import "../../../index.less";
@import "../../../image.less";
.bi-farbtastic {
& * {

2
src/less/base/combo/combo.bubble.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
// .bi-bubble-combo {
// & .button-combo-triangle-wrapper {

41
src/less/base/combo/combo.less

@ -1,19 +1,22 @@
@import "../../index";
@import "../../index.less";
@val: transform .3s ease;
.bi-combo {
& > .bi-trigger {
& .bi-trigger-icon-button{
& .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}
&.bi-combo-popup {
display: block !important;
visibility: visible !important;
& > .bi-trigger {
& .bi-trigger-icon-button{
& .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
@ -21,11 +24,13 @@
}
}
}
&.bi-combo-popup, &.bi-combo-hover, &:hover {
&.bi-border, &.bi-border-bottom {
border-color: @color-bi-border-hover-combo;
}
}
&.disabled {
&.bi-combo-hover, &:hover {
&.bi-border, &.bi-border-bottom {
@ -33,6 +38,36 @@
}
}
}
&.error {
&.bi-combo-hover, &:hover {
&.bi-border, &.bi-border-bottom {
border-color: @border-color-negative;
}
}
}
// 将来统一变成combo的特性
//&.status-error {
// &.bi-border, &.bi-border-bottom {
// border-color: @border-color-negative;
// }
//
// .bi-trigger .select-text-label {
// color: @color-bi-text-error-text-trigger;
// }
//}
//
//&.status-warning {
// &.bi-border, &.bi-border-bottom {
// border-color: @border-color-warning;
// }
//
// .bi-trigger .select-text-label {
// color: @font-color-warning;
// }
//}
}
.bi-theme-dark {

2
src/less/base/combo/combo.searchtextvalue.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
@val: transform .3s ease;
.bi-search-text-value-combo{
& .trigger-icon-button{

2
src/less/base/combo/combo.textvalue.icon.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-icon-text-value-combo{
&.combo-error {

14
src/less/base/combo/combo.textvalue.less

@ -1,14 +0,0 @@
@import "../../index";
.bi-text-value-combo {
&.combo-error {
& .bi-select-text-trigger {
& .select-text-label {
color: @color-bi-text-error-hover-text-value-combo;
}
}
&.bi-border, &.bi-border-bottom {
border-color: @border-color-negative;
}
}
}

2
src/less/base/combo/combo.textvaluecheck.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-text-value-check-combo {
&.bi-combo-popup, &:hover {

2
src/less/base/combo/combo.textvaluedownlist.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-text-value-down-list-combo {
&.bi-combo-popup, &:hover {

2
src/less/base/combo/popup.bubble.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-bubble-popup-view {
&.bi-popup-view > .list-view-shadow {

4
src/less/base/dom.less

@ -1,2 +1,2 @@
@import "../index";
@import "../lib/colors";
@import "../index.less";
@import "../lib/colors.less";

2
src/less/base/editor/editor.search.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
/*************BI.SearchEditor******************/
.bi-search-editor {
.border-radius(2px);

2
src/less/base/editor/editor.search.small.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-small-search-editor {
& .bi-editor {

2
src/less/base/foundation/bi.message.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-message-title {
font-size: @font-size-14;

2
src/less/base/layer/layer.multiselect.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-multi-list-view{
& .bi-button-mask{

2
src/less/base/layer/panel.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-panel{
.border-radius(2px);

2
src/less/base/loader/sort.list.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-sortable-holder {
border: 1px dashed @color-bi-border-sortable-holder;

2
src/less/base/pager/pager.all.count.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-all-count-pager {
& .all-pager-prev {

2
src/less/base/pager/pager.direction.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-direction-pager {
& .direction-pager-prev {

2
src/less/base/pager/pager.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-pager{
& .page-item{

6
src/less/base/pane.less

@ -1,6 +1,6 @@
@import "../index";
@import "../image";
@import "../lib/icon";
@import "../index.less";
@import "../image.less";
@import "../lib/icon.less";
.bi-pane {
min-height: 25px;
&.loading-status{

2
src/less/base/segment/button.segment.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-segment-button {
@transition: color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;

2
src/less/base/segment/segment.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-segment{
& > .center-element{

2
src/less/base/single/button/button.half.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-half-button {
.border-radius(2px);

2
src/less/base/single/button/button.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
@hoverVal: opacity .3s ease;
@activeVal: transform .5s ease, opacity 1s ease;
@activeStopVal: transform 0s;

2
src/less/base/single/button/item.singleselect.icontext.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-single-select-icon-text-item{
&:active, &.active {

2
src/less/base/single/button/switch.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-switch {
font-size: @font-size-12;

2
src/less/base/single/editor/editor.multifile.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-multifile-editor {
.multifile-editor {

2
src/less/base/single/editor/editor.textarea.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-textarea-editor {
.overflow-hidden();

2
src/less/base/single/html.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-html {
article,

2
src/less/base/single/input/checkbox.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-checkbox {
& .checkbox-content, &.checkbox-content {

2
src/less/base/single/input/file.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-file{
.opacity(0);

2
src/less/base/single/input/input.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-input, .bi-textarea{
border: none;

2
src/less/base/single/input/radio.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-radio {
& .radio-content, &.radio-content {

2
src/less/base/single/label.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-label {
.overflow-hidden();

2
src/less/base/single/text.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-text {
.overflow-hidden();

2
src/less/base/single/tip/tip.bubble.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-bubble {
z-index: @zIndex-tip;

2
src/less/base/single/tip/tip.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-tip{
position: fixed !important;

2
src/less/base/single/tip/tip.toast.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-toast{
color: @color-bi-color-toast-text;

2
src/less/base/single/tip/tip.tooltip.less

@ -1,4 +1,4 @@
@import "../../../index";
@import "../../../index.less";
.bi-tooltip{
max-width: 250px;

2
src/less/base/tree/tree.branch.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-branch-tree{
& .bi-branch-tree-view{
min-width: 300px;

2
src/less/base/tree/tree.display.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-display-tree{
.ztree * {

6
src/less/base/tree/tree.expander.less

@ -1,6 +1,6 @@
@import "../../index";
@import "../../image";
@import "../../lib/icon";
@import "../../index.less";
@import "../../image.less";
@import "../../lib/icon.less";
.bi-tree-expander-popup.line:before {
position: absolute;
content: "";

2
src/less/base/tree/tree.list.display.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-list-display-tree{

2
src/less/base/tree/ztree.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.ztree * {
padding: 0;

2
src/less/base/trigger/trigger.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-trigger{
& .bi-trigger-icon-button{

11
src/less/base/trigger/trigger.searchtextvalue.less

@ -0,0 +1,11 @@
@import "../../index.less";
.bi-search-text-value-trigger {
&.error .select-text-label {
color: @color-bi-text-error-text-trigger;
}
&:where(:not(&:hover)) .clear-button {
display: none;
}
}

2
src/less/base/trigger/trigger.selecttext.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-select-text-trigger{
.border-radius(2px);

2
src/less/base/trigger/trigger.selecttextsmall.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-small-select-text-trigger{
.border-radius(2px);

11
src/less/base/trigger/trigger.text.less

@ -0,0 +1,11 @@
@import "../../index.less";
.bi-text-trigger {
&.error .select-text-label {
color: @color-bi-text-error-text-trigger;
}
&:where(:not(&:hover)) .clear-button {
display: none;
}
}

2
src/less/base/view/drawer.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-drawer {
.box-shadows(-6px 0 16px -8px #00000014, -9px 0 28px #0000000d, -12px 0 48px 16px #00000008);

2
src/less/base/view/popover.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-popover {
border: 1px solid transparent;

2
src/less/base/view/popupview.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-popup-view {
position: fixed !important;

2
src/less/component/form/form.less

@ -1,4 +1,4 @@
@import "../../index";
@import "../../index.less";
.bi-form {
& .bi-form-field.error {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save