历史记录改为翻页自适应,取消滑条

This commit is contained in:
李志鹏
2025-10-21 17:30:03 +08:00
parent 550af61181
commit 722c6827bd
2 changed files with 17 additions and 1 deletions

View File

@@ -91,7 +91,7 @@ import TableSearchBar from '@/component/common/TableSearchBar.vue'
import projectSetting from '@/component/home/newProject/setting.vue'
import { useStore } from 'vuex'
import router from '@/router'
import MyEvent from "@/tool/myEvents";
export default defineComponent({
components: {
@@ -250,6 +250,8 @@ export default defineComponent({
}
},
async mounted() {
MyEvent.add('remChange',this.setPageSize)
this.setPageSize();
await this.getHistoryList()
this.$nextTick(() => {
this.calcScrollHeight()
@@ -258,12 +260,24 @@ export default defineComponent({
this.getClass()
},
beforeUnmount() {
MyEvent.remove('remChange',this.setPageSize)
if (this.resizeObserver) {
this.resizeObserver.disconnect()
this.resizeObserver = null
}
},
methods: {
setPageSize(rem){
const historyTable = this.$refs.historyTable
const height = historyTable.offsetHeight - 176;
const size = Math.trunc(height / 54);
this.pageSize = size
if(rem){
this.currentPage = 1
this.getHistoryList()
}
console.log("==========",size,rem)
},
getClass() {
let data = {
classificationIdList: [],