fix(fe): 顶部固定条去掉补丁感 + 社区分类吸顶 + 切分类回顶部
## 那条 banner 为什么丑 我给它加了不透明底色 + 分隔线,而页面本身是渐变背景——等于在渐变上 贴了块补丁,屏幕上出现三条颜色不搭的横带。 但它根本不需要背景:它在文档流里而不是浮层,内容永远不会滚到它下面。 去掉 background / backdrop-filter / border 之后自然融进页面渐变。 顺手把 .pet-bar 改名 .top-bar,因为社区也要用它。 ## 社区 - 分类标签移出滚动区吸顶。原来一滚就没了,想换分类还得先滚回顶部 - 「发布图文」那个大黑按钮独占 124rpx,而发帖是低频操作,不该在每屏 都占着首屏。压成右侧的小胶囊,收进同一条,始终可点 - 切分类回到顶部:不然从「推荐」滚到一半切到「关注」,看到的是新列表 的中间,会以为内容错乱了 回顶用 scroll-into-view + 锚点,并在 bindscroll 里清掉锚点值—— 不清的话下次再设同一个值不会触发,第二次切分类就不动了。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,14 +3,16 @@ module.exports.isUrl = function (s) { return s && s.indexOf('http') === 0; }
|
||||
</wxs>
|
||||
<nav-bar title="宠友圈"></nav-bar>
|
||||
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<view class="page-body">
|
||||
<view class="top-bar feed-bar">
|
||||
<seg-tabs items="{{feedTabs}}" current="{{feedIdx}}" bind:change="switchFeedTab"></seg-tabs>
|
||||
|
||||
<view class="compose-card">
|
||||
<button class="btn btn-dark btn-block" bindtap="openSheet" data-type="createPost"><pt-icon name="plus" size="{{30}}"></pt-icon>发布图文</button>
|
||||
<view class="feed-post" bindtap="openSheet" data-type="createPost">
|
||||
<pt-icon name="plus" size="{{28}}"></pt-icon>发布
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" scroll-into-view="{{intoView}}" bindscroll="onFeedScroll" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<view class="page-body">
|
||||
<view id="feed-top"></view>
|
||||
<view wx:for="{{posts}}" wx:key="id" class="post-card" bindlongpress="onLongPressPost" data-index="{{index}}">
|
||||
<view class="post-head">
|
||||
<view class="post-avatar">{{item.author_emoji}}</view>
|
||||
|
||||
Reference in New Issue
Block a user