fix:React 19 与 antd v5 的兼容警告已接入官方补丁
parent
c6188809ff
commit
6e347be83b
|
|
@ -8,6 +8,7 @@
|
|||
"name": "frontend",
|
||||
"version": "1.1.0",
|
||||
"dependencies": {
|
||||
"@ant-design/v5-patch-for-react-19": "^1.0.3",
|
||||
"@codemirror/lang-markdown": "^6.5.0",
|
||||
"@codemirror/state": "^6.5.2",
|
||||
"@codemirror/view": "^6.38.6",
|
||||
|
|
@ -153,6 +154,20 @@
|
|||
"react": ">=16.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ant-design/v5-patch-for-react-19": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@ant-design/v5-patch-for-react-19/-/v5-patch-for-react-19-1.0.3.tgz",
|
||||
"integrity": "sha512-iWfZuSUl5kuhqLUw7jJXUQFMMkM7XpW7apmKzQBQHU0cpifYW4A79xIBt9YVO5IBajKpPG5UKP87Ft7Yrw1p/w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.x"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"antd": ">=5.22.6",
|
||||
"react": ">=19.0.0",
|
||||
"react-dom": ">=19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.27.1.tgz",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/v5-patch-for-react-19": "^1.0.3",
|
||||
"@codemirror/lang-markdown": "^6.5.0",
|
||||
"@codemirror/state": "^6.5.2",
|
||||
"@codemirror/view": "^6.38.6",
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const ContentViewer = ({
|
|||
];
|
||||
|
||||
return (
|
||||
<Card variant="borderless" bodyStyle={{ padding: '12px 24px' }} style={{ borderRadius: 12 }}>
|
||||
<Card variant="borderless" styles={{ body: { padding: '12px 24px' } }} style={{ borderRadius: 12 }}>
|
||||
<Tabs
|
||||
className="console-tabs"
|
||||
activeKey={activeTab}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const MarkdownEditor = ({
|
|||
<div className="markdown-editor-modern">
|
||||
<Card
|
||||
size="small"
|
||||
bodyStyle={{ padding: '4px 8px', background: '#f5f5f5', borderBottom: '1px solid #d9d9d9', borderRadius: '8px 8px 0 0' }}
|
||||
styles={{ body: { padding: '4px 8px', background: '#f5f5f5', borderBottom: '1px solid #d9d9d9', borderRadius: '8px 8px 0 0' } }}
|
||||
variant="borderless"
|
||||
>
|
||||
<Space split={<Divider type="vertical" />} size={4}>
|
||||
|
|
@ -132,7 +132,7 @@ const MarkdownEditor = ({
|
|||
</Card>
|
||||
|
||||
{showPreview ? (
|
||||
<Card bordered bodyStyle={{ padding: 16, minHeight: height, overflowY: 'auto' }} style={{ borderRadius: '0 0 8px 8px' }}>
|
||||
<Card bordered styles={{ body: { padding: 16, minHeight: height, overflowY: 'auto' } }} style={{ borderRadius: '0 0 8px 8px' }}>
|
||||
<MarkdownRenderer content={value} />
|
||||
</Card>
|
||||
) : (
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import '@ant-design/v5-patch-for-react-19';
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { StyleProvider } from '@ant-design/cssinjs';
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ const Dashboard = ({ user }) => {
|
|||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card variant="borderless" className="dashboard-main-card" bodyStyle={{ padding: 0 }}>
|
||||
<Card variant="borderless" className="dashboard-main-card" styles={{ body: { padding: 0 } }}>
|
||||
<div className="dashboard-toolbar">
|
||||
<div className="dashboard-search-row">
|
||||
<Input
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ const MeetingCenterPage = ({ user }) => {
|
|||
marginBottom: 22,
|
||||
boxShadow: '0 8px 30px rgba(40, 72, 120, 0.08)',
|
||||
}}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
styles={{ body: { padding: '16px 20px' } }}
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', gap: 20, alignItems: 'center', flexWrap: 'wrap' }}>
|
||||
<Space size={14} align="center">
|
||||
|
|
@ -263,7 +263,7 @@ const MeetingCenterPage = ({ user }) => {
|
|||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
styles={{ body: { padding: 0 } }}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ const PromptConfigPage = ({ user }) => {
|
|||
</div>
|
||||
</Space>
|
||||
</Card>
|
||||
<Card className="console-surface" variant="borderless" bodyStyle={{ padding: 12 }}>
|
||||
<Card className="console-surface" variant="borderless" styles={{ body: { padding: 12 } }}>
|
||||
<Tabs
|
||||
className="console-tabs"
|
||||
defaultActiveKey="config"
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@
|
|||
resize-observer-polyfill "^1.5.1"
|
||||
throttle-debounce "^5.0.0"
|
||||
|
||||
"@ant-design/v5-patch-for-react-19@^1.0.3":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.npmjs.org/@ant-design/v5-patch-for-react-19/-/v5-patch-for-react-19-1.0.3.tgz"
|
||||
integrity sha512-iWfZuSUl5kuhqLUw7jJXUQFMMkM7XpW7apmKzQBQHU0cpifYW4A79xIBt9YVO5IBajKpPG5UKP87Ft7Yrw1p/w==
|
||||
|
||||
"@babel/code-frame@^7.27.1":
|
||||
version "7.27.1"
|
||||
resolved "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.27.1.tgz"
|
||||
|
|
@ -903,7 +908,7 @@ ansi-styles@^4.1.0:
|
|||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
antd@^5.27.3:
|
||||
antd@^5.27.3, antd@>=5.22.6:
|
||||
version "5.27.3"
|
||||
resolved "https://registry.npmmirror.com/antd/-/antd-5.27.3.tgz"
|
||||
integrity sha512-Jewp1ek1iyqoAyjWyPgzc2kioZ+7S3jh39a+tld/j4ucnuf/cBk4omfyIdhLz49pVNsaEcRp5LtJOSQPFwPgpA==
|
||||
|
|
@ -3502,7 +3507,7 @@ rc-virtual-list@^3.14.2, rc-virtual-list@^3.5.1, rc-virtual-list@^3.5.2:
|
|||
rc-resize-observer "^1.0.0"
|
||||
rc-util "^5.36.0"
|
||||
|
||||
react-dom@*, react-dom@^19.1.0, react-dom@>=16.0.0, react-dom@>=16.11.0, react-dom@>=16.8.0, react-dom@>=16.9.0, react-dom@>=17.0.0, react-dom@>=18:
|
||||
react-dom@*, react-dom@^19.1.0, react-dom@>=16.0.0, react-dom@>=16.11.0, react-dom@>=16.8.0, react-dom@>=16.9.0, react-dom@>=17.0.0, react-dom@>=18, react-dom@>=19.0.0:
|
||||
version "19.1.1"
|
||||
resolved "https://registry.npmmirror.com/react-dom/-/react-dom-19.1.1.tgz"
|
||||
integrity sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==
|
||||
|
|
@ -3567,7 +3572,7 @@ react-router@7.13.2:
|
|||
cookie "^1.0.1"
|
||||
set-cookie-parser "^2.6.0"
|
||||
|
||||
react@*, "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react@^19.1.0, react@^19.1.1, react@>=16.0.0, react@>=16.11.0, react@>=16.8.0, react@>=16.9.0, react@>=17.0.0, react@>=18:
|
||||
react@*, "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react@^19.1.0, react@^19.1.1, react@>=16.0.0, react@>=16.11.0, react@>=16.8.0, react@>=16.9.0, react@>=17.0.0, react@>=18, react@>=19.0.0:
|
||||
version "19.1.1"
|
||||
resolved "https://registry.npmmirror.com/react/-/react-19.1.1.tgz"
|
||||
integrity sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==
|
||||
|
|
|
|||
Loading…
Reference in New Issue