fix(ui): 统一表格筛选分页和用量明细,升级 ESLint

This commit is contained in:
zhanjunhao
2026-11-19 23:09:58 +08:00
parent 13105bdba5
commit 74ca103334
76 changed files with 2556 additions and 2410 deletions
@@ -21,7 +21,6 @@ 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,
@@ -32,6 +31,7 @@ import {
Select,
Tag,
Avatar,
Popconfirm,
Typography,
Space,
Banner,
@@ -307,34 +307,28 @@ const CustomerServiceSetting = () => {
title: t('操作'),
dataIndex: 'action',
render: (_, record) => (
<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),
}),
},
]}
>
<Space>
<Button
onClick={() => handleToggleStatus(record)}
type='link'
size='small'
danger={(record.status === 1 ? 'danger' : 'primary') === 'danger'}
>
{record.status === 1 ? t('下线') : t('上线')}
</Button>
<Button onClick={() => openModal(record)} type='link' size='small'>
{t('编辑')}
</Button>
</TableRowActions>
<Popconfirm
title={t('确认删除')}
content={t('确定要删除这个客服吗?')}
onConfirm={() => handleDelete(record.id)}
>
<Button type='link' size='small' danger>
{t('删除')}
</Button>
</Popconfirm>
</Space>
),
},
];