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
49 lines (46 loc) · 1.27 KB
/
index.tsx
File metadata and controls
49 lines (46 loc) · 1.27 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
41
42
43
44
45
46
47
48
49
import * as React from 'react';
import { ILowCodePluginContext } from '@alilc/lowcode-engine';
import { IconQuestion } from './icon';
import { Dialog } from '@alifd/next';
import { Documents } from './popup';
const PluginManual = (ctx: ILowCodePluginContext) => {
return {
// 插件名,注册环境下唯一
name: 'PluginManual',
// 依赖的插件(插件名数组)
dep: [],
// 插件对外暴露的数据和方法
exports() {
return { }
},
// 插件的初始化函数,在引擎初始化之后会立刻调用
init() {
// 往引擎增加面板
ctx.skeleton.add({
area: 'leftArea',
name: 'demoPane',
type: 'PanelDock',
props: {
align: 'bottom',
icon: IconQuestion,
description: '如何使用',
onClick() {
Dialog.show({
title: '低代码产品使用文档',
content: (
<Documents />
),
height: window.innerHeight - 100 + 'px',
style: {
width: window.innerWidth - 300,
},
footer: false,
})
},
},
});
},
};
};
PluginManual.pluginName = 'PluginManual';
export default PluginManual;