2026-06-13 12:44:48 +08:00
|
|
|
import React from 'react'
|
|
|
|
|
import { Space, Typography } from 'antd'
|
|
|
|
|
import { ThunderboltOutlined } from '@ant-design/icons'
|
|
|
|
|
import { useLanguageStore } from '../../store/languageStore'
|
|
|
|
|
|
|
|
|
|
const { Text, Title } = Typography
|
|
|
|
|
|
|
|
|
|
interface CompanyLogoProps {
|
|
|
|
|
showText?: boolean
|
|
|
|
|
size?: 'small' | 'medium' | 'large'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CompanyLogo: React.FC<CompanyLogoProps> = ({ showText = true, size = 'medium' }) => {
|
|
|
|
|
const { t, currentLanguage } = useLanguageStore()
|
|
|
|
|
const sizeMap = {
|
|
|
|
|
small: { fontSize: 14, iconSize: 20 },
|
|
|
|
|
medium: { fontSize: 16, iconSize: 28 },
|
|
|
|
|
large: { fontSize: 20, iconSize: 36 }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { fontSize, iconSize } = sizeMap[size]
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Space align="center" style={{ cursor: 'pointer' }}>
|
|
|
|
|
{/* 图标 */}
|
|
|
|
|
<ThunderboltOutlined
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: iconSize,
|
|
|
|
|
color: '#1890ff',
|
|
|
|
|
fontWeight: 'bold'
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* 公司名称 */}
|
|
|
|
|
{showText && (
|
|
|
|
|
<div>
|
|
|
|
|
<Title
|
|
|
|
|
level={5}
|
|
|
|
|
style={{
|
|
|
|
|
margin: 0,
|
|
|
|
|
fontSize: fontSize,
|
|
|
|
|
color: '#262626',
|
|
|
|
|
fontWeight: 600
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{t('login.title')}
|
|
|
|
|
</Title>
|
|
|
|
|
<Text
|
|
|
|
|
type="secondary"
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: fontSize - 4,
|
|
|
|
|
display: 'block',
|
|
|
|
|
marginTop: -2
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Qingyuan Power Laos
|
|
|
|
|
</Text>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</Space>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default CompanyLogo
|