Skip to content

Commit

Permalink
feat: support jump to task
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Jun 14, 2023
1 parent 81140a9 commit 2943fe2
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
}
Expand Down

0 comments on commit 2943fe2

Please sign in to comment.