Class UiModule

EntityBase.

Hierarchy (view full)

Implements

Constructors

Properties

_app?: App
_controlContainer: HTMLElement
_controlPositions: Record<string, HTMLElement> = {}
_controls: IControl[] = []
_destroyed: boolean = false
appRenderIndex: number = 0
configPane?: any
data: ShallowReactive<{
    [key: string]: any;
}> = ...

Type declaration

  • [key: string]: any
extData: {
    [key: string]: any;
} = {}

Type declaration

  • [key: string]: any
instanceId: number = ++AppObject._instanceIdCounter
onSetApp: Signal = ...
moduleName: string = "UiModule"

Accessors

  • get app(): App
  • Returns App

  • set app(value): void
  • Parameters

    Returns void

  • get destroyed(): boolean
  • Whether it has been destroyed.

    Returns boolean

  • get enabled(): boolean
  • Indicates whether the component is enabled.

    Returns boolean

  • set enabled(value): void
  • Parameters

    • value: boolean

    Returns void

Methods

  • 增加控件 (会调用 control.onAdd(this) ).

    Parameters

    • control: IControl

      需要增加的控件.

    • Optional position: ControlPosition

      位置. 'top-left', 'top-right', 'bottom-left', and 'bottom-right'. Defaults to 'top-right'`

    Returns App

  • Parameters

    • toClassInst: any
    • Optional methodNames: string[]
    • Optional addMethods: string[]
    • Optional filterName: string[]

    Returns void

  • 触发指定事件名称.

    Parameters

    • event: string

      Event name

    • Rest ...data: any

      Data

    Returns boolean

    • Whether the dispatching is successful
  • 返回注册的所有事件名.

    Returns string[]

    所有事件名

  • Parameters

    • Optional opts: {
          isReset?: boolean;
          style?: Partial<CSSStyleDeclaration>;
          title?: string;
      }
      • Optional isReset?: boolean

        是否清空,默认是

      • Optional style?: Partial<CSSStyleDeclaration>

        样式

      • Optional title?: string

        标题

    Returns Promise<{
        appendChild: ((config?, params?) => any);
        configPane: any;
        element: HTMLElement;
        isInit: boolean;
        isVisible: (() => boolean);
        renderUiConfig: ((uiConfig) => any);
        renderUiObject: ((uiConfig, parent?) => any);
        reset: (() => void);
        rootPane: any;
        setVisible: ((b) => "" | "none");
        uiRefresh(deep?, mode?, delay?): any;
    }>

  • 是否有控件.

    Parameters

    Returns boolean

  • 确定是否存在事件侦听

    Parameters

    • event: string

      事件名

    Returns boolean

    返回是否存在相应的事件

  • 返回具有指定事件名称的侦听总数.

    Parameters

    • event: string

      Event name

    Returns number

    The count of listeners

  • 信息弹窗提示

    • text(必填):需要输出的文本
    • type(可选):输出类型 默认是 "log"
    • time(可选):停留时间 默认是 2500

    Parameters

    • text: string
    • Optional type: number | logInfoType
    • Optional time: number

    Returns void

  • 通过事件名移除所有监听.

    Parameters

    • Optional event: string

      Event name, delete all events if not passed

    Returns void

  • 移除控件.

    Parameters

    Returns App

  • 设置光标

    Parameters

    • cur: string

      光标名称

    Returns void