DataBlockResourceProvider

Based on properties like collection, association, sourceId, etc. in DataBlockProvider, constructs resource object to facilitate child components' CRUD operations on block data. It is built into DataBlockProvider.

useDataBlockResource

Used to get the resource object of the current data block.

  • Type
function useDataBlockResource(): IResource
  • Example
const  resource = useDataBlockResource();

const onSubmit = async (values) => {
  // Create
  await resource.create({ values });
}
const  resource = useDataBlockResource();

const onDelete = async () => {
  // Delete
  await resource.destroy();
}
Total visits  times     Total visitors  times     Total reading  times.   Powered by Tego Team