bigger layout for FileDetail

This commit is contained in:
Timi
2025-07-15 17:16:59 +08:00
parent cef8121008
commit 4d723758df

View File

@ -1,6 +1,6 @@
<template>
<b-e-flower-fall class="background" />
<root-layout v-if="ready" class="diselect" icp="粤ICP备2025368555号-1" domain="imyeyu.com" author="夜雨">
<root-layout v-if="ready" class="root-layout diselect" icp="粤ICP备2025368555号-1" domain="imyeyu.com" author="夜雨">
<router-view />
</root-layout>
<popup />
@ -11,15 +11,32 @@
import { BEFlowerFall, Popup } from "timi-web";
import { RootLayout, UserProfilePopup } from "timi-tdesign-pc";
const ready = ref(false);
const route = useRoute();
onMounted(async () => {
ready.value = true;
});
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>