In NocoBase 2.0, the block extension mechanism has been significantly simplified. Developers only need to inherit the corresponding FlowModel base class and implement related interface methods (mainly the renderComponent() method) to quickly customize blocks.
NocoBase categorizes blocks into three types, displayed in groups in the configuration interface:
DataBlockModel or CollectionBlockModelFilterBlockModelBlockModelThe block grouping is determined by the corresponding base class. The classification logic is based on inheritance relationships and requires no additional configuration.
The system provides four base classes for extensions:
Basic Block Model, the most versatile block base class.
Data Block Model (not bound to data table), for blocks with custom data sources.
Collection Block Model, for blocks that need to be bound to a data table.
Filter Block Model, for building filter condition blocks.
When selecting a base class, you can follow these principles:
CollectionBlockModelDataBlockModelFilterBlockModelBlockModelCreating a custom block only requires three steps:
BlockModel)renderComponent() method to return a React componentFor detailed examples, please refer to Write a Block Plugin.