Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/desktop/src/composables/useAppUpdater.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -27,8 +27,8 @@ export function useAppUpdater() {
const downloadIndeterminate = ref(false)
const statusText = ref('')
const errorText = ref('')
/** check() 返回的更新对象;安装前保持引用 */
const pendingUpdate = ref<Awaited<ReturnType<typeof check>>>(null)
/** check() 返回带私有字段的类实例;必须保持原对象,不能被 Vue 深层代理 */
const pendingUpdate = shallowRef<Awaited<ReturnType<typeof check>>>(null)

function reset() {
phase.value = 'idle'
Expand Down