feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面
This commit is contained in:
@@ -49,7 +49,7 @@ import {
|
||||
Tag,
|
||||
Tooltip,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Plus,
|
||||
Pencil,
|
||||
@@ -150,19 +150,19 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<div
|
||||
className={`relative rounded-xl border bg-white/75 backdrop-blur-xl transition-all duration-150 dark:bg-[#0e1430]/65 ${
|
||||
selected
|
||||
? 'border-[var(--semi-color-primary)] shadow-lg ring-2 ring-[var(--semi-color-primary-light-default)]'
|
||||
: 'border-white/60 shadow-[0_10px_30px_-14px_rgba(15,23,42,0.35)] hover:border-[var(--semi-color-primary-light-active)] hover:shadow-lg dark:border-white/10'
|
||||
? 'border-[var(--ui-color-primary)] shadow-lg ring-2 ring-[var(--ui-color-primary-light-default)]'
|
||||
: 'border-white/60 shadow-[0_10px_30px_-14px_rgba(15,23,42,0.35)] hover:border-[var(--ui-color-primary-light-active)] hover:shadow-lg dark:border-white/10'
|
||||
} ${active ? '' : 'opacity-70'}`}
|
||||
style={{ width: NODE_WIDTH }}
|
||||
>
|
||||
{/* 根节点渐变顶条:一眼区分树的入口 */}
|
||||
{isRoot && (
|
||||
<div className='absolute inset-x-0 top-0 h-[3px] rounded-t-xl bg-gradient-to-r from-[var(--semi-color-primary)] to-[var(--semi-color-primary-light-active)]' />
|
||||
<div className='absolute inset-x-0 top-0 h-[3px] rounded-t-xl bg-gradient-to-r from-[var(--ui-color-primary)] to-[var(--ui-color-primary-light-active)]' />
|
||||
)}
|
||||
<Handle
|
||||
type='target'
|
||||
position={targetPos}
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--semi-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--ui-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
/>
|
||||
<div className='px-3.5 pt-3'>
|
||||
<div className='flex items-center justify-between gap-2'>
|
||||
@@ -248,7 +248,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
);
|
||||
const danger = pct >= 90;
|
||||
return (
|
||||
<div className='mt-2 rounded-md bg-[var(--semi-color-fill-0)] px-2 py-1'>
|
||||
<div className='mt-2 rounded-md bg-[var(--ui-color-fill-0)] px-2 py-1'>
|
||||
<div className='flex items-center justify-between gap-2 text-[11px] leading-4'>
|
||||
<span className='text-gray-500 dark:text-gray-400 flex-shrink-0'>
|
||||
{t('预算')} · {budgetInfo.label}
|
||||
@@ -256,7 +256,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<span
|
||||
className={
|
||||
danger
|
||||
? 'font-medium text-[var(--semi-color-danger)] truncate'
|
||||
? 'font-medium text-[var(--ui-color-danger)] truncate'
|
||||
: 'text-gray-600 dark:text-gray-300 truncate'
|
||||
}
|
||||
title={`${renderQuota(budgetInfo.used, 2)} / ${renderQuota(budgetInfo.cap, 2)}`}
|
||||
@@ -271,8 +271,8 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
style={{
|
||||
width: `${pct}%`,
|
||||
background: danger
|
||||
? 'var(--semi-color-danger)'
|
||||
: 'var(--semi-color-primary)',
|
||||
? 'var(--ui-color-danger)'
|
||||
: 'var(--ui-color-primary)',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -329,7 +329,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<Handle
|
||||
type='source'
|
||||
position={sourcePos}
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--semi-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--ui-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -697,8 +697,8 @@ const FlowInner = ({
|
||||
nodeColor={(n) => {
|
||||
const dept = deptMap[parseInt(n.id, 10)];
|
||||
return dept && dept.status === 1
|
||||
? 'var(--semi-color-primary-light-active)'
|
||||
: 'var(--semi-color-fill-2)';
|
||||
? 'var(--ui-color-primary-light-active)'
|
||||
: 'var(--ui-color-fill-2)';
|
||||
}}
|
||||
maskColor={
|
||||
colorMode === 'dark'
|
||||
@@ -774,7 +774,7 @@ const FlowInner = ({
|
||||
return (
|
||||
<div
|
||||
key={m.user_id}
|
||||
className='flex items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-[var(--semi-color-fill-0)]'
|
||||
className='flex items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-[var(--ui-color-fill-0)]'
|
||||
>
|
||||
<Avatar size='extra-small' color='blue'>
|
||||
{name.slice(0, 1).toUpperCase()}
|
||||
|
||||
Reference in New Issue
Block a user