feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面
This commit is contained in:
@@ -90,18 +90,22 @@ const OrgStatCard = ({
|
||||
const hasCountUp = typeof countTo === 'number';
|
||||
const animated = useCountUp(hasCountUp ? countTo : 0, { decimals });
|
||||
const displayValue = hasCountUp
|
||||
? (formatter ? formatter(animated) : animated.toLocaleString())
|
||||
? formatter
|
||||
? formatter(animated)
|
||||
: animated.toLocaleString()
|
||||
: value;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`rounded-xl border border-[var(--border-subtle)] bg-[var(--surface-card)] shadow-[var(--elevation-xs)] ${compact ? 'p-3' : 'p-4'} ${className}`}
|
||||
className={`org-stat-card rounded-xl border border-[var(--border-subtle)] bg-[var(--surface-card)] shadow-[var(--elevation-xs)] ${compact ? 'p-3' : 'p-4'} ${className}`}
|
||||
>
|
||||
<div className={`flex ${compact ? 'items-center gap-3' : 'flex-col'}`}>
|
||||
<div className={`flex items-center gap-2.5 ${compact ? '' : 'mb-2.5'}`}>
|
||||
<div
|
||||
className={`org-stat-label flex items-center gap-2.5 ${compact ? '' : 'mb-2.5'}`}
|
||||
>
|
||||
{Icon && (
|
||||
<span
|
||||
className={`inline-flex flex-shrink-0 items-center justify-center rounded-lg ${palette.icon} ${compact ? 'h-8 w-8' : 'h-9 w-9'}`}
|
||||
className={`org-stat-icon inline-flex flex-shrink-0 items-center justify-center rounded-lg ${palette.icon} ${compact ? 'h-8 w-8' : 'h-9 w-9'}`}
|
||||
>
|
||||
<Icon size={compact ? 15 : 17} />
|
||||
</span>
|
||||
@@ -140,12 +144,12 @@ const OrgStatCard = ({
|
||||
) : (
|
||||
<>
|
||||
<div
|
||||
className={`text-2xl font-semibold tracking-tight tabular-nums ${palette.value}`}
|
||||
className={`org-stat-value text-2xl font-semibold tracking-tight tabular-nums ${palette.value}`}
|
||||
>
|
||||
{displayValue}
|
||||
</div>
|
||||
{sub && (
|
||||
<div className='mt-1 text-xs text-gray-500 dark:text-gray-400'>
|
||||
<div className='org-stat-hint mt-1 text-xs text-gray-500 dark:text-gray-400'>
|
||||
{sub}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user