c9a263f8
王强
init
|
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { delete<feewee>替换name</feewee>Api } from "../api";
import { useStore } from "../index";
export default function List() {
const { pagination, setCurrent, setOpen } = useStore();
function editItem(item: <feewee>替换name</feewee>.ListVO) {
setCurrent(item);
setOpen(true);
}
function deleteItem(id: number) {
const hide = message.loading('删除中,请稍后...', 0);
delete<feewee>替换name</feewee>Api(id)
.then((res) => {
hide();
message.success(res.result);
pagination.setLoading(true);
})
.catch((error) => {
hide();
message.error(error.message);
});
}
return (
<Table dataSource={pagination.list} rowKey="id" loading={pagination.loading} pagination={pagination.paginationConfig}>
<Table.Column title="name" align="left" dataIndex="name" />
<Table.Column
title="操作"
align="left"
render={(record: <feewee>替换name</feewee>.ListVO) => (
<>
|