UNPKG

@farris/devkit-vue

Version:
50 lines (49 loc) 1.22 kB
import { EntityPath } from './entity-path/index'; import { Entity } from './entity'; import { EntityState } from './entity-state'; /** * 实体状态更新 */ declare class EntityStateUpdater { /** * 实体类型 */ private entityState; /** * 实体集合 */ private entityList; /** * 实体查询器 */ private entityQuery; /** * 构造函数 */ constructor(entityState: EntityState<Entity>); /** * 根据path加载实体集合 */ loadEntitesByPath(path: EntityPath, entities: Entity[]): void; /** * 根据path追加实体集合 */ appendEntitesByPath(path: EntityPath, entities: Entity[]): void; /** * 根据Path批量删除实体 */ removeEntitiesByPath(path: EntityPath, ids: string[]): void; /** * 根据实体path,更新实体 */ updateEntityByPath(path: EntityPath, newValues: any): void; /** * 根据属性Path,更新属性值 */ setValueByPath(path: EntityPath, newValue: any): void; /** * 根据Paht和ID改变当前实体 */ changeCurrentEntityByPath(path: EntityPath, id: string): void; } export { EntityStateUpdater };