Merge pull request #607 from shariquerik/description-in-link
This commit is contained in:
commit
9910382496
@ -25,7 +25,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item-label="{ active, selected, option }">
|
<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>
|
||||||
|
|
||||||
<template #footer="{ value, close }">
|
<template #footer="{ value, close }">
|
||||||
@ -131,8 +143,9 @@ const options = createResource({
|
|||||||
transform: (data) => {
|
transform: (data) => {
|
||||||
let allData = data.map((option) => {
|
let allData = data.map((option) => {
|
||||||
return {
|
return {
|
||||||
label: option.value,
|
label: option.label || option.value,
|
||||||
value: option.value,
|
value: option.value,
|
||||||
|
description: option.description,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (!props.hideMe && props.doctype == 'User') {
|
if (!props.hideMe && props.doctype == 'User') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user