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.

63 lines
1.6 KiB

import { shortcut, Widget, createWidget } from "@/core";
@shortcut()
export class Func extends Widget {
static xtype = "demo.grid_view";
props = { baseCls: "demo-func" };
render() {
const items = [];
const rowCount = 10000,
columnCount = 100;
for (let i = 0; i < rowCount; i++) {
8 years ago
items[i] = [];
for (let j = 0; j < columnCount; j++) {
8 years ago
items[i][j] = {
type: "bi.label",
text: `${i}-${j}`,
7 years ago
};
8 years ago
}
}
const grid = createWidget({
8 years ago
type: "bi.grid_view",
8 years ago
width: 400,
height: 300,
estimatedRowSize: 30,
estimatedColumnSize: 100,
items,
8 years ago
scrollTop: 100,
rowHeightGetter() {
8 years ago
return 30;
},
columnWidthGetter() {
8 years ago
return 100;
},
8 years ago
});
createWidget({
8 years ago
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
}
}