From ba6bdda6a236ba499ce143dff296714a78a28361 Mon Sep 17 00:00:00 2001 From: BARM Date: Wed, 15 Mar 2023 16:44:51 +0800 Subject: [PATCH] update pluginWidget.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dock的使用需要在props里面定义icon属性和onClick事件 --- docs/docs/guide/expand/editor/pluginWidget.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/docs/guide/expand/editor/pluginWidget.md b/docs/docs/guide/expand/editor/pluginWidget.md index 7efaffcf0..06125575f 100644 --- a/docs/docs/guide/expand/editor/pluginWidget.md +++ b/docs/docs/guide/expand/editor/pluginWidget.md @@ -172,19 +172,16 @@ 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'); + } + } }); ```