Do not rotate cards at each update
This commit is contained in:
@@ -31,9 +31,17 @@ function contextmenu(e: MouseEvent) {
|
|||||||
|
|
||||||
const rotation = ref(0)
|
const rotation = ref(0)
|
||||||
|
|
||||||
onBeforeUpdate(() => {
|
// onBeforeUpdate(() => {
|
||||||
|
// rotation.value = Math.random() > .5 ? 2 : -2
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.data,
|
||||||
|
() => {
|
||||||
rotation.value = Math.random() > .5 ? 2 : -2
|
rotation.value = Math.random() > .5 ? 2 : -2
|
||||||
})
|
},
|
||||||
|
{ immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user