mirror of https://github.com/ElemeFE/element
Merge pull request #2207 from reverland/fix-safari-colgroup
table: wrap col in colgroup to make column width work in safaripull/2178/merge
commit
624442927f
|
@ -28,13 +28,15 @@ export default {
|
|||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0">
|
||||
{
|
||||
this._l(this.columns, column =>
|
||||
<col
|
||||
name={ column.id }
|
||||
width={ column.realWidth || column.width }
|
||||
/>)
|
||||
}
|
||||
<colgroup>
|
||||
{
|
||||
this._l(this.columns, column =>
|
||||
<col
|
||||
name={ column.id }
|
||||
width={ column.realWidth || column.width }
|
||||
/>)
|
||||
}
|
||||
</colgroup>
|
||||
<tbody>
|
||||
{
|
||||
this._l(this.data, (row, $index) =>
|
||||
|
|
|
@ -78,18 +78,20 @@ export default {
|
|||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0">
|
||||
{
|
||||
this._l(this.columns, column =>
|
||||
<col
|
||||
name={ column.id }
|
||||
width={ column.realWidth || column.width }
|
||||
/>)
|
||||
}
|
||||
{
|
||||
!this.fixed && this.layout.gutterWidth
|
||||
? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col>
|
||||
: ''
|
||||
}
|
||||
<colgroup>
|
||||
{
|
||||
this._l(this.columns, column =>
|
||||
<col
|
||||
name={ column.id }
|
||||
width={ column.realWidth || column.width }
|
||||
/>)
|
||||
}
|
||||
{
|
||||
!this.fixed && this.layout.gutterWidth
|
||||
? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col>
|
||||
: ''
|
||||
}
|
||||
</colgroup>
|
||||
<thead>
|
||||
{
|
||||
this._l(columnRows, (columns, rowIndex) =>
|
||||
|
|
Loading…
Reference in New Issue