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.

54 lines
1.4 KiB

8 years ago
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var items = [];
var rowCount = 10000, columnCount = 100;
for (var i = 0; i < rowCount; i++) {
items[i] = [];
for (var j = 0; j < columnCount; j++) {
items[i][j] = {
type: "bi.label",
text: i + "-" + j
7 years ago
};
8 years ago
}
}
var grid = BI.createWidget({
type: "bi.grid_view",
8 years ago
width: 400,
height: 300,
estimatedRowSize: 30,
estimatedColumnSize: 100,
8 years ago
items: items,
scrollTop: 100,
rowHeightGetter: function () {
return 30;
},
columnWidthGetter: function () {
return 100;
}
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 1,
rows: 1,
items: [{
column: 0,
row: 0,
el: grid
}]
},
left: 10,
right: 10,
top: 10,
bottom: 10
}]
7 years ago
});
8 years ago
}
});
8 years ago
BI.shortcut("demo.grid_view", Demo.Func);