diff --git a/packages/core/client/src/schema-component/antd/page/Page.tsx b/packages/core/client/src/schema-component/antd/page/Page.tsx index 5d306ab23..6055565eb 100644 --- a/packages/core/client/src/schema-component/antd/page/Page.tsx +++ b/packages/core/client/src/schema-component/antd/page/Page.tsx @@ -1,11 +1,13 @@ -import React, { useEffect } from 'react'; +import { useField } from '@formily/react'; import { PageHeader as AntdPageHeader } from 'antd'; -import { observer, useField } from '@formily/react'; +import React, { useEffect } from 'react'; import { useDocumentTitle } from '../../../document-title'; +import { useCompile } from '../../hooks'; export const Page = (props) => { const { children, ...others } = props; const field = useField(); + const compile = useCompile(); const { title, setTitle } = useDocumentTitle(); useEffect(() => { if (!title) { @@ -14,7 +16,7 @@ export const Page = (props) => { }, [field.title, title]); return ( <> - +
{children}
);