Commit 7217d10e5e20cab09c68a7d0ff2d58de54d8a086
1 parent
a7a82dbf
🐹 feat(*): 更新脚手架
Showing
4 changed files
with
77 additions
and
56 deletions
package.json
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | "@modern-js/plugin-tailwindcss": "~2.49.2", | 40 | "@modern-js/plugin-tailwindcss": "~2.49.2", |
41 | "@modern-js/tsconfig": "~2.49.2", | 41 | "@modern-js/tsconfig": "~2.49.2", |
42 | "@types/jest": "^29.5.12", | 42 | "@types/jest": "^29.5.12", |
43 | - "@types/node": "^18.19.31", | 43 | + "@types/node": "^18.19.32", |
44 | "@types/react": "^18.3.1", | 44 | "@types/react": "^18.3.1", |
45 | "@types/react-dom": "^18.3.0", | 45 | "@types/react-dom": "^18.3.0", |
46 | "cross-env": "^7.0.3", | 46 | "cross-env": "^7.0.3", |
pnpm-lock.yaml
@@ -55,8 +55,8 @@ importers: | @@ -55,8 +55,8 @@ importers: | ||
55 | specifier: ^29.5.12 | 55 | specifier: ^29.5.12 |
56 | version: 29.5.12 | 56 | version: 29.5.12 |
57 | '@types/node': | 57 | '@types/node': |
58 | - specifier: ^18.19.31 | ||
59 | - version: 18.19.31 | 58 | + specifier: ^18.19.32 |
59 | + version: 18.19.32 | ||
60 | '@types/react': | 60 | '@types/react': |
61 | specifier: ^18.3.1 | 61 | specifier: ^18.3.1 |
62 | version: 18.3.1 | 62 | version: 18.3.1 |
@@ -1629,8 +1629,8 @@ packages: | @@ -1629,8 +1629,8 @@ packages: | ||
1629 | '@types/minimist@1.2.5': | 1629 | '@types/minimist@1.2.5': |
1630 | resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} | 1630 | resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} |
1631 | 1631 | ||
1632 | - '@types/node@18.19.31': | ||
1633 | - resolution: {integrity: sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==} | 1632 | + '@types/node@18.19.32': |
1633 | + resolution: {integrity: sha512-2bkg93YBSDKk8DLmmHnmj/Rwr18TLx7/n+I23BigFwgexUJoMHZOd8X1OFxuF/W3NN0S2W2E5sVabI5CPinNvA==} | ||
1634 | 1634 | ||
1635 | '@types/normalize-package-data@2.4.4': | 1635 | '@types/normalize-package-data@2.4.4': |
1636 | resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} | 1636 | resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} |
@@ -2575,8 +2575,8 @@ packages: | @@ -2575,8 +2575,8 @@ packages: | ||
2575 | eastasianwidth@0.2.0: | 2575 | eastasianwidth@0.2.0: |
2576 | resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} | 2576 | resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} |
2577 | 2577 | ||
2578 | - electron-to-chromium@1.4.756: | ||
2579 | - resolution: {integrity: sha512-RJKZ9+vEBMeiPAvKNWyZjuYyUqMndcP1f335oHqn3BEQbs2NFtVrnK5+6Xg5wSM9TknNNpWghGDUCKGYF+xWXw==} | 2578 | + electron-to-chromium@1.4.757: |
2579 | + resolution: {integrity: sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw==} | ||
2580 | 2580 | ||
2581 | elliptic@6.5.5: | 2581 | elliptic@6.5.5: |
2582 | resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} | 2582 | resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} |
@@ -2601,8 +2601,8 @@ packages: | @@ -2601,8 +2601,8 @@ packages: | ||
2601 | resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==} | 2601 | resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==} |
2602 | engines: {node: '>=10.13.0'} | 2602 | engines: {node: '>=10.13.0'} |
2603 | 2603 | ||
2604 | - enhanced-resolve@5.16.0: | ||
2605 | - resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==} | 2604 | + enhanced-resolve@5.16.1: |
2605 | + resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==} | ||
2606 | engines: {node: '>=10.13.0'} | 2606 | engines: {node: '>=10.13.0'} |
2607 | 2607 | ||
2608 | entities@2.2.0: | 2608 | entities@2.2.0: |
@@ -4778,8 +4778,8 @@ packages: | @@ -4778,8 +4778,8 @@ packages: | ||
4778 | resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} | 4778 | resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} |
4779 | hasBin: true | 4779 | hasBin: true |
4780 | 4780 | ||
4781 | - semver@7.6.0: | ||
4782 | - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} | 4781 | + semver@7.6.1: |
4782 | + resolution: {integrity: sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==} | ||
4783 | engines: {node: '>=10'} | 4783 | engines: {node: '>=10'} |
4784 | hasBin: true | 4784 | hasBin: true |
4785 | 4785 | ||
@@ -5420,8 +5420,8 @@ packages: | @@ -5420,8 +5420,8 @@ packages: | ||
5420 | peerDependencies: | 5420 | peerDependencies: |
5421 | zod: ^3.18.0 | 5421 | zod: ^3.18.0 |
5422 | 5422 | ||
5423 | - zod@3.23.6: | ||
5424 | - resolution: {integrity: sha512-RTHJlZhsRbuA8Hmp/iNL7jnfc4nZishjsanDAfEY1QpDQZCahUp3xDzl+zfweE9BklxMUcgBgS1b7Lvie/ZVwA==} | 5423 | + zod@3.23.7: |
5424 | + resolution: {integrity: sha512-NBeIoqbtOiUMomACV/y+V3Qfs9+Okr18vR5c/5pHClPpufWOrsx8TENboDPe265lFdfewX2yBtNTLPvnmCxwog==} | ||
5425 | 5425 | ||
5426 | snapshots: | 5426 | snapshots: |
5427 | 5427 | ||
@@ -6491,7 +6491,7 @@ snapshots: | @@ -6491,7 +6491,7 @@ snapshots: | ||
6491 | '@jest/schemas': 29.6.3 | 6491 | '@jest/schemas': 29.6.3 |
6492 | '@types/istanbul-lib-coverage': 2.0.6 | 6492 | '@types/istanbul-lib-coverage': 2.0.6 |
6493 | '@types/istanbul-reports': 3.0.4 | 6493 | '@types/istanbul-reports': 3.0.4 |
6494 | - '@types/node': 18.19.31 | 6494 | + '@types/node': 18.19.32 |
6495 | '@types/yargs': 17.0.32 | 6495 | '@types/yargs': 17.0.32 |
6496 | chalk: 4.1.2 | 6496 | chalk: 4.1.2 |
6497 | 6497 | ||
@@ -7353,8 +7353,8 @@ snapshots: | @@ -7353,8 +7353,8 @@ snapshots: | ||
7353 | tapable: 2.2.1 | 7353 | tapable: 2.2.1 |
7354 | watchpack: 2.4.1 | 7354 | watchpack: 2.4.1 |
7355 | webpack-sources: 3.2.3 | 7355 | webpack-sources: 3.2.3 |
7356 | - zod: 3.23.6 | ||
7357 | - zod-validation-error: 1.3.1(zod@3.23.6) | 7356 | + zod: 3.23.7 |
7357 | + zod-validation-error: 1.3.1(zod@3.23.7) | ||
7358 | optionalDependencies: | 7358 | optionalDependencies: |
7359 | '@swc/helpers': 0.5.3 | 7359 | '@swc/helpers': 0.5.3 |
7360 | 7360 | ||
@@ -7518,7 +7518,7 @@ snapshots: | @@ -7518,7 +7518,7 @@ snapshots: | ||
7518 | 7518 | ||
7519 | '@types/minimist@1.2.5': {} | 7519 | '@types/minimist@1.2.5': {} |
7520 | 7520 | ||
7521 | - '@types/node@18.19.31': | 7521 | + '@types/node@18.19.32': |
7522 | dependencies: | 7522 | dependencies: |
7523 | undici-types: 5.26.5 | 7523 | undici-types: 5.26.5 |
7524 | 7524 | ||
@@ -7571,7 +7571,7 @@ snapshots: | @@ -7571,7 +7571,7 @@ snapshots: | ||
7571 | graphemer: 1.4.0 | 7571 | graphemer: 1.4.0 |
7572 | ignore: 5.3.1 | 7572 | ignore: 5.3.1 |
7573 | natural-compare-lite: 1.4.0 | 7573 | natural-compare-lite: 1.4.0 |
7574 | - semver: 7.6.0 | 7574 | + semver: 7.6.1 |
7575 | tsutils: 3.21.0(typescript@5.4.5) | 7575 | tsutils: 3.21.0(typescript@5.4.5) |
7576 | optionalDependencies: | 7576 | optionalDependencies: |
7577 | typescript: 5.4.5 | 7577 | typescript: 5.4.5 |
@@ -7616,7 +7616,7 @@ snapshots: | @@ -7616,7 +7616,7 @@ snapshots: | ||
7616 | debug: 4.3.4(supports-color@5.5.0) | 7616 | debug: 4.3.4(supports-color@5.5.0) |
7617 | globby: 11.1.0 | 7617 | globby: 11.1.0 |
7618 | is-glob: 4.0.3 | 7618 | is-glob: 4.0.3 |
7619 | - semver: 7.6.0 | 7619 | + semver: 7.6.1 |
7620 | tsutils: 3.21.0(typescript@5.4.5) | 7620 | tsutils: 3.21.0(typescript@5.4.5) |
7621 | optionalDependencies: | 7621 | optionalDependencies: |
7622 | typescript: 5.4.5 | 7622 | typescript: 5.4.5 |
@@ -7633,7 +7633,7 @@ snapshots: | @@ -7633,7 +7633,7 @@ snapshots: | ||
7633 | '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) | 7633 | '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5) |
7634 | eslint: 8.57.0 | 7634 | eslint: 8.57.0 |
7635 | eslint-scope: 5.1.1 | 7635 | eslint-scope: 5.1.1 |
7636 | - semver: 7.6.0 | 7636 | + semver: 7.6.1 |
7637 | transitivePeerDependencies: | 7637 | transitivePeerDependencies: |
7638 | - supports-color | 7638 | - supports-color |
7639 | - typescript | 7639 | - typescript |
@@ -8131,7 +8131,7 @@ snapshots: | @@ -8131,7 +8131,7 @@ snapshots: | ||
8131 | browserslist@4.23.0: | 8131 | browserslist@4.23.0: |
8132 | dependencies: | 8132 | dependencies: |
8133 | caniuse-lite: 1.0.30001616 | 8133 | caniuse-lite: 1.0.30001616 |
8134 | - electron-to-chromium: 1.4.756 | 8134 | + electron-to-chromium: 1.4.757 |
8135 | node-releases: 2.0.14 | 8135 | node-releases: 2.0.14 |
8136 | update-browserslist-db: 1.0.15(browserslist@4.23.0) | 8136 | update-browserslist-db: 1.0.15(browserslist@4.23.0) |
8137 | 8137 | ||
@@ -8637,7 +8637,7 @@ snapshots: | @@ -8637,7 +8637,7 @@ snapshots: | ||
8637 | 8637 | ||
8638 | eastasianwidth@0.2.0: {} | 8638 | eastasianwidth@0.2.0: {} |
8639 | 8639 | ||
8640 | - electron-to-chromium@1.4.756: {} | 8640 | + electron-to-chromium@1.4.757: {} |
8641 | 8641 | ||
8642 | elliptic@6.5.5: | 8642 | elliptic@6.5.5: |
8643 | dependencies: | 8643 | dependencies: |
@@ -8666,7 +8666,7 @@ snapshots: | @@ -8666,7 +8666,7 @@ snapshots: | ||
8666 | graceful-fs: 4.2.10 | 8666 | graceful-fs: 4.2.10 |
8667 | tapable: 2.2.1 | 8667 | tapable: 2.2.1 |
8668 | 8668 | ||
8669 | - enhanced-resolve@5.16.0: | 8669 | + enhanced-resolve@5.16.1: |
8670 | dependencies: | 8670 | dependencies: |
8671 | graceful-fs: 4.2.11 | 8671 | graceful-fs: 4.2.11 |
8672 | tapable: 2.2.1 | 8672 | tapable: 2.2.1 |
@@ -8970,7 +8970,7 @@ snapshots: | @@ -8970,7 +8970,7 @@ snapshots: | ||
8970 | read-pkg-up: 7.0.1 | 8970 | read-pkg-up: 7.0.1 |
8971 | regexp-tree: 0.1.27 | 8971 | regexp-tree: 0.1.27 |
8972 | safe-regex: 2.1.1 | 8972 | safe-regex: 2.1.1 |
8973 | - semver: 7.6.0 | 8973 | + semver: 7.6.1 |
8974 | strip-indent: 3.0.0 | 8974 | strip-indent: 3.0.0 |
8975 | 8975 | ||
8976 | eslint-rule-composer@0.3.0: {} | 8976 | eslint-rule-composer@0.3.0: {} |
@@ -9213,7 +9213,7 @@ snapshots: | @@ -9213,7 +9213,7 @@ snapshots: | ||
9213 | minimatch: 3.1.2 | 9213 | minimatch: 3.1.2 |
9214 | node-abort-controller: 3.1.1 | 9214 | node-abort-controller: 3.1.1 |
9215 | schema-utils: 3.3.0 | 9215 | schema-utils: 3.3.0 |
9216 | - semver: 7.6.0 | 9216 | + semver: 7.6.1 |
9217 | tapable: 2.2.1 | 9217 | tapable: 2.2.1 |
9218 | typescript: 5.4.5 | 9218 | typescript: 5.4.5 |
9219 | webpack: 5.91.0(esbuild@0.17.19) | 9219 | webpack: 5.91.0(esbuild@0.17.19) |
@@ -9720,7 +9720,7 @@ snapshots: | @@ -9720,7 +9720,7 @@ snapshots: | ||
9720 | jest-util@29.7.0: | 9720 | jest-util@29.7.0: |
9721 | dependencies: | 9721 | dependencies: |
9722 | '@jest/types': 29.6.3 | 9722 | '@jest/types': 29.6.3 |
9723 | - '@types/node': 18.19.31 | 9723 | + '@types/node': 18.19.32 |
9724 | chalk: 4.1.2 | 9724 | chalk: 4.1.2 |
9725 | ci-info: 3.9.0 | 9725 | ci-info: 3.9.0 |
9726 | graceful-fs: 4.2.11 | 9726 | graceful-fs: 4.2.11 |
@@ -9728,13 +9728,13 @@ snapshots: | @@ -9728,13 +9728,13 @@ snapshots: | ||
9728 | 9728 | ||
9729 | jest-worker@27.5.1: | 9729 | jest-worker@27.5.1: |
9730 | dependencies: | 9730 | dependencies: |
9731 | - '@types/node': 18.19.31 | 9731 | + '@types/node': 18.19.32 |
9732 | merge-stream: 2.0.0 | 9732 | merge-stream: 2.0.0 |
9733 | supports-color: 8.1.1 | 9733 | supports-color: 8.1.1 |
9734 | 9734 | ||
9735 | jest-worker@29.7.0: | 9735 | jest-worker@29.7.0: |
9736 | dependencies: | 9736 | dependencies: |
9737 | - '@types/node': 18.19.31 | 9737 | + '@types/node': 18.19.32 |
9738 | jest-util: 29.7.0 | 9738 | jest-util: 29.7.0 |
9739 | merge-stream: 2.0.0 | 9739 | merge-stream: 2.0.0 |
9740 | supports-color: 8.1.1 | 9740 | supports-color: 8.1.1 |
@@ -10112,7 +10112,7 @@ snapshots: | @@ -10112,7 +10112,7 @@ snapshots: | ||
10112 | dependencies: | 10112 | dependencies: |
10113 | hosted-git-info: 4.1.0 | 10113 | hosted-git-info: 4.1.0 |
10114 | is-core-module: 2.13.1 | 10114 | is-core-module: 2.13.1 |
10115 | - semver: 7.6.0 | 10115 | + semver: 7.6.1 |
10116 | validate-npm-package-license: 3.0.4 | 10116 | validate-npm-package-license: 3.0.4 |
10117 | 10117 | ||
10118 | normalize-path@3.0.0: {} | 10118 | normalize-path@3.0.0: {} |
@@ -11013,9 +11013,7 @@ snapshots: | @@ -11013,9 +11013,7 @@ snapshots: | ||
11013 | 11013 | ||
11014 | semver@6.3.1: {} | 11014 | semver@6.3.1: {} |
11015 | 11015 | ||
11016 | - semver@7.6.0: | ||
11017 | - dependencies: | ||
11018 | - lru-cache: 6.0.0 | 11016 | + semver@7.6.1: {} |
11019 | 11017 | ||
11020 | serialize-javascript@6.0.2: | 11018 | serialize-javascript@6.0.2: |
11021 | dependencies: | 11019 | dependencies: |
@@ -11472,16 +11470,16 @@ snapshots: | @@ -11472,16 +11470,16 @@ snapshots: | ||
11472 | ts-loader@9.4.4(typescript@5.4.5)(webpack@5.91.0(esbuild@0.17.19)): | 11470 | ts-loader@9.4.4(typescript@5.4.5)(webpack@5.91.0(esbuild@0.17.19)): |
11473 | dependencies: | 11471 | dependencies: |
11474 | chalk: 4.1.2 | 11472 | chalk: 4.1.2 |
11475 | - enhanced-resolve: 5.16.0 | 11473 | + enhanced-resolve: 5.16.1 |
11476 | micromatch: 4.0.5 | 11474 | micromatch: 4.0.5 |
11477 | - semver: 7.6.0 | 11475 | + semver: 7.6.1 |
11478 | typescript: 5.4.5 | 11476 | typescript: 5.4.5 |
11479 | webpack: 5.91.0(esbuild@0.17.19) | 11477 | webpack: 5.91.0(esbuild@0.17.19) |
11480 | 11478 | ||
11481 | tsconfig-paths-webpack-plugin@4.1.0: | 11479 | tsconfig-paths-webpack-plugin@4.1.0: |
11482 | dependencies: | 11480 | dependencies: |
11483 | chalk: 4.1.2 | 11481 | chalk: 4.1.2 |
11484 | - enhanced-resolve: 5.16.0 | 11482 | + enhanced-resolve: 5.16.1 |
11485 | tsconfig-paths: 4.2.0 | 11483 | tsconfig-paths: 4.2.0 |
11486 | 11484 | ||
11487 | tsconfig-paths@3.15.0: | 11485 | tsconfig-paths@3.15.0: |
@@ -11661,7 +11659,7 @@ snapshots: | @@ -11661,7 +11659,7 @@ snapshots: | ||
11661 | acorn-import-assertions: 1.9.0(acorn@8.11.3) | 11659 | acorn-import-assertions: 1.9.0(acorn@8.11.3) |
11662 | browserslist: 4.23.0 | 11660 | browserslist: 4.23.0 |
11663 | chrome-trace-event: 1.0.3 | 11661 | chrome-trace-event: 1.0.3 |
11664 | - enhanced-resolve: 5.16.0 | 11662 | + enhanced-resolve: 5.16.1 |
11665 | es-module-lexer: 1.5.2 | 11663 | es-module-lexer: 1.5.2 |
11666 | eslint-scope: 5.1.1 | 11664 | eslint-scope: 5.1.1 |
11667 | events: 3.3.0 | 11665 | events: 3.3.0 |
@@ -11781,8 +11779,8 @@ snapshots: | @@ -11781,8 +11779,8 @@ snapshots: | ||
11781 | 11779 | ||
11782 | yocto-queue@1.0.0: {} | 11780 | yocto-queue@1.0.0: {} |
11783 | 11781 | ||
11784 | - zod-validation-error@1.3.1(zod@3.23.6): | 11782 | + zod-validation-error@1.3.1(zod@3.23.7): |
11785 | dependencies: | 11783 | dependencies: |
11786 | - zod: 3.23.6 | 11784 | + zod: 3.23.7 |
11787 | 11785 | ||
11788 | - zod@3.23.6: {} | 11786 | + zod@3.23.7: {} |
src/routes/demo/page.tsx
1 | import { Helmet } from '@modern-js/runtime/head'; | 1 | import { Helmet } from '@modern-js/runtime/head'; |
2 | -import { ListRow, Button, Icon, IconFont, Space } from '@feewee/h5app-common'; | 2 | +import { ListRow, Button, Icon, IconFont, Space, PageProvider } from '@feewee/h5app-common'; |
3 | +import { useSafeState } from 'ahooks'; | ||
4 | +import { useEffect } from 'react'; | ||
3 | 5 | ||
4 | -const Index = () => ( | ||
5 | - <> | ||
6 | - <Helmet> | ||
7 | - <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" /> | ||
8 | - </Helmet> | ||
9 | - <main className="p-4"> | ||
10 | - <div>demo 页面</div> | ||
11 | - <ListRow title="标题" description="副标题" extra="描述文字" radius={6} align="center" onClick={() => console.info('点击事件')} /> | ||
12 | - <Button type="primary">默认</Button> | ||
13 | - <Space> | ||
14 | - <Icon.Add /> | ||
15 | - <IconFont name="down" /> | ||
16 | - </Space> | ||
17 | - </main> | ||
18 | - </> | ||
19 | -); | 6 | +const Index = () => { |
7 | + const [loading, setLoading] = useSafeState(true); | ||
8 | + | ||
9 | + useEffect(() => { | ||
10 | + setTimeout(() => setLoading(false), 2500); | ||
11 | + }, []); | ||
12 | + | ||
13 | + return ( | ||
14 | + <> | ||
15 | + <Helmet> | ||
16 | + {/* 这里面可以映入外部的一些样式或者js之类的,如果有需要的话。也可以调整head里的信息 */} | ||
17 | + <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" /> | ||
18 | + </Helmet> | ||
19 | + <PageProvider tittle="demo页面" loading={loading}> | ||
20 | + <main className="p-5"> | ||
21 | + <div>demo 页面</div> | ||
22 | + <ListRow title="标题" description="副标题" extra="描述文字" radius={6} align="center" onClick={() => console.info('点击事件')} /> | ||
23 | + <Button type="primary">默认</Button> | ||
24 | + <Space> | ||
25 | + <Icon.Add /> | ||
26 | + <IconFont name="down" /> | ||
27 | + </Space> | ||
28 | + </main> | ||
29 | + </PageProvider> | ||
30 | + </> | ||
31 | + ); | ||
32 | +}; | ||
20 | 33 | ||
21 | export default Index; | 34 | export default Index; |
src/routes/layout.tsx
@@ -8,6 +8,16 @@ import '@/style/global.scss'; | @@ -8,6 +8,16 @@ import '@/style/global.scss'; | ||
8 | 8 | ||
9 | dayjs.locale('zh-cn'); | 9 | dayjs.locale('zh-cn'); |
10 | 10 | ||
11 | +(() => { | ||
12 | + const { error } = console; | ||
13 | + console.error = (...args: any) => { | ||
14 | + if (/defaultProps/.test(args[0])) { | ||
15 | + return; | ||
16 | + } | ||
17 | + error(...args); | ||
18 | + }; | ||
19 | +})(); | ||
20 | + | ||
11 | export default function Layout() { | 21 | export default function Layout() { |
12 | localdb.init('fw_h5_template', 'fw_h5_template', 'fw_h5_template_del'); | 22 | localdb.init('fw_h5_template', 'fw_h5_template', 'fw_h5_template_del'); |
13 | const timer = useRef<any>(); | 23 | const timer = useRef<any>(); |