fix(ui): 修复登录与并发请求并统一表格、主题和页面展示
验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
Plus as ActionPlus,
|
||||
Upload as ActionUpload,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { TableRowActions } from '@/components/common/table/TableToolbar';
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import {
|
||||
Card,
|
||||
@@ -31,7 +32,6 @@ import {
|
||||
Select,
|
||||
Tag,
|
||||
Avatar,
|
||||
Popconfirm,
|
||||
Typography,
|
||||
Space,
|
||||
Banner,
|
||||
@@ -307,28 +307,34 @@ const CustomerServiceSetting = () => {
|
||||
title: t('操作'),
|
||||
dataIndex: 'action',
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
onClick={() => handleToggleStatus(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
danger={(record.status === 1 ? 'danger' : 'primary') === 'danger'}
|
||||
>
|
||||
{record.status === 1 ? t('下线') : t('上线')}
|
||||
</Button>
|
||||
<TableRowActions
|
||||
items={[
|
||||
{
|
||||
key: 'status',
|
||||
label: record.status === 1 ? t('下线') : t('上线'),
|
||||
onClick: () => handleToggleStatus(record),
|
||||
danger: (record.status === 1 ? 'danger' : 'primary') === 'danger',
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: t('删除'),
|
||||
danger: true,
|
||||
onClick: () =>
|
||||
Modal.confirm({
|
||||
title: t('确认删除'),
|
||||
content: t('确定要删除这个客服吗?'),
|
||||
okText: t('确认'),
|
||||
cancelText: t('取消'),
|
||||
okButtonProps: { danger: true },
|
||||
onOk: () => handleDelete(record.id),
|
||||
}),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Button onClick={() => openModal(record)} type='link' size='small'>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确认删除')}
|
||||
content={t('确定要删除这个客服吗?')}
|
||||
onConfirm={() => handleDelete(record.id)}
|
||||
>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</TableRowActions>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user