Holiday 3 years ago
parent
commit
a72a8b64e2
  1. 2
      package.json
  2. 2
      src/base/combination/bubble.js
  3. 32
      src/base/combination/combo.js
  4. 68
      src/base/layer/layer.popup.js
  5. 75
      src/base/single/button/listitem/blankiconicontextitem.js
  6. 81
      src/base/single/button/listitem/blankicontexticonitem.js
  7. 62
      src/base/single/button/listitem/blankicontextitem.js
  8. 76
      src/base/single/button/listitem/icontexticonitem.js
  9. 55
      src/base/single/button/listitem/icontextitem.js
  10. 56
      src/base/single/button/listitem/texticonitem.js
  11. 76
      src/base/single/button/node/icontexticonnode.js
  12. 54
      src/base/single/button/node/icontextnode.js
  13. 54
      src/base/single/button/node/texticonnode.js
  14. 53
      src/case/ztree/0.treeview.js
  15. 20
      src/case/ztree/1.asynctree.js
  16. 2
      src/case/ztree/jquery.ztree.excheck-3.5.js
  17. 61
      src/less/base/combo/combo.bubble.less
  18. 4
      src/less/base/single/input/checkbox.less
  19. 4
      src/less/base/single/input/radio.less
  20. 1
      src/less/base/single/label.less
  21. 1
      src/less/base/single/text.less
  22. 28
      src/less/base/tree/ztree.less
  23. 18
      src/less/base/view/popupview.less

2
package.json

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

2
src/base/combination/bubble.js

@ -332,7 +332,7 @@
name: "offset", name: "offset",
options: { options: {
offset: function () { offset: function () {
return [o.adjustXOffset, (o.showArrow ? 9 : 0) + (o.adjustYOffset || o.adjustLength)]; return [o.adjustXOffset, (o.showArrow ? 9 : 0) + (o.adjustYOffset + o.adjustLength)];
} }
} }
}]; }];

32
src/base/combination/combo.js

@ -213,64 +213,64 @@
switch (o.direction) { switch (o.direction) {
case "bottom": case "bottom":
case "bottom,right": case "bottom,right":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break; break;
case "top": case "top":
case "top,right": case "top,right":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break; break;
case "left": case "left":
case "left,bottom": case "left,bottom":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break; break;
case "right": case "right":
case "right,bottom": case "right,bottom":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break; break;
case "top,left": case "top,left":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break; break;
case "bottom,left": case "bottom,left":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break; break;
case "left,top": case "left,top":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break; break;
case "right,top": case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break; break;
case "right,innerRight": case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break; break;
case "right,innerLeft": case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break; break;
case "innerRight": case "innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerRight", "innerLeft", "right", "left", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerRight", "innerLeft", "right", "left", "bottom", "top"], o.offsetStyle);
break; break;
case "innerLeft": case "innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerLeft", "innerRight", "left", "right", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerLeft", "innerRight", "left", "right", "bottom", "top"], o.offsetStyle);
break; break;
case "top,custom": case "top,custom":
case "custom,top": case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight); p = BI.DOM.getTopAdaptPosition(combo, this.popupView, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight);
p.dir = "top"; p.dir = "top";
break; break;
case "custom,bottom": case "custom,bottom":
case "bottom,custom": case "bottom,custom":
p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight); p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, (o.adjustYOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight);
p.dir = "bottom"; p.dir = "bottom";
break; break;
case "left,custom": case "left,custom":
case "custom,left": case "custom,left":
p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0)); p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0));
delete p.top; delete p.top;
delete p.adaptHeight; delete p.adaptHeight;
p.dir = "left"; p.dir = "left";
break; break;
case "custom,right": case "custom,right":
case "right,custom": case "right,custom":
p = BI.DOM.getRightAdaptPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0)); p = BI.DOM.getRightAdaptPosition(combo, this.popupView, (o.adjustXOffset + o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0));
delete p.top; delete p.top;
delete p.adaptHeight; delete p.adaptHeight;
p.dir = "right"; p.dir = "right";

