Options
All
  • Public
  • Public/Protected
  • All
Menu

组件序列化服务类

Hierarchy

Index

Constructors

constructor

Methods

Static deserialize

  • deserialize(strJson: string, reviverCallback: Function, isDesignMode?: boolean, modelId?: string): ComponentBase
  • json对象反序列化成组件对象

    Parameters

    • strJson: string

      json字符串

    • reviverCallback: Function
    • Optional isDesignMode: boolean

      是否设计模式

    • Optional modelId: string

    Returns ComponentBase

    返回创建的page实例

Static getInstance

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

    • T: {}

    Returns T

Static jsonParser

  • jsonParser(strJson: string, reviverCallback: Function): IComponent
  • 字符串反序列化成json对象

    Parameters

    • strJson: string

      json字符串

    • reviverCallback: Function

      序列化的回调函数

    Returns IComponent

    返回IComponentBase的实例,注意这里只是json反序列化而已,不是组件实例.

Static serialize

  • 组件对象序列化成json字符串

    Parameters

    Returns any

Static serializeJson

  • serializeJson(cmp: SerializeComponetBase, serCallBack: (propertyName: any, value: any, lev: number, path: string, cmp: any) => boolean, space: any): any
  • 组件序列化函数

    Parameters

    • cmp: SerializeComponetBase

      需要序列化的组件

    • serCallBack: (propertyName: any, value: any, lev: number, path: string, cmp: any) => boolean

      (propertyName, value, lev) 序列化过程中的回调函数, propertyName属性名, value属性值, lev属性深度.

        • (propertyName: any, value: any, lev: number, path: string, cmp: any): boolean
        • Parameters

          • propertyName: any
          • value: any
          • lev: number
          • path: string
          • cmp: any

          Returns boolean

    • space: any

    Returns any

Generated using TypeDoc