From 1c591a92f57d6054b57b9703d064888ffc06bbfc Mon Sep 17 00:00:00 2001 From: non_hana <1209220829@qq.com> Date: Sat, 20 Jul 2024 13:45:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8D=B8=E9=99=A4=20activation=20?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - pnpm-lock.yaml | 77 -------------------------------------------------- src/main.tsx | 19 ++++++------- 3 files changed, 8 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 182a83d..96c2e33 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "normalize.css": "^8.0.1", "qs": "^6.12.1", "react": "^18.2.0", - "react-activation": "^0.12.4", "react-content-loader": "^7.0.2", "react-cropper": "^2.3.3", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 58b9e18..2c0c751 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,9 +71,6 @@ importers: react: specifier: ^18.2.0 version: 18.2.0 - react-activation: - specifier: ^0.12.4 - version: 0.12.4(prop-types@15.8.1)(react@18.2.0) react-content-loader: specifier: ^7.0.2 version: 7.0.2(react@18.2.0) @@ -1496,12 +1493,6 @@ packages: typescript: optional: true - create-react-context@0.3.0: - resolution: {integrity: sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==} - peerDependencies: - prop-types: ^15.0.0 - react: ^0.14.0 || ^15.0.0 || ^16.0.0 - cropperjs@1.6.2: resolution: {integrity: sha512-nhymn9GdnV3CqiEHJVai54TULFAE3VshJTXSqSJKa8yXAKyBKDWdhHarnlIPrshJ0WMFTGuFvG02YjLXfPiuOA==} @@ -2319,9 +2310,6 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - gud@1.0.0: - resolution: {integrity: sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==} - gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -2366,9 +2354,6 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - hoist-non-react-statics@3.3.2: - resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} - hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -2734,10 +2719,6 @@ packages: jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - jsx-ast-utils@2.4.1: - resolution: {integrity: sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w==} - engines: {node: '>=4.0'} - jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -3552,11 +3533,6 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-activation@0.12.4: - resolution: {integrity: sha512-6jJtnUnQBKCrWgvHkzCJP3QZAtthnhDuoPa5LJnj1+1TxS5qkh3Z74zdNZY40wMbkTsLbo6CYoS51Fx/bTM3/w==} - peerDependencies: - react: '>=16' - react-content-loader@7.0.2: resolution: {integrity: sha512-773S98JTyC8VB2nu7LXUhpHx8tZMieGxMcx3qTe7IkohT6Br7d9AXnIXs/wQ6IhlUdKQcw6JLKk1QKigYCWDRA==} engines: {node: '>=10'} @@ -3597,11 +3573,6 @@ packages: react: ^16.0.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 - react-node-key@0.4.0: - resolution: {integrity: sha512-puiuP2QYEuNBVVvcjpUE8d8/jdAhiXHBHMmjZzQT4+fe276RMYea/tY7JoZoYlrhAX8DORLPvjySjXYJZ1m6/A==} - peerDependencies: - react: '>=16' - react-photo-view@1.2.4: resolution: {integrity: sha512-8G7yb0YgQuVgEMT3DopiROZyY8cgCDpba+G5MoxDkHNFOyqtw3r5T5tazYeifybPrvHWuKXj/bnAlBtQcpxyzQ==} peerDependencies: @@ -4117,9 +4088,6 @@ packages: resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} engines: {node: ^14.18.0 || >=16.0.0} - szfe-tools@0.0.0-beta.7: - resolution: {integrity: sha512-/M7+Tel2G8zapfDYZlz17hf9ViqAi/loZMfM81b5iZMyaWL/t5dajBszEBI2kyIDFzlLT4btBcq+BimFgmAHug==} - table@6.8.2: resolution: {integrity: sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==} engines: {node: '>=10.0.0'} @@ -4345,9 +4313,6 @@ packages: terser: optional: true - warning@4.0.3: - resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==} - which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -5903,13 +5868,6 @@ snapshots: optionalDependencies: typescript: 5.4.4 - create-react-context@0.3.0(prop-types@15.8.1)(react@18.2.0): - dependencies: - gud: 1.0.0 - prop-types: 15.8.1 - react: 18.2.0 - warning: 4.0.3 - cropperjs@1.6.2: {} cross-spawn@5.1.0: @@ -6927,8 +6885,6 @@ snapshots: graphemer@1.4.0: {} - gud@1.0.0: {} - gzip-size@6.0.0: dependencies: duplexer: 0.1.2 @@ -6965,10 +6921,6 @@ snapshots: dependencies: function-bind: 1.1.2 - hoist-non-react-statics@3.3.2: - dependencies: - react-is: 16.13.1 - hosted-git-info@2.8.9: {} html-tags@3.3.1: {} @@ -7299,11 +7251,6 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - jsx-ast-utils@2.4.1: - dependencies: - array-includes: 3.1.8 - object.assign: 4.1.5 - jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.8 @@ -8178,16 +8125,6 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-activation@0.12.4(prop-types@15.8.1)(react@18.2.0): - dependencies: - create-react-context: 0.3.0(prop-types@15.8.1)(react@18.2.0) - hoist-non-react-statics: 3.3.2 - react: 18.2.0 - react-node-key: 0.4.0(react@18.2.0) - szfe-tools: 0.0.0-beta.7 - transitivePeerDependencies: - - prop-types - react-content-loader@7.0.2(react@18.2.0): dependencies: react: 18.2.0 @@ -8224,12 +8161,6 @@ snapshots: react-is: 18.2.0 styled-components: 6.1.11(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - react-node-key@0.4.0(react@18.2.0): - dependencies: - jsx-ast-utils: 2.4.1 - react: 18.2.0 - szfe-tools: 0.0.0-beta.7 - react-photo-view@1.2.4(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: react: 18.2.0 @@ -8833,10 +8764,6 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.6.2 - szfe-tools@0.0.0-beta.7: - dependencies: - '@babel/runtime': 7.24.7 - table@6.8.2: dependencies: ajv: 8.12.0 @@ -9094,10 +9021,6 @@ snapshots: less: 4.2.0 sass: 1.74.1 - warning@4.0.3: - dependencies: - loose-envify: 1.4.0 - which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 diff --git a/src/main.tsx b/src/main.tsx index e930f6c..b8bf4d5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,5 +1,4 @@ import { ConfigProvider } from 'antd' -import { AliveScope } from 'react-activation' import { createRoot } from 'react-dom/client' import { ErrorBoundary } from 'react-error-boundary' import 'react-photo-view/dist/react-photo-view.css' @@ -17,16 +16,14 @@ import { persistor, store } from './store' createRoot(document.getElementById('root')!).render( - - - - 初始化加载...

} router={router} /> -
-
-
+ + + 初始化加载...

} router={router} /> +
+
, )