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.
|
|
|
import { shortcut, Widget, createWidget } from "@/core";
|
|
|
|
|
|
|
|
@shortcut()
|
|
|
|
export class Func extends Widget {
|
|
|
|
static xtype = "demo.collection_view";
|
|
|
|
|
|
|
|
props = { baseCls: "demo-func" };
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const items = [];
|
|
|
|
const cellCount = 100;
|
|
|
|
for (let i = 0; i < cellCount; i++) {
|
|
|
|
items[i] = {
|
|
|
|
type: "bi.label",
|
|
|
|
text: i,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
const grid = createWidget({
|
|
|
|
type: "bi.collection_view",
|
|
|
|
width: 400,
|
|
|
|
height: 300,
|
|
|
|
items,
|
|
|
|
cellSizeAndPositionGetter(index) {
|
|
|
|
return {
|
|
|
|
x: (index % 10) * 50,
|
|
|
|
y: Math.floor(index / 10) * 50,
|
|
|
|
width: 50,
|
|
|
|
height: 50,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
createWidget({
|
|
|
|
type: "bi.absolute",
|
|
|
|
element: this,
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
el: grid,
|
|
|
|
left: 10,
|
|
|
|
right: 10,
|
|
|
|
top: 10,
|
|
|
|
bottom: 10,
|
|
|
|
}
|
|
|
|
],
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|