diff options
Diffstat (limited to 'src/client/components/ui/switch.vue')
| -rw-r--r-- | src/client/components/ui/switch.vue | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/components/ui/switch.vue b/src/client/components/ui/switch.vue index 9652a01024..f738257232 100644 --- a/src/client/components/ui/switch.vue +++ b/src/client/components/ui/switch.vue @@ -26,12 +26,9 @@ </template> <script lang="ts"> -import Vue from 'vue'; -export default Vue.extend({ - model: { - prop: 'value', - event: 'change' - }, +import { defineComponent } from 'vue'; + +export default defineComponent({ props: { value: { type: Boolean, @@ -50,7 +47,7 @@ export default Vue.extend({ methods: { toggle() { if (this.disabled) return; - this.$emit('change', !this.checked); + this.$emit('update:value', !this.checked); } } }); |