Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Uploader

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _config

_config: WidgetConfig<Widget> = null

Protected _dataModel

_dataModel: ListModel

Protected _eventBus

_eventBus: EventBus

Protected _initialConfig

_initialConfig: WidgetConfig<Widget> = null

Protected _mainEl

_mainEl: JQuery<HTMLElement>

Protected _valueModel

_valueModel: Model

Readonly id

id: string

widgetEl

widgetEl: JQuery<HTMLElement>

Methods

Protected _addFiles

  • Parameters

    Returns this

Protected _bodyFragment

  • _bodyFragment(): string

Protected _destroy

  • _destroy(): 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 _equalValues

Protected _fire

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

    • E

    Parameters

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

    Returns void

Protected _hAlign

  • _hAlign(): string

Protected _hasFaceMode

Protected _hideError

  • _hideError(): void

Protected _hideTipError

  • _hideTipError(): void

Protected _i18n

Protected _iniValue

  • _iniValue(): void

Protected _initDataModel

  • _initDataModel(): void

Protected _initDom

  • _initDom(): void

Protected _initUploader

Protected _initValueModel

  • _initValueModel(): void

Protected _onAfterInit

  • _onAfterInit(): void

Protected _onAfterRender

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

    Returns void

Protected _onBeforeInit

  • _onBeforeInit(): void

Protected _onBeforeRender

  • _onBeforeRender(): void

Protected _removeFile

  • _removeFile(wuFileId: string): this
  • Parameters

    • wuFileId: string

    Returns this

Protected _render

  • _render(): void

Protected _renderData

  • _renderData(): void

Protected _renderValue

  • _renderValue(): void

Protected _retryFile

  • _retryFile(wuFileId: string): this
  • Parameters

    • wuFileId: string

    Returns this

Protected _setValue

  • _setValue(val: any, silent?: boolean): void
  • Parameters

    • val: any
    • Optional silent: boolean

    Returns void

Protected _showError

  • _showError(msg: string): void

Protected _showTipError

  • _showTipError(msg: string): void

Protected _vAlign

  • _vAlign(): string

Protected _validate

  • _validate(name: string, val: any, rst: ValidateResult): string | boolean

add

clear

  • clear(silent?: boolean): this
  • Clear value.

    Parameters

    • Optional silent: boolean

    Returns this

crudValue

data

dataModel

  • dataModel<M>(): M

destroy

  • destroy(): void

disable

  • disable(): this

enable

  • enable(): this

hide

  • hide(): this

inProgress

  • inProgress(): boolean
  • Returns boolean

iniValue

initialConfig

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

    • V

    Parameters

    • Optional key: string

    Returns V

isCrud

  • isCrud(): boolean

isEnabled

  • isEnabled(): boolean

isShown

  • isShown(): boolean

load

locale

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

name

  • name(): string

off

  • off(types?: string): this

on

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

    • H

    Parameters

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

    Returns this

readonly

  • readonly(): boolean
  • readonly(is: boolean): this

reload

  • reload(): this

remove

  • remove(id: string | string[]): this
  • Parameters

    • id: string | string[]

    Returns this

render

  • render<T>(): T

reset

  • reset(): this

show

  • show(): this

title

  • title(text: string): this
  • title(): string

validate

  • validate(): string | boolean

value

valueModel

Object literals

Static I18N

I18N: object

exceedMaxSize

exceedMaxSize: string = "Exceed the max size of single file"

exceedMaxTotalSize

exceedMaxTotalSize: string = "Exceed the max size of total files"

exceedNumbers

exceedNumbers: string = "Exceed the max numbers of file"

pickTip

pickTip: string = "<Accepts>FileExts={fileExts}MaxTotalSize={maxTotalSize}MaxNumbers={maxNumbers}MaxSingleSize={maxSingleSize}"

pickTitle

pickTitle: string = "Select your local files please"

removeTip

removeTip: string = "Remove"

retryTip

retryTip: string = "Retry"

viewDenied

viewDenied: string = "The file can't be viewed in local mode"

wrongDuplicate

wrongDuplicate: string = "Can't upload duplicate file"

wrongType

wrongType: string = "Wrong file type"