Vue ptero

The Vue binding for ptero

Version: 0.1.3 Updated: 07/27/2019

By: emoji-gen License: MIT

Downloads Last 30 Days: 187

Install

npm i vue-ptero
yarn add vue-ptero

Repository: https://github.com/emoji-gen/vue-ptero

CDNs

bundle.run: https://bundle.run/vue-ptero

jsDelivr: https://cdn.jsdelivr.net/npm/vue-ptero

unpkg: https://unpkg.com/vue-ptero

vue-ptero

npm Build Status dependencies Status devDependencies Status License

:deciduous_tree: The Vue binding for ptero

Requirements

  • Vue 1.x or 2.x

Getting started

$ npm install vue-ptero --save # for npm users
$ yarn add vue-ptero           # for yarn users
const Vue = require('Vue')
const VuePtero = require('vue-ptero')

Vue.use(VuePtero, { target: document.body })

new Vue({
  el: '#app',
  created() {
    // listen a custom event
    this.$ptero.on('event-xxx', e => {
      console.log(e.detail)
    })

    // emit a custom event
    this.$ptero.emit('event-xxx', { foo: 1 })
  },
})

Example

First, try to build example projects.

$ git clone https://github.com/emoji-gen/vue-ptero.git
$ cd vue-ptero
$ yarn
$ yarn run example

License

MIT © Emoji Generator

Categories: Vue js
Tags: