diff --git a/packages/core/client/src/schema-component/antd/grid-card/hooks.ts b/packages/core/client/src/schema-component/antd/grid-card/hooks.ts index e8ef5db93..f66305dec 100644 --- a/packages/core/client/src/schema-component/antd/grid-card/hooks.ts +++ b/packages/core/client/src/schema-component/antd/grid-card/hooks.ts @@ -26,7 +26,7 @@ export const useGridCustomPageUrl = ({ field, fieldSchema }) => { fieldSchema?.parent?.parent?.['x-decorator-props']?.['linkConfig'] || {}; const { record } = field; let options = '?'; - fields.forEach((item, index) => { + fields?.forEach((item, index) => { if (!record[item]) return; return (options += `${index === 0 ? '' : '&'}${item}=${record[item]}`); }); diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx index e39869daf..6130d25af 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/OpenInNewTab.tsx @@ -11,7 +11,9 @@ export const OpenInNewTab = () => { const app = useApp(); const onOpenInNewTab = () => { - window.open(app.getRouteUrl('/mobile')); + const search = window.location; + const hash = search.hash.slice(search.hash.indexOf('/')); + window.open(app.getRouteUrl(hash)); }; return (