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