watch round timer immediately
This commit is contained in:
parent
1d4bad751c
commit
b1bba55a7b
@ -88,8 +88,7 @@ const timestamp = useTimestamp({
|
|||||||
});
|
});
|
||||||
watch(() => props.game.deadline, (now) => {
|
watch(() => props.game.deadline, (now) => {
|
||||||
initTimeLeft.value = now - timestamp.value;
|
initTimeLeft.value = now - timestamp.value;
|
||||||
console.log(initTimeLeft, now, timestamp.value);
|
}, {immediate: true});
|
||||||
});
|
|
||||||
const moveColor = computed(() => timeLeft.value > 3000 ? 'primary' : 'red');
|
const moveColor = computed(() => timeLeft.value > 3000 ? 'primary' : 'red');
|
||||||
|
|
||||||
function attack(left: boolean) {
|
function attack(left: boolean) {
|
||||||
|
Loading…
Reference in New Issue
Block a user