VSirrr / vue-exposure

A Vue2 component to add IntersectionObserver and MutationObserver to Vue2 component or HTML element.

Repository from Github https://github.comVSirrr/vue-exposureRepository from Github https://github.comVSirrr/vue-exposure

VueExposure

A Vue2 component to add IntersectionObserver and MutationObserver to Vue2 component or HTML element.

Usage

step one

npm i @vsirrr/vue-exposure

step two

<template>
  <VueExposure @exposure="exposure">
    <div>dom</div>
    <VueComponent />
  </VueExposure>
</template>

<script>
  import VueExposure from '@vsirrr/vue-exposure'

  export default {
    components: {
      VueExposure,
    },
    methods: {
      exposure(elm) {
        // todo
      },
    },
  }
</script>

About

A Vue2 component to add IntersectionObserver and MutationObserver to Vue2 component or HTML element.

License:Apache License 2.0


Languages

Language:JavaScript 100.0%