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