npm.io
1.1.0 • Published 9 years ago

zent-layout

Licence
MIT
Version
1.1.0
Deps
1
Vulns
0
Weekly
0
Stars
2.2K

Layout 布局

24栅格布局组件

代码演示

:::demo 基本用法

import { Layout } from 'zent';

const { Row, Col } = Layout

ReactDOM.render(
	<div className="layout-demo-basic">
		<Row>
			<Col span={24}>Col 24</Col>
		</Row>

		<Row>
			<Col span={8}>Col 8</Col>
			<Col span={8}>Col 8</Col>
			<Col span={8}>Col 8</Col>
		</Row>

		<Row>
			<Col span={8}>Col 8</Col>
			<Col span={8} offset={8}>Col 8, Offset 8</Col>
		</Row>

		<Row>
			<Col span={4}>Col 4</Col>
			<Col span={4} offset={4}>Col 4, Offset 4</Col>
			<Col span={4} offset={4}>Col 4, Offset 4</Col>
		</Row>	
	</div>
	, mountNode
);

:::

Row API
属性 说明 类型 默认值
className 额外的样式名 string
prefix UI 前缀 string 'zent'
Col API
属性 说明 类型 默认值
span col所占的栅格数 number
offset col左偏移的栅格数 number
className 额外的样式名 string
prefix UI 前缀 string 'zent'