A Vue.js Plugin
npm install --save vue-sensor
import Vue from 'vue'
import VueSensor from 'vue-sensor'
Vue.use(VueSensor, {,
trackHandle: (e) => {
// implementation
console.log(e)
}
})
<button v-sensor:click="{value: 'hello'}">Click me</button>
<!-- Include after Vue -->
<!-- Local files -->
<script src="vue-sensor/dist/vue-sensor.js"></script>
<!-- From CDN -->
<script src="https://unpkg.com/vue-sensor"></script>
npm run dev
npm run dev:coverage
Bundle the js and css of to the dist
folder:
npm run build