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.
 
 
 

78 lines
2.7 KiB

import { shortcut, Widget, UUID } from "@/core";
import { Layers } from "@/base";
@shortcut()
export class Func extends Widget {
static xtype = "demo.layer";
props = { baseCls: "demo-func" };
render() {
const self = this,
id1 = UUID(),
id2 = UUID();
return {
type: "bi.vertical",
vgap: 10,
items: [
{
type: "bi.button",
text: "create形式创建layer, 遮住当前面板, 返回创建的面板对象",
height: 30,
handler() {
Layers.create(id1, self, {
// 偏移量
offset: {
left: 10,
right: 10,
top: 10,
bottom: 10,
},
type: "bi.center_adapt",
cls: "bi-card",
items: [
{
type: "bi.button",
text: "点击关闭",
handler() {
Layers.hide(id1);
},
}
],
});
Layers.show(id1);
},
},
{
type: "bi.button",
text: "make形式创建layer,可以指定放到哪个面板内,这里指定当前面板(默认放在body下撑满), 返回创建的面板对象",
height: 30,
handler() {
Layers.make(id2, self, {
// 偏移量
offset: {
left: 10,
right: 10,
top: 10,
bottom: 10,
},
type: "bi.center_adapt",
cls: "bi-card",
items: [
{
type: "bi.button",
text: "点击关闭",
handler() {
Layers.remove(id2);
},
}
],
});
Layers.show(id2);
},
}
],
};
}
}