fineui是帆软报表和BI产品线所使用的前端框架。

57 lines
1.6 KiB

8 years ago
/**
* 可以理解为MultiPopupView和Panel两个面板的结合体
* @class BI.PopupPanel
* @extends BI.MultiPopupView
*/
import { shortcut, extend, createWidget } from "@/core";
import { IconButton } from "@/base";
import { MultiPopupView } from "./layer.multipopup";
@shortcut()
export class PopupPanel extends MultiPopupView {
static xtype = "bi.popup_panel";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_CLOSE = "EVENT_CLOSE";
static EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
_defaultConfig () {
const conf = super._defaultConfig(...arguments);
return extend(conf, {
baseCls: `${conf.baseCls || ""} bi-popup-panel`,
title: "",
7 years ago
});
}
8 years ago
_createTool () {
const o = this.options;
const close = createWidget({
8 years ago
type: "bi.icon_button",
cls: "close-h-font",
width: 25,
height: 25,
8 years ago
});
close.on(IconButton.EVENT_CHANGE, () => {
this.setVisible(false);
this.fireEvent(PopupPanel.EVENT_CLOSE);
8 years ago
});
return createWidget({
8 years ago
type: "bi.htape",
7 years ago
cls: "popup-panel-title bi-header-background",
8 years ago
height: 25,
items: [{
el: {
type: "bi.label",
textAlign: "left",
text: o.title,
height: 25,
lgap: 10,
},
8 years ago
}, {
el: close,
width: 25,
}],
8 years ago
});
}
}