瀏覽代碼

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

(cherry picked from commit 5ef528ffbd37ee3b9eaa58b9705d5b7868ac973a)
任一存 3 年之前
父節點
當前提交
93564bb52e
共有 1 個文件被更改,包括 1 次插入0 次删除
  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'
 })