From 2a2a4ce4882776bb3edbb9609bb5bfff8d6fe637 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Mon, 14 Oct 2024 09:40:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/GraphicStore.d.ts | 2 ++ lib/index.d.ts | 2 +- lib/index.js | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) 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); + } } //基础图形对象扩展