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.
ngcp-csc-ui/src/components/form/CscToggle.vue

37 lines
726 B

<template>
<q-toggle
:label="label"
@input="toggle()"
v-model="toggleState" />
</template>
<script>
import { QToggle } from 'quasar-framework'
export default {
name: 'csc-toggle',
props: [
'enabled',
'label'
],
data () {
return {
toggleState: this.enabled,
}
},
updated() {
this.toggleState = this.enabled;
},
components: {
QToggle
},
methods: {
toggle() {
this.$emit('change', this.toggleState);
}
}
}
</script>
<style lang="stylus" rel="stylesheet/stylus">
</style>