mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
feat(components): [el-row] enhancement for supporting space-evenly (#6223)
Co-authored-by: gp5251 <gp5251@qq.com>
This commit is contained in:
parent
496398ce38
commit
f68aa3cf05
@ -60,7 +60,7 @@ layout/column-offset
|
||||
|
||||
Default use the flex layout to make flexible alignment of columns.
|
||||
|
||||
:::demo You can define the layout of child elements by setting `justify` attribute with start, center, end, space-between or space-around.
|
||||
:::demo You can define the layout of child elements by setting `justify` attribute with start, center, end, space-between, space-around or space-evenly.
|
||||
|
||||
layout/alignment
|
||||
|
||||
@ -103,12 +103,12 @@ The classes are:
|
||||
|
||||
## Row Attributes
|
||||
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
| --------- | ----------------------------------- | ------ | ------------------------------------------- | ------- |
|
||||
| gutter | grid spacing | number | — | 0 |
|
||||
| justify | horizontal alignment of flex layout | string | start/end/center/space-around/space-between | start |
|
||||
| align | vertical alignment of flex layout | string | top/middle/bottom | top |
|
||||
| tag | custom element tag | string | \* | div |
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
| --------- | ----------------------------------- | ------ | ---------------------------------------------------------- | ------- |
|
||||
| gutter | grid spacing | number | — | 0 |
|
||||
| justify | horizontal alignment of flex layout | string | start/end/center/space-around/space-between/spacing-evenly | start |
|
||||
| align | vertical alignment of flex layout | string | top/middle/bottom | top |
|
||||
| tag | custom element tag | string | \* | div |
|
||||
|
||||
## Row Slots
|
||||
|
||||
|
@ -24,6 +24,11 @@
|
||||
<el-col :span="6"><div class="grid-content bg-purple-light"></div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
|
||||
</el-row>
|
||||
<el-row class="row-bg" justify="space-evenly">
|
||||
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple-light"></div></el-col>
|
||||
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
@ -14,7 +14,14 @@ export const rowProps = buildProps({
|
||||
},
|
||||
justify: {
|
||||
type: String,
|
||||
values: ['start', 'center', 'end', 'space-around', 'space-between'],
|
||||
values: [
|
||||
'start',
|
||||
'center',
|
||||
'end',
|
||||
'space-around',
|
||||
'space-between',
|
||||
'space-evenly',
|
||||
],
|
||||
default: 'start',
|
||||
},
|
||||
align: {
|
||||
|
@ -20,7 +20,9 @@
|
||||
@include when(justify-space-around) {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
@include when(justify-space-evenly) {
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
@include when(align-middle) {
|
||||
align-items: center;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user