登录页切换为官方 input-group 组合并将全站提示从 antd message 统一为 sonner toast,确保通知位置与风格一致。同时补齐相关 shadcn CLI 生成组件及构建配置更新。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { useState } from "react";
|
||||
import { Button, message } from "antd";
|
||||
import { Button } from "antd";
|
||||
import { Check, Copy } from "lucide-react";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import remarkMath from "remark-math";
|
||||
import rehypeKatex from "rehype-katex";
|
||||
import rehypeHighlight from "rehype-highlight";
|
||||
import { toast } from "sonner";
|
||||
import "katex/dist/katex.min.css";
|
||||
import "highlight.js/styles/github.css";
|
||||
import type { ReactNode } from "react";
|
||||
@@ -34,10 +35,10 @@ function MarkdownPreBlock(props: { children: ReactNode }) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(codeText);
|
||||
setCopied(true);
|
||||
message.success("代码已复制");
|
||||
toast.success("代码已复制");
|
||||
window.setTimeout(() => setCopied(false), 1200);
|
||||
} catch {
|
||||
message.error("复制失败");
|
||||
toast.error("复制失败");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user