refacor: 为大屏单独设置显示逻辑
This commit is contained in:
parent
e57b9b4865
commit
a4dcff069d
@ -1,11 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
<template v-if="pageLoaded">
|
||||||
|
<template v-if="!route.meta.screen">
|
||||||
<Index ></Index>
|
<Index ></Index>
|
||||||
|
</template>
|
||||||
|
<router-view v-else></router-view>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
import Index from "./views/index.vue";
|
import Index from "./views/index.vue";
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
const route = useRoute()
|
||||||
|
const pageLoaded = ref(false)
|
||||||
|
onMounted(() => {
|
||||||
|
setTimeout(()=>{
|
||||||
|
pageLoaded.value = true
|
||||||
|
}, 50)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -32,6 +32,15 @@ const routes = [
|
|||||||
name: 'yhzevent',
|
name: 'yhzevent',
|
||||||
component: () => import('../views/SnowEventManagement/index.vue')
|
component: () => import('../views/SnowEventManagement/index.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/airSkyLand',
|
||||||
|
name: 'airskyland',
|
||||||
|
meta: {
|
||||||
|
screen: true
|
||||||
|
},
|
||||||
|
component: () => import('../views/airSkyLand/AirSkyLand.vue')
|
||||||
|
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user