Browse Source

Merge pull request #162038 in DEC/fineui from release/11.0 to bugfix/11.0

* commit '40f5689193d4af914e4e9605d15fc36f42e05e2b':
  无JIRA任务 图标更新
  Pull request #3033: REPORT-79369 fix:修正按钮文字计算公式 & 无jira feat:补充按钮ts类型
  JSY-22302 fix: text无法点击
  无JIRA fix: nor_bar 复选下拉框切换箭头
research/test
superman 2 years ago
parent
commit
4d1cf69412
  1. 4
      demo/js/base/button/demo.button.js
  2. BIN
      dist/font/iconfont.eot
  3. 44
      dist/font/iconfont.svg
  4. BIN
      dist/font/iconfont.ttf
  5. BIN
      dist/font/iconfont.woff
  6. BIN
      dist/font/iconfont.woff2
  7. 2
      src/base/single/1.text.js
  8. 5
      src/base/single/button/buttons/button.js
  9. 6
      src/less/widget/multiselect/multiselect.combo.less
  10. 22
      src/widget/multiselect/multiselect.combo.nobar.js
  11. 11
      typescript/base/single/button/buttons/button.ts

4
demo/js/base/button/demo.button.js

@ -381,6 +381,10 @@ Demo.Button = BI.inherit(BI.Widget, {
text: "文字偏左的按钮",
textAlign: "left",
width: 200,
}, {
type: "bi.button",
text: "小于最小宽度的按钮",
width: 50,
}];
return {

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

44
dist/font/iconfont.svg vendored

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 692 KiB

After

Width:  |  Height:  |  Size: 699 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

2
src/base/single/1.text.js

@ -65,7 +65,7 @@
tagName: "span",
});
this.text.element.click(function (e) {
!o.disabled && o.invalid && o.handler.call(self, self.getValue(), self, e);
!o.disabled && !o.invalid && o.handler.call(self, self.getValue(), self, e);
});
BI.createWidget({
type: "bi.default",

5
src/base/single/button/buttons/button.js

@ -107,8 +107,9 @@
});
}
// 用于 whiteSpace
var textWidth = iconInvisible && o.width ? o.width - o.hgap * 2 : null;
// 用户可能设置的 width 小于按钮的最小宽度
var actualWidth = (o.minWidth > 0 && o.width < o.minWidth) ? o.minWidth : o.width;
var textWidth = iconInvisible && o.width ? actualWidth - o.hgap * 2 : null;
if (BI.isNotNull(o.textWidth)) {
// textWidth 需要减去图标
textWidth = o.textWidth - (iconInvisible || isVertical(o.iconPosition) ? 0 : this._const.iconWidth);

6
src/less/widget/multiselect/multiselect.combo.less

@ -1,9 +1,12 @@
@import "../../index.less";
@val: transform .3s ease;
.bi-multi-select-combo{
.bi-multi-select-combo, .bi-multi-select-combo-no-bar {
& .multi-select-trigger-icon-button {
font-size: @font-size-16;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
@ -11,6 +14,7 @@
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);

22
src/widget/multiselect/multiselect.combo.nobar.js

@ -174,7 +174,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
value: o.value
},
hideChecker: function (e) {
return self.numberCounter.element.find(e.target).length === 0;
return triggerBtn.element.find(e.target).length === 0 && self.numberCounter.element.find(e.target).length === 0;
}
});
@ -199,6 +199,21 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
}
});
var triggerBtn = BI.createWidget({
type: "bi.trigger_icon_button",
width: o.height,
height: o.height,
cls: "multi-select-trigger-icon-button"
});
triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {
self.numberCounter.hideView();
if (self.combo.isViewVisible()) {
self.combo.hideView();
} else {
self.combo.showView();
}
});
this.numberCounter = BI.createWidget({
type: "bi.multi_select_check_selected_switcher",
masker: {
@ -252,6 +267,11 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
right: 0,
top: 0,
bottom: 0
}, {
el: triggerBtn,
right: 0,
top: 0,
bottom: 0
}, {
el: {
type: "bi.vertical_adapt",

11
typescript/base/single/button/buttons/button.ts

@ -14,6 +14,9 @@ export declare class Button extends BasicButton {
block?: boolean; // 是否块状显示,即不显示边框,没有最小宽度的限制
clear?: boolean; // 是否去掉边框和背景
ghost?: boolean; // 是否幽灵显示, 即正常状态无背景
iconGap?: number;
iconPosition?: string;
textWidth?: number;
} & AbstractLabel['props'] & IconLabel['props'] & BasicButton['props'];
text: Label;
@ -26,4 +29,12 @@ export declare class Button extends BasicButton {
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
loading(): void;
loaded(): void;
setIcon(iconCls: string): void;
isLoading(): boolean;
}

Loading…
Cancel
Save