Skip to content

Commit 749c854

Browse files
cs1707hzsrc
authored andcommitted
Row: fix align top (ElemeFE#20963)
1 parent 15e524b commit 749c854

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

examples/docs/en-US/layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ The classes are:
337337
| gutter | grid spacing | number || 0 |
338338
| type | layout mode, you can use flex, works in modern browsers | string |||
339339
| justify | horizontal alignment of flex layout | string | start/end/center/space-around/space-between | start |
340-
| align | vertical alignment of flex layout | string | top/middle/bottom | top |
340+
| align | vertical alignment of flex layout | string | top/middle/bottom | |
341341
| tag | custom element tag | string | * | div |
342342

343343
### Col Attributes

examples/docs/es/layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Las clases son:
338338
| gutter | espaciado de la grilla | number || 0 |
339339
| type | modo del layout , puedes usar flex, funciona en navegadores modernos | string |||
340340
| justify | alineación horizontal del layout flex | string | start/end/center/space-around/space-between | start |
341-
| align | alineación vertical del layout flex | string | top/middle/bottom | top |
341+
| align | alineación vertical del layout flex | string | top/middle/bottom | |
342342
| tag | tag de elemento propio | string | * | div |
343343

344344
### Atributos Col

examples/docs/fr-FR/layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Ces classes sont:
338338
| gutter | Espacement de la grille. | number || 0 |
339339
| type | Mode de mise en page. Vous pouvez utiliser flex, qui fonctionne sur les navigateurs modernes. | string |||
340340
| justify | Alignement horizontal pour le mise en page flex. | string | start/end/center/space-around/space-between | start |
341-
| align | Alignement vertical pour la mise en page flex. | string | top/middle/bottom | top |
341+
| align | Alignement vertical pour la mise en page flex. | string | top/middle/bottom | |
342342
| tag | Élément de tag personnalisé. | string | * | div |
343343

344344
### Attributs des colonnes

examples/docs/zh-CN/layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ import 'element-ui/lib/theme-chalk/display.css';
336336
| gutter | 栅格间隔 | number || 0 |
337337
| type | 布局模式,可选 flex,现代浏览器下有效 | string |||
338338
| justify | flex 布局下的水平排列方式 | string | start/end/center/space-around/space-between | start |
339-
| align | flex 布局下的垂直排列方式 | string | top/middle/bottom | top |
339+
| align | flex 布局下的垂直排列方式 | string | top/middle/bottom | |
340340
| tag | 自定义元素标签 | string | * | div |
341341

342342
### Col Attributes

packages/row/src/row.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ export default {
1414
type: String,
1515
default: 'start'
1616
},
17-
align: {
18-
type: String,
19-
default: 'top'
20-
}
17+
align: String
2118
},
2219

2320
computed: {
@@ -38,7 +35,7 @@ export default {
3835
class: [
3936
'el-row',
4037
this.justify !== 'start' ? `is-justify-${this.justify}` : '',
41-
this.align !== 'top' ? `is-align-${this.align}` : '',
38+
this.align ? `is-align-${this.align}` : '',
4239
{ 'el-row--flex': this.type === 'flex' }
4340
],
4441
style: this.style

packages/theme-chalk/src/row.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
justify-content: space-around;
2828
}
2929

30+
@include when(align-top) {
31+
align-items: flex-start;
32+
}
33+
3034
@include when(align-middle) {
3135
align-items: center;
3236
}

0 commit comments

Comments
 (0)