doum
2025-09-11 7298d5354963a88643a543b51b90192dc9fc934c
admin/src/components/base/BaseComputHeight.vue
@@ -1,20 +1,25 @@
<script>
import {mapState} from "vuex";
export default {
  name: 'BaseComputeHeight',
  data () {
    return {
      tableHeightNew: 300
      // tableHeightNew: 300
    }
  },
  computed: {
    ...mapState(['tableHeightNew'])
  },
  created() {
    this.computeTableHeight()
    // this.computeTableHeight()
  },
  mounted () {
    this.computeTableHeight()
    window.addEventListener('resize', this.computeTableHeight)
    // this.computeTableHeight()
    // window.addEventListener('resize', this.computeTableHeight)
  },
  activated() {
    this.computeTableHeight()
    // this.computeTableHeight()
  },
  methods: {
    computeTableHeight () {
@@ -33,8 +38,8 @@
        const height12 = document.getElementsByClassName('platgroup_tabs') && document.getElementsByClassName('platgroup_tabs')[0]?20+ document.getElementsByClassName('platgroup_tabs')[0].clientHeight:0
        // this.tableHeightNew = height-height4-height3-height2-height1-height5-height6-height7-height8-height9 -height10// 打印高度
       this.tableHeightNew = height-height3 -height5-height6-height2-height7-height4-height9-height10 -height11 -height12
        console.log('self',height,height3 ,height5,(height6==0?20:height6),height2,height7,height4,height9,height10 ,height11 ,height12)
        console.log('self',this.tableHeightNew)
        // console.log('self',height,height3 ,height5,(height6==0?20:height6),height2,height7,height4,height9,height10 ,height11 ,height12)
        // console.log('self',this.tableHeightNew)
      })
    }
  }