68
src/base/layer/layer.popup.js

@ -104,6 +104,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
cls: "bubble-arrow" cls: "bubble-arrow"
}] }]
}); });
this.arrowWrapper = BI.createWidget({
type: "bi.absolute",
items: [{
el: this.arrow,
}]
})
// 因为三角符号的原因位置变大了,需要占位 // 因为三角符号的原因位置变大了,需要占位
this.placeholder = BI.createWidget({ this.placeholder = BI.createWidget({
type: "bi.layout" type: "bi.layout"
@ -112,7 +118,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.arrow el: this.arrowWrapper,
left: 0,
top: 0,
}, { }, {
el: this.placeholder el: this.placeholder
}] }]
@ -174,8 +182,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
}, },
setDirection: function (direction, position) { setDirection: function (direction, position) {
if (this.options.showArrow) { var o = this.options;
var style, placeholderStyle; if (o.showArrow) {
var style, wrapperStyle, placeholderStyle;
var adjustXOffset = position.adjustXOffset || 0; var adjustXOffset = position.adjustXOffset || 0;
var adjustYOffset = position.adjustYOffset || 0; var adjustYOffset = position.adjustYOffset || 0;
var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds(); var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds();
@ -204,6 +213,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
// 5表示留出一定的空间 // 5表示留出一定的空间
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft) left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft)
}; };
wrapperStyle = {
top: o.tgap + o.vgap,
left: 0,
right: "",
bottom: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
@ -217,6 +232,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight)
}; };
wrapperStyle = {
bottom: o.bgap + o.vgap,
left: "",
right: 0,
top: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
@ -231,12 +252,18 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft) left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft)
}; };
wrapperStyle = {
bottom: o.bgap + o.vgap,
left: 0,
right: "",
top: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
height: this._const.TRIANGLE_LENGTH, height: this._const.TRIANGLE_LENGTH,
top: "", top: "",
bottom: -this._const.TRIANGLE_LENGTH bottom: -this._const.TRIANGLE_LENGTH,
}; };
break; break;
case "top,left": case "top,left":
@ -244,12 +271,18 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight)
}; };
wrapperStyle = {
bottom: o.bgap + o.vgap,
right: 0,
left: "",
top: "",
};
placeholderStyle = { placeholderStyle = {
left: 0, left: 0,
right: 0, right: 0,
height: this._const.TRIANGLE_LENGTH, height: this._const.TRIANGLE_LENGTH,
top: "", top: "",
bottom: -this._const.TRIANGLE_LENGTH bottom: -this._const.TRIANGLE_LENGTH,
}; };
break; break;
case "left": case "left":
@ -258,6 +291,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop) top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop)
}; };
wrapperStyle = {
right: o.rgap + o.hgap,
top: 0,
bottom: "",
left: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -271,6 +310,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom) bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom)
}; };
wrapperStyle = {
right: o.rgap + o.hgap,
bottom: 0,
top: "",
left: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -285,6 +330,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop) top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop)
}; };
wrapperStyle = {
left: o.lgap + o.hgap,
top: 0,
bottom: "",
right: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -298,6 +349,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
style = { style = {
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom) bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom)
}; };
wrapperStyle = {
left: o.lgap + o.hgap,
bottom: 0,
top: "",
right: "",
};
placeholderStyle = { placeholderStyle = {
top: 0, top: 0,
bottom: 0, bottom: 0,
@ -317,6 +374,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
} }
this.element.removeClass("left").removeClass("right").removeClass("top").removeClass("bottom").addClass(direction); this.element.removeClass("left").removeClass("right").removeClass("top").removeClass("bottom").addClass(direction);
this.arrow.element.css(style); this.arrow.element.css(style);
this.arrowWrapper.element.css(wrapperStyle);
this.placeholder.element.css(placeholderStyle); this.placeholder.element.css(placeholderStyle);
} }
}, },

75
src/base/single/button/listitem/blankiconicontextitem.js

