From 6851b39ad6c1df6db8639fe8ce7b381d7cd74c07 Mon Sep 17 00:00:00 2001 From: stevelliu Date: Mon, 31 Aug 2026 14:25:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(updater):=20=E4=BF=9D=E6=8C=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AE=9E=E4=BE=8B=E4=B8=8D=E8=A2=AB=E6=B7=B1=E5=B1=82?= =?UTF-8?q?=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/desktop/src/composables/useAppUpdater.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/composables/useAppUpdater.ts b/apps/desktop/src/composables/useAppUpdater.ts index 8c65182..5edce8d 100644 --- a/apps/desktop/src/composables/useAppUpdater.ts +++ b/apps/desktop/src/composables/useAppUpdater.ts @@ -1,4 +1,4 @@ -import { ref } from 'vue' +import { ref, shallowRef } from 'vue' import { check } from '@tauri-apps/plugin-updater' import { relaunch } from '@tauri-apps/plugin-process' import { getVersion } from '@tauri-apps/api/app' @@ -27,8 +27,8 @@ export function useAppUpdater() { const downloadIndeterminate = ref(false) const statusText = ref('') const errorText = ref('') - /** check() 返回的更新对象;安装前保持引用 */ - const pendingUpdate = ref>>(null) + /** check() 返回带私有字段的类实例;必须保持原对象,不能被 Vue 深层代理 */ + const pendingUpdate = shallowRef>>(null) function reset() { phase.value = 'idle'