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