docs: update skeleton.md (#1699)

* docs: update skeleton.md
This commit is contained in:
BARM 2023-03-10 16:22:05 +08:00 committed by GitHub
parent 53ada7bf10
commit 608b99eb97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ Widget 形式是直接渲染在当前编辑器的对应位置上。如 demo 中
接入可以参考代码:
```javascript
import {skeleton} from "@alilc/lowcode-engine";
import { skeleton } from "@alilc/lowcode-engine";
// 注册 logo 面板
skeleton.add({
area: "topArea",
@ -119,18 +119,15 @@ skeleton.add({
area: "leftArea",
type: "Dock",
name: "opener",
content: Opener, // Widget 组件实例
contentProps: { // Widget 插件 props
xxx: "1",
},
props: {
icon: Icon, // Icon 组件实例
align: "bottom",
},
onClick: function() {
// 打开外部链接
window.open('https://lowcode-engine.cn');
// 显示 widget
skeleton.showWidget('xxx');
onClick: function () {
// 打开外部链接
window.open('https://lowcode-engine.cn');
// 显示 widget
skeleton.showWidget('xxx');
}
}
});
```