Commit 8224a308 authored by danfuman's avatar danfuman

修改

parent acddeef9
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<skeleton v-if="isSkeleton"></skeleton> <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" :data="tableData.rows"
stripe border stripe border
style="width: 100%"> style="width: 100%">
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
v-loading="tableLoading" v-loading="tableLoading"
:data="tableData" :data="tableData"
border border
v-horizontal-scroll="tableData.total > 15 ? 'hover' : 'false'" v-horizontal-scroll="'hover'"
highlight-current-row highlight-current-row
@sort-change="sortChange" @sort-change="sortChange"
:default-sort = "{prop: 'gdp', order: 'descending'}" :default-sort = "{prop: 'gdp', order: 'descending'}"
...@@ -98,6 +98,15 @@ export default { ...@@ -98,6 +98,15 @@ export default {
getYears({}).then(res => { getYears({}).then(res => {
this.yearOptions=res.data.reverse(); 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: { methods: {
getData(){ getData(){
......
...@@ -156,6 +156,16 @@ ...@@ -156,6 +156,16 @@
this.querySubmit() this.querySubmit()
this.dataRegion() this.dataRegion()
this.getYears() 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() { 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