mirror of https://github.com/ElemeFE/element
Table: fix test fix #2090 , remove virtual scrollbar
parent
593acacdfa
commit
923d9b6622
|
@ -1453,7 +1453,6 @@ When the row content is too long and you do not want to display the horizontal s
|
||||||
| empty-text | Displayed text when data is empty. You can customize this area with `slot="empty"` | String | — | No Data |
|
| empty-text | Displayed text when data is empty. You can customize this area with `slot="empty"` | String | — | No Data |
|
||||||
| default-expand-all | whether expand all rows by default, only works when the table has a column type="expand" | Boolean | — | false |
|
| default-expand-all | whether expand all rows by default, only works when the table has a column type="expand" | Boolean | — | false |
|
||||||
| expand-row-keys | set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop | Array | — | |
|
| expand-row-keys | set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop | Array | — | |
|
||||||
| virtual-scrollbar | Enable virtual scrollbar | Boolean | — | false |
|
|
||||||
|
|
||||||
### Table Events
|
### Table Events
|
||||||
| Event Name | Description | Parameters |
|
| Event Name | Description | Parameters |
|
||||||
|
|
|
@ -1475,7 +1475,6 @@
|
||||||
| empty-text | 空数据时显示的文本内容,也可以通过 `slot="empty"` 设置 | String | — | 暂无数据 |
|
| empty-text | 空数据时显示的文本内容,也可以通过 `slot="empty"` 设置 | String | — | 暂无数据 |
|
||||||
| default-expand-all | 是否默认展开所有行,当 Table 中存在 type="expand" 的 Column 的时候有效 | Boolean | — | false |
|
| default-expand-all | 是否默认展开所有行,当 Table 中存在 type="expand" 的 Column 的时候有效 | Boolean | — | false |
|
||||||
| expand-row-keys | 可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。| Array | — | |
|
| expand-row-keys | 可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。| Array | — | |
|
||||||
| virtual-scrollbar | 启用虚拟滚动条 | Boolean | — | false |
|
|
||||||
|
|
||||||
|
|
||||||
### Table Events
|
### Table Events
|
||||||
|
|
|
@ -124,7 +124,7 @@ export default {
|
||||||
minWidth: {},
|
minWidth: {},
|
||||||
renderHeader: Function,
|
renderHeader: Function,
|
||||||
sortable: {
|
sortable: {
|
||||||
type: [Boolean, String],
|
type: [String, Boolean],
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
sortMethod: Function,
|
sortMethod: Function,
|
||||||
|
@ -222,14 +222,14 @@ export default {
|
||||||
context: this.context,
|
context: this.context,
|
||||||
align: this.align ? 'is-' + this.align : null,
|
align: this.align ? 'is-' + this.align : null,
|
||||||
headerAlign: this.headerAlign ? 'is-' + this.headerAlign : (this.align ? 'is-' + this.align : null),
|
headerAlign: this.headerAlign ? 'is-' + this.headerAlign : (this.align ? 'is-' + this.align : null),
|
||||||
sortable: this.sortable,
|
sortable: this.sortable === '' ? true : this.sortable,
|
||||||
sortMethod: this.sortMethod,
|
sortMethod: this.sortMethod,
|
||||||
resizable: this.resizable,
|
resizable: this.resizable,
|
||||||
showOverflowTooltip: this.showOverflowTooltip || this.showTooltipWhenOverflow,
|
showOverflowTooltip: this.showOverflowTooltip || this.showTooltipWhenOverflow,
|
||||||
formatter: this.formatter,
|
formatter: this.formatter,
|
||||||
selectable: this.selectable,
|
selectable: this.selectable,
|
||||||
reserveSelection: this.reserveSelection,
|
reserveSelection: this.reserveSelection,
|
||||||
fixed: this.fixed,
|
fixed: this.fixed === '' ? true : this.fixed,
|
||||||
filterMethod: this.filterMethod,
|
filterMethod: this.filterMethod,
|
||||||
filters: this.filters,
|
filters: this.filters,
|
||||||
filterable: this.filters || this.filterMethod,
|
filterable: this.filters || this.filterMethod,
|
||||||
|
|
|
@ -18,11 +18,10 @@
|
||||||
:style="{ width: layout.bodyWidth ? layout.bodyWidth + 'px' : '' }">
|
:style="{ width: layout.bodyWidth ? layout.bodyWidth + 'px' : '' }">
|
||||||
</table-header>
|
</table-header>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar
|
<div
|
||||||
class="el-table__body-wrapper"
|
class="el-table__body-wrapper"
|
||||||
ref="bodyWrapper"
|
ref="bodyWrapper"
|
||||||
:native="!virtualScrollbar"
|
:style="[bodyHeight]">
|
||||||
:wrap-style="[bodyHeight]">
|
|
||||||
<table-body
|
<table-body
|
||||||
:context="context"
|
:context="context"
|
||||||
:store="store"
|
:store="store"
|
||||||
|
@ -35,7 +34,7 @@
|
||||||
<div class="el-table__empty-block" v-if="!data || data.length === 0">
|
<div class="el-table__empty-block" v-if="!data || data.length === 0">
|
||||||
<span class="el-table__empty-text"><slot name="empty">{{ emptyText || t('el.table.emptyText') }}</slot></span>
|
<span class="el-table__empty-text"><slot name="empty">{{ emptyText || t('el.table.emptyText') }}</slot></span>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</div>
|
||||||
<div class="el-table__fixed" ref="fixedWrapper"
|
<div class="el-table__fixed" ref="fixedWrapper"
|
||||||
v-if="fixedColumns.length > 0"
|
v-if="fixedColumns.length > 0"
|
||||||
:style="[
|
:style="[
|
||||||
|
@ -133,8 +132,6 @@
|
||||||
|
|
||||||
width: [String, Number],
|
width: [String, Number],
|
||||||
|
|
||||||
virtualScrollbar: Boolean,
|
|
||||||
|
|
||||||
height: [String, Number],
|
height: [String, Number],
|
||||||
|
|
||||||
maxHeight: [String, Number],
|
maxHeight: [String, Number],
|
||||||
|
@ -249,7 +246,7 @@
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
bodyWrapper() {
|
bodyWrapper() {
|
||||||
return this.$refs.bodyWrapper.wrap;
|
return this.$refs.bodyWrapper;
|
||||||
},
|
},
|
||||||
|
|
||||||
shouldUpdateHeight() {
|
shouldUpdateHeight() {
|
||||||
|
|
Loading…
Reference in New Issue