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.

96 lines
3.3 KiB

import { shortcut, Widget, isEqual } from "@/core";
8 years ago
@shortcut()
export class Preview extends Widget {
static xtype = "demo.preview";
props = { baseCls: "demo-preview" };
render() {
const self = this;
const items = [],
header = [],
columnSize = [];
const rowCount = 100,
columnCount = 100;
8 years ago
for (var i = 0; i < 1; i++) {
header[i] = [];
for (var j = 0; j < columnCount; j++) {
header[i][j] = {
type: "bi.label",
text: `表头${i}-${j}`,
7 years ago
};
8 years ago
columnSize[j] = 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 < 3 ? 0 : i}-${j}`,
7 years ago
};
8 years ago
}
}
8 years ago
return {
8 years ago
type: "bi.absolute",
8 years ago
cls: "preview-background",
items: [
{
el: {
type: "bi.vtape",
cls: "preview-card bi-card",
items: [
{
el: {
type: "bi.label",
cls: "preview-title bi-border-bottom",
height: 40,
text: "Card",
hgap: 10,
textAlign: "left",
},
height: 40,
8 years ago
},
{
type: "bi.center_adapt",
scrollable: true,
items: [
{
type: "bi.resizable_table",
el: {
type: "bi.collection_table",
},
width: 500,
height: 400,
isResizeAdapt: true,
isNeedResize: true,
isNeedMerge: true,
mergeCols: [0, 1],
mergeRule (col1, col2) {
return isEqual(col1, col2);
},
isNeedFreeze: true,
freezeCols: [0, 1],
columnSize,
items,
header,
}
],
}
],
},
left: 60,
right: 60,
top: 60,
bottom: 60,
}
],
7 years ago
};
8 years ago
}
mounted() {}
}