refactor: 提示与确认框改用 App 上下文实例
CI / Static checks (push) Has been cancelled
CI / Production build (push) Has been cancelled
CI / API integration (push) Has been cancelled
CI / Taro builds (acheng-campus-food) (push) Has been cancelled
CI / Taro builds (atelier-solopreneur) (push) Has been cancelled
CI / Taro builds (linjing-editorial) (push) Has been cancelled
CI / Browser regression (push) Has been cancelled

This commit is contained in:
que01 committed 2026-10-21 10:34:34 +08:00
1 parent 3a0099e674
commit 06619a191f
22 files changed
+167 -27

No files matched your search

@@ -1 +0,0 @@
export { message as adminMessage } from "antd";
+2 -1
View File
@@ -1,5 +1,5 @@
import { CloudUploadOutlined, DeleteOutlined, PictureOutlined } from "@ant-design/icons";
import { Alert, Button, Image, Popconfirm, Spin, Upload, message } from "antd";
import { Alert, App, Button, Image, Popconfirm, Spin, Upload } from "antd";
import { useEffect, useMemo, useState } from "react";
import { apiBaseUrl, authenticatedFetch, createApiClient } from "../lib/api.js";
@@ -12,6 +12,7 @@ interface ImageUrlFieldProps {
}
export function ImageUrlField({ id, value, onChange, placeholder, scope }: ImageUrlFieldProps) {
const { message } = App.useApp();
const imageUrl = typeof value === "string" ? value.trim() : "";
const [uploading, setUploading] = useState(false);
const [storageStatus, setStorageStatus] = useState<
@@ -1,4 +1,4 @@
import { Form, message } from "antd";
import { App, Form } from "antd";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useEffect, useMemo, useState } from "react";
import type { TemplateAdminSection } from "@personal-brand/api-client";
@@ -59,6 +59,7 @@ export function useRecordContentEditorState({
onDraft?: ((values: PresentationValues) => void) | undefined;
onSaved?: (() => void) | undefined;
}) {
const { message } = App.useApp();
const [form] = Form.useForm<PresentationValues>();
const queryClient = useQueryClient();
const [draftValues, setDraftValues] = useState<PresentationValues>(() =>