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.

168 lines
4.0 KiB

import { shortcut, Widget, createWidget } from "@/core";
8 years ago
@shortcut()
export class Func extends Widget {
static xtype = "demo.combo2";
props = { baseCls: "demo-func" };
_createEl() {
8 years ago
return {
type: "bi.button",
height: 25,
text: "点击",
7 years ago
};
}
8 years ago
oneCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustLength: 5,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
height: 500,
8 years ago
},
maxHeight: 400,
},
8 years ago
});
}
8 years ago
twoCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "bottom,left",
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
height: 1200,
},
},
8 years ago
});
}
8 years ago
threeCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustYOffset: 5,
el: this._createEl(),
isNeedAdjustHeight: false,
popup: {
el: {
type: "bi.layout",
height: 1200,
},
},
8 years ago
});
}
8 years ago
fourCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "left",
el: this._createEl(),
isNeedAdjustHeight: true,
popup: {
el: {
type: "bi.layout",
height: 1200,
},
},
7 years ago
});
}
8 years ago
fiveCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "left,top",
el: this._createEl(),
isNeedAdjustHeight: true,
popup: {
el: {
type: "bi.layout",
height: 1200,
8 years ago
},
maxHeight: 2000,
},
7 years ago
});
}
8 years ago
sixCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "top,left",
el: this._createEl(),
isNeedAdjustHeight: true,
popup: {
el: {
type: "bi.layout",
height: 1200,
},
},
7 years ago
});
}
8 years ago
sevenCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "bottom",
isNeedAdjustWidth: false,
7 years ago
// isNeedAdjustHeight: false,
8 years ago
offsetStyle: "center",
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 200,
height: 1200,
},
},
7 years ago
});
}
8 years ago
eightCombo() {
return createWidget({
8 years ago
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "right",
isNeedAdjustWidth: false,
7 years ago
// isNeedAdjustHeight: false,
8 years ago
offsetStyle: "middle",
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 200,
height: 200,
},
},
7 years ago
});
}
8 years ago
render() {
8 years ago
return {
type: "bi.grid",
hgap: 10,
vgap: 5,
items: [
[this.oneCombo(), this.twoCombo(), this.threeCombo()],
8 years ago
[this.fourCombo(), this.fiveCombo(), this.sixCombo()],
[this.sevenCombo(), this.eightCombo()]
],
8 years ago
};
}
}