优化主界面搜索、快速搜索项目标题过长导致样式变形的问题。

This commit is contained in:
unknown 2024-06-16 20:21:42 +08:00
parent 2d82702efe
commit c170df8691
2 changed files with 18 additions and 9 deletions

View File

@ -74,14 +74,19 @@
> >
<CustomItemIcon :item="(item as Item)" :icon-size="28"></CustomItemIcon> <CustomItemIcon :item="(item as Item)" :icon-size="28"></CustomItemIcon>
<span <span
class="text-sm ml-[10px] overflow-hidden text-ellipsis whitespace-nowrap h-[20px] flex-1 pr-[10px]" class="text-sm ml-[10px] overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
>{{ getName(item.name) >{{ getName(item.name) }}</span
}}<span v-if="mode === 'search'" class="text-xs ml-2">{{ >
<span
v-if="mode === 'search'"
class="text-xs ml-2 max-w-[100px] flex-shrink-0 pr-[10px]"
>{{
getSearchItemClassificationName((item as Item).classificationId) getSearchItemClassificationName((item as Item).classificationId)
}}</span></span }}</span
> >
<!-- 快捷键 --> <!-- 快捷键 -->
<template <div
class="ml-auto max-w-[100px] flex-shrink-0"
v-if=" v-if="
store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9 store.setting.quickSearch.openShortcutKey !== 'none' && index <= 9
" "
@ -121,7 +126,7 @@
:text="(index + 1 === 10 ? 0 : index + 1).toString()" :text="(index + 1 === 10 ? 0 : index + 1).toString()"
></keyText> ></keyText>
</template> </template>
</template> </div>
<!-- 删除历史记录 --> <!-- 删除历史记录 -->
<Icon <Icon
v-if="showHistory" v-if="showHistory"

View File

@ -84,10 +84,14 @@
<CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon> <CustomItemIcon :item="(item as Item)" :icon-size="32"></CustomItemIcon>
<span <span
class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]" class="text-sm ml-2 overflow-hidden text-ellipsis whitespace-nowrap h-[20px]"
>{{ getName(item.name) >{{ getName(item.name) }}</span
}}<span v-if="mode === 'search'" class="text-xs ml-2">{{ >
<span
v-if="mode === 'search'"
class="text-xs ml-2 max-w-[100px] flex-shrink-0"
>{{
getSearchItemClassificationName((item as Item).classificationId) getSearchItemClassificationName((item as Item).classificationId)
}}</span></span }}</span
> >
</li> </li>
</ul> </ul>