Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions src/components/table/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<table-head
fixed="left"
:prefix-cls="prefixCls"
:styleObject="fixedTableStyle"
:styleObject="tableStyle"
:columns="leftFixedColumns"
:column-rows="columnRows"
:fixed-column-rows="leftFixedColumnRows"
Expand All @@ -66,7 +66,7 @@
fixed="left"
:draggable="draggable"
:prefix-cls="prefixCls"
:styleObject="fixedTableStyle"
:styleObject="tableStyle"
:columns="leftFixedColumns"
:data="rebuildData"
:row-key="rowKey"
Expand All @@ -77,14 +77,14 @@
v-if="showSummary && (data && data.length)"
fixed="left"
:prefix-cls="prefixCls"
:styleObject="fixedTableStyle"
:styleObject="tableStyle"
:columns="leftFixedColumns"
:data="summaryData"
:columns-width="columnsWidth"
:style="{ 'margin-top': showHorizontalScrollBar ? scrollBarWidth + 'px' : 0 }"
/>
</div>
<div :class="fixedRightTableClasses" :style="fixedRightTableStyle" v-if="isRightFixed">
<div :class="fixedRightTableClasses" :style="fixedRightStyle" v-if="isRightFixed">
<div :class="fixedHeaderClasses" v-if="showHeader">
<table-head
fixed="right"
Expand Down Expand Up @@ -481,7 +481,7 @@
style.width = `${width}px`;
return style;
},
fixedRightTableStyle () {
fixedRightStyle () {
let style = {};
let width = 0;
this.rightFixedColumns.forEach((col) => {
Expand All @@ -492,6 +492,20 @@
style.right = `${this.showVerticalScrollBar?this.scrollBarWidth:0}px`;
return style;
},
fixedRightTableStyle () {
let style = {}
if (this.tableWidth !== 0) {
let width = '';
if (this.bodyHeight === 0) {
width = this.tableWidth;
} else {
width = this.tableWidth - (this.showVerticalScrollBar?this.scrollBarWidth:0);
}
style.width = `${width}px`;
}
style.right = `${this.showVerticalScrollBar?this.scrollBarWidth:0}px`;
return style;
},
fixedRightHeaderStyle () {
let style = {};
let width = 0;
Expand Down