- 当前{state.activeIndex == -1?'暂未播放':`播放到${state.activeIndex}条`},
+ 当前{state.activeIndex == -1 ? '暂未播放' : `播放到${state.activeIndex}条`},
共{videoData.length}条
- {editable?'已解锁':'锁定状态不可排序'}
+ {editable ? '已解锁' : '锁定状态不可排序'}
{editable ? : }
@@ -222,7 +222,7 @@ export default function LiveIndex() {
-
setState({showToTop: top > 30})}>
+ setState({showToTop: top > 30})}>
{
const {active, over} = e;
@@ -266,9 +266,9 @@ export default function LiveIndex() {
- scrollerRef.current?.scrollToPosition(0)}/>
+ scrollerRef.current?.scrollToPosition(0)}/>
批量删除
-
+
+
)
}
\ No newline at end of file
diff --git a/src/pages/news/components/button-delete-batch.tsx b/src/pages/news/components/button-delete-batch.tsx
index d520764..63b67ea 100644
--- a/src/pages/news/components/button-delete-batch.tsx
+++ b/src/pages/news/components/button-delete-batch.tsx
@@ -1,13 +1,13 @@
-import {App, Button} from "antd";
+import {App} from "antd";
import {showToast} from "@/components/message.ts";
import {useState} from "react";
import {push2article} from "@/service/api/news.ts";
-import {IconArrowRight, IconDelete} from "@/components/icons";
+import {IconDelete} from "@/components/icons";
import {useNavigate} from "react-router-dom";
export default function ButtonDeleteBatch(props: { ids: Id[]; }) {
const {modal} = App.useApp();
- const [loading,setLoading] = useState(false)
+ const [loading, setLoading] = useState(false)
const navigate = useNavigate();
const handlePush = () => {
setLoading(true)
@@ -37,10 +37,10 @@ export default function ButtonDeleteBatch(props: { ids: Id[]; }) {
)
diff --git a/src/pages/news/components/button-news-download.tsx b/src/pages/news/components/button-news-download.tsx
index 6c0129c..5fa50c5 100644
--- a/src/pages/news/components/button-news-download.tsx
+++ b/src/pages/news/components/button-news-download.tsx
@@ -65,6 +65,7 @@ async function downloadAsZip(list: NewsInfo[]) {
export default function ButtonNewsDownload(props: { ids: Id[] }) {
const [loading, setLoading] = useState(false)
const onDownloadClick = async (ids: Id[]) => {
+ if(loading) return;
if (props.ids.length === 0) {
showToast('请选择要下载的新闻', 'warning')
return
@@ -80,13 +81,13 @@ export default function ButtonNewsDownload(props: { ids: Id[] }) {
}
}
return (
-
)
}
diff --git a/src/pages/news/components/button-push-news2article.tsx b/src/pages/news/components/button-push-news2article.tsx
index 3d43247..333f621 100644
--- a/src/pages/news/components/button-push-news2article.tsx
+++ b/src/pages/news/components/button-push-news2article.tsx
@@ -1,4 +1,4 @@
-import {App, Button} from "antd";
+import {App} from "antd";
import {showToast} from "@/components/message.ts";
import {useState} from "react";
import {push2article} from "@/service/api/news.ts";
@@ -22,7 +22,7 @@ export default function ButtonPushNews2Article(props: { ids: Id[]; }) {
}
const onPushClick = () => {
if (props.ids.length === 0) {
- showToast('请选择要推送的新闻', 'warning')
+ showToast('请选择要推入编辑的新闻', 'warning')
return
}
modal.confirm({
@@ -33,14 +33,13 @@ export default function ButtonPushNews2Article(props: { ids: Id[]; }) {
})
}
return (
-
}
- iconPosition={'end'}
+ className='bg-[#4096ff] hover:bg-blue-600 text-white'
>
推入编辑
-
+
+
)
}
\ No newline at end of file
diff --git a/src/pages/news/components/button-push2video.tsx b/src/pages/news/components/button-push2video.tsx
index 801ff1b..b2cd512 100644
--- a/src/pages/news/components/button-push2video.tsx
+++ b/src/pages/news/components/button-push2video.tsx
@@ -1,8 +1,8 @@
-import {Button, Modal} from "antd";
+import { Modal} from "antd";
import React, {useState} from "react";
import {showErrorToast, showToast} from "@/components/message.ts";
import {push2video} from "@/service/api/article.ts";
-import {IconArrowRight, IconDelete} from "@/components/icons";
+import {IconArrowRight} from "@/components/icons";
export default function ButtonPush2Video(props: { ids: Id[]; onSuccess?: () => void; }) {
@@ -29,16 +29,15 @@ export default function ButtonPush2Video(props: { ids: Id[]; onSuccess?: () => v
}
return (
- }
+ className='bg-[#4096ff] hover:bg-blue-600 text-white'
onClick={onPushClick}
- iconPosition={'end'}
>
生成视频
-
+
+
)
}
\ No newline at end of file
diff --git a/src/pages/news/edit.tsx b/src/pages/news/edit.tsx
index b593622..b89673f 100644
--- a/src/pages/news/edit.tsx
+++ b/src/pages/news/edit.tsx
@@ -77,10 +77,9 @@ export default function NewEdit() {
{
handleCheckAll(!state.checkAll)
}}>全选
-
{
+ {
handleCheckAll(e.target.checked)
- }}
- indeterminate={selectedRowKeys.length > 0 && selectedRowKeys.length < data?.list.length}>
+ }} />