Skip to content

Latest commit

 

History

History
242 lines (118 loc) · 4.18 KB

File metadata and controls

242 lines (118 loc) · 4.18 KB

ISYS_ReactComponentizationDialogWorkerPortal interface

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

WorkerPortal 类接口 用于管理组件的生命周期和事件处理

Signature

interface ISYS_ReactComponentizationDialogWorkerPortal 

Remarks

WorkerPortal 负责在虚拟环境中创建、更新和销毁组件, 并通过消息机制与 EditorDesignPortal 通信。

Properties

Property

Modifiers

Type

Description

bindEvent

(handle: string, callback: (event: unknown) => void) => void

(ALPHA) 绑定事件处理器

createComponent

(handle: string, type: string, props: Record<string, unknown>, parent: string) => void

(ALPHA) 创建组件

detachComponent

(handle: string) => void

(ALPHA) 销毁组件

dispatchEvent

(handle: string, event: unknown) => void

(ALPHA) 触发事件

Provider

React.ComponentType<React.PropsWithChildren<unknown>>

(ALPHA) Provider 组件 用于提供 PortalContext 给子组件

updateComponent

(handle: string, props: Record<string, unknown>) => void

(ALPHA) 更新组件


属性详情

bindevent

ISYS_ReactComponentizationDialogWorkerPortal.bindEvent property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

绑定事件处理器

Signature

bindEvent: (handle: string, callback: (event: unknown) => void) => void;

createcomponent

ISYS_ReactComponentizationDialogWorkerPortal.createComponent property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

创建组件

Signature

createComponent: (handle: string, type: string, props: Record<string, unknown>, parent: string) => void;

detachcomponent

ISYS_ReactComponentizationDialogWorkerPortal.detachComponent property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

销毁组件

Signature

detachComponent: (handle: string) => void;

dispatchevent

ISYS_ReactComponentizationDialogWorkerPortal.dispatchEvent property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

触发事件

Signature

dispatchEvent: (handle: string, event: unknown) => void;

provider

ISYS_ReactComponentizationDialogWorkerPortal.Provider property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Provider 组件 用于提供 PortalContext 给子组件

Signature

Provider: React.ComponentType<React.PropsWithChildren<unknown>>;

updatecomponent

ISYS_ReactComponentizationDialogWorkerPortal.updateComponent property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

更新组件

Signature

updateComponent: (handle: string, props: Record<string, unknown>) => void;