lollms-webui/web/src/components/SafeSwitch.vue

26 lines
550 B
Vue
Raw Normal View History

2024-02-10 00:32:17 +00:00
<template>
<div>
<label class="switch">
<input type="checkbox" v-bind:checked="isChecked" @change="$emit('update:isChecked', $event.target.checked)">
<span class="slider round"></span>
</label>
</div>
</template>
<script>
export default {
name: 'SafeSwitch',
props: ['isChecked'],
data() {
return {
}
},
methods: {
toggleSwitch() {
// Handle the switch toggle logic here
console.log('Switch toggled:', this.isChecked);
}
}
}
</script>