Skip to content

WeiChiaChang/vue-elevator

Repository files navigation

vue-elevator

vue2

A wrapper of elevator.js in Vue

vue2-github-corners

Demo

Show me the code, or demo it turtle

easter-egg-collection

Image Original Source From Awesome Egoist ! Thank you !

Installation

npm i -D vue-elevator

Usage

For standalone version

<script src="/dist/vue-elevator.browser.js"></script>

For vue-cli user

import { VueElevator } from 'vue-elevator'

Vue.component('VueElevator', VueElevator)

Sample

<template>
  <div id="app">
    <VueElevator :word="word" :duration="duration" :mainAudio="mainAudio" :endAudio="endAudio"></VueElevator>
  </div>
</template>

export default {
  ...
  data () {
    return {
      // Replace word, duration, mainAudio and endAudio setting as you want.
      // If default is what you like, just don't use related key-value pair and ignore it.
      word: "Go to Top",
      duration: 4000,
      mainAudio: "http://tholman.com/elevator.js/music/elevator.mp3",
      endAudio: "http://tholman.com/elevator.js/music/ding.mp3",
    }
  }
}

License

MIT © WeiChiaChang

About

🔝 A wrapper of elevator.js in Vue

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published