bugfix: 教育管理员编辑用户之后刷新列表

This commit is contained in:
2025-12-18 15:17:40 +08:00
parent 271b8af4c4
commit f011300bef
3 changed files with 149 additions and 123 deletions

View File

@@ -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%;