diff --git a/src/pages/video/index.tsx b/src/pages/video/index.tsx
index 08fcabe..28e951b 100644
--- a/src/pages/video/index.tsx
+++ b/src/pages/video/index.tsx
@@ -65,12 +65,13 @@ export default function VideoIndex() {
checkedAll: !state.checkedAll
})
}
- const handleModifySort = () => {
- setVideoData((items) => {
- modifyOrder(items.map(s => s.id)).catch(() => {
- showToast('调整视频顺序失败,请重试!')
- }).finally(loadList)
- return items;
+ const handleModifySort = (items:VideoInfo[]) => {
+ // .then(() => {
+ // showToast('调整视频顺序成功!','success')
+ // })
+ modifyOrder(items.map(s => s.id)).catch(()=>{
+ loadList();
+ showToast('调整视频顺序失败,请重试!','warning')
})
}
//
@@ -94,8 +95,6 @@ export default function VideoIndex() {
}
},[videoData,scrollerRef])
-
-
return (
{contextHolder}
@@ -148,16 +147,18 @@ export default function VideoIndex() {
setVideoData((items) => {
oldIndex = items.findIndex(s => s.id == active.id);
newIndex = items.findIndex(s => s.id == over.id);
- return arrayMove(items, oldIndex, newIndex);
+ const newSorts = arrayMove(items, oldIndex, newIndex);
+ handleModifySort(newSorts)
+ return newSorts;
});
- modal.confirm({
- title: '提示',
- content: '是否要移动到指定位置',
- onOk: handleModifySort,
- onCancel: () => {
- setVideoData(originArr);
- }
- })
+ // modal.confirm({
+ // title: '提示',
+ // content: '是否要移动到指定位置',
+ // onOk: handleModifySort,
+ // onCancel: () => {
+ // setVideoData(originArr);
+ // }
+ // })
}
}}>
@@ -179,6 +180,7 @@ export default function VideoIndex() {
})
}}
onItemClick={ () => playVideo(v, index)}
+ onRemove={()=>{}}
onEdit={v.status == VideoStatus.Generating ? undefined : () => {
setEditId(v.article_id)
}}
@@ -195,21 +197,21 @@ export default function VideoIndex() {
scrollerRef.current?.scrollToPosition(0)}/>
- {
+ {checkedIdArray.length > 0 && {
showToast('删除成功!', 'success')
loadList()
}}
- >
- 批量删除
-
-
+ >
+ 批量删除
+
+ }
diff --git a/src/routes/layout/dashboard-layout.tsx b/src/routes/layout/dashboard-layout.tsx
index 3fbf55a..5db3593 100644
--- a/src/routes/layout/dashboard-layout.tsx
+++ b/src/routes/layout/dashboard-layout.tsx
@@ -20,12 +20,12 @@ const NavigationUserContainer = () => {
const {logout, user} = useAuth()
const navigate = useNavigate()
const items: MenuProps['items'] = [
- {
- key: 'profile',
- label:
{
- navigate('/history')
- }}>视频库
,
- },
+ // {
+ // key: 'profile',
+ // label:
{
+ // navigate('/history')
+ // }}>视频库
,
+ // },
{
key: 'logout',
label:
{