Moli0
2022-02-15 3d13fff2afc69131bbca9ea98deaa3907bf454f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<template>
  <router-view />
</template>
 
<script>
export default {
  name: '后台',
  mounted () {
    window.addEventListener('load', () => { // 滚动事件变为 scroll
      if (this.$route.path !== '/home/index') { // /print 表示首页
        this.$router.replace('/home/index') // 切换到首页
      }
    })
  }
}
</script>