mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 18:47:51 +00:00
Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
29 lines
567 B
Vue
29 lines
567 B
Vue
<script setup>
|
|
import { ref, defineEmits } from 'vue';
|
|
import { useIntersectionObserver } from '@vueuse/core';
|
|
|
|
const { options } = defineProps({
|
|
options: {
|
|
type: Object,
|
|
default: () => ({ root: document, rootMargin: '100px 0 100px 0)' }),
|
|
},
|
|
});
|
|
|
|
const emit = defineEmits(['observed']);
|
|
const observedElement = ref('');
|
|
|
|
useIntersectionObserver(
|
|
observedElement,
|
|
([{ isIntersecting }]) => {
|
|
if (isIntersecting) {
|
|
emit('observed');
|
|
}
|
|
},
|
|
options
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<div ref="observedElement" class="h-6 w-full" />
|
|
</template>
|