Browse Source

Pull request #204411: Feature/x

Merge in DEC/fineui from ~DAILER/fineui-decision:feature/x to feature/x

* commit '7dd7228eb6ce513ff87fb3c8177a44318b746318': (56 commits)
  auto upgrade version to 2.0.20221101100519
  auto upgrade version to 2.0.20221031221611
  REPORT-82014 fix:补齐AFTER_HIDEVIEW事件
  auto upgrade version to 2.0.20221031190602
  auto upgrade version to 2.0.20221031135635
  BI-115201 fix: 【6.0.3.3】下拉树下拉后不选择任何内容,前端多发一个data请求
  BI-115201 fix: 【6.0.3.3】下拉树下拉后不选择任何内容,前端多发一个data请求
  auto upgrade version to 2.0.20221031101438
  auto upgrade version to 2.0.20221031095439
  bugfix
  auto upgrade version to 2.0.20221028191610
  feature: 增加instruction组件
  feature: 增加instruction组件
  REPORT-83214 fix: 不允许编辑的下拉树展示多了滚动条(finui的bi.multilayer_single_tree_combo组件)
  auto upgrade version to 2.0.20221028145548
  auto upgrade version to 2.0.20221028143506
  update
  update
  update
  KERNEL-13158: 优化
  ...
master
Dailer-刘荣歆 2 years ago
parent
commit
f37405e3a1
  1. 2
      demo/js/config/widget.js
  2. 10
      demo/js/widget/multitree/demo.multi_tree_combo.js
  3. 2
      package.json
  4. 36
      src/base/collection/collection.js
  5. 12
      src/base/combination/group.button.js
  6. 19
      src/base/combination/navigation.js
  7. 17
      src/base/combination/tab.js
  8. 36
      src/base/grid/grid.js
  9. 31
      src/base/single/button/button.basic.js
  10. 76
      src/base/single/instruction/instruction.js
  11. 2
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  12. 41
      src/case/layer/panel.js
  13. 6
      src/component/treevaluechooser/combo.treevaluechooser.js
  14. 2
      src/core/2.base.js
  15. 21
      src/core/4.widget.js
  16. 2
      src/core/platform/web/detectElementResize.js
  17. 2
      src/core/utils/events/mousemovetracker.js
  18. 28
      src/core/wrapper/layout/sticky/sticky.horizontal.js
  19. 28
      src/core/wrapper/layout/sticky/sticky.vertical.js
  20. 11
      src/less/base/single/button/button.half.less
  21. 13
      src/less/base/single/input/checkbox.less
  22. 13
      src/less/base/single/input/radio.less
  23. 31
      src/less/base/single/instruction.less
  24. 10
      src/less/base/single/tip/tip.bubble.less
  25. 275
      src/less/base/tree/ztree.less
  26. 25
      src/less/case/tree/tree.item.less
  27. 22
      src/less/core/utils/common.less
  28. 66
      src/less/resource/background.less
  29. 2
      src/less/visual.less
  30. 19
      src/widget/intervalslider/intervalslider.js
  31. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  32. 14
      src/widget/multitree/multi.tree.combo.js
  33. 11
      src/widget/multitree/multi.tree.insert.combo.js
  34. 11
      src/widget/multitree/multi.tree.list.combo.js
  35. 3
      typescript/index.ts
  36. 4
      typescript/widget/datepane/datepane.ts
  37. 4
      typescript/widget/dynamicdate/dynamicdate.combo.ts
  38. 4
      typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
  39. 2
      typescript/widget/year/combo.year.ts
  40. 13
      typescript/widget/year/popup.year.ts

2
demo/js/config/widget.js

