PHP Classes

File: resources/js/Components/Checkbox.vue

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Vue.js PHP CRUD Example Using Laravel Vite   resources/js/Components/Checkbox.vue   Download  
File: resources/js/Components/Checkbox.vue
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Vue.js PHP CRUD Example Using Laravel Vite
Example application to manage users and blog posts
Author: By
Last change:
Date: 5 months ago
Size: 612 bytes
 

Contents

Class file image Download
<script setup> import { computed } from 'vue'; const emit = defineEmits(['update:checked']); const props = defineProps({ checked: { type: [Array, Boolean], default: false, }, value: { default: null, }, }); const proxyChecked = computed({ get() { return props.checked; }, set(val) { emit('update:checked', val); }, }); </script> <template> <input type="checkbox" :value="value" v-model="proxyChecked" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500" /> </template>