Commit f06638fd authored by 前端-许佳敏's avatar 前端-许佳敏

fix: 组件优化

parent 51ea4387
......@@ -16,6 +16,7 @@ import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import PopConfirmControl from '@/components/PopConfirmControl';
const fetchData = async (params) => {
const { data } = await PublicApi.getMemberRolePage(params)
......@@ -81,18 +82,12 @@ const MemberSystem: React.FC<{}> = () => {
render: (text:any, record:any) => {
return <>
<Button type='link' onClick={()=>updateItem(record)}>修改</Button>
{
record.status === 0 ?
<Popconfirm
title="确定要执行这个操作?"
<PopConfirmControl
onConfirm={() => deleteItem(record)}
okText="是"
cancelText="否"
visible={record.status === 0}
>
<Button type='link'>删除</Button>
</Popconfirm>
: null
}
</PopConfirmControl>
</>
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment