MCPcopy
hub / github.com/alibaba/lowcode-engine / PanelDock

Class PanelDock

packages/editor-skeleton/src/widget/panel-dock.ts:12–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10import { findDOMNode } from 'react-dom';
11
12export class PanelDock implements IWidget {
13 readonly isWidget = true;
14
15 readonly isPanelDock = true;
16
17 readonly id: string;
18
19 readonly name: string;
20
21 readonly align?: 'left' | 'right' | 'bottom' | 'center' | 'top' | undefined;
22
23 private inited = false;
24
25 private _body: ReactNode;
26
27 get body() {
28 if (this.inited) {
29 return this._body;
30 }
31 this.inited = true;
32 const { props } = this.config;
33
34 this._body = createElement(PanelDockView, {
35 ...props,
36 dock: this,
37 });
38
39 return this._body;
40 }
41
42 private _shell: ReactInstance | null = null;
43
44 get content(): ReactNode {
45 return createElement(WidgetView, {
46 widget: this,
47 ref: (ref) => {
48 this._shell = ref;
49 },
50 key: this.id,
51 });
52 }
53
54 @obx.ref private _visible = true;
55
56 get visible() {
57 return this._visible;
58 }
59
60 @computed get actived(): boolean {
61 return this.panel?.visible || false;
62 }
63
64 readonly panelName: string;
65
66 private _panel?: Panel;
67
68 @obx.ref private _disabled = false;
69

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…