style: 弹窗滚动区域隐藏滚动条,保留滚动功能
CI / 后端测试 (push) Has been cancelled
CI / 前端构建 (push) Has been cancelled

This commit is contained in:
selfrelease
2026-08-31 15:56:15 +08:00
parent 978d9eeb2b
commit 38673f7b44
4 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -1029,7 +1029,7 @@ export function ChatPanel({
</div> </div>
</div> </div>
) : ( ) : (
<div className="max-h-[50vh] space-y-4 overflow-y-auto pr-1"> <div className="max-h-[50vh] space-y-4 overflow-y-auto pr-1 scrollbar-none">
{messages.map((msg, i) => ( {messages.map((msg, i) => (
<div <div
key={i} key={i}
+9
View File
@@ -78,3 +78,12 @@
border: 1px solid hsl(var(--border)) !important; border: 1px solid hsl(var(--border)) !important;
} }
} }
/* 隐藏滚动条但保留滚动功能 */
.scrollbar-none {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE10+ */
}
.scrollbar-none::-webkit-scrollbar {
display: none; /* Chrome/Safari/Opera */
}
+2 -2
View File
@@ -279,7 +279,7 @@ function EditExpertDialog({
<DialogDescription>修改专家资料、上传头像</DialogDescription> <DialogDescription>修改专家资料、上传头像</DialogDescription>
</DialogHeader> </DialogHeader>
<div className="max-h-[70vh] space-y-4 overflow-y-auto py-2"> <div className="max-h-[70vh] space-y-4 overflow-y-auto py-2 scrollbar-none">
{/* 头像上传区 */} {/* 头像上传区 */}
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<ExpertAvatar name={name || expert.name} avatarUrl={avatarUrl} size="2xl" shape="rect" /> <ExpertAvatar name={name || expert.name} avatarUrl={avatarUrl} size="2xl" shape="rect" />
@@ -420,7 +420,7 @@ function CreateExpertDialog({
<DialogDescription>创建专家账号,填写基本信息和登录密码</DialogDescription> <DialogDescription>创建专家账号,填写基本信息和登录密码</DialogDescription>
</DialogHeader> </DialogHeader>
<div className="max-h-[70vh] space-y-4 overflow-y-auto py-2"> <div className="max-h-[70vh] space-y-4 overflow-y-auto py-2 scrollbar-none">
{/* 姓名 */} {/* 姓名 */}
<div className="space-y-1.5"> <div className="space-y-1.5">
<Label htmlFor="create-name">姓名 *</Label> <Label htmlFor="create-name">姓名 *</Label>
+1 -1
View File
@@ -118,7 +118,7 @@ export function ConsultationDetailDialog({
<DialogTitle>咨询详情</DialogTitle> <DialogTitle>咨询详情</DialogTitle>
<DialogDescription>{target?.topic}</DialogDescription> <DialogDescription>{target?.topic}</DialogDescription>
</DialogHeader> </DialogHeader>
<div className="max-h-[60vh] space-y-4 overflow-y-auto"> <div className="max-h-[60vh] space-y-4 overflow-y-auto scrollbar-none">
{/* 用户问题 */} {/* 用户问题 */}
<div> <div>
<p className="mb-1 flex items-center gap-1.5 text-xs font-medium text-muted-foreground"> <p className="mb-1 flex items-center gap-1.5 text-xs font-medium text-muted-foreground">