@ -27,45 +27,44 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
var blank = BI.createWidget({
type: "bi.layout",
width: o.blankWidth,
height: o.height
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon1 = BI.createWidget({
type: "bi.icon_button",
cls: o.iconCls1,
forceNotSelected: true,
width: o.height,
height: o.height
});
this.icon2 = BI.createWidget({
type: "bi.icon_button",
cls: o.iconCls2,
forceNotSelected: true,
width: o.height,
height: o.height
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.blankWidth, o.leftIconWrapperWidth || o.height, o.rightIconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon1, this.icon2, this.text) items: [{
})))); type: "bi.layout",
width: o.blankWidth
}, {
type: "bi.icon_label",
cls: o.iconCls1,
width: o.leftIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

81
src/base/single/button/listitem/blankicontexticonitem.js

@ -28,57 +28,44 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.blankWidth, o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
},
top: 0,
bottom: 0,
right: 0
}]
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.layout", type: "bi.layout",
width: o.blankWidth width: o.blankWidth
}, icon1, this.text, { }, {
type: "bi.layout", type: "bi.icon_label",
width: o.height cls: o.iconCls1,
}) width: o.leftIconWrapperWidth || o.height,
})))); height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

62
src/base/single/button/listitem/blankicontextitem.js

@ -26,38 +26,38 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
var blank = BI.createWidget({
type: "bi.layout",
width: o.blankWidth
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
cls: o.iconCls,
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.blankWidth, "fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", blank, this.icon, this.text) items: [{
})))); type: "bi.layout",
width: o.blankWidth
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

76
src/base/single/button/listitem/icontexticonitem.js

@ -27,55 +27,41 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.leftIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
var blank = BI.createWidget({
type: "bi.layout",
width: o.height
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: { type: "bi.icon_label",
type: "bi.icon_label", cls: o.iconCls1,
cls: o.iconCls2, width: o.leftIconWrapperWidth || o.height,
width: o.rightIconWrapperWidth || o.height, height: o.height,
height: o.height, iconWidth: o.iconWidth,
iconWidth: o.iconWidth, iconHeight: o.iconHeight
iconHeight: o.iconHeight }, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
}, },
top: 0, textAlign: "left",
bottom: 0, hgap: o.textHgap,
right: 0 vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}] }]
}); };
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank)
}))));
}, },
doClick: function () { doClick: function () {

55
src/base/single/button/listitem/icontextitem.js

@ -27,34 +27,35 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, { columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text) items: [{
})))); type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

56
src/base/single/button/listitem/texticonitem.js

@ -15,6 +15,7 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
iconWrapperWidth: null,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
iconCls: "", iconCls: "",
@ -26,34 +27,35 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
cls: o.iconCls,
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: ["fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) items: [{
})))); type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

76
src/base/single/button/node/icontexticonnode.js

