修复:将前端宽屏布局改为响应式
This commit is contained in:
+5
-33
@@ -4,19 +4,11 @@
|
||||
<div class="app-container">
|
||||
<BottomNav v-if="!isHiddenNav" />
|
||||
<div class="page-content" :class="{ 'no-nav-padding': isHiddenNav }">
|
||||
<div
|
||||
class="page-renderer"
|
||||
:class="{
|
||||
'centered-user-shell': shouldCenterUserContent,
|
||||
'admin-renderer': isAdminRoute
|
||||
}"
|
||||
>
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="page-fade" mode="out-in">
|
||||
<component :is="Component" :key="route.path" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</div>
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="page-fade" mode="out-in">
|
||||
<component :is="Component" :key="route.path" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</div>
|
||||
</div>
|
||||
</ConfigProvider>
|
||||
@@ -40,16 +32,6 @@ const isHiddenNav = computed(() => {
|
||||
return result
|
||||
})
|
||||
|
||||
const isAdminRoute = computed(() => route.matched.some(r => r.meta.isAdmin))
|
||||
|
||||
const shouldCenterUserContent = computed(() => {
|
||||
if (isAdminRoute.value) {
|
||||
return false
|
||||
}
|
||||
|
||||
return route.name !== 'auth' && route.name !== 'not-found'
|
||||
})
|
||||
|
||||
// 全局购物车数量状态
|
||||
const cartCount = ref(0)
|
||||
|
||||
@@ -116,16 +98,6 @@ loadCartCount()
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.page-renderer {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.page-renderer.centered-user-shell > * {
|
||||
width: 100%;
|
||||
max-width: var(--frontend-page-max-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 当导航栏隐藏时,移除底部 padding */
|
||||
.page-content.no-nav-padding {
|
||||
padding-bottom: 0;
|
||||
|
||||
Reference in New Issue
Block a user