2018-06-27 14:38:27 +00:00
|
|
|
<template>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="custom-control custom-checkbox">
|
2018-07-12 11:29:10 +00:00
|
|
|
<input class="custom-control-input" type="checkbox"
|
|
|
|
:id="id"
|
|
|
|
v-model="checkboxValue"
|
|
|
|
@change="emitChange"
|
|
|
|
:disabled="disabled"
|
|
|
|
>
|
2018-06-27 14:38:27 +00:00
|
|
|
<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>
|