import React from "react"; import { Divider, message, Popconfirm, Table } from "antd"; import { delete替换nameApi } from "../api"; import { useStore } from "../index"; export default function List() { const { pagination, setCurrent, setOpen } = useStore(); function editItem(item: 替换name.ListVO) { setCurrent(item); setOpen(true); } function deleteItem(id: number) { const hide = message.loading('删除中,请稍后...', 0); delete替换nameApi(id) .then((res) => { hide(); message.success(res.result); pagination.setLoading(true); }) .catch((error) => { hide(); message.error(error.message); }); } return ( 替换name.ListVO) => ( <> editItem(record)}>编辑 确定删除?} onConfirm={() => deleteItem(record.id || -1)}> 删除 )} />
); }