bugfix: 教育管理员编辑用户之后刷新列表
This commit is contained in:
@@ -171,7 +171,6 @@ import {
|
||||
computed,
|
||||
reactive,
|
||||
toRefs,
|
||||
onMounted,
|
||||
unref,
|
||||
watch
|
||||
} from 'vue'
|
||||
@@ -650,12 +649,35 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let historyTable: any = this.$refs.historyTable
|
||||
this.historyTableHeight = historyTable.clientHeight - 200
|
||||
this.updateTableHeight()
|
||||
window.addEventListener('resize', this.updateTableHeight)
|
||||
},
|
||||
beforeUnmount() {
|
||||
window.removeEventListener('resize', this.updateTableHeight)
|
||||
},
|
||||
methods: {
|
||||
updateTableHeight() {
|
||||
const historyTable: any = this.$refs.historyTable
|
||||
if (historyTable) {
|
||||
// 为底部分页器预留固定空间,使表格部分高度固定且分页器始终可见
|
||||
this.historyTableHeight = historyTable.clientHeight - 200
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.admin_page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
.admin_table_content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.admin_page .admin_table_search .admin_state {
|
||||
display: flex;
|
||||
width: 70%;
|
||||
|
||||
Reference in New Issue
Block a user