feat(web): 全局中文 locale;管理面固定外壳、内容区独立滚动
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
// 路由出口——逻辑骨架阶段无装饰
|
||||
// 路由出口 + 全局中文(DatePicker 等默认 en-US,须用 ConfigProvider)
|
||||
import zhCN from "antdv-next/locale/zh_CN";
|
||||
import dayjs from "dayjs";
|
||||
import "dayjs/locale/zh-cn";
|
||||
|
||||
dayjs.locale("zh-cn");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<router-view />
|
||||
<a-config-provider :locale="zhCN">
|
||||
<router-view />
|
||||
</a-config-provider>
|
||||
</template>
|
||||
|
||||
@@ -114,7 +114,7 @@ async function onUserMenuClick({ key }: MenuInfo) {
|
||||
@click="onMenuClick"
|
||||
/>
|
||||
</a-layout-sider>
|
||||
<a-layout>
|
||||
<a-layout class="admin-layout__main">
|
||||
<a-layout-header class="admin-layout__header">
|
||||
<a-dropdown
|
||||
:menu="{ items: userMenuItems }"
|
||||
@@ -148,8 +148,18 @@ async function onUserMenuClick({ key }: MenuInfo) {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 固定外壳:侧栏 + 顶栏不动,仅内容区滚动 */
|
||||
.admin-layout {
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-layout__main {
|
||||
height: 100vh;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -218,6 +228,7 @@ async function onUserMenuClick({ key }: MenuInfo) {
|
||||
}
|
||||
|
||||
.admin-layout__header {
|
||||
flex: 0 0 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
@@ -267,13 +278,16 @@ async function onUserMenuClick({ key }: MenuInfo) {
|
||||
}
|
||||
|
||||
.admin-layout__content {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
background: #f5f5f5;
|
||||
padding: 24px;
|
||||
min-height: calc(100vh - 64px);
|
||||
}
|
||||
|
||||
.admin-layout__surface {
|
||||
padding: 24px;
|
||||
min-height: calc(100vh - 64px - 48px);
|
||||
min-height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user