diff --git a/package.json b/package.json
index c22ee70..d3a4973 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"@modern-js/plugin-tailwindcss": "~2.49.2",
"@modern-js/tsconfig": "~2.49.2",
"@types/jest": "^29.5.12",
- "@types/node": "^18.19.31",
+ "@types/node": "^18.19.32",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"cross-env": "^7.0.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index da07f69..ae80c22 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -55,8 +55,8 @@ importers:
specifier: ^29.5.12
version: 29.5.12
'@types/node':
- specifier: ^18.19.31
- version: 18.19.31
+ specifier: ^18.19.32
+ version: 18.19.32
'@types/react':
specifier: ^18.3.1
version: 18.3.1
@@ -1629,8 +1629,8 @@ packages:
'@types/minimist@1.2.5':
resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==}
- '@types/node@18.19.31':
- resolution: {integrity: sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==}
+ '@types/node@18.19.32':
+ resolution: {integrity: sha512-2bkg93YBSDKk8DLmmHnmj/Rwr18TLx7/n+I23BigFwgexUJoMHZOd8X1OFxuF/W3NN0S2W2E5sVabI5CPinNvA==}
'@types/normalize-package-data@2.4.4':
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
@@ -2575,8 +2575,8 @@ packages:
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
- electron-to-chromium@1.4.756:
- resolution: {integrity: sha512-RJKZ9+vEBMeiPAvKNWyZjuYyUqMndcP1f335oHqn3BEQbs2NFtVrnK5+6Xg5wSM9TknNNpWghGDUCKGYF+xWXw==}
+ electron-to-chromium@1.4.757:
+ resolution: {integrity: sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw==}
elliptic@6.5.5:
resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==}
@@ -2601,8 +2601,8 @@ packages:
resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==}
engines: {node: '>=10.13.0'}
- enhanced-resolve@5.16.0:
- resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==}
+ enhanced-resolve@5.16.1:
+ resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==}
engines: {node: '>=10.13.0'}
entities@2.2.0:
@@ -4778,8 +4778,8 @@ packages:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
- semver@7.6.0:
- resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
+ semver@7.6.1:
+ resolution: {integrity: sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==}
engines: {node: '>=10'}
hasBin: true
@@ -5420,8 +5420,8 @@ packages:
peerDependencies:
zod: ^3.18.0
- zod@3.23.6:
- resolution: {integrity: sha512-RTHJlZhsRbuA8Hmp/iNL7jnfc4nZishjsanDAfEY1QpDQZCahUp3xDzl+zfweE9BklxMUcgBgS1b7Lvie/ZVwA==}
+ zod@3.23.7:
+ resolution: {integrity: sha512-NBeIoqbtOiUMomACV/y+V3Qfs9+Okr18vR5c/5pHClPpufWOrsx8TENboDPe265lFdfewX2yBtNTLPvnmCxwog==}
snapshots:
@@ -6491,7 +6491,7 @@ snapshots:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
- '@types/node': 18.19.31
+ '@types/node': 18.19.32
'@types/yargs': 17.0.32
chalk: 4.1.2
@@ -7353,8 +7353,8 @@ snapshots:
tapable: 2.2.1
watchpack: 2.4.1
webpack-sources: 3.2.3
- zod: 3.23.6
- zod-validation-error: 1.3.1(zod@3.23.6)
+ zod: 3.23.7
+ zod-validation-error: 1.3.1(zod@3.23.7)
optionalDependencies:
'@swc/helpers': 0.5.3
@@ -7518,7 +7518,7 @@ snapshots:
'@types/minimist@1.2.5': {}
- '@types/node@18.19.31':
+ '@types/node@18.19.32':
dependencies:
undici-types: 5.26.5
@@ -7571,7 +7571,7 @@ snapshots:
graphemer: 1.4.0
ignore: 5.3.1
natural-compare-lite: 1.4.0
- semver: 7.6.0
+ semver: 7.6.1
tsutils: 3.21.0(typescript@5.4.5)
optionalDependencies:
typescript: 5.4.5
@@ -7616,7 +7616,7 @@ snapshots:
debug: 4.3.4(supports-color@5.5.0)
globby: 11.1.0
is-glob: 4.0.3
- semver: 7.6.0
+ semver: 7.6.1
tsutils: 3.21.0(typescript@5.4.5)
optionalDependencies:
typescript: 5.4.5
@@ -7633,7 +7633,7 @@ snapshots:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5)
eslint: 8.57.0
eslint-scope: 5.1.1
- semver: 7.6.0
+ semver: 7.6.1
transitivePeerDependencies:
- supports-color
- typescript
@@ -8131,7 +8131,7 @@ snapshots:
browserslist@4.23.0:
dependencies:
caniuse-lite: 1.0.30001616
- electron-to-chromium: 1.4.756
+ electron-to-chromium: 1.4.757
node-releases: 2.0.14
update-browserslist-db: 1.0.15(browserslist@4.23.0)
@@ -8637,7 +8637,7 @@ snapshots:
eastasianwidth@0.2.0: {}
- electron-to-chromium@1.4.756: {}
+ electron-to-chromium@1.4.757: {}
elliptic@6.5.5:
dependencies:
@@ -8666,7 +8666,7 @@ snapshots:
graceful-fs: 4.2.10
tapable: 2.2.1
- enhanced-resolve@5.16.0:
+ enhanced-resolve@5.16.1:
dependencies:
graceful-fs: 4.2.11
tapable: 2.2.1
@@ -8970,7 +8970,7 @@ snapshots:
read-pkg-up: 7.0.1
regexp-tree: 0.1.27
safe-regex: 2.1.1
- semver: 7.6.0
+ semver: 7.6.1
strip-indent: 3.0.0
eslint-rule-composer@0.3.0: {}
@@ -9213,7 +9213,7 @@ snapshots:
minimatch: 3.1.2
node-abort-controller: 3.1.1
schema-utils: 3.3.0
- semver: 7.6.0
+ semver: 7.6.1
tapable: 2.2.1
typescript: 5.4.5
webpack: 5.91.0(esbuild@0.17.19)
@@ -9720,7 +9720,7 @@ snapshots:
jest-util@29.7.0:
dependencies:
'@jest/types': 29.6.3
- '@types/node': 18.19.31
+ '@types/node': 18.19.32
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -9728,13 +9728,13 @@ snapshots:
jest-worker@27.5.1:
dependencies:
- '@types/node': 18.19.31
+ '@types/node': 18.19.32
merge-stream: 2.0.0
supports-color: 8.1.1
jest-worker@29.7.0:
dependencies:
- '@types/node': 18.19.31
+ '@types/node': 18.19.32
jest-util: 29.7.0
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -10112,7 +10112,7 @@ snapshots:
dependencies:
hosted-git-info: 4.1.0
is-core-module: 2.13.1
- semver: 7.6.0
+ semver: 7.6.1
validate-npm-package-license: 3.0.4
normalize-path@3.0.0: {}
@@ -11013,9 +11013,7 @@ snapshots:
semver@6.3.1: {}
- semver@7.6.0:
- dependencies:
- lru-cache: 6.0.0
+ semver@7.6.1: {}
serialize-javascript@6.0.2:
dependencies:
@@ -11472,16 +11470,16 @@ snapshots:
ts-loader@9.4.4(typescript@5.4.5)(webpack@5.91.0(esbuild@0.17.19)):
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.16.0
+ enhanced-resolve: 5.16.1
micromatch: 4.0.5
- semver: 7.6.0
+ semver: 7.6.1
typescript: 5.4.5
webpack: 5.91.0(esbuild@0.17.19)
tsconfig-paths-webpack-plugin@4.1.0:
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.16.0
+ enhanced-resolve: 5.16.1
tsconfig-paths: 4.2.0
tsconfig-paths@3.15.0:
@@ -11661,7 +11659,7 @@ snapshots:
acorn-import-assertions: 1.9.0(acorn@8.11.3)
browserslist: 4.23.0
chrome-trace-event: 1.0.3
- enhanced-resolve: 5.16.0
+ enhanced-resolve: 5.16.1
es-module-lexer: 1.5.2
eslint-scope: 5.1.1
events: 3.3.0
@@ -11781,8 +11779,8 @@ snapshots:
yocto-queue@1.0.0: {}
- zod-validation-error@1.3.1(zod@3.23.6):
+ zod-validation-error@1.3.1(zod@3.23.7):
dependencies:
- zod: 3.23.6
+ zod: 3.23.7
- zod@3.23.6: {}
+ zod@3.23.7: {}
diff --git a/src/routes/demo/page.tsx b/src/routes/demo/page.tsx
index e4af499..71797fa 100644
--- a/src/routes/demo/page.tsx
+++ b/src/routes/demo/page.tsx
@@ -1,21 +1,34 @@
import { Helmet } from '@modern-js/runtime/head';
-import { ListRow, Button, Icon, IconFont, Space } from '@feewee/h5app-common';
+import { ListRow, Button, Icon, IconFont, Space, PageProvider } from '@feewee/h5app-common';
+import { useSafeState } from 'ahooks';
+import { useEffect } from 'react';
-const Index = () => (
- <>
-
-
-
-
- demo 页面
- console.info('点击事件')} />
-
-
-
-
-
-
- >
-);
+const Index = () => {
+ const [loading, setLoading] = useSafeState(true);
+
+ useEffect(() => {
+ setTimeout(() => setLoading(false), 2500);
+ }, []);
+
+ return (
+ <>
+
+ {/* 这里面可以映入外部的一些样式或者js之类的,如果有需要的话。也可以调整head里的信息 */}
+
+
+
+
+ demo 页面
+ console.info('点击事件')} />
+
+
+
+
+
+
+
+ >
+ );
+};
export default Index;
diff --git a/src/routes/layout.tsx b/src/routes/layout.tsx
index 55806e2..6d40c73 100644
--- a/src/routes/layout.tsx
+++ b/src/routes/layout.tsx
@@ -8,6 +8,16 @@ import '@/style/global.scss';
dayjs.locale('zh-cn');
+(() => {
+ const { error } = console;
+ console.error = (...args: any) => {
+ if (/defaultProps/.test(args[0])) {
+ return;
+ }
+ error(...args);
+ };
+})();
+
export default function Layout() {
localdb.init('fw_h5_template', 'fw_h5_template', 'fw_h5_template_del');
const timer = useRef();