0.1.3 • Published 5 years ago

linxl-ui v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

linxl-ui

// main.js
import LinxlUI from 'linxl-ui'

Vue.use(LinxlUI)
<template>
  <div class="home">
    <finger-print :width="200" :height="200" ref="fingerprint"></finger-print>
    <div>
      <p>Speed: x{{animationSpeed}}</p>
      <input type="range" value="1" min="0" max="3" step="0.5" @change="onSpeedChange" v-model="animationSpeed">
    </div>
    <button @click="stop">stop</button>
    <button @click="pause">pause</button>
    <button @click="play">play</button>
  </div>
</template>
export default {
  name: 'home',
  data() {
    return {
      animationSpeed: 1
    }
  },
  methods: {
    stop() {
      this.$refs.fingerprint.stop();
    },

    play() {
      this.$refs.fingerprint.play();
    },

    pause() {
      this.$refs.fingerprint.pause();
    },

    onSpeedChange() {
      this.$refs.fingerprint.onSpeedChange(this.animationSpeed);
    }
  }
}
0.1.3

5 years ago

0.1.0

5 years ago