diff --git a/apps/frontend/src/components/command/CommandSearchTasksItem.vue b/apps/frontend/src/components/command/CommandSearchTasksItem.vue index 6dc2ae0..26a98c4 100644 --- a/apps/frontend/src/components/command/CommandSearchTasksItem.vue +++ b/apps/frontend/src/components/command/CommandSearchTasksItem.vue @@ -2,7 +2,7 @@ import { NCheckbox, NEllipsis } from 'naive-ui' import { closeCommandModal } from './commandModal' import type { TasksSelector } from '@/store' -import { useTasksSelectorStore } from '@/store' +import { useTasksSelectorStore, useTasksStore } from '@/store' const props = defineProps<{ title: string @@ -12,12 +12,14 @@ const props = defineProps<{ id: string }>() +const tasksStore = useTasksStore() const tasksSelectorStore = useTasksSelectorStore() const goTo = async () => { - if (props.from) + if (props.from) { await tasksSelectorStore.setCurrentSelector(props.from) - // TODO 还应该跳转到对应的 task 上 + tasksStore.changeActiveTask(props.id) + } closeCommandModal() }