图标选择器优化

This commit is contained in:
Jason 2022-09-16 11:16:13 +08:00
parent 237b44e7ce
commit 20dbff10bc
1 changed files with 9 additions and 4 deletions

View File

@ -49,13 +49,18 @@
:disabled="disabled"
@focus="handleFocus"
@blur="handleBlur"
clearable
>
<template #prepend>
<div class="flex items-center" v-if="modelValue">
<icon class="mr-1" :key="modelValue" :name="modelValue" :size="16" />
<overflow-tooltip class="flex-1 w-20" :content="modelValue">
{{ modelValue }}
</overflow-tooltip>
<el-tooltip class="flex-1 w-20" :content="modelValue" placement="top">
<icon
class="mr-1"
:key="modelValue"
:name="modelValue"
:size="16"
/>
</el-tooltip>
</div>
<template v-else></template>