feat: add ScrollToTopBtn component and integrate it into multiple pages

- Added ScrollToTopBtn component for smooth scrolling to the top of the page.
- Registered ScrollToTopBtn in main.ts.
- Integrated ScrollToTopBtn into browse.vue, discover.vue, recommend.vue, resource.vue pages.
- Updated components.d.ts to include ScrollToTopBtn type definition.
- Refactored MediaCard.vue and SlideView.vue for improved hover effects and styling.
- Cleaned up unused styles and optimized existing styles for better performance and readability.
This commit is contained in:
jxxghp
2025-04-08 17:43:20 +08:00
parent 204719caf8
commit 89e4a68a03
9 changed files with 351 additions and 403 deletions

View File

@@ -431,7 +431,7 @@ function onRemoveSubscribe() {
:width="props.width"
class="outline-none shadow ring-gray-500 media-card"
:class="{
'transition transform-cpu duration-300 -translate-y-1 shadow-lg': hover.isHovering,
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
'ring-1': isImageLoaded,
}"
@click.stop="goMediaDetail(hover.isHovering ?? false)"
@@ -450,7 +450,7 @@ function onRemoveSubscribe() {
</div>
</template>
</VImg>
<!-- 详情 -->
<VCardText
v-show="hover.isHovering || imageLoadError || searchMenuShow"
@@ -533,15 +533,3 @@ function onRemoveSubscribe() {
@close="chooseSiteDialog = false"
/>
</template>
<style lang="scss" scoped>
.media-card {
position: relative;
transition: transform 0.2s ease;
&:hover {
transform: scale(1.03);
z-index: 2;
}
}
</style>