@ -25,55 +25,41 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
var icon1 = BI.createWidget({ return {
type: "bi.icon_label", type: "bi.vertical_adapt",
cls: o.iconCls1, columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height],
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
var blank = BI.createWidget({
type: "bi.layout",
width: o.height,
height: o.height
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{ items: [{
el: { type: "bi.icon_label",
type: "bi.icon_label", cls: o.iconCls1,
cls: o.iconCls2, width: o.leftIconWrapperWidth || o.height,
width: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
}, },
top: 0, textAlign: "left",
bottom: 0, hgap: o.textHgap,
right: 0 vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls2,
width: o.rightIconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}] }]
}); };
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank)
}))));
}, },
doClick: function () { doClick: function () {

54
src/base/single/button/node/icontextnode.js

@ -24,33 +24,35 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: [o.iconWrapperWidth || o.height, "fill"],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon, this.text) items: [{
})))); type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}, {
type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}]
};
}, },
doClick: function () { doClick: function () {

54
src/base/single/button/node/texticonnode.js

@ -23,33 +23,35 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
}, },
render: function () { render: function () {
var o = this.options, c = this._const; var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
});
this.icon = BI.createWidget({
type: "bi.icon_label",
width: o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
});
BI.createWidget(BI.extend({ return {
element: this type: "bi.vertical_adapt",
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { columnSize: ["fill", o.iconWrapperWidth || o.height],
items: BI.LogicFactory.createLogicItemsByDirection("left", this.text, this.icon) items: [{
})))); type: "bi.label",
ref: function (_ref) {
self.text = _ref;
},
cls: "list-item-text",
textAlign: "left",
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
value: o.value,
keyword: o.keyword,
height: o.height
}, {
type: "bi.icon_label",
cls: o.iconCls,
width: o.iconWrapperWidth || o.height,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}]
};
}, },
doClick: function () { doClick: function () {

53
src/case/ztree/0.treeview.js

@ -140,7 +140,9 @@ BI.TreeView = BI.inherit(BI.Pane, {
} }
return true; return true;
} }
BI.Msg.toast("Please Wait。", "warning"); // 不展开节点,也不触发onExpand事件 BI.Msg.toast("Please Wait。", {
level: "warning"
}); // 不展开节点,也不触发onExpand事件
return false; return false;
} }
@ -184,6 +186,9 @@ BI.TreeView = BI.inherit(BI.Pane, {
} }
function beforeCheck (treeId, treeNode) { function beforeCheck (treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
// 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下 // 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下
var status = treeNode.getCheckStatus(); var status = treeNode.getCheckStatus();
treeNode.halfCheck = false; treeNode.halfCheck = false;
@ -213,14 +218,23 @@ BI.TreeView = BI.inherit(BI.Pane, {
} }
function onCheck (event, treeId, treeNode) { function onCheck (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._selectTreeNode(treeId, treeNode); self._selectTreeNode(treeId, treeNode);
} }
function onExpand (event, treeId, treeNode) { function onExpand (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false; treeNode.halfCheck = false;
} }
function onCollapse (event, treeId, treeNode) { function onCollapse (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
} }
return setting; return setting;
@ -335,22 +349,33 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; // n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text; // n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) { // if (n.text === null) {
n.text = ""; // n.text = "";
} // }
if (BI.isNull(n.title)) { if (BI.isNull(n.title)) {
n.title = n.text; n.title = n.text;
} }
// 处理标红 var text = BI.createWidget(BI.extend({
if (BI.isNotNull(n.text)) { type: "bi.text",
if (BI.isKey(o.paras.keyword)) { cls: "tree-node-text",
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); css: {
} else { display: "inline"
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); },
} root: true
} }, n));
var fragment = BI.Widget._renderEngine.createElement("<div>");
fragment.append(text.element[0]);
n.text = fragment.html();
// // 处理标红
// if (BI.isNotNull(n.text)) {
// if (BI.isKey(o.paras.keyword)) {
// n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
// } else {
// n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
// }
// }
}); });
return nodes; return nodes;
}, },

20
src/case/ztree/1.asynctree.js

@ -59,6 +59,9 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
}; };
function onClick (event, treeId, treeNode) { function onClick (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
var zTree = BI.$.fn.zTree.getZTreeObj(treeId); var zTree = BI.$.fn.zTree.getZTreeObj(treeId);
// 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选 // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选
var checked = treeNode.checked; var checked = treeNode.checked;
@ -70,6 +73,9 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
} }
function beforeCheck (treeId, treeNode) { function beforeCheck (treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
// 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下 // 下面主动修改了node的halfCheck属性, 节点属性的判断依赖halfCheck,改之前就获取一下
var status = treeNode.getCheckStatus(); var status = treeNode.getCheckStatus();
treeNode.halfCheck = false; treeNode.halfCheck = false;
@ -98,18 +104,30 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
} }
function beforeExpand (treeId, treeNode) { function beforeExpand (treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._beforeExpandNode(treeId, treeNode); self._beforeExpandNode(treeId, treeNode);
} }
function onCheck (event, treeId, treeNode) { function onCheck (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._selectTreeNode(treeId, treeNode); self._selectTreeNode(treeId, treeNode);
} }
function onExpand (event, treeId, treeNode) { function onExpand (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false; treeNode.halfCheck = false;
} }
function onCollapse (event, treeId, treeNode) { function onCollapse (event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false; treeNode.halfCheck = false;
} }
@ -245,4 +263,4 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
} }
}); });
BI.shortcut("bi.async_tree", BI.AsyncTree); BI.shortcut("bi.async_tree", BI.AsyncTree);

