diff --git a/docs/changelog/index.md b/docs/changelog/index.md index 366803f3..67e86df0 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -20,6 +20,7 @@ sidebar: false ### 修复 +- 修复添加 DNS 账号时因直接传递 class static 方法作为 React Query 的 mutationFn 导致 JavaScript 丢失 `this` 上下文报错 `this.post is not a function` 的问题。 - 修复侧边栏一级菜单项当前页面字体颜色被硬编码为 `#6366F1` 的问题,改用 CSS 主题变量 `text-sidebar-primary`,以保证在多主题系统下的色彩一致性。 - 修复默认(Default)主题因遗漏声明 `destructive-foreground` 变量,导致删除按钮(如确认删除证书弹窗)在某些状态下渲染为黑底黑字而无法阅读的问题。 diff --git a/frontend/app/(main)/websites/components/dns-account-create-dialog.tsx b/frontend/app/(main)/websites/components/dns-account-create-dialog.tsx index e0adfd5b..c8f9893c 100644 --- a/frontend/app/(main)/websites/components/dns-account-create-dialog.tsx +++ b/frontend/app/(main)/websites/components/dns-account-create-dialog.tsx @@ -20,6 +20,7 @@ import {Input} from '@/components/ui/input'; import {Label} from '@/components/ui/label'; import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue,} from '@/components/ui/select'; import {DnsAccountService} from '@/lib/services/openflare'; +import type {DnsAccountMutationPayload} from '@/lib/services/openflare'; import {getErrorMessage} from './website-utils'; @@ -52,7 +53,7 @@ export function DnsAccountCreateDialog({ }); const createMutation = useMutation({ - mutationFn: DnsAccountService.create, + mutationFn: (payload: DnsAccountMutationPayload) => DnsAccountService.create(payload), onSuccess: async () => { await queryClient.invalidateQueries({queryKey: dnsAccountsQueryKey}); form.reset();