Commit c1115edd1afe43f10fbf8fe08428f84485956f63
1 parent
408b6950
fixed table
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
examples/routers/table.vue
| ... | ... | @@ -12,10 +12,10 @@ |
| 12 | 12 | <Table :height='200' border :columns="columns2" :data="data3"></Table> |
| 13 | 13 | </div> |
| 14 | 14 | <div style='margin:20px 0px'> |
| 15 | - <Table :width='500' border :columns="columns2" :data="data3"></Table> | |
| 15 | + <Table :width='600' border :columns="columns2" :data="data3"></Table> | |
| 16 | 16 | </div> |
| 17 | 17 | <div style='margin:20px 0px'> |
| 18 | - <Table :width='500' :height='200' border :columns="columns2" :data="data3"></Table> | |
| 18 | + <Table :width='600' :height='200' border :columns="columns2" :data="data3"></Table> | |
| 19 | 19 | </div> |
| 20 | 20 | <div style='margin:20px 0px;'> |
| 21 | 21 | Table scrolling <i-switch v-model="fixedHeader" style="margin-right: 5px"></i-switch> | ... | ... |
src/components/table/mixin.js
| ... | ... | @@ -32,8 +32,8 @@ export default { |
| 32 | 32 | } |
| 33 | 33 | // when fixed type,reset first right fixed column's width |
| 34 | 34 | if (this.fixed === 'right' && top ) { |
| 35 | - const firstFixedIndex = this.columns.findIndex((col) => col.fixed === 'right'); | |
| 36 | - if (firstFixedIndex === index) { | |
| 35 | + //const firstFixedIndex = this.columns.findIndex((col) => col.fixed === 'right'); | |
| 36 | + if (this.columns.length === index + 1) { | |
| 37 | 37 | let scrollBarWidth = this.$parent.scrollBarWidth; |
| 38 | 38 | if (!this.$parent.showVerticalScrollBar) scrollBarWidth = 0; |
| 39 | 39 | width += scrollBarWidth; | ... | ... |