1.0.8 • Published 6 years ago

vb-switch v1.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Switch

Switch component for Vue Bulma.

Installation

$ npm install vb-switch --save

Examples

<template>
  <div>
    <p>
      <vb-switch type="success" size="large" checked v-model="value"></vb-switch>
    </p>
    <p>
      {{ text }}
    </p>
  </div>
</template>

<script>
// do not use below code, because `Switch` is svg tag.
// import Switch from 'vue-bulma-switch'
import VbSwitch from 'vue-bulma-switch'

export default {
  components: {
    VbSwitch
  },

  data () {
    return {
      value: false,
      text: ''
    }
  },

  watch: {
    value (val) {
      this.text = val ? 'Right' : 'Wrong'
    }
  }
}
</script>

Badges

npm.io npm.io


fundon.me  ·  GitHub @fundon  ·  Twitter @_fundon