2.0.3 • Published 5 months ago
@wu-component/wu-col v2.0.3
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,现代浏览器下有效 | TypeEnums | flex | - |
justify | flex 布局下的水平排列方式 | JustifyEnums | start/end/center/space-around/space-between | - |
align | flex 布局下的垂直排列方式 | AlignEnums | top/middle/bottom | - |
Col Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
span | 栅格占据的列数 | TypeEnums | Number | - |
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.7
1 year ago
1.11.6
1 year ago
1.11.4
1 year ago
1.11.3
1 year ago
1.11.1
1 year ago
1.11.0
1 year ago
1.10.6
1 year ago
1.10.5
1 year ago
1.10.3
1 year ago
1.10.2
1 year ago
1.10.1
1 year ago
1.10.0
1 year ago
1.9.24
2 years ago
1.9.21
2 years ago
1.9.20
2 years ago
1.9.18
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.4.0
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