Sfoglia il codice sorgente

bug fix: 窗口高度变化时没有立刻自适应高度

任一存 3 anni fa
parent
commit
5ef528ffbd
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/main.js

+ 1 - 0
src/main.js

@@ -32,6 +32,7 @@ Vue.prototype.$backEndBaseUrl = 'https://culture.4dage.com/njmuseum/'
 Vue.prototype.$oneRemToPx = window.innerHeight * 0.025276
 document.documentElement.style.fontSize = Vue.prototype.$oneRemToPx + 'px'
 window.addEventListener('resize', () => {
+  Vue.prototype.$oneRemToPx = window.innerHeight * 0.025276
   document.documentElement.style.fontSize = Vue.prototype.$oneRemToPx + 'px'
 })