Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -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: [],
|
||||
|
||||
Reference in New Issue
Block a user