From b1efffc9fe37a36833e8f7f0ddc8354fd994706b Mon Sep 17 00:00:00 2001 From: callmeyan Date: Sun, 22 Dec 2024 00:12:26 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20=E6=96=B0=E9=97=BB=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E6=8E=A8=E5=85=A5=E7=BC=96=E8=BE=91=E5=90=8E=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/core.scss | 2 +- src/pages/news/components/button-push-news2article.tsx | 5 ++++- src/pages/news/index.tsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/assets/core.scss b/src/assets/core.scss index e5cc379..31359e4 100644 --- a/src/assets/core.scss +++ b/src/assets/core.scss @@ -177,7 +177,7 @@ } .data-list-container { - height: calc(100vh - var(--app-header-header) - 300px); + height: calc(100vh - var(--app-header-header) - 200px); overflow: auto; .data-list-container-inner { diff --git a/src/pages/news/components/button-push-news2article.tsx b/src/pages/news/components/button-push-news2article.tsx index 14b6be3..3d43247 100644 --- a/src/pages/news/components/button-push-news2article.tsx +++ b/src/pages/news/components/button-push-news2article.tsx @@ -3,14 +3,17 @@ import {showToast} from "@/components/message.ts"; import {useState} from "react"; import {push2article} from "@/service/api/news.ts"; import {IconArrowRight} from "@/components/icons"; +import {useNavigate} from "react-router-dom"; -export default function ButtonPushNews2Article(props: { ids: Id[] }) { +export default function ButtonPushNews2Article(props: { ids: Id[]; }) { const {modal} = App.useApp(); const [loading,setLoading] = useState(false) + const navigate = useNavigate(); const handlePush = () => { setLoading(true) push2article(props.ids).then(() => { showToast('推送成功', 'success') + navigate('/edit') }).catch(() => { showToast('推送失败', 'error') }).finally(() => { diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index f0d3418..7d64ff1 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -89,7 +89,7 @@ export default function NewsIndex() { {