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.
 
 
 

137 lines
3.7 KiB

/**
* Created by User on 2017/3/22.
*/
Demo.GridLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-grid"
},
render: function () {
return {
type: "bi.grid",
columns: 5,
rows: 3,
items: [{
column: 0,
row: 0,
el: {
type: "bi.label",
text: "column-0, row-0",
cls: "layout-bg1"
}
}, {
column: 1,
row: 0,
el: {
type: "bi.label",
text: "column-1, row-0",
cls: "layout-bg2"
}
}, {
column: 2,
row: 0,
el: {
type: "bi.label",
text: "column-2, row-0",
cls: "layout-bg6"
}
}, {
column: 3,
row: 0,
el: {
type: "bi.label",
text: "column-3, row-0",
cls: "layout-bg3"
}
}, {
column: 4,
row: 0,
el: {
type: "bi.label",
text: "column-4, row-0",
cls: "layout-bg4"
}
}, {
column: 0,
row: 1,
el: {
type: "bi.label",
text: "column-0, row-1",
cls: "layout-bg5"
}
}, {
column: 1,
row: 1,
el: {
type: "bi.label",
text: "column-1, row-1",
cls: "layout-bg6"
}
}, {
column: 2,
row: 1,
el: {
type: "bi.label",
text: "column-2, row-1",
cls: "layout-bg7"
}
}, {
column: 3,
row: 1,
el: {
type: "bi.label",
text: "column-3, row-1",
cls: "layout-bg1"
}
}, {
column: 4,
row: 1,
el: {
type: "bi.label",
text: "column-4, row-1",
cls: "layout-bg3"
}
}, {
column: 0,
row: 2,
el: {
type: "bi.label",
text: "column-0, row-2",
cls: "layout-bg2"
}
}, {
column: 1,
row: 2,
el: {
type: "bi.label",
text: "column-1, row-2",
cls: "layout-bg3"
}
}, {
column: 2,
row: 2,
el: {
type: "bi.label",
text: "column-2, row-2",
cls: "layout-bg4"
}
}, {
column: 3,
row: 2,
el: {
type: "bi.label",
text: "column-3, row-2",
cls: "layout-bg5"
}
}, {
column: 4,
row: 2,
el: {
type: "bi.label",
text: "column-4, row-2",
cls: "layout-bg6"
}
}]
};
}
});
BI.shortcut("demo.grid", Demo.GridLayout);