优化 PluginAppCard 组件,添加插件标签显示功能;调整 PluginFolderCard 组件的菜单位置和图标样式;更新 PluginCardListView 组件的文件夹显示逻辑。

This commit is contained in:
jxxghp
2025-05-24 16:38:34 +08:00
parent 6c4beffdb7
commit 21f352aa64
3 changed files with 18 additions and 13 deletions
+15 -10
View File
@@ -190,9 +190,22 @@ const dropdownItems = ref([
</VCardText> </VCardText>
<div class="relative flex flex-row items-start px-2 justify-between grow"> <div class="relative flex flex-row items-start px-2 justify-between grow">
<div class="relative flex-1 min-w-0"> <div class="relative flex-1 min-w-0">
<VCardText class="text-white text-sm px-2 py-1 text-shadow overflow-hidden line-clamp-3 ..."> <div class="text-white text-sm px-2 py-1 text-shadow overflow-hidden line-clamp-3 ...">
{{ props.plugin?.plugin_desc }} {{ props.plugin?.plugin_desc }}
</VCardText> </div>
<!-- 插件标签 -->
<div v-if="pluginLabels.length > 0" class="plugin-app-card__tags-section">
<VChip
v-for="tag in pluginLabels"
:key="tag"
size="x-small"
variant="tonal"
color="primary"
class="me-1 mb-1"
>
{{ tag }}
</VChip>
</div>
</div> </div>
<div class="relative flex-shrink-0 self-center pb-3"> <div class="relative flex-shrink-0 self-center pb-3">
<VAvatar size="48"> <VAvatar size="48">
@@ -208,14 +221,6 @@ const dropdownItems = ref([
</div> </div>
</div> </div>
</div> </div>
<!-- 插件标签 -->
<div v-if="pluginLabels.length > 0" class="plugin-app-card__tags-section">
<VChip v-for="tag in pluginLabels" :key="tag" size="x-small" variant="tonal" color="primary">
{{ tag }}
</VChip>
</div>
<VCardText class="flex flex-col align-self-baseline px-2 py-2 w-full overflow-hidden"> <VCardText class="flex flex-col align-self-baseline px-2 py-2 w-full overflow-hidden">
<div class="flex flex-nowrap items-center w-full pe-7"> <div class="flex flex-nowrap items-center w-full pe-7">
<span> <span>
+2 -2
View File
@@ -310,11 +310,11 @@ const dropdownItems = ref([
</div> </div>
<!-- 更多菜单按钮 - 右下角 --> <!-- 更多菜单按钮 - 右下角 -->
<div class="absolute bottom-0 right-0"> <div class="absolute top-0 right-0">
<VMenu v-model="menuVisible" location="top end" :close-on-content-click="true"> <VMenu v-model="menuVisible" location="top end" :close-on-content-click="true">
<template #activator="{ props: menuProps }"> <template #activator="{ props: menuProps }">
<IconBtn v-bind="menuProps" @click.stop> <IconBtn v-bind="menuProps" @click.stop>
<VIcon size="small" icon="mdi-dots-vertical" /> <VIcon size="small" icon="mdi-dots-vertical" class="text-white" />
</IconBtn> </IconBtn>
</template> </template>
<VList> <VList>
+1 -1
View File
@@ -1210,7 +1210,7 @@ function onDragEndPlugin(evt: any) {
<div v-if="displayedFolders.length > 0 || displayedPlugins.length > 0" class="grid gap-4 grid-plugin-card"> <div v-if="displayedFolders.length > 0 || displayedPlugins.length > 0" class="grid gap-4 grid-plugin-card">
<!-- 文件夹卡片 - 使用draggable进行排序 --> <!-- 文件夹卡片 - 使用draggable进行排序 -->
<draggable <draggable
v-if="displayedFolders.length > 0" v-if="displayedFolders.length > 0 && isRefreshed"
v-model="folderOrder" v-model="folderOrder"
@end="onFolderSortEnd" @end="onFolderSortEnd"
handle=".cursor-move" handle=".cursor-move"