refactor: avoid to use some deprecated properities

This commit is contained in:
2025-11-12 16:14:10 +08:00
parent dda8e13587
commit ca55ad5512
3 changed files with 12 additions and 5 deletions

View File

@@ -125,10 +125,12 @@ const ImageModal: React.FC<ImageModalProps> = ({ visible, imageUrl, onClose }) =
closable={false}
width={isMobile ? '100vw' : '66vw'}
style={modalStyle}
bodyStyle={modalBodyStyle}
styles={{
body: modalBodyStyle,
mask: { backgroundColor: 'rgba(0, 0, 0, 0.8)' },
}}
centered={true} // 移动端和PC端都居中显示
destroyOnClose
maskStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.8)' }}
destroyOnHidden
wrapClassName={isMobile ? 'mobile-image-modal' : 'desktop-image-modal'}
>
{/* 自定义关闭按钮 */}

View File

@@ -1063,7 +1063,7 @@ const ResourceList: React.FC<Props> = ({ inputOpen = false, onCloseInput, contai
}
}
}}
destroyOnClose
destroyOnHidden
okText="确认"
cancelText="取消"
>

View File

@@ -8,7 +8,12 @@ import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<BrowserRouter>
<BrowserRouter
future={{
v7_relativeSplatPath: true,
v7_startTransition: true,
}}
>
<App />
</BrowserRouter>
</StrictMode>,