From b001a19b3d2be8009836d43a22639ff681c46441 Mon Sep 17 00:00:00 2001 From: Pine Date: Thu, 27 Aug 2026 15:50:07 +0800 Subject: [PATCH] =?UTF-8?q?style(admin):=20=E9=A2=84=E8=A7=88=E5=A4=96?= =?UTF-8?q?=E9=93=BE=E5=8E=BB=E7=AE=AD=E5=A4=B4emoji?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/article-editor/index.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/pages/article-editor/index.tsx b/src/pages/article-editor/index.tsx index ea9486a..b9b0f0f 100644 --- a/src/pages/article-editor/index.tsx +++ b/src/pages/article-editor/index.tsx @@ -44,6 +44,8 @@ export default function ArticleEditor() { const [cover, setCover] = React.useState(""); const [video, setVideo] = React.useState(""); const [link, setLink] = React.useState(""); + const [cardMode, setCardMode] = React.useState("small"); + const [isPublic, setIsPublic] = React.useState(true); const [html, setHtml] = React.useState(""); const [editor, setEditor] = React.useState(null); const [busy, setBusy] = React.useState(false); @@ -63,6 +65,7 @@ export default function ArticleEditor() { contentApi.getOne(id).then((r) => { setCat(r.type || "policy"); setTitle(r.title || ""); setAuthor(r.publisher_name || ""); setCover(r.cover || ""); setVideo(r.video || ""); setLink(r.link || ""); setHtml(r.body || ""); + setCardMode(r.card_mode || "small"); setIsPublic(r.is_public !== false); }).catch((e) => setErr((e as Error).message || "加载失败")); return () => { if (editor) editor.destroy(); }; }, [id]); @@ -79,6 +82,7 @@ export default function ArticleEditor() { type: cat, title, body: html, cover, video, link, publisher_name: author, + card_mode: cardMode, is_public: isPublic, status, summary: stripHtml(html).slice(0, 80), }; @@ -138,6 +142,17 @@ export default function ArticleEditor() { {CATS.map((c) => {c.label})} + + setVideo(e.target.value)} /> setLink(e.target.value)} /> @@ -175,7 +190,7 @@ export default function ArticleEditor() {
{author || "云超服"}
{video &&
} - {link && 原文链接 ↗} + {link && 原文链接}