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

fix: 组件优化

parent 51ea4387
...@@ -16,6 +16,7 @@ import StatusSwitch from '@/components/StatusSwitch'; ...@@ -16,6 +16,7 @@ import StatusSwitch from '@/components/StatusSwitch';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants'; import { STATUS_ENUM } from '@/constants';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import PopConfirmControl from '@/components/PopConfirmControl';
const fetchData = async (params) => { const fetchData = async (params) => {
const { data } = await PublicApi.getMemberRolePage(params) const { data } = await PublicApi.getMemberRolePage(params)
...@@ -81,18 +82,12 @@ const MemberSystem: React.FC<{}> = () => { ...@@ -81,18 +82,12 @@ const MemberSystem: React.FC<{}> = () => {
render: (text:any, record:any) => { render: (text:any, record:any) => {
return <> return <>
<Button type='link' onClick={()=>updateItem(record)}>修改</Button> <Button type='link' onClick={()=>updateItem(record)}>修改</Button>
{ <PopConfirmControl
record.status === 0 ? onConfirm={() => deleteItem(record)}
<Popconfirm visible={record.status === 0}
title="确定要执行这个操作?" >
onConfirm={() => deleteItem(record)} <Button type='link'>删除</Button>
okText="是" </PopConfirmControl>
cancelText="否"
>
<Button type='link'>删除</Button>
</Popconfirm>
: null
}
</> </>
} }
} }
......
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