Vue easteregg

Easter egg for vue js apps

Version: 1.0.1 Updated: 10/11/2017

By: ddgll License: MIT

Downloads Last 30 Days: 29

Install

npm i vue-easteregg
yarn add vue-easteregg

Repository: https://github.com/ddgll/vue-easteregg

CDNs

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

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

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

vue-easteregg

ADD an easter egg to your vue app ;)

<template>
  <div id="app">
    {{ title }}
    <easteregg @easter="test" :eggs="eggs" duration="5000">EASTER EGG</easteregg>
  </div>
</template>

<script>
import easteregg from '../src/easteregg.vue'

export default {
  name: 'app',
  data () {
    return {
      title: 'vue-easteregg',
      eggs: [ 
        'easter',
        [ 'ArrowUp', 'ArrowDown' ]
      ]
    }
  },
  components: { easteregg },
  methods: {
    test () {
      if (this.title === 'vue-easteregg') {
        this.title = 'EASTER EGGGG !!!!'
      } else if (this.title === 'EASTER EGGGG !!!!') {
        this.title = 'AGAIN ??'
      } else {
        this.title = 'vue-easteregg'
      }
    }
  }
}
</script>
Categories: Vue js