更换事件
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import { ref, onMounted, onBeforeUnmount } from "vue";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
@@ -44,7 +44,7 @@ onMounted(async () => {
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
onBeforeUnmount(() => {
|
||||
if (timer.value) clearTimeout(timer.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user