Skip to content

Commit

Permalink
fix: task reactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jan 5, 2022
1 parent 2d0dd8a commit 693af51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xmcl-keystone-ui/src/windows/main/provideTaskProxy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InjectionKey, onMounted, onUnmounted, reactive, Ref, ref } from '@vue/composition-api'
import { computed, InjectionKey, onMounted, onUnmounted, reactive, Ref, ref } from '@vue/composition-api'
import { TaskItem } from '/@/entities/task'
import { useI18n } from '/@/hooks'
import { TaskBatchUpdatePayloads, TaskPayload, TaskState } from '@xmcl/runtime-api'
Expand Down Expand Up @@ -88,7 +88,7 @@ export function useTaskManager() {
const item = reactive({
id: localId,
taskId: payload.uuid,
title: $t(payload.path, payload.param),
title: computed(() => $t(payload.path, payload.param)),
time: new Date(payload.time),
message: payload.error ?? payload.from ?? payload.to ?? '',
from: payload.from,
Expand All @@ -115,7 +115,7 @@ export function useTaskManager() {
const item = reactive({
taskId: uuid,
id: localId,
title: $t(path, param),
title: computed(() => $t(path, param)),
children,
time: new Date(time),
message: from ?? to ?? '',
Expand Down

0 comments on commit 693af51

Please sign in to comment.