Browse Source

QFX-1511 refactor: popover header支持设置高度

es6
Kira 4 years ago
parent
commit
1942a78e78
  1. 10
      src/base/layer/layer.popover.js
  2. 2
      typescript/base/combination/combo.ts
  3. 8
      typescript/base/single/button/button.node.ts

10
src/base/layer/layer.popover.js

@ -10,7 +10,6 @@ BI.Popover = BI.inherit(BI.Widget, {
NORMAL: "normal", NORMAL: "normal",
BIG: "big" BIG: "big"
}, },
HEADER_HEIGHT: 40
}, },
_defaultConfig: function () { _defaultConfig: function () {
@ -23,6 +22,7 @@ BI.Popover = BI.inherit(BI.Widget, {
dynamic: false dynamic: false
}, },
header: null, header: null,
headerHeight: 40,
body: null, body: null,
footer: null, footer: null,
closable: true // BI-40839 是否显示右上角的关闭按钮 closable: true // BI-40839 是否显示右上角的关闭按钮
@ -61,7 +61,7 @@ BI.Popover = BI.inherit(BI.Widget, {
}) : { }) : {
type: "bi.label", type: "bi.label",
cls: "bi-font-bold", cls: "bi-font-bold",
height: this._constant.HEADER_HEIGHT, height: o.headerHeight,
text: o.header, text: o.header,
title: o.header, title: o.header,
textAlign: "left" textAlign: "left"
@ -75,7 +75,7 @@ BI.Popover = BI.inherit(BI.Widget, {
el: o.closable ? { el: o.closable ? {
type: "bi.icon_button", type: "bi.icon_button",
cls: "bi-message-close close-font", cls: "bi-message-close close-font",
height: this._constant.HEADER_HEIGHT, height: o.headerHeight,
handler: function () { handler: function () {
self.close(); self.close();
} }
@ -84,9 +84,9 @@ BI.Popover = BI.inherit(BI.Widget, {
}, },
width: 56 width: 56
}], }],
height: this._constant.HEADER_HEIGHT height: o.headerHeight
}, },
height: this._constant.HEADER_HEIGHT height: o.headerHeight
}, { }, {
el: o.logic.dynamic ? { el: o.logic.dynamic ? {
type: "bi.vertical", type: "bi.vertical",

2
typescript/base/combination/combo.ts

@ -15,6 +15,8 @@ export interface _Combo extends _Widget {
getPopupPosition(): any; getPopupPosition(): any;
adjustHeight(e?: MouseEvent): void;
toggle(): void; toggle(): void;
} }

8
typescript/base/single/button/button.node.ts

@ -1,11 +1,11 @@
import { _BasicButton } from "./button.basic"; import { _BasicButton } from "./button.basic";
export interface _NodeButton extends _BasicButton { export interface _NodeButton extends _BasicButton {
isOpened: () => void; isOpened(): void;
setOpened: (b: boolean) => void; setOpened(b: boolean): void;
triggerCollapse: () => void; triggerCollapse(): void;
triggerExpand: () => void; triggerExpand(): void;
} }

Loading…
Cancel
Save