vue-event-report
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

vue-event-report

vue event report component

Getting started

  • make sure node and npm installed;

Install

> npm install vue-event-report

Usage

main.js
import vue from 'vue';
import vue_event_report from 'vue-event-report';

// install
vue.use(vue_event_report);
// set report handler
vue_event_report.setReportHandler(({ event, data }) => {
    if (event == 'click') {
        // click event
    } else if (event == 'exposure') {
        // exposure event
    }
})
app.vue
<template>
  <div>
    <div v-report="{ key: value }">
    </div>
    <div v-report:click="{ key: value }">
    </div>
    <div v-report:exposure="{ key: value }">
    </div>
  </div>
</template>

Development

  • make sure node and npm installed;
  • clone the repo to local;
  • run npm install to install node modules;
  • run npm run build to get an unminified build file at lib folder;

Readme

Keywords

Package Sidebar

Install

npm i vue-event-report

Weekly Downloads

2

Version

2.0.0

License

UNLICENSED

Unpacked Size

17.3 kB

Total Files

11

Last publish

Collaborators

  • liangmayong