style(layout): 完善 Z-INDEX 层级管理,优化全局侧边栏样式
layoutConfig.js: - 重构 Z_INDEX 常量,分层管理(页面内部 → 系统级) - 添加详细注释说明各层级用途 - 新增 SIDEBAR、DROPDOWN、POPOVER 等层级定义 GlobalSidebar: - 使用统一的 Z_INDEX.SIDEBAR 常量 - 优化背景色和边框样式 - 添加 h="100%" 确保高度填满 MainLayout: - 简化注释 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { useGlobalSidebar } from '@/contexts/GlobalSidebarContext';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { getEventDetailUrl } from '@/utils/idEncoder';
|
||||
import { Z_INDEX } from '@/layouts/config/layoutConfig';
|
||||
import WatchSidebar from '@views/Profile/components/WatchSidebar';
|
||||
import { WatchlistPanel, FollowingEventsPanel } from '@views/Profile/components/WatchSidebar/components';
|
||||
import HotSectorsRanking from '@views/Profile/components/MarketDashboard/components/atoms/HotSectorsRanking';
|
||||
@@ -267,12 +268,14 @@ const GlobalSidebar = () => {
|
||||
return (
|
||||
<Box
|
||||
w={isOpen ? '300px' : '72px'}
|
||||
h="100%"
|
||||
flexShrink={0}
|
||||
transition="width 0.2s ease-in-out"
|
||||
display={{ base: 'none', md: 'block' }}
|
||||
bg="rgba(26, 32, 44, 0.6)"
|
||||
borderLeft="1px solid rgba(255, 255, 255, 0.05)"
|
||||
bg="rgba(26, 32, 44, 0.98)"
|
||||
borderLeft="1px solid rgba(255, 255, 255, 0.08)"
|
||||
position="relative"
|
||||
zIndex={Z_INDEX.SIDEBAR}
|
||||
>
|
||||
{/* 加载状态 */}
|
||||
{loading && (
|
||||
@@ -287,8 +290,9 @@ const GlobalSidebar = () => {
|
||||
{/* 标题栏 - 收起按钮 + 标题 */}
|
||||
<HStack
|
||||
px={3}
|
||||
py={2}
|
||||
borderBottom="1px solid rgba(255, 255, 255, 0.05)"
|
||||
py={3}
|
||||
bg="rgba(26, 32, 44, 1)"
|
||||
borderBottom="1px solid rgba(255, 255, 255, 0.1)"
|
||||
flexShrink={0}
|
||||
>
|
||||
<IconButton
|
||||
|
||||
Reference in New Issue
Block a user