1.0.5 • Published 6 years ago

vue-on-off v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Vue on-off switch component

Installation

npm i -s vue-on-off

Or...

yarn add vue-on-off

Or...

git clone https://github.com/Onefivefournine/vue-on-off.git

Usage

// register locally
import onOff from 'vue-on-off';

const app = new Vue({
  components: {
    onOff
  },
  data() {
    return {
      model: false
    };
  },
  methods: {
    modelChangeHandler() {
      /*
			* some API request or other actions,
			* you DON'T need to set model = !model
			*/
    }
  }
});

// OR register globally
Vue.component('onOff', onOff);
	<on-off v-model="model" :action="modelChangeHandler"></on-off>
1.0.5

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago