refactor(platform): 统一控件 - 收敛下拉选择与按钮输入交互样式

This commit is contained in:
ddcat666
2026-09-25 00:01:09 +08:00
parent c0d223f357
commit 8a691f76c9
61 changed files with 661 additions and 237 deletions

View File

@@ -1,9 +1,11 @@
import { Button, Checkbox as AntCheckbox, Segmented, Select as AntSelect, Switch as AntSwitch, Tooltip as AntTooltip } from "antd";
import { Button, Checkbox as AntCheckbox, Segmented, Switch as AntSwitch, Tooltip as AntTooltip } from "antd";
import type { CheckboxChangeEvent } from "antd/es/checkbox";
import type { ButtonProps } from "antd";
import type { LucideIcon } from "lucide-react";
import type { CSSProperties, InputHTMLAttributes, ReactNode } from "react";
import { Select as UnifiedSelect } from "@/components/ui/base/select";
import { cn } from "@/lib/utils";
export function AdminSwitch({
@@ -46,7 +48,7 @@ export function AdminSelect<V extends string = string>({
ariaLabel?: string;
className?: string;
}) {
return <AntSelect {...props} size={size === "sm" ? "small" : "middle"} className={cn("admin-select", className)} aria-label={ariaLabel} onChange={(value) => onChange?.(value as V)} />;
return <UnifiedSelect {...props} size={size === "sm" ? "small" : "middle"} className={cn("admin-select", className)} aria-label={ariaLabel} onChange={(value) => onChange?.(value as V)} />;
}
export function Select<V extends string = string>(props: Parameters<typeof AdminSelect<V>>[0]) {