fix: 🐛 update to use new Vue 3 syntax

This commit is contained in:
Sebin Nyshkim 2022-01-06 04:31:56 +01:00
parent 6823eeb92f
commit 03ef3d9f7f

View file

@ -3,8 +3,8 @@
<div>😇</div> <div>😇</div>
<div class="toggle-wrap"> <div class="toggle-wrap">
<input <input
:checked="checked" :checked="modelValue"
@change="$emit('change', $event.target.checked)" @change="$emit('update:modelValue', $event.target.checked)"
type="checkbox" type="checkbox"
name="nsfw" name="nsfw"
:id="id" :id="id"
@ -17,12 +17,8 @@
<script> <script>
export default { export default {
model: {
prop: "checked",
event: "change",
},
props: { props: {
checked: Boolean, modelValue: Boolean,
id: { type: String, required: true }, id: { type: String, required: true },
}, },
}; };