1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-11-13 22:11:42 +08:00

refactor: 优化滚动监听逻辑与评论系统,新增对齐alova的meta参数

1. 重构usePageScroll hook,支持自定义默认滚动值并暴露更新方法
2. 全局页面统一接入onPageScroll监听,替换原有内置日志打印
3. 新增评论可见回复数、回复引用、分页回复加载等评论扩展能力
4. 调整全局操作按钮位置与部分UI样式细节
5. 优化请求拦截器,对齐alova参数格式重构query处理逻辑
6. 完善评论弹窗与评论列表组件,实现抖音式折叠回复交互
This commit is contained in:
小莫唐尼
2026-09-12 23:35:50 +08:00
parent e5e3ad3d8b
commit 1cb300f07a
36 changed files with 390 additions and 128 deletions
+7 -1
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { computed, ref, watchEffect } from 'vue'
import { onPageScroll } from '@dcloudio/uni-app'
import { formatTime } from '@/utils/formatTime'
import { useFavoritesStore } from '@/store/favorites'
import { DataLoadingStatusEnum, useDataLoadingStatus } from '@/hooks/useDataLoadingStatus'
@@ -13,7 +14,7 @@ definePage({
},
})
const { scrollY } = usePageScroll()
const { scrollY, updatePageScrollValue } = usePageScroll()
const favoritesStore = useFavoritesStore()
/* ---------------- Tab(文章/瞬间) ---------------- */
@@ -67,6 +68,11 @@ function handleRemove(item: IFavoriteItem) {
/* ---------------- 空态文案 ---------------- */
const emptyText = computed(() => (activeKind.value === 'post' ? '还没有收藏文章' : '还没有收藏瞬间'))
/* ---------------- 滚动 ---------------- */
onPageScroll((option: Page.PageScrollOption) => {
updatePageScrollValue(option.scrollTop)
})
</script>
<template>