mirror of
https://github.com/frappe/books.git
synced 2024-11-10 15:50:56 +00:00
26 lines
633 B
Vue
26 lines
633 B
Vue
<template>
|
|
<div class="form-group">
|
|
<div class="custom-control custom-checkbox">
|
|
<input class="custom-control-input" type="checkbox" :id="id" v-model="checkboxValue" @change="emitChange">
|
|
<label class="custom-control-label" :for="id">{{ docfield.label }}</label>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Base from './Base';
|
|
export default {
|
|
extends: Base,
|
|
data() {
|
|
return {
|
|
checkboxValue: Boolean(this.value)
|
|
}
|
|
},
|
|
methods: {
|
|
emitChange(e) {
|
|
this.$emit('change', Number(this.checkboxValue));
|
|
}
|
|
}
|
|
}
|
|
</script>
|