App.vue
871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
<div
id="app"
>
<el-scrollbar
ref="main"
style="height: 100%; width: 100%"
>
<router-view />
</el-scrollbar>
</div>
</template>
<script>
export default {
name: 'App',
computed: {
key() {
return this.$route.name !== undefined
? this.$route.name + new Date()
: this.$route + new Date()
}
},
watch: {
// 解决页面跳转后无法回到新页面顶部的问题
$route() {
const main = this.$refs.main
main.wrap.scrollTop = 0
}
},
methods: {
goJobsArea() {
this.$router.push('/organization/institutions-jobs-area')
},
goOperational() {
this.$router.push('/branches/operational')
}
}
}
</script>
<style lang="scss" scoped>
#app {
/* min-width: 1620px; */
/deep/ .el-scrollbar__wrap {
overflow-x: hidden;
}
}
</style>