import React from "react"; import { Divider, message, Popconfirm, Popover, 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) => ( <> 编辑 确定删除?} onConfirm={() => deleteItem(record.id || -1)}> 删除 )} />
); }