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.

84 lines
2.6 KiB

8 years ago
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
7 years ago
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.multi_select_item",
height: 25,
handler: function (v) {
}
7 years ago
});
7 years ago
},
8 years ago
render: function () {
7 years ago
var self = this;
8 years ago
var items = [{
7 years ago
text: "2010年", value: 2010, py: "2010n", title: "1111111111111111111111111111111111"
}, {
text: "2011年", value: 2011, py: "2011n", title: "1111111111111111111111111111111111"
}, {
text: "2012年", value: 2012, py: "2012n", title: "1111111111111111111111111111111111"
}, {
text: "2013年", value: 2013, py: "2013n", title: "1111111111111111111111111111111111"
}, {
text: "2014年", value: 2014, py: "2014n", title: "1111111111111111111111111111111111"
}, {
text: "2015年", value: 2015, py: "2015n", title: "1111111111111111111111111111111111"
}, {
text: "2016年", value: 2016, py: "2016n", title: "1111111111111111111111111111111111"
8 years ago
}, {
7 years ago
text: "2017年", value: 2017, py: "2017n", title: "1111111111111111111111111111111111"
8 years ago
}];
7 years ago
var adapter = BI.createWidget({
8 years ago
type: "bi.button_group",
7 years ago
cls: "layout-bg1",
items: this._createItems(items),
chooseType: 1,
behaviors: {},
8 years ago
layouts: [{
type: "bi.vertical"
}]
});
7 years ago
BI.createWidget({
8 years ago
type: "bi.absolute",
7 years ago
element: this,
items: [{
el: adapter,
top: 50,
left: 50,
width: 200,
height: 100
}]
});
BI.createWidget({
type: "bi.absolute",
element: this,
8 years ago
items: [{
el: {
7 years ago
type: "bi.absolute",
width: 200,
height: 30,
items: [{
el: {
type: "bi.searcher",
adapter: adapter,
width: 200,
height: 30
},
left: 0,
right: 0,
top: 0,
bottom: 0
}]
8 years ago
},
7 years ago
top: 100,
left: 300
8 years ago
}]
7 years ago
});
8 years ago
}
});
BI.shortcut("demo.searcher", Demo.Func);