@ -192,7 +192,7 @@ Demo.WIDGET_CONFIG = [{
value: "demo.number_interval"
}, {
id: 420,
text: "滚动sliders",
text: "数值滑块sliders",
value: "demo.slider"
}, {
pId: 4,

10
demo/js/widget/multitree/demo.multi_tree_combo.js

@ -38,7 +38,15 @@ Demo.MultiTreeCombo = BI.inherit(BI.Widget, {
width: 300,
value: {
"根目录": {}
}
},
listeners: [
{
eventName: "EVENT_CONFIRM",
action: function () {
console.log("EVENT_CONFIRM", this.getValue());
}
}
]
}, {
type: "bi.button",
text: "getValue",

2
package.json

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

36
src/base/collection/collection.js

@ -280,12 +280,44 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}
},
_isOverflowX: function () {
var o = this.options;
// 兼容一下
var scrollable = o.scrollable, scrollx = o.scrollx;
if (o.overflowX === false) {
return false;
}
if (scrollx) {
return true;
}
if (scrollable === true || scrollable === "xy" || scrollable === "x") {
return true;
}
return false;
},
_isOverflowY: function () {
var o = this.options;
// 兼容一下
var scrollable = o.scrollable, scrolly = o.scrolly;
if (o.overflowX === false) {
return false;
}
if (scrolly) {
return true;
}
if (scrollable === true || scrollable === "xy" || scrollable === "y") {
return true;
}
return false;
},
_getMaxScrollLeft: function () {
return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
return Math.max(0, this._width - this.options.width + (this._isOverflowX() ? BI.DOM.getScrollWidth() : 0));
},
_getMaxScrollTop: function () {
return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));
return Math.max(0, this._height - this.options.height + (this._isOverflowY() ? BI.DOM.getScrollWidth() : 0));
},
_populate: function (items) {

12
src/base/combination/group.button.js

@ -42,11 +42,13 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
_createBtns: function (items) {
BI.Widget.pushContext(this);
var btns = BI.createWidgets(BI.createItems(items, {
type: "bi.text_button",
}));
BI.Widget.popContext();
var btns;
BI.Widget.execWithContext(this, function () {
btns = BI.createWidgets(BI.createItems(items, {
type: "bi.text_button",
}));
});
return btns;
},

19
src/base/combination/navigation.js

@ -43,11 +43,10 @@ BI.Navigation = BI.inherit(BI.Widget, {
return self.showIndex + v;
},
cardCreator: function (v) {
BI.Widget.pushContext(self);
var card = o.cardCreator(v);
BI.Widget.popContext();
self.cardMap[v] = card;
return card;
BI.Widget.execWithContext(self, function () {
self.cardMap[v] = o.cardCreator(v);
});
return self.cardMap[v];
},
afterCardCreated: BI.bind(this.afterCardCreated, this),
afterCardShow: BI.bind(this.afterCardShow, this),
@ -104,12 +103,12 @@ BI.Navigation = BI.inherit(BI.Widget, {
},
_assertCard: function (v) {
var self = this, o = this.options;
if (!this.layout.isCardExisted(v)) {
BI.Widget.pushContext(this);
var card = this.options.cardCreator(v);
BI.Widget.popContext();
this.cardMap[v] = card;
this.layout.addCardByName(v, card);
BI.Widget.execWithContext(self, function () {
self.cardMap[v] = o.cardCreator(v);
});
this.layout.addCardByName(v, this.cardMap[v]);
this.afterCardCreated(v);
}
},

17
src/base/combination/tab.js

@ -43,10 +43,11 @@ BI.Tab = BI.inherit(BI.Widget, {
eventObj: this.tab,
cardLayout: this.layout,
cardCreator: function (v) {
var card = o.cardCreator.apply(self, arguments);
self.cardMap[v] = card;
BI.Widget.execWithContext(self, function () {
self.cardMap[v] = o.cardCreator(v);
});
return card;
return self.cardMap[v];
},
afterCardShow: function (v) {
self._deleteOtherCards(v);
@ -71,12 +72,12 @@ BI.Tab = BI.inherit(BI.Widget, {
},
_assertCard: function (v) {
var self = this, o = this.options;
if (!this.layout.isCardExisted(v)) {
BI.Widget.pushContext(this);
var card = this.options.cardCreator(v);
BI.Widget.popContext();
this.cardMap[v] = card;
this.layout.addCardByName(v, card);
BI.Widget.execWithContext(this, function () {
self.cardMap[v] = o.cardCreator(v);
});
this.layout.addCardByName(v, this.cardMap[v]);
}
},

36
src/base/grid/grid.js

@ -262,12 +262,44 @@ BI.GridView = BI.inherit(BI.Widget, {
}
},
_isOverflowX: function () {
var o = this.options;
// 兼容一下
var scrollable = o.scrollable, scrollx = o.scrollx;
if (o.overflowX === false) {
return false;
}
if (scrollx) {
return true;
}
if (scrollable === true || scrollable === "xy" || scrollable === "x") {
return true;
}
return false;
},
_isOverflowY: function () {
var o = this.options;
// 兼容一下
var scrollable = o.scrollable, scrolly = o.scrolly;
if (o.overflowX === false) {
return false;
}
if (scrolly) {
return true;
}
if (scrollable === true || scrollable === "xy" || scrollable === "y") {
return true;
}
return false;
},
_getMaxScrollLeft: function () {
return Math.max(0, this._getContainerWidth() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));
return Math.max(0, this._getContainerWidth() - this.options.width + (this._isOverflowX() ? BI.DOM.getScrollWidth() : 0));
},
_getMaxScrollTop: function () {
return Math.max(0, this._getContainerHeight() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));
return Math.max(0, this._getContainerHeight() - this.options.height + (this._isOverflowY() ? BI.DOM.getScrollWidth() : 0));
},
_getContainerWidth: function () {

31
src/base/single/button/button.basic.js

@ -184,7 +184,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
var mouseDown = false;
var interval;
hand.mousedown(function (e) {
BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function (e) {
BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function () {
interval && clearInterval(interval);
interval = null;
mouseDown = false;
@ -193,13 +193,14 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (mouseDown === true) {
return;
}
if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {
if (!self.isEnabled() || !self.isValid()) {
return;
}
if (self.isOnce() && self.isSelected()) {
return;
}
interval = setInterval(function () {
if (self.isEnabled()) {
self.doClick();
}
clk(e)
}, 180);
mouseDown = true;
ev(e);
@ -239,7 +240,10 @@ BI.BasicButton = BI.inherit(BI.Single, {
function clk(e) {
ev(e);
if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {
if (!self.isEnabled() || !self.isValid()) {
return;
}
if (self.isOnce() && self.isSelected()) {
return;
}
if (BI.isKey(o.bubble) || BI.isFunction(o.bubble)) {
@ -335,16 +339,17 @@ BI.BasicButton = BI.inherit(BI.Single, {
},
_doClick: function (e) {
if (this.isValid()) {
var isIntercepted = this.beforeClick(e);
// 如果事件已经被消费掉了,就不再触发点击事件
if (isIntercepted) {
return;
}
if (!this.isEnabled() || !this.isValid()) {
return;
}
var isIntercepted = this.beforeClick(e);
// 如果事件已经被消费掉了,就不再触发点击事件
if (isIntercepted) {
return;
}
this._trigger(e);
if (this.isValid()) {
if (this.isEnabled() && this.isValid()) {
this.doClick(e);
}
},

76
src/base/single/instruction/instruction.js

@ -0,0 +1,76 @@
BI.Instruction = BI.inherit(BI.Widget, {
_defaultConfig: function () {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-instruction",
height: 20,
level: "error",
textAlign: "left",
whiteSpace: "nowrap",
hgap: 5
});
},
render: function () {
var self = this, o = this.options;
return {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "instruction-" + o.level,
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textHeight: o.height,
height: o.height,
hgap: o.hgap,
rgap: o.rgap,
lgap: o.lgap,
vgap: o.vgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
};
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
setText: function (v) {
this.options.text = v;
this.text.setText(v);
},
getText: function () {
return this.options.text;
},
setStyle: function (css) {
this.text.setStyle(css);
},
setValue: function (v) {
this.text.setValue(v);
},
getValue: function () {
this.text.getValue();
}
});
BI.shortcut("bi.instruction", BI.Instruction);

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

@ -91,6 +91,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () {
self.trigger.stopEditing();
self.fireEvent(BI.SearchTextValueCombo.EVENT_AFTER_HIDEVIEW);
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
@ -148,4 +149,5 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
});
BI.SearchTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.SearchTextValueCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"
BI.shortcut("bi.search_text_value_combo", BI.SearchTextValueCombo);

41
src/case/layer/panel.js

@ -11,22 +11,21 @@ BI.Panel = BI.inherit(BI.Widget, {
titleHeight: 30,
titleButtons: [],
el: {},
logic: {
dynamic: false
}
// logic: {
// dynamic: false
// }
});
},
_init: function () {
render: function () {
BI.Panel.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle()
, this.options.el)
}))));
return {
type: "bi.vertical_fill",
rowSize: ["", "fill"],
items: [this._createTitle(), this.options.el]
};
},
_createTitle: function () {
@ -56,18 +55,18 @@ BI.Panel = BI.inherit(BI.Widget, {
});
return {
el: {
type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-header-background bi-border-bottom",
height: BI.toPix(o.titleHeight, 1),
items: {
left: [this.text],
right: [this.button_group]
},
lhgap: 10,
rhgap: 10
// el: {
type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-header-background bi-border-bottom",
height: BI.toPix(o.titleHeight, 1),
items: {
left: [this.text],
right: [this.button_group]
},
height: BI.toPix(o.titleHeight, 1)
lhgap: 10,
rhgap: 10
// },
// height: BI.toPix(o.titleHeight, 1)
};
},

6
src/component/treevaluechooser/combo.treevaluechooser.js

@ -73,6 +73,11 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
action: function () {
self.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW);
}
}, {
eventName: BI.MultiTreeCombo.EVENT_AFTER_HIDEVIEW,
action: function () {
self.fireEvent(BI.TreeValueChooserCombo.EVENT_AFTER_HIDEVIEW);
}
}]
});
},
@ -128,4 +133,5 @@ BI.TreeValueChooserCombo.EVENT_BLUR = "EVENT_BLUR";
BI.TreeValueChooserCombo.EVENT_STOP = "EVENT_STOP";
BI.TreeValueChooserCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.TreeValueChooserCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.TreeValueChooserCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);

2
src/core/2.base.js

@ -486,7 +486,7 @@
if (typeof w === "number") {
return w >= 0;
} else if (typeof w === "string") {
return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+px$/.test(w) || /^calc/.test(w);
return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+(\.\d+)?px$/.test(w) || /^calc/.test(w);
}
},

21
src/core/4.widget.js

@ -857,6 +857,17 @@
BI.Widget.context = context = contextStack.pop();
};
BI.Widget.execWithContext = function (context, execFunc) {
BI.Widget.pushContext(context);
try {
execFunc();
} catch (e) {
throw e;
} finally {
BI.Widget.popContext();
}
};
function pushTarget(_current) {
if (current) currentStack.push(current);
BI.Widget.current = current = _current;
@ -927,16 +938,6 @@
return vm;
};
BI.execWithContext = function (_context, fn) {
BI.Widget.pushContext(_context);
try {
fn();
} catch (e) {
// nothing
}
BI.Widget.popContext();
};
BI.watch = function (vm, watch, handler) {
// 必须要保证组件当前环境存在
if (BI.Widget.current) {

2
src/core/platform/web/detectElementResize.js

@ -553,7 +553,7 @@ var ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill.ResizeObser
if (!element.__resizeObserver__) {
var resizeObserver = new ResizeObserver(function () {
element.__resizeListeners__.forEach(function (listener) {
listener();
BI.$(element).is(":visible") && listener();
});
});
resizeObserver.observe(element);

2
src/core/utils/events/mousemovetracker.js

@ -44,7 +44,7 @@
this._x = event.clientX;
this._y = event.clientY;
}
event.preventDefault ? event.preventDefault() : (event.returnValue = false);
// event.preventDefault ? event.preventDefault() : (event.returnValue = false);
},
releaseMouseMoves: function () {

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

@ -21,13 +21,29 @@ BI.HorizontalStickyLayout = BI.inherit(BI.FlexHorizontalLayout, {
}
}
if (columnSize !== "fill") {
var firstItemFill = o.columnSize[0] === "fill" || o.items[0].width === "fill";
w.element.css({
position: "sticky",
zIndex: 1,
left: firstItemFill ? "" : 0,
right: firstItemFill ? 0 : ""
var fillIndex;
BI.count(0, o.items.length - 1, index => {
if (BI.isNotNull(fillIndex)) {
return;
}
if ((o.columnSize[index] === "fill" || o.items[index].width === "fill")) {
fillIndex = index;
}
});
if (fillIndex > i) {
w.element.css({
position: "sticky",
zIndex: 1,
left: 0,
});
} else {
w.element.css({
position: "sticky",
zIndex: 1,
right: 0
});
}
} else {
w.element.css({
overflow: ""

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

@ -21,13 +21,29 @@ BI.VerticalStickyLayout = BI.inherit(BI.FlexVerticalLayout, {
}
}
if (rowSize !== "fill") {
var firstItemFill = o.rowSize[0] === "fill" || o.items[0].height === "fill";
w.element.css({
position: "sticky",
zIndex: 1,
top: firstItemFill ? "" : 0,
bottom: firstItemFill ? 0 : ""
var fillIndex;
BI.count(0, o.items.length - 1, index => {
if (BI.isNotNull(fillIndex)) {
return;
}
if ((o.rowSize[index] === "fill" || o.items[index].height === "fill")) {
fillIndex = index;
}
});
if (fillIndex > i) {
w.element.css({
position: "sticky",
zIndex: 1,
top: 0,
});
} else {
w.element.css({
position: "sticky",
zIndex: 1,
bottom: 0
});
}
} else {
w.element.css({
overflow: ""

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

@ -6,10 +6,13 @@
&:after {
position: absolute;
left: 2px;
top: 2px;
width: 8px;
height: 8px;
.border-radius(2px);
display: table;
left: 50%;
top: 50%;
width: 70%;
height: 70%;
.transform(translate(-50%, -50%));
background-color: @color-bi-background-half-button-content;
content: '';
}

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

@ -6,20 +6,21 @@
border: 1px solid @color-bi-border-checkbox;
.box-sizing(border-box);
.transition(all .1s);
&:after {
position: absolute;
display: table;
// 百分比会出现像素误差
top: 6px;
left: 2px;
top: 45%;
left: 18%;
border: 2px solid transparent;
border: calc(var(--css-scale, 1) * 2px) solid transparent;
border-top: 0;
border-left: 0;
width: 6px;
height: 9px;
width: 50%;
height: 75%;
.box-sizing(border-box);
.transform(rotate(45deg) scale(1) translate(-50%, -50%));
@transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;
@transition: all .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s;
.transition(@transition);
content: '';
}

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

@ -2,13 +2,15 @@
.bi-radio {
& .radio-content, &.radio-content {
.border-radius(8px);
.border-radius(50%);
border: 1px solid @color-bi-border-radio;
.box-sizing(border-box);
.transition(all .1s);
&:after {
content: "";
}
&.hover, &:hover {
border-color: @color-bi-border-hover-active-radio;
}
@ -18,16 +20,15 @@
border-color: @color-bi-border-hover-active-radio;
background-color: @color-bi-background-active-radio;
&:after {
width: 8px;
height: 8px;
display: table;
width: 50%;
height: 50%;
position: absolute;
top: 50%;
left: 50%;
.border-radius(4px);
.border-radius(50%);
background-color: @color-bi-background-active-radio-content;
.transform(translate(-50%, -50%));
@transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;
@transition: all .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s;
.transition(@transition);
}
}

31
src/less/base/single/instruction.less

@ -0,0 +1,31 @@
@import "../../index.less";
.bi-instruction {
.border-radius(2px);
&.instruction-error{
background: @color-bi-background-bubble-error;
color: @color-bi-text-failure;
}
&.instruction-common{
background: @color-bi-background-bubble-normal;
color: @color-bi-text-highlight;
}
&.instruction-success{
background: @color-bi-background-bubble-success;
color: @color-bi-text-success;
}
&.instruction-warning{
background: @color-bi-background-bubble-warning;
color: @color-bi-text-redmark;
}
}
.bi-theme-dark {
.bi-instruction.instruction-error {
background: @color-bi-background-bubble-error-theme-dark;
}
}

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

@ -9,10 +9,6 @@
color: @color-bi-text-failure;
}
.bi-theme-dark &.bubble-error {
background: @color-bi-background-bubble-error-theme-dark;
}
&.bubble-common{
background: @color-bi-background-bubble-normal;
color: @color-bi-text-highlight;
@ -28,3 +24,9 @@
color: @color-bi-text-redmark;
}
}
.bi-theme-dark {
.bi-bubble.bubble-error {
background: @color-bi-background-bubble-error-theme-dark;
}
}

275
src/less/base/tree/ztree.less

@ -1,5 +1,10 @@
@import "../../index.less";
.use-scale(@property, @pix) {
@{property} : @pix; //不支持css变量的浏览器
@{property} : calc(var(--css-scale, 1) * @pix);
}
.ztree * {
padding: 0;
margin: 0;
@ -27,7 +32,7 @@
.ztree.solid li ul {
margin: 0;
padding: 0 0 0 24px
.use-scale(padding-left, 24px);
}
// 此处不用2倍图,改用css画虚线
@ -50,7 +55,7 @@
&:before {
border-left: 1px solid @border-color-dark-gray-line;
height: 100%;
left: 14px;
.use-scale(left, 14px);
margin-top: 0;
}
}
@ -113,35 +118,8 @@
}
.ztree.solid li a {
height: 30px;
}
.ztree li a.curSelectedNode {
}
.ztree li a.curSelectedNode_Edit {
padding-top: 0px;
background-color: #FFE6B0;
color: black;
height: 16px;
border: 1px #FFB951 solid;
opacity: 0.8;
}
.ztree li a.tmpTargetNode_inner {
padding-top: 0px;
background-color: #316AC5;
color: white;
height: 16px;
border: 1px #316AC5 solid;
opacity: 0.8;
filter: alpha(opacity=80)
}
.ztree li a.tmpTargetNode_prev {
}
.ztree li a.tmpTargetNode_next {
//height: 30px;
.use-scale(height, 30px);
}
.ztree li a input.rename {
@ -163,7 +141,8 @@
}
.ztree.solid li span {
line-height: 30px;
//line-height: 30px;
.use-scale(line-height, 30px);
}
.ztree li span.icon {
@ -183,10 +162,6 @@
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
}
.ztree li span.button.chk {
@ -215,57 +190,100 @@
}
}
.ztree li span.button.chk {
.ztree.solid li span.button.roots_docu {
background: none;
position: relative;
width: 14px;
height: 14px;
margin: 0 3px 0 0;
cursor: auto
}
.ztree li span.button.chk.checkbox_false_disable {
background-position: 0 -56px
}
&:before {
position: absolute;
bottom: 0;
left: -1px;
width: 50%;
height: 50%;
border-right: 1px solid @border-color-dark-gray-line;
content: '';
}
.ztree li span.button.chk.checkbox_true_disable {
background-position: -14px -56px
&:after {
position: absolute;
top: 0;
right: 0;
height: 50%;
width: 50%;
border-bottom: 1px solid @border-color-dark-gray-line;
content: '';
}
}
.ztree li span.button.chk.radio_false_full {
background-position: -28px 0
}
.ztree.solid li span.button.center_docu {
background: none;
position: relative;
.ztree li span.button.chk.radio_false_full_focus {
background-position: -28px -14px
}
&:before {
position: absolute;
top: 0;
left: -1px;
width: 50%;
height: 100%;
border-right: 1px solid @border-color-dark-gray-line;
content: '';
}
.ztree li span.button.chk.radio_false_part {
background-position: -28px -28px
&:after {
position: absolute;
top: 0;
right: 0;
height: 50%;
width: 50%;
border-bottom: 1px solid @border-color-dark-gray-line;
content: '';
}
}
.ztree li span.button.chk.radio_false_part_focus {
background-position: -28px -42px
}
.ztree.solid li span.button.bottom_docu {
background: none;
position: relative;
.ztree li span.button.chk.radio_false_disable {
background-position: -28px -56px
}
&:before {
position: absolute;
top: 0;
left: -1px;
width: 50%;
height: 50%;
border-right: 1px solid @border-color-dark-gray-line;
content: '';
}
.ztree li span.button.chk.radio_true_full {
background-position: -42px 0
&:after {
position: absolute;
top: 0;
right: 1px;
height: 50%;
width: 50%;
border-bottom: 1px solid @border-color-dark-gray-line;
content: '';
}
}
.ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px;
}
.bi-theme-dark {
.ztree.solid li span.button.center_docu, .ztree.solid li span.button.bottom_docu {
&:before {
border-right: 1px solid @border-color-dark-gray-line-theme-dark;
}
.ztree li span.button.chk.radio_true_part {
background-position: -42px -28px
&:after {
border-bottom: 1px solid @border-color-dark-gray-line-theme-dark;
}
}
}
.ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px
.ztree li span.button.chk {
position: relative;
.use-scale(width, 14px);
.use-scale(height, 14px);
margin: 0 3px 0 0;
cursor: auto
}
.ztree li span.button.chk.checkbox_true_full {
@ -292,73 +310,16 @@
}
}
.ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px
}
.ztree li span.button.switch {
width: 24px;
height: 24px
}
.ztree.solid li span.button.switch {
width: 30px;
height: 30px
}
.ztree li span.button.switch.noline_open {
width: 0;
}
.ztree li span.button.switch.noline_close {
width: 0;
}
.ztree li span.button.noline_open {
background-position: -92px -72px
}
.ztree li span.button.noline_close {
background-position: -74px -72px
}
.ztree li span.button.root_docu {
background: none;
}
.ztree li span.button.noline_docu {
background: none;
width: 0;
}
.ztree li span.button.ico_open {
margin-right: 2px;
background-position: -110px -16px;
vertical-align: top;
}
.ztree li span.button.ico_close {
margin-right: 2px;
background-position: -110px 0;
vertical-align: top;
}
.ztree li span.button.ico_docu {
margin-right: 2px;
background-position: -110px -32px;
vertical-align: top;
}
.ztree li span.button.edit {
margin-right: 2px;
background-position: -110px -48px;
vertical-align: top;
}
.ztree li span.button.remove {
margin-right: 2px;
background-position: -110px -64px;
vertical-align: top;
.use-scale(width, 30px);
.use-scale(height, 30px);
//width: 30px;
//height: 30px;
}
.ztree li span.button.ico_loading {
@ -366,53 +327,3 @@
margin-right: 2px;
vertical-align: top;
}
ul.tmpTargetzTree {
background-color: #FFE6B0;
opacity: 0.8;
filter: alpha(opacity=80)
}
span.tmpzTreeMove_arrow {
width: 16px;
height: 16px;
display: inline-block;
padding: 0;
margin: 2px 0 0 1px;
border: 0 none;
position: absolute;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: -110px -80px;
}
ul.ztree.zTreeDragUL {
margin: 0;
padding: 0;
position: absolute;
width: auto;
height: auto;
overflow: hidden;
background-color: #cfcfcf;
border: 1px #00B83F dotted;
opacity: 0.8;
filter: alpha(opacity=80)
}
.zTreeMask {
z-index: 10000;
background-color: #cfcfcf;
opacity: 0.0;
filter: alpha(opacity=0);
position: absolute
}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/

25
src/less/case/tree/tree.item.less

@ -1,6 +1,29 @@
@import "../../index.less";
.tree-first-solid-line-conn-background, .tree-mid-solid-line-conn-background {
.tree-first-solid-line-conn-background {
&:before {
position: absolute;
bottom: 0;
left: -1px;
width: 50%;
height: 50%;
border-right: 1px solid @border-color-dark-gray-line;
content: '';
}
&:after {
position: absolute;
top: 0;
right: 0;
height: 50%;
width: 50%;
border-bottom: 1px solid @border-color-dark-gray-line;
content: '';
}
}
.tree-mid-solid-line-conn-background {
&:before {
position: absolute;
top: 0;

22
src/less/core/utils/common.less

@ -74,9 +74,10 @@
border-color: @color-bi-border-highlight;
}
// ie下不支持focus-within, 和上面写在一起会导致ie下:hover不生效
&:focus-within{
&:focus-within {
border-color: @color-bi-border-highlight;
}
&.disabled {
&:hover {
border-color: @border-color-line;
@ -84,6 +85,14 @@
}
}
.base-disabled {
.bi-focus-shadow {
&:hover {
border-color: @border-color-line;
}
}
}
.bi-theme-dark {
.bi-focus-shadow {
&.disabled {
@ -94,6 +103,16 @@
}
}
.bi-theme-dark {
.base-disabled {
.bi-focus-shadow {
&:hover {
border-color: @border-color-line-theme-dark;
}
}
}
}
.clearfix {
.clearfix();
}
@ -102,6 +121,7 @@
.bi-background {
background-color: @color-bi-background-normal;
color: @color-bi-text-background;
& .bi-input {
color: @color-bi-text-background;
}

66
src/less/resource/background.less

@ -43,6 +43,7 @@
.ztree li span.button.root_open {
.image2xPath(@icon-tree-expand-type1-theme-dark);
}
.ztree.solid li span.button.root_open {
.image2xPath(@icon-tree-solid-expand-type1-theme-dark);
}
@ -60,6 +61,7 @@
.ztree li span.button.root_close {
.image2xPath(@icon-tree-collapse-type1-theme-dark);
}
.ztree.solid li span.button.root_close {
.image2xPath(@icon-tree-solid-collapse-type1-theme-dark);
}
@ -70,15 +72,16 @@
}
.ztree.solid li span.button.roots_open {
.image2xPath(@icon-tree-solid-expand-type2);
.image2xPath(@icon-tree-solid-expand-type1);
}
.bi-theme-dark {
.ztree li span.button.roots_open {
.image2xPath(@icon-tree-expand-type2-theme-dark);
}
.ztree.solid li span.button.roots_open {
.image2xPath(@icon-tree-solid-expand-type2-theme-dark);
.image2xPath(@icon-tree-solid-expand-type1-theme-dark);
}
}
@ -87,15 +90,16 @@
}
.ztree.solid li span.button.roots_close {
.image2xPath(@icon-tree-solid-collapse-type2);
.image2xPath(@icon-tree-solid-collapse-type1);
}
.bi-theme-dark {
.ztree li span.button.roots_close {
.image2xPath(@icon-tree-collapse-type2-theme-dark);
}
.ztree.solid li span.button.roots_close {
.image2xPath(@icon-tree-solid-collapse-type2-theme-dark);
.image2xPath(@icon-tree-solid-collapse-type1-theme-dark);
}
}
@ -104,15 +108,16 @@
}
.ztree.solid li span.button.center_open {
.image2xPath(@icon-tree-solid-expand-type3);
.image2xPath(@icon-tree-solid-expand-type1);
}
.bi-theme-dark {
.ztree li span.button.center_open {
.image2xPath(@icon-tree-expand-type3-theme-dark);
}
.ztree.solid li span.button.center_open {
.image2xPath(@icon-tree-solid-expand-type3-theme-dark);
.image2xPath(@icon-tree-solid-expand-type1-theme-dark);
}
}
@ -121,15 +126,16 @@
}
.ztree.solid li span.button.center_close {
.image2xPath(@icon-tree-solid-collapse-type3);
.image2xPath(@icon-tree-solid-collapse-type1);
}
.bi-theme-dark {
.ztree li span.button.center_close {
.image2xPath(@icon-tree-collapse-type3-theme-dark);
}
.ztree.solid li span.button.center_close {
.image2xPath(@icon-tree-solid-collapse-type3-theme-dark);
.image2xPath(@icon-tree-solid-collapse-type1-theme-dark);
}
}
@ -138,15 +144,16 @@
}
.ztree.solid li span.button.bottom_open {
.image2xPath(@icon-tree-solid-expand-type4);
.image2xPath(@icon-tree-solid-expand-type1);
}
.bi-theme-dark {
.ztree li span.button.bottom_open {
.image2xPath(@icon-tree-expand-type4-theme-dark);
}
.ztree.solid li span.button.bottom_open {
.image2xPath(@icon-tree-solid-expand-type4-theme-dark);
.image2xPath(@icon-tree-solid-expand-type1-theme-dark);
}
}
@ -155,15 +162,16 @@
}
.ztree.solid li span.button.bottom_close {
.image2xPath(@icon-tree-solid-collapse-type4);
.image2xPath(@icon-tree-solid-collapse-type1);
}
.bi-theme-dark {
.ztree li span.button.bottom_close {
.image2xPath(@icon-tree-collapse-type4-theme-dark);
}
.ztree.solid li span.button.bottom_close {
.image2xPath(@icon-tree-solid-collapse-type4-theme-dark);
.image2xPath(@icon-tree-solid-collapse-type1-theme-dark);
}
}
@ -171,51 +179,31 @@
.image2xPath(@icon-tree-vertical-line-2);
}
.ztree.solid li span.button.roots_docu {
.image2xPath(@icon-tree-solid-vertical-line-2);
}
.bi-theme-dark {
.ztree li span.button.roots_docu {
.image2xPath(@icon-tree-vertical-line-2-theme-dark);
}
.ztree.solid li span.button.roots_docu {
.image2xPath(@icon-tree-solid-vertical-line-2-theme-dark);
}
}
.ztree li span.button.center_docu {
.image2xPath(@icon-tree-vertical-line-3);
}
.ztree.solid li span.button.center_docu {
.image2xPath(@icon-tree-solid-vertical-line-3);
}
.bi-theme-dark {
.ztree li span.button.center_docu {
.image2xPath(@icon-tree-vertical-line-3-theme-dark);
}
.ztree.solid li span.button.center_docu {
.image2xPath(@icon-tree-solid-vertical-line-3-theme-dark);
}
}
.ztree li span.button.bottom_docu {
.image2xPath(@icon-tree-vertical-line-4);
}
.ztree.solid li span.button.bottom_docu {
.image2xPath(@icon-tree-solid-vertical-line-4);
}
.bi-theme-dark {
.ztree li span.button.bottom_docu {
.image2xPath(@icon-tree-vertical-line-4-theme-dark);
}
.ztree.solid li span.button.bottom_docu {
.image2xPath(@icon-tree-solid-vertical-line-4-theme-dark);
}
}
.ztree li span.button.ico_loading {
@ -335,43 +323,43 @@
}
.auto-color-background {
&.hack{
&.hack {
.imagePath(@background-auto-color);
}
}
.auto-color-normal-background {
&.hack{
&.hack {
.imagePath(@background-auto-color-normal);
}
}
.auto-color-normal-disabled-background {
&.hack{
&.hack {
.imagePath(@background-auto-color-disabled);
}
}
.auto-color-square-normal-background {
&.hack{
&.hack {
.imagePath(@background-auto-color-square-normal);
}
}
.auto-color-no-square-normal-background {
&.hack{
&.hack {
.imagePath(@background-auto-color-no-square-normal);
}
}
.trans-color-background {
&.hack{
&.hack {
.imagePath(@background-trans-color);
}
}
.trans-color-disabled-background {
&.hack{
&.hack {
.imagePath(@background-trans-color-disabled);
}
}

2
src/less/visual.less

@ -339,7 +339,7 @@
}
.hover-visible(@cls) {
& .@{cls} {
& .@{cls}:not(.bi-combo-popup) {
visibility: hidden;
}
&:hover {

19
src/widget/intervalslider/intervalslider.js

@ -26,7 +26,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
beforeMount: function () {
const { value, min, max } = this.options;
this.setMinAndMax({
this._setMinAndMax({
min,
max,
});
@ -260,12 +260,12 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
items: [
{
el: this.sliderOne,
top: 1,
top: 0,
bottom: 0,
left: 0
}, {
el: this.sliderTwo,
top: 1,
top: 0,
bottom: 0,
left: "100%"
}
@ -487,22 +487,23 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
},
setMinAndMax: function (v) {
_setMinAndMax: function (v) {
var minNumber = BI.parseFloat(v.min);
var maxNumber = BI.parseFloat(v.max);
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) {
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber)) {
this.min = minNumber;
this.max = maxNumber;
this.valueOne = minNumber;
this.valueTwo = maxNumber;
this.precision = this._getPrecision();
this.setEnable(true);
}
if (maxNumber === minNumber) {
this.setEnable(false);
}
},
setMinAndMax: function (v) {
this._setMinAndMax(v);
this.setEnable(v.min <= v.max);
},
setValue: function (v) {
var o = this.options;
var valueOne = BI.parseFloat(v.min);

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -49,6 +49,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}
return BI.extend(baseConfig, {
width: BI.toPix(o.width, 2),
height: BI.toPix(o.height, 2),
el: {
type: "bi.single_tree_trigger",
ref: function (_ref) {

14
src/widget/multitree/multi.tree.combo.js

@ -82,6 +82,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
self.numberCounter.setButtonChecked(val);
self.storeValue = { value: self.combo.getValue() };
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue());
self._dataChange = true;
}
}, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -92,6 +93,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,
action: function () {
clear = true;
self._dataChange = true;
self.setValue();
self._defaultState();
}
@ -180,12 +182,16 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
self.numberCounter.setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue());
self._dataChange = true;
});
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
if (isSearching()) {
return;
}
if (!this.isViewVisible()) {
self._dataChange = false; // 标记数据是否发生变化
}
if (change === true) {
self.storeValue = { value: self.combo.getValue() };
change = false;
@ -198,7 +204,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
if (isSearching()) {
self._stopEditing();
self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);
} else {
if (isPopupView()) {
self._stopEditing();
@ -206,12 +212,15 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
if (clear === true) {
self.storeValue = { value: {} };
}
self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);
}
}
clear = false;
change = false;
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.MultiTreeCombo.EVENT_AFTER_HIDEVIEW);
});
var triggerBtn = BI.createWidget({
type: "bi.trigger_icon_button",
@ -367,5 +376,6 @@ BI.MultiTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.MultiTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.MultiTreeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiTreeCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
BI.shortcut("bi.multi_tree_combo", BI.MultiTreeCombo);

11
src/widget/multitree/multi.tree.insert.combo.js

@ -56,6 +56,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
self.combo.setValue(self.storeValue);
self.numberCounter.setValue(self.storeValue);
self._stopEditing();
self._dataChange = true;
}
}]
}
@ -99,6 +100,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
self.numberCounter.setButtonChecked(val);
self.storeValue = { value: self.combo.getValue() };
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.getValue());
self._dataChange = true;
}
}, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -109,6 +111,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,
action: function () {
clear = true;
self._dataChange = true;
self.setValue();
self._defaultState();
}
@ -192,12 +195,16 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
self.numberCounter.setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
self._dataChange = true;
});
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
if (isSearching()) {
return;
}
if (!this.isViewVisible()) {
self._dataChange = false; // 标记数据是否发生变化
}
if (change === true) {
self.storeValue = { value: self.combo.getValue() };
change = false;
@ -210,7 +217,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
if (isSearching()) {
self._stopEditing();
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);
} else {
if (isPopupView()) {
self._stopEditing();
@ -218,7 +225,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
if (clear === true) {
self.storeValue = { value: {} };
}
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);
}
}
clear = false;

11
src/widget/multitree/multi.tree.list.combo.js

@ -59,6 +59,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
self.combo.setValue(self.storeValue);
self.numberCounter.setValue(self.storeValue);
self._stopEditing();
self._dataChange = true;
}
}]
}
@ -116,6 +117,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
self.numberCounter.setButtonChecked(val);
self.storeValue = { value: self.combo.getValue() };
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.getValue());
self._dataChange = true;
}
}, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -126,6 +128,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,
action: function () {
clear = true;
self._dataChange = true;
self.setValue();
self._defaultState();
}
@ -209,12 +212,16 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
self.numberCounter.setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
self._dataChange = true;
});
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
if (isSearching()) {
return;
}
if (!this.isViewVisible()) {
self._dataChange = false; // 标记数据是否发生变化
}
if (change === true) {
self.storeValue = { value: self.combo.getValue() };
change = false;
@ -227,7 +234,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
if (isSearching()) {
self.trigger.stopEditing();
self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
} else {
if (isPopupView()) {
self._stopEditing();
@ -235,7 +242,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
if (clear === true) {
self.storeValue = { value: [] };
}
self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
self._dataChange && self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);
}
}
clear = false;

