fix(gantt): only update today value when changing to the gantt chart view
This commit is contained in:
parent
b77c7c2f45
commit
078d8b39a9
@ -38,9 +38,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {computed, ref, watch, toRefs} from 'vue'
|
||||
import {computed, ref, watch, toRefs, onMounted} from 'vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
import {useNow} from '@vueuse/core'
|
||||
|
||||
import {getHexColor} from '@/models/task'
|
||||
|
||||
@ -157,9 +156,8 @@ function openTask(e: {
|
||||
|
||||
const weekDayFromDate = useWeekDayFromDate()
|
||||
|
||||
const today = useNow({
|
||||
interval: 6 * 60 * 60 * 1000, // Every 6 hours
|
||||
})
|
||||
const today = ref(new Date())
|
||||
onMounted(() => today.value = new Date())
|
||||
const dateIsToday = computed(() => (date: Date) => {
|
||||
return (
|
||||
date.getDate() === today.value.getDate() &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user