From d92cdedc57bae306b606f41b80a07042c1502dc4 Mon Sep 17 00:00:00 2001 From: "2817212736@qq.com" <2817212736@qq.com> Date: Fri, 9 May 2025 17:27:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=99=E9=BB=98=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=97=B6pinia=E5=AE=9E=E4=BE=8B=E6=9C=AA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/lib/entry.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6edcba8..dc2907c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "material-editor", "private": true, - "version": "1.0.5", + "version": "1.0.6", "type": "module", "scripts": { "dev": "vite", diff --git a/src/lib/entry.ts b/src/lib/entry.ts index ad836c6..0fd1cfb 100644 --- a/src/lib/entry.ts +++ b/src/lib/entry.ts @@ -46,7 +46,8 @@ export function UpdateTexture() { export async function SubmitRawAsync(options: { textureSrc: string }): Promise<{ file: string }> { - const scene = useSceneRaw(); + let pinia = createPinia(); + const scene = useSceneRaw(pinia); const virtualDom = document.createElement('div'); virtualDom.style.display = 'none'; @@ -56,6 +57,7 @@ export async function SubmitRawAsync(options: { textureSrc: string }): Promise<{ scene.Dispose(); virtualDom.remove(); + disposePinia(pinia); return { file: json };