Do not rotate cards at each update

This commit is contained in:
2024-05-03 00:38:52 +02:00
parent 716f3cf018
commit 4485b6b810
+10 -2
View File
@@ -31,9 +31,17 @@ function contextmenu(e: MouseEvent) {
const rotation = ref(0)
onBeforeUpdate(() => {
// onBeforeUpdate(() => {
// rotation.value = Math.random() > .5 ? 2 : -2
// })
watch(
() => props.data,
() => {
rotation.value = Math.random() > .5 ? 2 : -2
})
},
{ immediate: true })
</script>
<template>