update Table summary when fixed
This commit is contained in:
parent
0b183ebba2
commit
07bde2f56d
2 changed files with 18 additions and 14 deletions
|
@ -1,18 +1,20 @@
|
|||
<template>
|
||||
<table class="ivu-table-summary" cellspacing="0" cellpadding="0" border="0" :style="styleObject">
|
||||
<colgroup>
|
||||
<col v-for="(column, index) in columns" :width="setCellWidth(column)">
|
||||
</colgroup>
|
||||
<tbody :class="[prefixCls + '-tbody']">
|
||||
<tr class="ivu-table-row">
|
||||
<td v-for="(column, index) in columns" :class="alignCls(column)">
|
||||
<div class="ivu-table-cell" :class="cellCls(column)">
|
||||
<span>{{ data[column.key].value }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="overflow:hidden;">
|
||||
<table class="ivu-table-summary" cellspacing="0" cellpadding="0" border="0" :style="styleObject">
|
||||
<colgroup>
|
||||
<col v-for="(column, index) in columns" :width="setCellWidth(column)">
|
||||
</colgroup>
|
||||
<tbody :class="[prefixCls + '-tbody']">
|
||||
<tr class="ivu-table-row">
|
||||
<td v-for="(column, index) in columns" :class="alignCls(column)">
|
||||
<div class="ivu-table-cell" :class="cellCls(column)">
|
||||
<span>{{ data[column.key].value }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Mixin from './mixin';
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
</div>
|
||||
<table-summary
|
||||
v-if="showSummary && (data && data.length)"
|
||||
ref="summary"
|
||||
:prefix-cls="prefixCls"
|
||||
:styleObject="tableStyle"
|
||||
:columns="cloneColumns"
|
||||
|
@ -769,6 +770,7 @@
|
|||
if (this.showHeader) this.$refs.header.scrollLeft = event.target.scrollLeft;
|
||||
if (this.isLeftFixed) this.$refs.fixedBody.scrollTop = event.target.scrollTop;
|
||||
if (this.isRightFixed) this.$refs.fixedRightBody.scrollTop = event.target.scrollTop;
|
||||
if (this.showSummary) this.$refs.summary.$el.scrollLeft = event.target.scrollLeft;
|
||||
this.hideColumnFilter();
|
||||
},
|
||||
handleFixedMousewheel(event) {
|
||||
|
|
Loading…
Add table
Reference in a new issue