Commit 8224a308 authored by danfuman's avatar danfuman

修改

parent acddeef9
......@@ -18,7 +18,7 @@
</div>
</div>
<skeleton v-if="isSkeleton"></skeleton>
<el-table v-if="!isSkeleton&&tableData.total > 0" class="fixed-table" v-horizontal-scroll="tableData.total > 10 ? 'hover' : 'false'" max-height="640"
<el-table v-if="!isSkeleton&&tableData.total > 0" class="fixed-table" v-horizontal-scroll="hover" max-height="640"
:data="tableData.rows"
stripe border
style="width: 100%">
......
......@@ -22,7 +22,7 @@
v-loading="tableLoading"
:data="tableData"
border
v-horizontal-scroll="tableData.total > 15 ? 'hover' : 'false'"
v-horizontal-scroll="'hover'"
highlight-current-row
@sort-change="sortChange"
:default-sort = "{prop: 'gdp', order: 'descending'}"
......@@ -98,6 +98,15 @@ export default {
getYears({}).then(res => {
this.yearOptions=res.data.reverse();
})
//列表一屏幕显示完整,底部滚动条隐藏
const targetTableWrapperEl = document.querySelector('.el-table__body-wrapper')
const viewHeight = window.innerHeight || document.documentElement.clientHeight
const { bottom } = targetTableWrapperEl.getBoundingClientRect()
if (bottom <= viewHeight) {
targetTableWrapperEl.style.display = 'initial'
} else {
targetTableWrapperEl.style.display = 'none'
}
},
methods: {
getData(){
......
......@@ -156,6 +156,16 @@
this.querySubmit()
this.dataRegion()
this.getYears()
//列表一屏幕显示完整,底部滚动条隐藏
const targetTableWrapperEl = document.querySelector('.el-table__body-wrapper')
const viewHeight = window.innerHeight || document.documentElement.clientHeight
const { bottom } = targetTableWrapperEl.getBoundingClientRect()
if (bottom <= viewHeight) {
targetTableWrapperEl.style.display = 'initial'
} else {
targetTableWrapperEl.style.display = 'none'
}
},
mounted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment