Element: [Feature, Request], flex, layout, wrap, capability

Created on 19 May 2017  ·  3Comments  ·  Source: ElemeFE/element

Existing Component

Component Name

el-row

Description

flex layout does not support wrap attribute, hopefully wrap can be added in the future

Most helpful comment

I think they may have meant adding a wrap attribute for flex-wrap (https://www.w3schools.com/cssref/css3_pr_flex-wrap.asp).

What I do now is this:

<el-row type="flex" :gutter="24" style="flex-wrap: wrap;">
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
<el-row>

What would be nice is this:

<el-row type="flex" :gutter="24" wrap>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
<el-row>

|Attribute|Description|Type|Accepted Values|Default|
|---|---|---|---|---|
|wrap|flex-wrap property|boolean or string|true, false, reverse, initial, inherit|false|

All 3 comments

Translation of this issue:

Existing Component

no

Component Name

El-row

Description

Flex layout, does, not, support, wrap, attribute, hopefully, wrap, can, be, added,, in, the, future

Please elaborate what wrap attribute is.

I think they may have meant adding a wrap attribute for flex-wrap (https://www.w3schools.com/cssref/css3_pr_flex-wrap.asp).

What I do now is this:

<el-row type="flex" :gutter="24" style="flex-wrap: wrap;">
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
<el-row>

What would be nice is this:

<el-row type="flex" :gutter="24" wrap>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
    <el-col :sm="24" :md="12">content</el-col>
<el-row>

|Attribute|Description|Type|Accepted Values|Default|
|---|---|---|---|---|
|wrap|flex-wrap property|boolean or string|true, false, reverse, initial, inherit|false|

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yorululu picture yorululu  ·  3Comments

gengxuelei picture gengxuelei  ·  3Comments

dbskccc picture dbskccc  ·  3Comments

fscardua picture fscardua  ·  3Comments

mochenxm picture mochenxm  ·  3Comments