#7411 - addInfoOnVnCheckboxAndVnInput #1295

Merged
jtubau merged 10 commits from 7411-addInfoOnVnCheckboxAndVnInput into dev 2025-02-11 08:50:10 +00:00
1 changed files with 3 additions and 13 deletions
Showing only changes of commit 2e0575052c - Show all commits

View File

@ -1,13 +1,9 @@
<script setup> <script setup>
import { computed } from 'vue'; import { defineModel } from 'vue';
const emit = defineEmits(['update:modelValue']); const modelValue = defineModel({ type: Boolean, default: false });
const $props = defineProps({ const $props = defineProps({
modelValue: {
type: [Boolean],
default: null,
},
label: { label: {
alexm marked this conversation as resolved
Review

no poner label

no poner label
type: String, type: String,
default: null, default: null,
@ -17,19 +13,13 @@ const $props = defineProps({
default: null, default: null,
}, },
}); });
const isChecked = computed({
get: () => $props.modelValue,
set: (value) => emit('update:modelValue', value),
});
</script> </script>
Review

Falta el
v-on="$attrs"

Falta el v-on="$attrs"
<template> <template>
<div> <div>
<QCheckbox <QCheckbox
:label="label" :label="label"
v-model="isChecked" v-model="modelValue"
/> />
<QIcon v-if="info" class="cursor-info q-ml-sm" name="info" size="sm" v-bind="$attrs"> <QIcon v-if="info" class="cursor-info q-ml-sm" name="info" size="sm" v-bind="$attrs">
<QTooltip> <QTooltip>