1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-07-27 04:20:43 +08:00

feat: 新增返回顶部功能与优化首页横幅样式

1.  给useListData的下拉刷新添加调试日志
2.  首页横幅替换固定图片为随机资源图,调整渐变背景层级
3.  新增tabbar滚动监听与返回顶部按钮功能
This commit is contained in:
小莫唐尼
2026-06-12 00:12:43 +08:00
parent 862d176593
commit c847dfb1c4
3 changed files with 36 additions and 8 deletions
+3 -4
View File
@@ -4,6 +4,7 @@ import { queryPostByName, queryPosts } from '@/api/halo-base/post'
import { completeUrl } from '@/utils/url'
import { timeFrom } from '@/utils/base/timeFrom'
import { useListData } from '@/hooks/useListData'
import { randomImageUrl } from '@/utils/randomResources'
import type { ListedPostVo, ListedPostVoList, PostV1alpha1PublicApiQueryPostByNameRequest, PostV1alpha1PublicApiQueryPostsRequest, PostVo } from '@halo-dev/api-client'
@@ -36,14 +37,12 @@ const banner = reactive({
list: [
{
value: exampleImageUrls.banner,
type: 'image',
title: 'UNI HALO v3.0',
desc: '新全新探索简约的艺术风格',
time: timeFrom(new Date()),
},
{
value: exampleImageUrls.postCover1,
type: 'image',
value: randomImageUrl.pc,
title: 'UNI HALO v3.0 使用手册',
desc: 'uni-halo 使用手册,包含安装、配置、使用等信息666666666aaaa啊啊啊啊啊啊啊啊啊啊啊',
time: timeFrom(new Date()),
@@ -138,7 +137,7 @@ onLoad(() => {
<template #default="{ index }">
<view class="relative h-full w-full">
<image class="h-full w-full object-cover" :src="banner.list[index].value" />
<view class="absolute bottom-0 left-0 right-0 from-black/10 to-black/90 bg-gradient-to-b p-4">
<view class="absolute bottom-0 left-0 right-0 from-black/0 via-black/50 to-black/90 bg-gradient-to-b p-4">
<view class="w-5/6 flex flex-col gap-y-2">
<text class="text-xs text-white/90">{{ banner.list[index].time }}</text>
<text class="line-clamp-1 text-xl text-white font-bold">{{ banner.list[index].title }}</text>