refs #6075 VnLabelValue created #68
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix-front#68
Loading…
Reference in New Issue
No description provided.
Delete Branch "6075-createVnLabelValue"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +4,4 @@
label: { type: String, default: '' },
value: {
type: [String, Boolean],
required: true,
Value no es required
Que valor por defecto asigno: default: undefined?
@ -0,0 +8,4 @@
},
info: { type: String, default: '' },
});
const isBooleanValue = computed(() => typeof $props.value === 'boolean');
Entonces aquí seria $props.value && typeof $props.value === 'boolean'
(Creo que asi si es true $props.value, devolvera typeof $props.value === 'boolean')
Según el ticket, hay que comprobar si value es un valor booleano true o false, no si existe. Si existe no se muestra el check, se muestra el slot
@ -0,0 +14,4 @@
<template>
<div class="vn-label-value">
<div class="label">
<slot name="label"></slot>
Segun ChatGPT:
<div v-if="!$slots.label ">{{ $props.label }}</div>
@ -0,0 +21,4 @@
<QIcon :name="value ? `check` : `close`" :class="value ? `positive` : `negative`" />
</span>
<span v-else>
<slot name="value"></slot>
Segun ChatGPT:
@ -0,0 +33,4 @@
</div>
</div>
</template>
<style lang="scss" scoped>
Quitar css se puede hacer sin