💄 新闻素材推入编辑后直接跳转
This commit is contained in:
parent
e9c5e241f3
commit
b1efffc9fe
@ -177,7 +177,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.data-list-container {
|
.data-list-container {
|
||||||
height: calc(100vh - var(--app-header-header) - 300px);
|
height: calc(100vh - var(--app-header-header) - 200px);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
.data-list-container-inner {
|
.data-list-container-inner {
|
||||||
|
@ -3,14 +3,17 @@ import {showToast} from "@/components/message.ts";
|
|||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import {push2article} from "@/service/api/news.ts";
|
import {push2article} from "@/service/api/news.ts";
|
||||||
import {IconArrowRight} from "@/components/icons";
|
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 {modal} = App.useApp();
|
||||||
const [loading,setLoading] = useState(false)
|
const [loading,setLoading] = useState(false)
|
||||||
|
const navigate = useNavigate();
|
||||||
const handlePush = () => {
|
const handlePush = () => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
push2article(props.ids).then(() => {
|
push2article(props.ids).then(() => {
|
||||||
showToast('推送成功', 'success')
|
showToast('推送成功', 'success')
|
||||||
|
navigate('/edit')
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
showToast('推送失败', 'error')
|
showToast('推送失败', 'error')
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
@ -89,7 +89,7 @@ export default function NewsIndex() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<InfiniteScroller
|
<InfiniteScroller
|
||||||
className="grid grid-cols-3 gap-4 lg:grid-cols-4"
|
className="grid grid-cols-3 gap-4 lg:grid-cols-4 pb-10"
|
||||||
pagination={data?.pagination}
|
pagination={data?.pagination}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onCallback={(page) => {
|
onCallback={(page) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user