From 6f35844fa4bc9b83a4b536310294cb78be4d4ce6 Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sat, 24 Oct 2026 18:10:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai):=20=E7=AA=84=E5=B1=8F=E4=B8=8B=E4=BF=9D?= =?UTF-8?q?=E8=AF=81=E3=80=8C=E8=BF=9B=E5=85=A5=E5=90=8E=E5=8F=B0=E3=80=8D?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E4=B8=8E=E5=AF=B9=E8=AF=9D=E5=8C=BA=E5=8F=AF?= =?UTF-8?q?=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试反馈学生在 admin 侧看不到后台管理入口。桌面端入口正常;窄屏/手机上侧栏被历史列表的固定高度撑满(接近 100vh),底部按钮落到地址栏之后,对话区也被顶出视口。窄屏改为 dvh + 侧栏限高,历史列表自适应,固定 800px 的对话块改为 100%,并清掉调试日志。 --- src/views/oa/chatgpt/index.vue | 41 +++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/src/views/oa/chatgpt/index.vue b/src/views/oa/chatgpt/index.vue index 16e2cc5..22d2ab3 100644 --- a/src/views/oa/chatgpt/index.vue +++ b/src/views/oa/chatgpt/index.vue @@ -561,7 +561,6 @@ const userStore = useUserStore(); const { push } = useRouter(); const route = useRoute(); const loginUser = computed(() => userStore.info ?? {}); -console.log('loginUser', loginUser) const userName = computed( () => loginUser.value.nickname || @@ -1736,9 +1735,7 @@ const goAdmin = async () => { return; } const authorityTree = buildAuthorityTree(loginUser.value.authorities); - console.log('authorityTree', authorityTree) const firstPath = findFirstChildMenuPath(authorityTree); - console.log('firstPath', firstPath) if (!firstPath) { message.warning("当前用户没有可进入的后台菜单"); @@ -2853,23 +2850,55 @@ export default { } @media screen and (max-width: 1200px) { + /* + 窄屏/移动端把侧栏收成顶部一块,而不是让它按历史列表的固定高度撑满整屏: + 否则 .chat-sidebar 会接近 100vh,底部的「进入后台」「退出登录」被挤到 + 浏览器地址栏/工具栏后面(手机上看起来就是没有入口),对话区也会被顶出视口。 + 这里用 dvh 跟随移动端动态视口,旧浏览器回退到 vh。 + */ .chat-page { flex-direction: column; - height: 100%; + height: 100vh; + height: 100dvh; min-height: 0; overflow: hidden; } .chat-sidebar { width: 100%; + max-height: 52vh; + max-height: 52dvh; + padding: 16px 16px 12px; border-right: none; border-bottom: 1px solid #c7e8ff; } - .chat-main { - padding: 24px 24px 0; + .brand-block, + .new-chat-btn, + .sidebar-footer { + flex-shrink: 0; } + .history-block { + height: auto; + flex: 1 1 auto; + min-height: 0; + margin-top: 16px; + } + + .sidebar-footer { + margin-top: 8px; + } + + .chat-main { + flex: 1 1 auto; + min-height: 0; + padding: 16px 16px 0; + } + + /* 桌面端这些块固定 800px 宽,窄屏下会顶出右边界被裁掉 */ + .chat-body, + .input-shell, .history-banner { width: 100%; }