2.0.3 • Published 5 months ago

@wu-component/wu-row v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Layout 布局

常用的操作按钮。

基础用法

::: demo

<template>
    <div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%">
            <wu-plus-row>
                <wu-plus-col span="12">
                    <div style="height: 40px;background:#d3dce6">12</div>
                </wu-plus-col>
                <wu-plus-col span="12">
                    <div style="height: 40px;background:#e5e9f2">12</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%; margin-top: 8px">
            <wu-plus-row>
                <wu-plus-col span="4">
                    <div style="height: 40px;background:#d3dce6">4</div>
                </wu-plus-col>
                <wu-plus-col span="20">
                    <div style="height: 40px;background:#e5e9f2">20</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%; margin-top: 8px">
            <wu-plus-row>
                <wu-plus-col span="20">
                    <div style="height: 40px;background:#d3dce6">4</div>
                </wu-plus-col>
                <wu-plus-col span="4">
                    <div style="height: 40px;background:#e5e9f2">20</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
    </div>
</template>
<script>
</script>

:::

对齐方式

通过 flex 布局来对分栏进行灵活的对齐。

::: demo

<template>
    <div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%; margin-top: 8px">
            <wu-plus-row type="flex" justify="space-around">
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#d3dce6">10</div>
                </wu-plus-col>
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#e5e9f2">10</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%; margin-top: 8px">
            <wu-plus-row type="flex" justify="start">
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#d3dce6">10</div>
                </wu-plus-col>
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#e5e9f2">10</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%; margin-top: 8px">
            <wu-plus-row type="flex" justify="end">
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#d3dce6">10</div>
                </wu-plus-col>
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#e5e9f2">10</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
        <div style="display: flex; align-items: center;justify-content: space-around;width: 100%; margin-top: 8px">
            <wu-plus-row type="flex" justify="center">
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#d3dce6">10</div>
                </wu-plus-col>
                <wu-plus-col span="10">
                    <div style="height: 40px;background:#e5e9f2">10</div>
                </wu-plus-col>
            </wu-plus-row>
        </div>
    </div>
</template>
<script>
</script>

:::

Row Attributes

参数说明类型可选值默认值
type布局模式,可选 flex,现代浏览器下有效TypeEnumsflex-
justifyflex 布局下的水平排列方式JustifyEnumsstart/end/center/space-around/space-between-
alignflex 布局下的垂直排列方式AlignEnumstop/middle/bottom-

Col Attributes

参数说明类型可选值默认值
span栅格占据的列数TypeEnumsNumber-
2.0.3

5 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.11.8

1 year ago

1.11.6

1 year ago

1.11.4

1 year ago

1.10.1

1 year ago

1.9.24

2 years ago

1.9.21

2 years ago

1.9.20

2 years ago

1.9.17

2 years ago

1.9.1

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.0.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago