1
0
forked from test/crm

Merge pull request #607 from shariquerik/description-in-link

This commit is contained in:
Shariq Ansari 2025-02-21 15:45:56 +05:30 committed by GitHub
commit 9910382496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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') {