0
0
Fork 0

refs #5987 refactor descriptors and VnLv

This commit is contained in:
Jorge Penadés 2023-08-09 10:39:37 +02:00
parent b98179563e
commit 7940d1702b
4 changed files with 9 additions and 17 deletions

View File

@ -125,7 +125,7 @@ watch($props, async () => {
</QItemLabel>
<QItem dense>
<QItemLabel class="text-subtitle2 text-white" caption>
#{{ $props.subtitle ? $props.subtitle : entity.id }}
#{{ $props.subtitle ?? entity.id }}
</QItemLabel>
</QItem>
</QList>

View File

@ -13,7 +13,9 @@ const isBooleanValue = computed(() => typeof $props.value === 'boolean');
<template>
<div class="vn-label-value">
<div v-if="$props.label || $slots.label" class="label">
<slot name="label"> {{ $props.label }}</slot>
<slot name="label">
<span>{{ $props.label }}</span>
</slot>
</div>
<div v-if="$props.value || $slots.value" class="value">
<span v-if="isBooleanValue">
@ -22,9 +24,9 @@ const isBooleanValue = computed(() => typeof $props.value === 'boolean');
:color="$props.value ? `positive` : `negative`"
/>
</span>
<span v-else>
<slot name="value">{{ $props.value }}</slot>
</span>
<slot v-else name="value">
<span :title="$props.value">{{ $props.value }}</span>
</slot>
</div>
<div class="info" v-if="$props.info">
<QIcon name="info">

View File

@ -88,13 +88,7 @@ const setData = (entity) =>
<template #body="{ entity }">
<VnLv v-if="entity.ticketState" :label="t('ticket.card.state')">
<template #value>
<QBadge
:color="
entity.ticketState.state.classColor
? entity.ticketState.state.classColor
: 'dark'
"
>
<QBadge :color="entity.ticketState.state.classColor ?? 'dark'">
{{ entity.ticketState.state.name }}
</QBadge>
</template>

View File

@ -106,11 +106,7 @@ function viewSummary(id) {
</QItemLabel>
<QItemLabel>
<QBadge
:color="
row.classColor
? row.classColor
: 'dark'
"
:color="row.classColor ?? 'dark'"
class="q-ma-none"
dense
>