Table: fixed firefox bug. fixed #766. (#769)

pull/787/head
FuryBean 2016-11-01 20:32:11 +08:00 committed by cinwell.li
parent 78277e2226
commit 3844b4aa3b
3 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ export default {
border="0">
{
this._l(this.columns, column =>
<colgroup
<col
name={ column.id }
width={ column.realWidth || column.width }
/>)

View File

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

View File

@ -393,7 +393,7 @@ describe('Table', () => {
it('width', done => {
const vm = createTable('width="123px"', ':width="102"', 'width="39"');
setTimeout(_ => {
const ths = toArray(vm.$el.querySelectorAll('.el-table__header-wrapper colgroup'))
const ths = toArray(vm.$el.querySelectorAll('.el-table__header-wrapper col'))
.map(node => node.width).filter(o => o);
expect(ths).to.include('123').include('102').include('39');