| | |
| | | <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 () { |
| | |
| | | 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) |
| | | }) |
| | | } |
| | | } |