2024-02-23 11:51:14 +08:00

34 lines
683 B
Vue

<template>
<div class="main-box">
<router-view :key="route.path"></router-view>
</div>
</template>
<script setup>
import { useRoute } from "vue-router";
const route = useRoute()
import { globalEventBus } from '@/common/eventBus'
// 标题事件
for (let i = 1; i < 6; i++) {
globalEventBus.on('header' + i, data => {
globalEventBus.emit('compheader' + i, data)
})
}
</script>
<style>
.main-box {
width: 1280px;
height: 720px;
overflow: hidden;
background-image: url('/static/img/index/index_bg.png');
background-size: 100% 100%;
}
div{
box-sizing: border-box;
font-size: 16px;
background-size: 100% 100%;
}
</style>