diff --git a/src/index.js b/src/index.js index fa56d43..63c456c 100644 --- a/src/index.js +++ b/src/index.js @@ -149,10 +149,20 @@ class AdminFramework { store: this.store, render: h => h('router-view'), async created() { + // 初始化响应式 rem 设置 + + uiTool.setRem() + + // 监听窗口大小变化,重新设置 rem + window.addEventListener('resize', () => { + uiTool.setRem() + }) + console.log('=== Admin Framework App Started ===') console.log('Framework Version:', framework.version) console.log('Config:', this.$config) + // Auto restore menu and title on refresh const token = this.$store.state.user.token const authorityMenus = localStorage.getItem('authorityMenus')