3
typescript/index.ts

@ -145,6 +145,7 @@ import { ArrowTreeGroupNodeCheckbox } from "./case/checkbox/check.arrownode";
import { NumberInterval } from "./widget/numberinterval/numberinterval";
import { DynamicYearQuarterCombo } from "./widget/yearquarter/combo.yearquarter";
import { DynamicYearCombo } from "./widget/year/combo.year";
import { DynamicYearPopup } from "./widget/year/popup.year";
import { IntervalSlider } from "./widget/intervalslider/intervalslider";
import { MultiSelectInsertList } from "./widget/multiselectlist/multiselectlist.insert";
import { YearMonthInterval } from "./widget/yearmonthinterval/yearmonthinterval";
@ -350,6 +351,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
NumberInterval: typeof NumberInterval;
DynamicYearQuarterCombo: typeof DynamicYearQuarterCombo;
DynamicYearCombo: typeof DynamicYearCombo;
DynamicYearPopup: typeof DynamicYearPopup;
IntervalSlider: typeof IntervalSlider;
MultiSelectInsertList: typeof MultiSelectInsertList;
YearMonthInterval: typeof YearMonthInterval;
@ -546,6 +548,7 @@ export {
NumberInterval,
DynamicYearQuarterCombo,
DynamicYearCombo,
DynamicYearPopup,
IntervalSlider,
MultiSelectInsertList,
YearMonthInterval,

4
typescript/widget/datepane/datepane.ts

@ -4,8 +4,8 @@ export declare class DynamicDatePane extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string;
static Static: 1;
static Dynamic: 2;
static Static: number;
static Dynamic: number;
setMinDate(minDate: string): void;

4
typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -2,8 +2,8 @@ import { Single } from '../../base/single/single';
export declare class DynamicDateCombo extends Single {
static xtype: string;
static Static: 1;
static Dynamic: 2;
static Static: number;
static Dynamic: number;
static EVENT_KEY_DOWN: string;
static EVENT_CONFIRM: string;

4
typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts

@ -11,8 +11,8 @@ export declare class DynamicDateTimeCombo extends Single {
static EVENT_ERROR: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string;
static Static: 1;
static Dynamic: 2;
static Static: number;
static Dynamic: number;
props: {
minDate?: string;
maxDate?: string;

2
typescript/widget/year/combo.year.ts

@ -2,6 +2,8 @@ import { Widget } from "../../core/widget";
export declare class DynamicYearCombo extends Widget {
static xtype: string;
static Static: number;
static Dynamic: number;
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;

13
typescript/widget/year/popup.year.ts

@ -0,0 +1,13 @@
import { Widget } from '../../core/widget';
export declare class DynamicYearPopup extends Widget {
static xtype: string;
static BUTTON_CLEAR_EVENT_CHANGE: string;
static BUTTON_lABEL_EVENT_CHANGE: string;
static BUTTON_OK_EVENT_CHANGE: string;
static EVENT_CHANGE: string;
setMinDate(minDate?: string): void;
setMaxDate(maxDate?: string): void;
}
Loading…
Cancel
Save