dialogHeight.js 439 B

123456789101112131415161718
  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 = document.documentElement.clientHeight || document.body.clientHeight
  15. return h
  16. }
  17. }
  18. }