fix(navigation): watcher
This commit is contained in:
parent
b1e6f5ccd6
commit
875cf619a2
|
@ -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 }>({})
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user