Revert "fix: modal app not found"

This reverts commit f5a83d48da.
This commit is contained in:
sealday 2024-03-21 22:14:32 +08:00
parent e07ee53db7
commit f4e75348d7

View File

@ -67,8 +67,6 @@ import {
useRecord, useRecord,
useSchemaSettingsItem, useSchemaSettingsItem,
useSortFields, useSortFields,
useApp,
ApplicationContext,
} from '..'; } from '..';
import { import {
BlockRequestContext_deprecated, BlockRequestContext_deprecated,
@ -972,7 +970,6 @@ export const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps> = (props)
const record = useCollectionRecord(); const record = useCollectionRecord();
const { association } = useDataBlockProps() || {}; const { association } = useDataBlockProps() || {};
const formCtx = useFormBlockContext(); const formCtx = useFormBlockContext();
const app = useApp();
// 解决变量`当前对象`值在弹窗中丢失的问题 // 解决变量`当前对象`值在弹窗中丢失的问题
const { formValue: subFormValue, collection: subFormCollection } = useSubFormValue(); const { formValue: subFormValue, collection: subFormCollection } = useSubFormValue();
@ -991,7 +988,6 @@ export const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps> = (props)
{ title: schema.title || title, width }, { title: schema.title || title, width },
() => { () => {
return ( return (
<ApplicationContext.Provider value={app}>
<CollectionRecordProvider record={record}> <CollectionRecordProvider record={record}>
<FormBlockContext.Provider value={formCtx}> <FormBlockContext.Provider value={formCtx}>
<SubFormProvider value={{ value: subFormValue, collection: subFormCollection }}> <SubFormProvider value={{ value: subFormValue, collection: subFormCollection }}>
@ -1037,7 +1033,6 @@ export const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps> = (props)
</SubFormProvider> </SubFormProvider>
</FormBlockContext.Provider> </FormBlockContext.Provider>
</CollectionRecordProvider> </CollectionRecordProvider>
</ApplicationContext.Provider>
); );
}, },
theme, theme,