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.

74 lines
2.2 KiB

import { shortcut, Widget, createWidget, createItems } from "@/core";
7 years ago
@shortcut()
export class Func extends Widget {
static xtype = "demo.switcher";
props = { baseCls: "demo-func" };
render() {
const adapter = createWidget({
7 years ago
type: "bi.label",
cls: "layout-bg2",
text: "将在该处弹出switcher",
7 years ago
});
createWidget({
7 years ago
type: "bi.absolute",
element: this,
items: [
{
el: adapter,
top: 50,
left: 20,
width: 200,
height: 300,
}
],
7 years ago
});
createWidget({
7 years ago
type: "bi.vertical",
element: this,
hgap: 30,
vgap: 20,
items: [
{
type: "bi.switcher",
el: {
type: "bi.button",
height: 25,
text: "Switcher",
},
popup: {
cls: "mvc-border layout-bg5",
items: createItems(
[
{
text: "项目1",
value: 1,
},
{
text: "项目2",
value: 2,
},
{
text: "项目3",
value: 3,
},
{
text: "项目4",
value: 4,
}
],
{
type: "bi.single_select_item",
height: 25,
}
),
},
adapter,
}
],
7 years ago
});
7 years ago
}
}