table: wrap col in colgroup to make column width work in safari

pull/2207/head
Yuyang Liu 2017-01-05 10:42:31 +08:00
parent aeb2d5df19
commit a3da161339
2 changed files with 23 additions and 19 deletions

View File

@ -28,13 +28,15 @@ export default {
cellspacing="0" cellspacing="0"
cellpadding="0" cellpadding="0"
border="0"> border="0">
{ <colgroup>
this._l(this.columns, column => {
<col this._l(this.columns, column =>
name={ column.id } <col
width={ column.realWidth || column.width } name={ column.id }
/>) width={ column.realWidth || column.width }
} />)
}
</colgroup>
<tbody> <tbody>
{ {
this._l(this.data, (row, $index) => this._l(this.data, (row, $index) =>

View File

@ -78,18 +78,20 @@ export default {
cellspacing="0" cellspacing="0"
cellpadding="0" cellpadding="0"
border="0"> border="0">
{ <colgroup>
this._l(this.columns, column => {
<col this._l(this.columns, column =>
name={ column.id } <col
width={ column.realWidth || column.width } name={ column.id }
/>) width={ column.realWidth || column.width }
} />)
{ }
!this.fixed && this.layout.gutterWidth {
? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col> !this.fixed && this.layout.gutterWidth
: '' ? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col>
} : ''
}
</colgroup>
<thead> <thead>
{ {
this._l(columnRows, (columns, rowIndex) => this._l(columnRows, (columns, rowIndex) =>