UNPKG

@farris/devkit-vue

Version:
48 lines (47 loc) 1.08 kB
import { Entity } from '../entity'; import { EntityState } from '../entity-state'; import { EntityPath } from './entity-path'; /** * 实体路径构造器 */ declare class EntityPathBuilder { /** * 实体状态 */ private entityState; /** * 构造函数 */ constructor(entityState: EntityState<Entity>); /** * 构造实体路径 */ build(path: string | string[] | EntityPath, isEntityListPath?: boolean): EntityPath; /** * 根据长路径数组构造实体路径对象 */ private buildEntityPath; /** * 转换为长路径 * 短路径:/childs/grands/assoInfo/name * 长路径:/[id]/childs/[childId]/assoInfo/name */ private convertToLongPath; /** * 转换为路径数据 */ private convertToPathArray; /** * 检查路径是否合法 */ private checkPath; /** * 检查是否为长路径 */ private isShortPath; /** * 检查是否为ID路径片段 */ private isIdPathItem; } export { EntityPathBuilder };