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>
|
|