forked from alibaba/lowcode-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
40 lines (37 loc) · 1.03 KB
/
index.tsx
File metadata and controls
40 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import * as React from 'react';
import { ILowCodePluginContext } from '@alilc/lowcode-engine';
import PluginSchema from './editor';
const plugin = (ctx: ILowCodePluginContext) => {
return {
// 插件名,注册环境下唯一
name: 'LowcodePluginAliLowcodePluginSchema',
// 依赖的插件(插件名数组)
dep: [],
// 插件的初始化函数,在引擎初始化之后会立刻调用
init() {
// 往引擎增加面板
ctx.skeleton.add({
area: 'leftArea',
name: 'LowcodePluginAliLowcodePluginSchema',
type: 'PanelDock',
props: {
align: 'bottom',
icon: 'ellipsis',
description: 'Schema',
},
panelProps: {
width: 'calc(100% - 50px)',
},
content: () => (
<PluginSchema
project={ctx.project}
skeleton={ctx.skeleton}
event={ctx.event}
/>
),
})
},
};
};
plugin.pluginName = 'LowcodePluginAliLowcodePluginSchema'
export default plugin