Browse Source

chore: upgrade react19 (#11474)

Co-authored-by: skyzhao <skyzhao@example.com>
Co-authored-by: SKY ZHAO <boyzhaotian@hotmail.com>
pull/11477/head
Wanpan 1 year ago
committed by GitHub
parent
commit
0d88e2990b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      package.json
  2. 1
      src/app.tsx
  3. 6
      src/global.less
  4. 2
      src/pages/TableList/components/UpdateForm.tsx
  5. 2
      src/pages/TableList/index.tsx

9
package.json

@ -42,11 +42,12 @@
"@ant-design/icons": "^5.6.1", "@ant-design/icons": "^5.6.1",
"@ant-design/pro-components": "^2.7.19", "@ant-design/pro-components": "^2.7.19",
"antd": "^5.25.4", "antd": "^5.25.4",
"@ant-design/v5-patch-for-react-19": "^1.0.3",
"antd-style": "^3.7.0", "antd-style": "^3.7.0",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"react": "^18.3.1", "react": "^19.1.0",
"react-dom": "^18.3.1" "react-dom": "^19.1.0"
}, },
"devDependencies": { "devDependencies": {
"@ant-design/pro-cli": "^3.3.0", "@ant-design/pro-cli": "^3.3.0",
@ -57,8 +58,8 @@
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/jest": "^29.5.13", "@types/jest": "^29.5.13",
"@types/lodash": "^4.17.10", "@types/lodash": "^4.17.10",
"@types/react": "^18.3.11", "@types/react": "^19.1.5",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^19.1.5",
"@types/react-helmet": "^6.1.11", "@types/react-helmet": "^6.1.11",
"@umijs/lint": "^4.3.24", "@umijs/lint": "^4.3.24",
"@umijs/max": "^4.3.24", "@umijs/max": "^4.3.24",

1
src/app.tsx

@ -8,6 +8,7 @@ import { history, Link } from '@umijs/max';
import React from 'react'; import React from 'react';
import defaultSettings from '../config/defaultSettings'; import defaultSettings from '../config/defaultSettings';
import { errorConfig } from './requestErrorConfig'; import { errorConfig } from './requestErrorConfig';
import '@ant-design/v5-patch-for-react-19';
const isDev = process.env.NODE_ENV === 'development'; const isDev = process.env.NODE_ENV === 'development';
const loginPath = '/user/login'; const loginPath = '/user/login';

6
src/global.less

@ -4,9 +4,9 @@ body,
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, font-family:
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
'Noto Color Emoji'; sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
} }
.colorWeak { .colorWeak {

2
src/pages/TableList/components/UpdateForm.tsx

@ -41,7 +41,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
padding: '32px 40px 48px', padding: '32px 40px 48px',
}, },
}} }}
destroyOnClose destroyOnHidden
title={intl.formatMessage({ title={intl.formatMessage({
id: 'pages.searchTable.updateForm.ruleConfig', id: 'pages.searchTable.updateForm.ruleConfig',
defaultMessage: '规则配置', defaultMessage: '规则配置',

2
src/pages/TableList/index.tsx

@ -97,7 +97,7 @@ const TableList: React.FC = () => {
const [showDetail, setShowDetail] = useState<boolean>(false); const [showDetail, setShowDetail] = useState<boolean>(false);
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType | null>(null);
const [currentRow, setCurrentRow] = useState<API.RuleListItem>(); const [currentRow, setCurrentRow] = useState<API.RuleListItem>();
const [selectedRowsState, setSelectedRows] = useState<API.RuleListItem[]>([]); const [selectedRowsState, setSelectedRows] = useState<API.RuleListItem[]>([]);

Loading…
Cancel
Save