diff --git a/lib/core/GraphicStore.d.ts b/lib/core/GraphicStore.d.ts index 5108b5a..dd0a5a8 100644 --- a/lib/core/GraphicStore.d.ts +++ b/lib/core/GraphicStore.d.ts @@ -52,6 +52,7 @@ export interface GraphicQueryStore { * @param type */ queryByCodeAndTypeAmbiguous(code: string, type: string): T[]; + checkIdExist(v: number): boolean; } /** * 图形存储 @@ -87,4 +88,5 @@ export declare class GraphicStore implements GraphicQueryStore { * 清空 */ clear(): void; + checkIdExist(id: number): boolean; } diff --git a/lib/index.d.ts b/lib/index.d.ts index d2f97fe..826e1af 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,4 +1,4 @@ -/// +/// export * as GraphicsExtras from '@pixi/graphics-extras'; export * from './app'; export * from './core'; diff --git a/lib/index.js b/lib/index.js index 58b89fd..ae36d11 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4446,6 +4446,9 @@ class GraphicStore { this.relationManage.clear(); this.store.clear(); } + checkIdExist(id) { + return this.store.has(id); + } } //基础图形对象扩展