fix: 修复ts问题
This commit is contained in:
parent
f534c101dd
commit
191cb7fc69
@ -13,7 +13,7 @@ import { useRef } from 'react';
|
||||
import { UserNav } from '../user-nav';
|
||||
import ImageLogo from './image.png';
|
||||
|
||||
export default function Header(props) {
|
||||
export default function Header() {
|
||||
const t = useTranslations('common');
|
||||
|
||||
const { user } = useGlobalStore();
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "ES2022"
|
||||
"target": "ES2022",
|
||||
"types": ["node"]
|
||||
},
|
||||
"display": "Default"
|
||||
}
|
||||
|
||||
@ -29,9 +29,16 @@ const DialogOverlay = React.forwardRef<
|
||||
));
|
||||
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
||||
|
||||
// 扩展 DialogContentProps 接口
|
||||
interface DialogContentProps
|
||||
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
||||
closeIcon?: React.ReactNode;
|
||||
closeClassName?: string;
|
||||
}
|
||||
|
||||
const DialogContent = React.forwardRef<
|
||||
React.ElementRef<typeof DialogPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
||||
DialogContentProps
|
||||
>(({ className, closeClassName, closeIcon, children, ...props }, ref) => (
|
||||
<DialogPortal>
|
||||
<DialogOverlay />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user