[fix]:[FL-59][系统参数页面优化]

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
chengkai3
2026-06-09 09:49:01 +08:00
parent 4e2b3dcdad
commit 0b2d7828ad
+20 -12
View File
@@ -5,6 +5,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { useCallback, useEffect, useMemo, useRef, useState, type CSSProperties } from "react"; import { useCallback, useEffect, useMemo, useRef, useState, type CSSProperties } from "react";
import { import {
Button, Button,
Card,
Empty, Empty,
Form, Form,
Input, Input,
@@ -15,8 +16,10 @@ import {
Space, Space,
Table, Table,
Tag, Tag,
type CardProps,
type TableColumnsType, type TableColumnsType,
} from "antd"; } from "antd";
import type { ComponentType } from "react";
import { useAuth } from "@/components/auth-provider"; import { useAuth } from "@/components/auth-provider";
import { useToastFeedback } from "@/hooks/use-toast-feedback"; import { useToastFeedback } from "@/hooks/use-toast-feedback";
@@ -53,8 +56,10 @@ const PARAM_STATUS_OPTIONS = [
{ label: "已禁用", value: "disabled" }, { label: "已禁用", value: "disabled" },
] as const satisfies ReadonlyArray<{ label: string; value: FormState["status"] }>; ] as const satisfies ReadonlyArray<{ label: string; value: FormState["status"] }>;
const AntCard = Card as unknown as ComponentType<CardProps>;
const PARAM_TABLE_MIN_SCROLL_Y = 180; const PARAM_TABLE_MIN_SCROLL_Y = 180;
const PARAM_TABLE_VIEWPORT_GAP = 8; const PARAM_TABLE_VIEWPORT_GAP = 40;
const PARAM_TABLE_FALLBACK_RESERVE = 220; const PARAM_TABLE_FALLBACK_RESERVE = 220;
export default function AdminSystemParamsPage() { export default function AdminSystemParamsPage() {
@@ -427,16 +432,19 @@ export default function AdminSystemParamsPage() {
return ( return (
<div className="space-y-6"> <div className="space-y-6">
<div className="rounded-xl border border-[var(--gray-6)] bg-[var(--gray-1)] p-4 shadow-sm sm:p-5"> <AntCard
<div className="mb-4 flex flex-wrap items-center justify-between gap-3"> title="参数列表"
<h2 className="text-base font-semibold text-[var(--gray-12)]"></h2> extra={(
{canManage ? ( <Space>
<Button type="primary" onClick={startCreate}> {listQuery.isFetching && <Spin size="small" />}
{canManage ? (
</Button> <Button type="primary" onClick={startCreate}>
) : null}
</div> </Button>
) : null}
</Space>
)}
>
<Form layout="inline" style={{ rowGap: 12 }}> <Form layout="inline" style={{ rowGap: 12 }}>
<Form.Item label="关键词" className="min-w-[240px]"> <Form.Item label="关键词" className="min-w-[240px]">
<Input <Input
@@ -490,7 +498,7 @@ export default function AdminSystemParamsPage() {
}} }}
/> />
</div> </div>
</div> </AntCard>
{canManage && ( {canManage && (
<Modal <Modal