Cleanup code & make sure it has a common code style

This commit is contained in:
kolaente 2020-09-05 22:35:52 +02:00
parent 4a8b15e7be
commit a8a7f70a3c
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
132 changed files with 6821 additions and 6595 deletions

View file

@ -1,6 +1,6 @@
<template>
<div class="select">
<select v-model.number="percentDone" @change="updateData" :disabled="disabled">
<select :disabled="disabled" @change="updateData" v-model.number="percentDone">
<option value="0">0%</option>
<option value="0.1">10%</option>
<option value="0.2">20%</option>
@ -17,36 +17,36 @@
</template>
<script>
export default {
name: 'percentDoneSelect',
data() {
return {
percentDone: 0,
}
export default {
name: 'percentDoneSelect',
data() {
return {
percentDone: 0,
}
},
props: {
value: {
default: 0,
type: Number,
},
props: {
value: {
default: 0,
type: Number,
},
disabled: {
default: false,
},
disabled: {
default: false,
},
watch: {
// Set the priority to the :value every time it changes from the outside
value(newVal) {
this.percentDone = newVal
},
},
watch: {
// Set the priority to the :value every time it changes from the outside
value(newVal) {
this.percentDone = newVal
},
mounted() {
this.percentDone = this.value
},
mounted() {
this.percentDone = this.value
},
methods: {
updateData() {
this.$emit('input', this.percentDone)
this.$emit('change')
},
methods: {
updateData() {
this.$emit('input', this.percentDone)
this.$emit('change')
}
},
}
},
}
</script>