MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / onShowWidget

Method onShowWidget

packages/shell/src/api/skeleton.ts:199–205  ·  view source on GitHub ↗

* 监听 widget 显示事件 * @param listener * @returns

(listener: (...args: any[]) => void)

Source from the content-addressed store, hash-verified

197 * @returns
198 */
199 onShowWidget(listener: (...args: any[]) => void): IPublicTypeDisposable {
200 const { editor } = this[skeletonSymbol];
201 editor.eventBus.on(SkeletonEvents.WIDGET_SHOW, (name: any, panel: any) => {
202 listener(name, new SkeletonItem(panel));
203 });
204 return () => editor.eventBus.off(SkeletonEvents.WIDGET_SHOW, listener);
205 }
206
207 /**
208 * 监听 widget 隐藏事件

Callers

nothing calls this directly

Calls 2

onMethod · 0.65
offMethod · 0.65

Tested by

no test coverage detected