2.1.3 • Published 12 months ago

@gant-lowcode/lowcode-plugin-block v2.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

区块管理 - 区块面板

区块实体

interface Block {
  name: string;
  title: string;
  schema: string;
  screenshot: string;
  created_at?: string;
  updated_at?: string;
}

注意

使用区块管理需要提前将对应的 API 注册到 engine config 里:

interface BlockAPI {
  listBlocks: () => Block[];
  createBlock: (Block) => any;
}

function setupConfig() {
  config.set('apiList', {
    block: {
      listBlocks,
      createBlock
    },
  })
}

使用方式

import { plugins } from '@gant-lowcode/lowcode-engine';
import BlockPane from '@gant-lowcode/lowcode-plugin-block';

await plugins.register(BlockPane);
2.1.3

12 months ago

2.1.0

1 year ago