0.0.10 • Published 3 years ago

rc-flex-layout v0.0.10

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

rc-flex-layout

基于react和flex的快速布局方式,只需要简单配置就可

安装

npm install rc-flex-layout

使用

import { HView, VView } from 'rc-flex-layout';

<HView gap={50}>
    <HView width={100} height="100px" bgColor="red" hAlign="center" onClick={this.handleClick.bind(this)}>100</HView>
    <VView width={200} height={200} padding={20} bgColor="blue" gap={10}>
        <div>a</div>
        <div>b</div>
    </VView>
    <HView width={300} height={300} bgColor="green">300</HView>
</HView>

API

公共部分

字段说明类型默认值
width宽度string | number-
height高度string | number-
gap间隔string | number-
padding内间距string | number-
flex缩放自动布局string | number | boolean
overflow超出展示stringauto|hidden|scroll
bgColor背景色string-

HView

字段说明类型默认值
hAlign横向内容展示stringflex-start|flex-end|center| space-between|space-around
vAlign纵向内容展示stringflex-start| flex-end| center| baseline| stretch

VView

字段说明类型默认值
hAlign横向内容展示stringflex-start| flex-end| center| baseline| stretch
vAlign纵向内容展示stringflex-start|flex-end|center|    space-between|space-around
0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago