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.

71 lines
1.3 KiB

# bi.grid
7 years ago
#### 网格布局
{% method %}
[source](https://jsfiddle.net/fineui/1gwjbpL6/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.grid',
element: "#wrapper",
columns: 2,
rows: 2,
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: 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"
}
}]
});
```
{% endmethod %}
## API
##### 基础属性
| 参数 | 说明 | 类型 | 可选值 | 默认值
| :------ |:------------- | :----- | :----|:----
| columns | 列数 | number | — | null |
| rows | 行数 | number | — | null |
7 years ago
| items | 子控件数组,二维数组的时候行和列个数就表示了rows和columns | array | — | []或[[]] |
---