Commit 3844b4aa authored by FuryBean's avatar FuryBean Committed by cinwell.li

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

parent 78277e22
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
border="0"> border="0">
{ {
this._l(this.columns, column => this._l(this.columns, column =>
<colgroup <col
name={ column.id } name={ column.id }
width={ column.realWidth || column.width } width={ column.realWidth || column.width }
/>) />)
......
...@@ -15,14 +15,14 @@ export default { ...@@ -15,14 +15,14 @@ export default {
border="0"> border="0">
{ {
this._l(this.columns, column => this._l(this.columns, column =>
<colgroup <col
name={ column.id } name={ column.id }
width={ column.realWidth || column.width } width={ column.realWidth || column.width }
/>) />)
} }
{ {
!this.fixed && this.layout.gutterWidth !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> <thead>
......
...@@ -393,7 +393,7 @@ describe('Table', () => { ...@@ -393,7 +393,7 @@ describe('Table', () => {
it('width', done => { it('width', done => {
const vm = createTable('width="123px"', ':width="102"', 'width="39"'); const vm = createTable('width="123px"', ':width="102"', 'width="39"');
setTimeout(_ => { 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); .map(node => node.width).filter(o => o);
expect(ths).to.include('123').include('102').include('39'); expect(ths).to.include('123').include('102').include('39');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment