Files
git/src/Root.vue
2025-07-15 17:16:59 +08:00

43 lines
1.1 KiB
Vue

<template>
<b-e-flower-fall class="background" />
<root-layout v-if="ready" class="root-layout diselect" icp="粤ICP备2025368555号-1" domain="imyeyu.com" author="夜雨">
<router-view />
</root-layout>
<popup />
<user-profile-popup />
</template>
<script lang="ts" setup>
import { BEFlowerFall, Popup } from "timi-web";
import { RootLayout, UserProfilePopup } from "timi-tdesign-pc";
const route = useRoute();
const ready = ref(false);
onMounted(async () => ready.value = true);
// ---------- 文件详情页更宽的布局 ----------
const inFileDetail = ref(false);
const largeWidth = computed(() => inFileDetail.value ? "1600px" : "1200px");
const width = computed(() => inFileDetail.value ? "1200px" : "900px");
watch(route, () => inFileDetail.value = route.name === "FileDetail");
</script>
<style lang="less">
.background {
background: url("@/assets/img/main.png") fixed right bottom;
}
@media screen and (max-width: 2560px) {
.root-layout {
width: v-bind(largeWidth) !important;
}
}
@media screen and (max-width: 1920px) {
.root-layout {
width: v-bind(width) !important;
}
}
</style>