优化 SubscribeCard 和 SubscribeShareCard 组件的结构

This commit is contained in:
jxxghp
2025-05-10 23:18:00 +08:00
parent 93ac5e1b3b
commit d4aaa46968
2 changed files with 154 additions and 139 deletions
+15 -5
View File
@@ -296,20 +296,26 @@ function onSubscribeEditRemove() {
<div> <div>
<VHover> <VHover>
<template #default="hover"> <template #default="hover">
<div
class="w-full h-full rounded-lg overflow-hidden"
:class="{
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
'outline-dashed outline-1': props.media?.best_version && imageLoaded,
}"
>
<VCard <VCard
v-bind="hover.props" v-bind="hover.props"
:key="props.media?.id" :key="props.media?.id"
class="flex flex-col h-full" class="flex flex-col h-full"
:class="{ :class="{
'outline-dashed outline-1': props.media?.best_version && imageLoaded,
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
'opacity-70': subscribeState === 'S', 'opacity-70': subscribeState === 'S',
}" }"
rounded="0"
min-height="170" min-height="170"
@click="editSubscribeDialog" @click="editSubscribeDialog"
:ripple="false" :ripple="false"
> >
<div class="me-n3 absolute top-1 right-2"> <div class="me-n3 absolute top-1 right-4">
<IconBtn> <IconBtn>
<VIcon icon="mdi-dots-vertical" color="white" /> <VIcon icon="mdi-dots-vertical" color="white" />
<VMenu activator="parent" close-on-content-click> <VMenu activator="parent" close-on-content-click>
@@ -333,9 +339,12 @@ function onSubscribeEditRemove() {
<VSkeletonLoader class="object-cover aspect-w-3 aspect-h-2" /> <VSkeletonLoader class="object-cover aspect-w-3 aspect-h-2" />
</div> </div>
</template> </template>
<div class="absolute inset-0 subscribe-card-background"></div> <div class="absolute inset-0 outline-none subscribe-card-background"></div>
</VImg> </VImg>
<div v-if="subscribeState === 'P'" class="absolute inset-0 bg-yellow-900 opacity-80 pointer-events-none" /> <div
v-if="subscribeState === 'P'"
class="absolute inset-0 bg-yellow-900 opacity-80 pointer-events-none"
/>
</template> </template>
<div> <div>
<VCardText class="flex items-center py-3"> <VCardText class="flex items-center py-3">
@@ -389,6 +398,7 @@ function onSubscribeEditRemove() {
</div> </div>
</div> </div>
</VCard> </VCard>
</div>
</template> </template>
</VHover> </VHover>
<!-- 订阅编辑弹窗 --> <!-- 订阅编辑弹窗 -->
+8 -3
View File
@@ -97,13 +97,17 @@ function doDelete() {
<div class="h-full"> <div class="h-full">
<VHover> <VHover>
<template #default="hover"> <template #default="hover">
<div
class="w-full h-full rounded-lg overflow-hidden"
:class="{
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
}"
>
<VCard <VCard
v-bind="hover.props" v-bind="hover.props"
:key="props.media?.id" :key="props.media?.id"
class="flex flex-col h-full" class="flex flex-col h-full"
:class="{ rounded="0"
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
}"
min-height="170" min-height="170"
@click="showForkSubscribe" @click="showForkSubscribe"
> >
@@ -155,6 +159,7 @@ function doDelete() {
</VCardText> </VCardText>
</div> </div>
</VCard> </VCard>
</div>
</template> </template>
</VHover> </VHover>
<!-- 订阅编辑弹窗 --> <!-- 订阅编辑弹窗 -->