bigger layout for FileDetail
This commit is contained in:
27
src/Root.vue
27
src/Root.vue
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user