nocobase/docs/tr-TR/development/client/ui-schema-designer/x-initializer.md
altaytahsin ad4929e48b
Turkish language created for Docs. Belgeler için türkçe dil desteği (#1071)
* Turkish language created for Docs. Belgeler için türkçe dil desteği oluşturuldu.

* Turkish docs fix
2022-12-23 09:42:44 +08:00

977 B

x-initializer 组件

内置 x-initializer 组件

  • BlockInitializers
  • CalendarActionInitializers
  • CreateFormBlockInitializers
  • CustomFormItemInitializers
  • DetailsActionInitializers
  • FormActionInitializers
  • FormItemInitializers
  • KanbanActionInitializers
  • ReadPrettyFormActionInitializers
  • ReadPrettyFormItemInitializers
  • RecordBlockInitializers
  • RecordFormBlockInitializers
  • SubTableActionInitializers
  • TableActionColumnInitializers
  • TableActionInitializers
  • TableColumnInitializers
  • TableSelectorInitializers
  • TabPaneInitializers

替换

import React, { useContext } from 'react';
import { SchemaInitializerContext } from '@nocobase/client';

export default React.memo((props) => {
  const items = useContext(SchemaInitializerContext);
  const BlockInitializers = {};
  return (
    <SchemaInitializerContext.Provider value={{ ...items, BlockInitializers }}>
      {props.children}
    </SchemaInitializerContext.Provider>
  );
});