mirror of https://github.com/ElemeFE/element
parent
78277e2226
commit
3844b4aa3b
|
@ -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 {
|
||||||
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', () => {
|
||||||
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');
|
||||||
|
|
Loading…
Reference in New Issue