update pluginWidget.md

Dock的使用需要在props里面定义icon属性和onClick事件
This commit is contained in:
BARM 2023-03-15 16:44:51 +08:00 committed by 刘菊萍(絮黎)
parent 0a8f836842
commit ba6bdda6a2

View File

@ -172,19 +172,16 @@ skeleton.add({
area: 'leftArea', area: 'leftArea',
type: 'Dock', type: 'Dock',
name: 'opener', name: 'opener',
content: Opener, // Widget 组件实例
contentProps: { // Widget 插件 props
xxx: '1',
},
props: { props: {
icon: Icon, // Icon 组件实例
align: 'bottom', align: 'bottom',
}, onClick: function () {
onClick: function () { // 打开外部链接
// 打开外部链接 window.open('https://lowcode-engine.cn');
window.open('https://lowcode-engine.cn'); // 显示 widget
// 显示 widget skeleton.showWidget('xxx');
skeleton.showWidget('xxx'); }
}, }
}); });
``` ```