fix: 修复打包后Logo显示问题
- 使用import语句正确引用静态资源 - 修复Vite构建时的资源路径问题 - 确保Logo在生产环境中正确显示
This commit is contained in:
parent
21863b6190
commit
9d42b3c1a9
|
|
@ -14,6 +14,7 @@ import {
|
||||||
RectangleStackIcon,
|
RectangleStackIcon,
|
||||||
ChartBarIcon,
|
ChartBarIcon,
|
||||||
} from '@heroicons/react/24/outline';
|
} from '@heroicons/react/24/outline';
|
||||||
|
import logoImage from '../assets/logo.png';
|
||||||
|
|
||||||
// 导航项类型定义
|
// 导航项类型定义
|
||||||
interface NavItem {
|
interface NavItem {
|
||||||
|
|
@ -152,7 +153,7 @@ const Navigation: React.FC = () => {
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<img
|
<img
|
||||||
src="/src/assets/logo.png"
|
src={logoImage}
|
||||||
alt="Aone Design Logo"
|
alt="Aone Design Logo"
|
||||||
className="w-8 h-8 rounded-lg shadow-sm"
|
className="w-8 h-8 rounded-lg shadow-sm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue