|
@@ -11,7 +11,7 @@ import {
|
|
|
A2_APIeditItem,
|
|
|
A2_APIgetInfoById,
|
|
|
A2_APIgetList,
|
|
|
- A2_APIupdateIndex,
|
|
|
+ // A2_APIupdateIndex,
|
|
|
} from "@/store/action/A2Gallery";
|
|
|
import { A2TableType } from "@/types";
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
@@ -97,16 +97,16 @@ function A2Edit({ editInfo, editFu, closeFu }: Props) {
|
|
|
);
|
|
|
|
|
|
// 点击置顶
|
|
|
- const updateIndexFu = useCallback(
|
|
|
- async (id: number, pid: number) => {
|
|
|
- const res = await A2_APIupdateIndex(id, pid);
|
|
|
- if (res.code === 0) {
|
|
|
- MessageFu.success("置顶成功!");
|
|
|
- upTableInfo();
|
|
|
- }
|
|
|
- },
|
|
|
- [upTableInfo]
|
|
|
- );
|
|
|
+ // const updateIndexFu = useCallback(
|
|
|
+ // async (id: number, pid: number) => {
|
|
|
+ // const res = await A2_APIupdateIndex(id, pid);
|
|
|
+ // if (res.code === 0) {
|
|
|
+ // MessageFu.success("置顶成功!");
|
|
|
+ // upTableInfo();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // [upTableInfo]
|
|
|
+ // );
|
|
|
|
|
|
const columns = useMemo(() => {
|
|
|
const arr: any = [
|
|
@@ -151,14 +151,14 @@ function A2Edit({ editInfo, editFu, closeFu }: Props) {
|
|
|
title: "操作",
|
|
|
render: (item: A2TableType, _: any, index: number) => (
|
|
|
<>
|
|
|
- <Button
|
|
|
+ {/* <Button
|
|
|
hidden={item.hasIndex === 1 || index === 0}
|
|
|
size="small"
|
|
|
type="text"
|
|
|
onClick={() => updateIndexFu(item.id, pid)}
|
|
|
>
|
|
|
置顶
|
|
|
- </Button>
|
|
|
+ </Button> */}
|
|
|
<Button
|
|
|
size="small"
|
|
|
type="text"
|
|
@@ -184,7 +184,7 @@ function A2Edit({ editInfo, editFu, closeFu }: Props) {
|
|
|
}
|
|
|
|
|
|
return arr;
|
|
|
- }, [delTableFu, editInfo.type, pid, updateIndexFu]);
|
|
|
+ }, [delTableFu, editInfo.type, pid]);
|
|
|
|
|
|
// 内部的 新增 、或者 编辑
|
|
|
const [isEdit, setIsEdit] = useState({
|