Browse Source

interval.value

master_hella_20240701
yufei0306 7 months ago
parent
commit
f6c50c8df2
  1. 5
      src/layout/components/Message/src/Message.vue

5
src/layout/components/Message/src/Message.vue

@ -38,6 +38,10 @@ onMounted(() => {
interval.value = setInterval( interval.value = setInterval(
() => { () => {
getUnreadCount() getUnreadCount()
if(interval.value){
clearInterval(interval.value)
interval.value = 0
}
}, },
1000 * 60 * 2 1000 * 60 * 2
) )
@ -45,6 +49,7 @@ onMounted(() => {
onBeforeUnmount(() => { onBeforeUnmount(() => {
if(interval.value){ if(interval.value){
clearInterval(interval.value) clearInterval(interval.value)
interval.value = 0
} }
}) })
</script> </script>

Loading…
Cancel
Save