事件中心UI优化
This commit is contained in:
@@ -13,13 +13,23 @@ import { getImportanceConfig } from '../../../../constants/importanceLevels';
|
||||
* 重要性印章组件(模拟盖章效果)
|
||||
* @param {Object} props
|
||||
* @param {string} props.importance - 重要性等级 (S/A/B/C)
|
||||
* @param {string} props.size - 印章尺寸 ('sm' | 'md' | 'lg')
|
||||
*/
|
||||
const ImportanceStamp = ({ importance }) => {
|
||||
const ImportanceStamp = ({ importance, size = 'md' }) => {
|
||||
const config = getImportanceConfig(importance);
|
||||
|
||||
// 印章颜色
|
||||
const stampColor = useColorModeValue(config.badgeBg, config.badgeBg);
|
||||
|
||||
// 尺寸配置
|
||||
const sizeConfig = {
|
||||
sm: { outer: '40px', inner: '34px', fontSize: 'md', borderOuter: '2px', borderInner: '1.5px' },
|
||||
md: { outer: '50px', inner: '42px', fontSize: 'xl', borderOuter: '3px', borderInner: '2px' },
|
||||
lg: { outer: '60px', inner: '52px', fontSize: '2xl', borderOuter: '4px', borderInner: '2.5px' },
|
||||
};
|
||||
|
||||
const currentSize = sizeConfig[size];
|
||||
|
||||
return (
|
||||
<Box
|
||||
position="relative"
|
||||
@@ -28,41 +38,43 @@ const ImportanceStamp = ({ importance }) => {
|
||||
{/* 外层圆形边框(双圈) */}
|
||||
<Box
|
||||
position="relative"
|
||||
w="50px"
|
||||
h="50px"
|
||||
w={currentSize.outer}
|
||||
h={currentSize.outer}
|
||||
borderRadius="50%"
|
||||
borderWidth="3px"
|
||||
borderWidth={currentSize.borderOuter}
|
||||
borderColor={stampColor}
|
||||
display="flex"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
transform="rotate(-15deg)"
|
||||
opacity={0.85}
|
||||
boxShadow="0 2px 8px rgba(0,0,0,0.15)"
|
||||
opacity={0.9}
|
||||
boxShadow="0 3px 12px rgba(0,0,0,0.2)"
|
||||
bg={useColorModeValue('white', 'gray.800')}
|
||||
_hover={{
|
||||
opacity: 1,
|
||||
transform: "rotate(-15deg) scale(1.1)",
|
||||
transform: "rotate(-15deg) scale(1.15)",
|
||||
boxShadow: "0 4px 16px rgba(0,0,0,0.3)",
|
||||
}}
|
||||
transition="all 0.3s ease"
|
||||
>
|
||||
{/* 内层圆形边框 */}
|
||||
<Box
|
||||
position="absolute"
|
||||
w="42px"
|
||||
h="42px"
|
||||
w={currentSize.inner}
|
||||
h={currentSize.inner}
|
||||
borderRadius="50%"
|
||||
borderWidth="2px"
|
||||
borderWidth={currentSize.borderInner}
|
||||
borderColor={stampColor}
|
||||
/>
|
||||
|
||||
{/* 印章文字 */}
|
||||
<Text
|
||||
fontSize="xl"
|
||||
fontSize={currentSize.fontSize}
|
||||
fontWeight="black"
|
||||
color={stampColor}
|
||||
fontFamily="'STKaiti', 'KaiTi', 'SimKai', serif"
|
||||
fontFamily={config.stampFont}
|
||||
letterSpacing="2px"
|
||||
textShadow="0 0 1px currentColor"
|
||||
textShadow="0 0 2px currentColor"
|
||||
>
|
||||
{config.stampText}
|
||||
</Text>
|
||||
|
||||
Reference in New Issue
Block a user