diff --git a/package.json b/package.json index 40f7792..12776b5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "@ant-design/cssinjs": "^1.21.1", "@ant-design/icons": "^5.4.0", - "@feewee/h5app-common": "^0.1.97", + "@feewee/h5app-common": "^0.1.107", "@modern-js/plugin-polyfill": "~2.55.0", "@modern-js/runtime": "~2.55.0", "ahooks": "^3.8.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0b1c47f..0b7feee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^5.4.0 version: 5.4.0(react-dom@18.3.1)(react@18.3.1) '@feewee/h5app-common': - specifier: ^0.1.97 - version: 0.1.97(antd@5.20.3)(react-dom@18.3.1)(react@18.3.1) + specifier: ^0.1.107 + version: 0.1.107(antd@5.20.3)(react-dom@18.3.1)(react@18.3.1) '@modern-js/plugin-polyfill': specifier: ~2.55.0 version: 2.55.0 @@ -3332,8 +3332,8 @@ packages: - supports-color dev: true - /@feewee/h5app-common@0.1.97(antd@5.20.3)(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-+1toOU/GZhaqnCpLcBJ5Ymrr7Pb9uqrqAOSPGOchSNNaAcMexR6u30m/jNYajXVow98cOPh7zx7OMDbjtiWQuQ==} + /@feewee/h5app-common@0.1.107(antd@5.20.3)(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-5yXePOzTixAEW/gQ+CJnK6fryH7cP481moMKSuuYwK2tlP2sU+BKtg+XopxLPDySpCuNBgT2OidsMq9BQiM9KQ==} engines: {node: '>=18', npm: '>=6.9.0'} peerDependencies: antd: '>=5' diff --git a/src/routes/layout.tsx b/src/routes/layout.tsx index a8d4a95..fc77aed 100644 --- a/src/routes/layout.tsx +++ b/src/routes/layout.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useLayoutEffect, useRef } from 'react'; import { Outlet, useNavigate } from '@modern-js/runtime/router'; import dayjs from 'dayjs'; -import { ONE_SECOND, helper, localdb } from '@feewee/h5app-common'; +import { ONE_SECOND, OnlyKey, helper, localdb, useOverlay } from '@feewee/h5app-common'; import { StyleProvider } from '@ant-design/cssinjs'; import { getServerTime } from './service'; import 'dayjs/locale/zh-cn'; @@ -54,6 +54,8 @@ export default function Layout() { useEffect(() => { window.document.addEventListener('message', lisFn); + OnlyKey.clearOnlyKey(); + useOverlay.clear(); return () => { window.document.removeEventListener('message', lisFn);