|
|
@ -17,6 +17,7 @@ interface CmdAction { |
|
|
|
keywords?: string[] |
|
|
|
keywords?: string[] |
|
|
|
section?: string |
|
|
|
section?: string |
|
|
|
is_default?: number | null |
|
|
|
is_default?: number | null |
|
|
|
|
|
|
|
iconHue?: number |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
const props = defineProps<{ |
|
|
@ -385,20 +386,29 @@ defineExpose({ |
|
|
|
@click="fireAction(act)" |
|
|
|
@click="fireAction(act)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="cmdk-action-content w-full"> |
|
|
|
<div class="cmdk-action-content w-full"> |
|
|
|
<component |
|
|
|
<template v-if="title === 'Bases' || act.icon === 'project'"> |
|
|
|
:is="(iconMap as any)[act.icon]" |
|
|
|
<LazyGeneralBaseIconColorPicker :key="act.iconHue" :hue="act.iconHue" size="small" readonly> |
|
|
|
v-if="act.icon && typeof act.icon === 'string' && (iconMap as any)[act.icon]" |
|
|
|
<template #default> |
|
|
|
class="cmdk-action-icon" |
|
|
|
<GeneralProjectIcon type="database" /> |
|
|
|
:class="{ |
|
|
|
</template> |
|
|
|
'!text-blue-500': act.icon === 'grid', |
|
|
|
</LazyGeneralBaseIconColorPicker> |
|
|
|
'!text-purple-500': act.icon === 'form', |
|
|
|
</template> |
|
|
|
'!text-[#FF9052]': act.icon === 'kanban', |
|
|
|
<template v-else> |
|
|
|
'!text-pink-500': act.icon === 'gallery', |
|
|
|
<component |
|
|
|
}" |
|
|
|
:is="(iconMap as any)[act.icon]" |
|
|
|
/> |
|
|
|
v-if="act.icon && typeof act.icon === 'string' && (iconMap as any)[act.icon]" |
|
|
|
<div v-else-if="act.icon" class="cmdk-action-icon max-w-4 flex items-center justify-center"> |
|
|
|
class="cmdk-action-icon" |
|
|
|
<LazyGeneralEmojiPicker class="!text-sm !h-4 !w-4" size="small" :emoji="act.icon" readonly /> |
|
|
|
:class="{ |
|
|
|
</div> |
|
|
|
'!text-blue-500': act.icon === 'grid', |
|
|
|
|
|
|
|
'!text-purple-500': act.icon === 'form', |
|
|
|
|
|
|
|
'!text-[#FF9052]': act.icon === 'kanban', |
|
|
|
|
|
|
|
'!text-pink-500': act.icon === 'gallery', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<div v-else-if="act.icon" class="cmdk-action-icon max-w-4 flex items-center justify-center"> |
|
|
|
|
|
|
|
<LazyGeneralEmojiPicker class="!text-sm !h-4 !w-4" size="small" :emoji="act.icon" readonly /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
<a-tooltip overlay-class-name="!px-2 !py-1 !rounded-lg"> |
|
|
|
<a-tooltip overlay-class-name="!px-2 !py-1 !rounded-lg"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ act.title }} |
|
|
|
{{ act.title }} |
|
|
|