@digiforce-cloud/dvd-plugin-block
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.0 • Public • Published

区块管理 - 区块面板

区块实体


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 '@digiforce-cloud/dvd-engine';
import BlockPane from '@digiforce-cloud/dvd-plugin-block';

await plugins.register(BlockPane);

Readme

Keywords

none

Package Sidebar

Install

npm i @digiforce-cloud/dvd-plugin-block

Weekly Downloads

3

Version

1.0.0-beta.0

License

MIT

Unpacked Size

20.9 kB

Total Files

20

Last publish

Collaborators

  • locngo-innoria
  • thodinh.sg