fix: 修复打包后Logo显示问题

- 使用import语句正确引用静态资源
- 修复Vite构建时的资源路径问题
- 确保Logo在生产环境中正确显示
This commit is contained in:
imeepos 2025-08-21 12:01:48 +08:00
parent 21863b6190
commit 9d42b3c1a9
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import {
RectangleStackIcon,
ChartBarIcon,
} from '@heroicons/react/24/outline';
import logoImage from '../assets/logo.png';
// 导航项类型定义
interface NavItem {
@ -152,7 +153,7 @@ const Navigation: React.FC = () => {
<div className="flex-shrink-0">
<div className="flex items-center gap-2">
<img
src="/src/assets/logo.png"
src={logoImage}
alt="Aone Design Logo"
className="w-8 h-8 rounded-lg shadow-sm"
/>