fix(ui): 修复登录与并发请求并统一表格、主题和页面展示
验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
@@ -26,10 +26,9 @@ import {
|
||||
Progress,
|
||||
Popover,
|
||||
Typography,
|
||||
Dropdown,
|
||||
} from '@/components/ui';
|
||||
import { Switch } from 'antd';
|
||||
import { IconMore } from '@/components/ui/icons';
|
||||
import { TableRowActions } from '@/components/common/table/TableToolbar';
|
||||
import {
|
||||
renderGroup,
|
||||
renderNumber,
|
||||
@@ -256,50 +255,48 @@ const renderOperations = (
|
||||
if (canChangeRole) {
|
||||
moreMenu.push(
|
||||
{
|
||||
node: 'item',
|
||||
name: t('提升'),
|
||||
key: 'promote',
|
||||
label: t('提升'),
|
||||
onClick: () => showPromoteModal(record),
|
||||
},
|
||||
{
|
||||
node: 'item',
|
||||
name: t('降级'),
|
||||
key: 'demote',
|
||||
label: t('降级'),
|
||||
onClick: () => showDemoteModal(record),
|
||||
},
|
||||
{ node: 'divider' },
|
||||
{ type: 'divider' },
|
||||
);
|
||||
}
|
||||
moreMenu.push({
|
||||
node: 'item',
|
||||
name: t('邀请记录'),
|
||||
key: 'invitations',
|
||||
label: t('邀请记录'),
|
||||
onClick: () => showInvitedUsersModal(record),
|
||||
});
|
||||
if (canManage) {
|
||||
moreMenu.push(
|
||||
{ node: 'divider' },
|
||||
{ type: 'divider' },
|
||||
{
|
||||
node: 'item',
|
||||
name: t('重置 Passkey'),
|
||||
key: 'reset-passkey',
|
||||
label: t('重置 Passkey'),
|
||||
onClick: () => showResetPasskeyModal(record),
|
||||
},
|
||||
{
|
||||
node: 'item',
|
||||
name: t('重置 2FA'),
|
||||
key: 'reset-2fa',
|
||||
label: t('重置 2FA'),
|
||||
onClick: () => showResetTwoFAModal(record),
|
||||
},
|
||||
{ node: 'divider' },
|
||||
{ type: 'divider' },
|
||||
{
|
||||
node: 'item',
|
||||
name: t('注销'),
|
||||
type: 'danger',
|
||||
key: 'delete',
|
||||
label: t('注销'),
|
||||
danger: true,
|
||||
onClick: () => showDeleteModal(record),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
// wrap 保留:移动端 CardTable 把按钮放进 ~280px 的卡片行里,Semi Space 默认
|
||||
// wrap:false 时溢出会被 .ant-card{overflow:hidden} 裁掉(不是滚动,是永久看不到)
|
||||
<Space wrap className='console-module-row-actions'>
|
||||
<TableRowActions items={moreMenu}>
|
||||
{canManage && (
|
||||
<>
|
||||
<Button
|
||||
@@ -314,15 +311,7 @@ const renderOperations = (
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
<Dropdown menu={moreMenu} trigger='click' position='bottomRight'>
|
||||
<Button
|
||||
type='tertiary'
|
||||
size='small'
|
||||
icon={<IconMore />}
|
||||
aria-label={t('更多操作')}
|
||||
/>
|
||||
</Dropdown>
|
||||
</Space>
|
||||
</TableRowActions>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -394,9 +383,7 @@ export const getUsersColumns = ({
|
||||
title: t('操作'),
|
||||
dataIndex: 'operate',
|
||||
fixed: 'right',
|
||||
// 200 而不是更窄:en 下「Edit + Disable + 更多」三控件 ≈ 190px,
|
||||
// 再窄会触发 Space wrap 折行,重新撑高行高(本次改版要消灭的问题)
|
||||
width: 120,
|
||||
width: 135,
|
||||
render: (text, record, index) =>
|
||||
renderOperations(text, record, {
|
||||
setEditingUser,
|
||||
|
||||
Reference in New Issue
Block a user