You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
368 B

  1. <template lang="pug">
  2. .toggle(:class='{ "is-active": value }', @click='changeToggle')
  3. .toggle-container
  4. .toggle-pin
  5. .toggle-text {{ desc }}
  6. </template>
  7. <script>
  8. export default {
  9. name: 'toggle',
  10. props: ['value', 'desc'],
  11. data () {
  12. return { }
  13. },
  14. methods: {
  15. changeToggle() {
  16. this.$emit('input', !this.value)
  17. }
  18. }
  19. }
  20. </script>