fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.4 KiB

import { shortcut, Widget, createWidget } from "@/core";
8 years ago
@shortcut()
export class BorderLayout extends Widget {
static xtype = "demo.border";
props = { baseCls: "demo-border" };
_createNorth() {
return createWidget({
8 years ago
type: "bi.label",
text: "North",
cls: "layout-bg1",
height: 30,
7 years ago
});
}
8 years ago
_createWest() {
return createWidget({
8 years ago
type: "bi.center",
cls: "layout-bg2",
items: [
{
type: "bi.label",
text: "West",
whiteSpace: "normal",
}
],
7 years ago
});
}
8 years ago
_createCenter() {
return createWidget({
8 years ago
type: "bi.center",
cls: "layout-bg3",
items: [
{
type: "bi.label",
text: "Center",
whiteSpace: "normal",
}
],
7 years ago
});
}
8 years ago
_createEast() {
return createWidget({
8 years ago
type: "bi.center",
cls: "layout-bg5",
items: [
{
type: "bi.label",
text: "East",
whiteSpace: "normal",
}
],
7 years ago
});
}
8 years ago
_createSouth() {
return createWidget({
8 years ago
type: "bi.label",
text: "South",
cls: "layout-bg6",
height: 50,
7 years ago
});
}
8 years ago
render() {
8 years ago
return {
type: "bi.border",
cls: "",
items: {
north: {
el: this._createNorth(),
height: 30,
top: 20,
left: 20,
right: 20,
8 years ago
},
south: {
el: this._createSouth(),
height: 50,
bottom: 20,
left: 20,
right: 20,
8 years ago
},
west: {
el: this._createWest(),
width: 200,
left: 20,
8 years ago
},
east: {
el: this._createEast(),
width: 300,
right: 20,
8 years ago
},
center: this._createCenter(),
},
7 years ago
};
8 years ago
}
}