1
0
forked from test/crm

fix: show title and description in link field

This commit is contained in:
Shariq Ansari 2025-02-21 15:30:52 +05:30
parent 169355992c
commit acf307cc52

View File

@ -25,7 +25,19 @@
</template>
<template #item-label="{ active, selected, option }">
<slot name="item-label" v-bind="{ active, selected, option }" />
<slot name="item-label" v-bind="{ active, selected, option }">
<div v-if="option.description" class="flex flex-col gap-1">
<div class="flex-1 font-semibold truncate text-ink-gray-7">
{{ option.label }}
</div>
<div class="flex-1 text-sm truncate text-ink-gray-5">
{{ option.description }}
</div>
</div>
<div v-else class="flex-1 truncate text-ink-gray-7">
{{ option.label }}
</div>
</slot>
</template>
<template #footer="{ value, close }">
@ -131,8 +143,9 @@ const options = createResource({
transform: (data) => {
let allData = data.map((option) => {
return {
label: option.value,
label: option.label || option.value,
value: option.value,
description: option.description,
}
})
if (!props.hideMe && props.doctype == 'User') {