Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BasicModel<Value>

Type parameters

  • Value

Hierarchy

Implements

Index

Constructors

Protected constructor

Properties

[MODEL_ID]

[MODEL_ID]: boolean
internal

destroyOnUnmount

destroyOnUnmount: boolean = false

组件 unmount 的时候删除 model

error$

error$: BehaviorSubject<undefined | null | IValidateResult<Value>> = new BehaviorSubject<IMaybeError<Value>>(null)

id

id: string

initialValue

initialValue: Maybe<Value> = None()
internal

初始值

Abstract owner

owner: IModel<any> | null

phantomValue

phantomValue: Value
internal

Private subscriptions

subscriptions: Subscription[] = []

validate$

validate$: Subject<IValidation> = new Subject<IValidation>()
internal

validators

validators: IValidators<Value> = []
internal

校验规则数组

Accessors

error

form

  • get form(): undefined | null | FormModel<any>

Methods

Abstract clear

  • clear(): void

Abstract dirty

  • dirty(): boolean

dispose

  • dispose(): void

Abstract getRawValue

  • getRawValue(): any

Abstract getSubmitValue

  • getSubmitValue(): any

Abstract initialize

  • initialize(value: Value): void

Abstract patchValue

  • patchValue(value: Value): void

Abstract pristine

  • pristine(): boolean

Abstract reset

  • reset(): void

Abstract touched

  • touched(): boolean

Protected triggerValidate

Abstract valid

  • valid(): boolean

Abstract validate

Generated using TypeDoc