dev #89

Merged
jgallego merged 28 commits from dev into test 2023-08-31 09:12:54 +00:00
1 changed files with 28 additions and 27 deletions
Showing only changes of commit 45fadc07ca - Show all commits

View File

@ -9,20 +9,21 @@ const $props = defineProps({
info: { type: String, default: null }, info: { type: String, default: null },
}); });
const isBooleanValue = computed(() => typeof $props.value === 'boolean'); const isBooleanValue = computed(() => typeof $props.value === 'boolean');
</script> </script>
<template> <template>
<div class="vn-label-value"> <div class="vn-label-value">
<div v-if="$props.label || $slots.label" class="label"> <div v-if="$props.label || $slots.label" class="label">
<div v-if="!$slots.label">{{ $props.label }}</div> <slot name="label"> {{ $props.label }}</slot>
<slot name="label"></slot>
</div> </div>
<div v-if="$props.value || $slots.value" class="value"> <div v-if="$props.value || $slots.value" class="value">
<span v-if="isBooleanValue"> <span v-if="isBooleanValue">
<QIcon :name="$props.value ? `check` : `close`" :color="$props.value ? `positive` : `negative`" /> <QIcon
:name="$props.value ? `check` : `close`"
:color="$props.value ? `positive` : `negative`"
/>
</span> </span>
<span v-else> <span v-else>
<slot name="value"></slot> <slot name="value">{{ $props.value }}</slot>
</span> </span>
</div> </div>
<div class="info" v-if="$props.info"> <div class="info" v-if="$props.info">