App.vue
921 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
<template>
<div id="app">
<div v-show="isShowWindow">
<transition name="fade">
<keep-alive v-if="$route.meta.keepAlive">
<router-view></router-view>
</keep-alive>
</transition>
<transition name="fade">
<router-view v-if="!$route.meta.keepAlive"></router-view>
</transition>
</div>
<div v-show="!isShowWindow">
<div style="text-align: center;font-size: 14px;height: 48px;line-height: 48px;">无权限访问</div>
</div>
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {
isShowWindow: false,
}
},
watch: {
watchFlag: {
immediate: true,
handler(newval) {
this.isShowWindow = newval
}
}
},
computed: {
watchFlag() {
return this.$store.state.app.showWindow
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped></style>