1.3.1 • Published 4 months ago

@alitajs/gesture-password-vue v1.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

install

// npm
npm install @alitajs/gesture-password-vue --save

// yarn
yarn add @alitajs/gesture-password-vue

Usage as global component

Vue 3

// main.js

import { createApp } from 'vue';
import App from './App.vue';
import GesturePassword from '@alitajs/gesture-password-vue';

const app = createApp(App);

app.use(GesturePassword).mount('#app');

// App.vue

<template>
  <GesturePassword :width='width' :height='height' @onChange="onChange" />
</template>

<script>
import { reactive, toRefs } from 'vue';

export default {
  setup() {
    const state = reactive({
      width: 375,
      height: 300,
      onChange: function(data){
        console.log(data) // get gesture password
      }
    });

    return toRefs(state);
  }
};
</script>

Vue 2

// main.js

import Vue from 'vue';
import App from './App.vue';
import GesturePassword from '@alitajs/gesture-password-vue';

Vue.use(GesturePassword);

new Vue({
  render: h => h(App),
}).$mount('#app');

// App.vue

<template>
  <GesturePassword :width='width' :height='height' @onChange="onChange" />
</template>

<script>

export default {
  data() {
    return {
      width: 375,
      height: 300,
      onChange: function(data){
        console.log(data) // get gesture password
      }
    };
  }
};
</script>

Usage as local component

<template>
  <GesturePassword  :width='width' :height='height' @onChange="onChange" />
</template>

<script>
import GesturePassword from '@alitajs/gesture-password-vue';
export default {
  components: {
    GesturePassword
  },
  data() {
    return {
      width: 375,
      height: 300,
      onChange: function(data){
        console.log(data) // get gesture password
      }
    };
  }
};
</script>
1.0.9

4 months ago

1.3.1

4 months ago

1.3.0

4 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.8

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago