Explorar o código

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

(cherry picked from commit 5ef528ffbd37ee3b9eaa58b9705d5b7868ac973a)
任一存 %!s(int64=3) %!d(string=hai) anos
pai
achega
93564bb52e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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'
 })