Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Widget

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _config

_config: WidgetConfig<Widget> = null

Protected _eventBus

_eventBus: EventBus

Protected _initialConfig

_initialConfig: WidgetConfig<Widget> = null

Readonly id

id: string

widgetEl

widgetEl: JQuery<HTMLElement>

Static I18N

I18N: I18NResource | URLString = null

Methods

Protected _destroy

  • _destroy(): void
  • Returns void

Protected _eachMode

  • _eachMode(type: "sizeMode" | "colorMode" | "faceMode", fn: (this: Widget, mode: string) => void, cfg?: WidgetConfig<Widget>): void
  • 按指定模式类型渲染

    Parameters

    • type: "sizeMode" | "colorMode" | "faceMode"

      模式类型

    • fn: (this: Widget, mode: string) => void

      渲染函数

        • (this: Widget, mode: string): void
        • Parameters

          Returns void

    • Optional cfg: WidgetConfig<Widget>

    Returns void

Protected _fire

  • _fire<E>(e: E, args?: Array<any>): void
  • Type parameters

    • E

    Parameters

    • e: E
    • Optional args: Array<any>

    Returns void

Protected _hasFaceMode

  • 是否包含指定模式

    Parameters

    Returns boolean

Protected _i18n

  • Returns JsonObject

  • Type parameters

    • T

    Parameters

    • key: string

    Returns T

Protected _initDom

  • _initDom(): void
  • 初始化DOM

    Returns void

Protected _onAfterInit

  • _onAfterInit(): void
  • 在父类构造函数中的初始化之后,由子类重载实现

    Returns void

Protected _onAfterRender

  • _onAfterRender(): void
  • Returns void

Protected _onBeforeInit

  • _onBeforeInit(): void
  • 在父类构造函数中的初始化之前,由子类重载实现

    Returns void

Protected _onBeforeRender

  • _onBeforeRender(): void
  • Returns void

Protected Abstract _render

  • _render(): void | false
  • 渲染DOM(不触发事件) 返回false表示异步渲染

    Returns void | false

destroy

  • destroy(): void

hide

  • hide(): this

initialConfig

  • initialConfig<V>(key?: string): V
  • Type parameters

    • V

    Parameters

    • Optional key: string

    Returns V

isShown

  • isShown(): boolean

locale

  • locale(): string
  • locale(locale: string): this

name

  • name(): string
  • 返回控件name属性

    Returns string

off

  • off(types?: string): this
  • Parameters

    • Optional types: string

    Returns this

on

  • on<H>(types: string, fn: H, once?: boolean): this
  • Type parameters

    • H

    Parameters

    • types: string
    • fn: H
    • Optional once: boolean

    Returns this

render

  • render<T>(): T
  • Type parameters

    Returns T

show

  • show(): this