dialogHeight.js 447 B

12345678910111213141516171819
  1. /**
  2. * 窗口高度修复
  3. */
  4. export default {
  5. mounted() {
  6. this.ibpsDialogHeight = this.fixIbpsDialogHeight()
  7. window.addEventListener('resize', this.handleDialogHeightResize)
  8. },
  9. methods: {
  10. handleDialogHeightResize() {
  11. this.ibpsDialogHeight = this.fixIbpsDialogHeight()
  12. },
  13. fixIbpsDialogHeight() {
  14. const h =
  15. document.documentElement.clientHeight || document.body.clientHeight
  16. return h
  17. }
  18. }
  19. }