From 6774504d39cdee3c91675695d65253937221394d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= <2712495353@qq.com> Date: Thu, 9 Jul 2026 23:28:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BC=95=E7=94=A8=E7=B1=BB=E5=9E=8B=E4=B8=BA=20Compon?= =?UTF-8?q?entRef=EF=BC=8C=E4=BB=A5=E6=8F=90=E9=AB=98=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/checkbox.tsx | 2 +- src/components/ui/dialog.tsx | 8 ++++---- src/components/ui/label.tsx | 2 +- src/components/ui/select.tsx | 14 +++++++------- src/components/ui/switch.tsx | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx index c1bac23..46a6429 100644 --- a/src/components/ui/checkbox.tsx +++ b/src/components/ui/checkbox.tsx @@ -5,7 +5,7 @@ import { Check } from 'lucide-react'; import { cn } from '@/lib/utils'; const Checkbox = React.forwardRef< - React.ElementRef, + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, DialogContentProps >(({ className, children, showCloseButton = true, ...props }, ref) => ( @@ -72,7 +72,7 @@ const DialogFooter = ({ className, ...props }: React.HTMLAttributes, + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef & VariantProps >(({ className, ...props }, ref) => ( diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx index 75b0629..b0fbfef 100644 --- a/src/components/ui/select.tsx +++ b/src/components/ui/select.tsx @@ -10,7 +10,7 @@ const SelectGroup = SelectPrimitive.Group; const SelectValue = SelectPrimitive.Value; const SelectTrigger = React.forwardRef< - React.ElementRef, + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, position = 'popper', ...props }, ref) => ( @@ -90,7 +90,7 @@ const SelectContent = React.forwardRef< SelectContent.displayName = SelectPrimitive.Content.displayName; const SelectLabel = React.forwardRef< - React.ElementRef, + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => (