fix(navigation): watcher
This commit is contained in:
parent
06e8cdb9d2
commit
be1f1d94c9
@ -72,7 +72,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {ref, computed, watch, onActivated} from 'vue'
|
import {ref, computed, watch} from 'vue'
|
||||||
import draggable from 'zhyswan-vuedraggable'
|
import draggable from 'zhyswan-vuedraggable'
|
||||||
import type {SortableEvent} from 'sortablejs'
|
import type {SortableEvent} from 'sortablejs'
|
||||||
|
|
||||||
@ -106,13 +106,12 @@ const currentProject = computed(() => baseStore.currentProject)
|
|||||||
// TODO: child projects
|
// TODO: child projects
|
||||||
const availableProjects = ref<IProject[]>([])
|
const availableProjects = ref<IProject[]>([])
|
||||||
watch(
|
watch(
|
||||||
props.projects,
|
() => props.projects,
|
||||||
projects => {
|
projects => {
|
||||||
availableProjects.value = projects
|
availableProjects.value = projects
|
||||||
},
|
},
|
||||||
{immediate: true},
|
{immediate: true},
|
||||||
)
|
)
|
||||||
onActivated(() => availableProjects.value = props.projects)
|
|
||||||
|
|
||||||
const projectUpdating = ref<{ [id: IProject['id']]: boolean }>({})
|
const projectUpdating = ref<{ [id: IProject['id']]: boolean }>({})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user