2
src/case/ztree/jquery.ztree.excheck-3.5.js

@ -455,7 +455,7 @@
chClass += ' bi-checkbox checkbox-content'; chClass += ' bi-checkbox checkbox-content';
break; break;
} }
return chClass; return chClass + (node.disabled ? " disabled" : "");
}, },
repairAllChk: function(setting, checked) { repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {

61
src/less/base/combo/combo.bubble.less

@ -1,57 +1,12 @@
@import "../../index"; @import "../../index";
.bi-bubble-combo { // .bi-bubble-combo {
& .button-combo-triangle-wrapper { // & .button-combo-triangle-wrapper {
position: fixed !important; // position: fixed !important;
// 消除祖先节点设置的line-height:normal对空白节点的行高影响 // // 消除祖先节点设置的line-height:normal对空白节点的行高影响
line-height: 0; // line-height: 0;
.z-index-layer(@zIndex-popup); // .z-index-layer(@zIndex-popup);
// ie10一下无背景色会鼠标穿透 // // ie10一下无背景色会鼠标穿透
.background-color(@color-bi-background-default, 0); // .background-color(@color-bi-background-default, 0);
}
& .bubble-combo-triangle-left {
z-index: 1;
.triangle-right();
}
& .bubble-combo-triangle-right {
z-index: 1;
.triangle-left();
}
& .bubble-combo-triangle-top {
z-index: 1;
.triangle-bottom();
}
& .bubble-combo-triangle-bottom {
z-index: 1;
.triangle-top();
}
& .bubble-combo-triangle-left, & .bubble-combo-triangle-right, & .bubble-combo-triangle-top, & .bubble-combo-triangle-bottom {
&:before {
background-color: @color-bi-background-bubble-combo-triangle;
}
&.bi-primary:before {
background-color: @background-color-card-primary;
}
}
}
// .bi-combo-popup .bi-bubble-popup-view {
// &.bi-zoom-big-leave{
// .zoom-big-motion-enter();
// }
// &.bi-zoom-big-leave-active{
// .zoom-big-motion-enter-active();
// } // }
// } // }
.bi-theme-dark {
.bi-bubble-combo {
& .bubble-combo-triangle-left, & .bubble-combo-triangle-right, & .bubble-combo-triangle-top, & .bubble-combo-triangle-bottom {
&:before {
background-color: @color-bi-background-bubble-combo-triangle-theme-dark;
border-bottom: 1px solid @color-bi-border-bubble-combo-triangle-theme-dark;
border-right: 1px solid @color-bi-border-bubble-combo-triangle-theme-dark;
}
}
}
}

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

@ -27,7 +27,7 @@
border-color: @color-bi-border-hover-active-checkbox; border-color: @color-bi-border-hover-active-checkbox;
} }
} }
&.active, &:active { &.active {
& .checkbox-content, &.checkbox-content{ & .checkbox-content, &.checkbox-content{
border-color: @color-bi-border-hover-active-checkbox; border-color: @color-bi-border-hover-active-checkbox;
background-color: @color-bi-background-active-checkbox; background-color: @color-bi-background-active-checkbox;
@ -65,7 +65,7 @@
border-color: @color-bi-border-hover-active-checkbox-theme-dark; border-color: @color-bi-border-hover-active-checkbox-theme-dark;
} }
} }
&.active, &:active { &.active {
& .checkbox-content, &.checkbox-content { & .checkbox-content, &.checkbox-content {
border-color: @color-bi-border-hover-active-checkbox-theme-dark; border-color: @color-bi-border-hover-active-checkbox-theme-dark;
background-color: @color-bi-background-active-checkbox-theme-dark; background-color: @color-bi-background-active-checkbox-theme-dark;

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

@ -13,7 +13,7 @@
border-color: @color-bi-border-hover-active-radio; border-color: @color-bi-border-hover-active-radio;
} }
} }
&:active, &.active { &.active {
& .radio-content, &.radio-content { & .radio-content, &.radio-content {
border-color: @color-bi-border-hover-active-radio; border-color: @color-bi-border-hover-active-radio;
background-color: @color-bi-background-active-radio; background-color: @color-bi-background-active-radio;
@ -59,7 +59,7 @@
border-color: @color-bi-border-hover-active-radio-theme-dark; border-color: @color-bi-border-hover-active-radio-theme-dark;
} }
} }
&.active, &:active { &.active {
& .radio-content, &.radio-content { & .radio-content, &.radio-content {
border-color:@color-bi-border-hover-active-radio-theme-dark; border-color:@color-bi-border-hover-active-radio-theme-dark;
&:after { &:after {

1
src/less/base/single/label.less

@ -2,5 +2,6 @@
.bi-label { .bi-label {
.overflow-hidden(); .overflow-hidden();
word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }

1
src/less/base/single/text.less

@ -3,5 +3,6 @@
.bi-text { .bi-text {
.overflow-hidden(); .overflow-hidden();
.box-sizing(border-box); .box-sizing(border-box);
word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }

28
src/less/base/tree/ztree.less

@ -76,12 +76,16 @@
text-decoration: none; text-decoration: none;
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
&:hover { .tree-node-text {
.background-color(@color-bi-background-highlight, 10%); &:not(.disabled) {
} &:hover {
&:active { .background-color(@color-bi-background-highlight, 10%);
color: @color-bi-text-highlight; }
.background-color(@color-bi-background-highlight, 15%); &:active {
color: @color-bi-text-highlight;
.background-color(@color-bi-background-highlight, 15%);
}
}
} }
} }
@ -161,7 +165,17 @@
box-sizing: border-box; box-sizing: border-box;
&.active { &.active {
background-color: @color-bi-background-highlight; background-color: @color-bi-background-highlight;
border-color: @color-bi-border-highlight;; border-color: @color-bi-border-highlight;
}
&.disabled {
border: 1px solid @color-bi-border-disabled;
background-color: @color-bi-background-disabled;
&.active {
border-color: @color-bi-border-disabled;
&:after {
opacity: 0;
}
}
} }
} }
&.bi-half-button { &.bi-half-button {

18
src/less/base/view/popupview.less

@ -28,34 +28,42 @@
} }
.bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top { .bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
bottom: -12px; bottom: -12px;
width: 14px;
> .bubble-arrow { > .bubble-arrow {
bottom: 8px; bottom: 8px;
left: 1px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom { .bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
top: -12px; top: -12px;
width: 14px;
> .bubble-arrow { > .bubble-arrow {
top: 8px; top: 8px;
left: 1px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left { .bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
right: -12px; right: -12px;
height: 14px;
> .bubble-arrow { > .bubble-arrow {
right: 8px; right: 8px;
top: 1px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right { .bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right {
> .bi-bubble-arrow { > div > .bi-bubble-arrow {
left: -12px; left: -12px;
height: 14px;
> .bubble-arrow { > .bubble-arrow {
left: 8px; left: 8px;
top: 1px;
} }
} }
} }
@ -63,6 +71,8 @@
.bi-bubble-arrow { .bi-bubble-arrow {
width: 12px; width: 12px;
height: 12px; height: 12px;
// 消除祖先节点设置的line-height:normal对空白节点的行高影响
line-height: 0;
overflow: hidden; overflow: hidden;
.bubble-arrow { .bubble-arrow {
width: 12px; width: 12px;

Loading…
Cancel
Save