feat: 整体页面优化,删除无用svg

This commit is contained in:
Blizzard
2026-02-14 08:32:47 +08:00
parent daea00ca60
commit cbbe82ef63
59 changed files with 1265 additions and 342 deletions
+26 -25
View File
@@ -16,38 +16,35 @@
bindscrolltolower="onReachBottom"
enhanced
show-scrollbar="{{false}}"
scroll-top="{{scrollTop}}"
>
<view class="search-section">
<t-search placeholder="搜索植物名称,如:龟背竹" value="{{searchQuery}}" bind:change="onSearchInput" shape="round" />
<view class="search-box-card">
<t-search placeholder="搜索植物名称,如:龟背竹" value="{{searchQuery}}" bind:change="onSearchInput" shape="round" t-class-input-container="search-input-bg" />
</view>
</view>
<!-- Dynamic Categories from API -->
<view class="category-scroll">
<t-tag
variant="{{activeCategory === 'all' ? 'dark' : 'outline'}}"
theme="{{activeCategory === 'all' ? 'primary' : 'default'}}"
shape="mark"
size="medium"
style="margin-right: 16rpx;"
bind:tap="setCategory"
<scroll-view class="category-scroll" scroll-x enable-flex show-scrollbar="{{false}}">
<view
class="category-item {{activeCategory === 'all' ? 'active' : ''}}"
bindtap="setCategory"
data-cat="all"
>
全部
</t-tag>
<t-tag
>
<text>全部</text>
</view>
<view
wx:for="{{categories}}"
wx:key="id"
variant="{{activeCategory === item.id ? 'dark' : 'outline'}}"
theme="{{activeCategory === item.id ? 'primary' : 'default'}}"
shape="mark"
size="medium"
style="margin-right: 16rpx;"
bind:tap="setCategory"
wx:key="id"
class="category-item {{activeCategory === item.id ? 'active' : ''}}"
bindtap="setCategory"
data-cat="{{item.id}}"
>
{{item.name}}
</t-tag>
</view>
>
<text>{{item.name}}</text>
</view>
<!-- Right spacer for scroll -->
<view style="width: 40rpx; flex-shrink: 0;"></view>
</scroll-view>
<view class="wiki-list">
<view wx:for="{{displayedList}}" wx:key="id" class="wiki-card" bindtap="goToDetail" data-item="{{item}}">
@@ -96,7 +93,11 @@
</t-tag>
</view>
</view>
<t-icon name="chevron-right" size="48rpx" color="#ccc" />
<!-- Favorite Heart Button -->
<view class="fav-action-btn" catchtap="toggleFavorite" data-id="{{item.id}}" style="padding: 16rpx; margin-right: -16rpx;">
<t-icon name="{{item.isFavorited ? 'heart-filled' : 'heart'}}" size="48rpx" color="{{item.isFavorited ? '#FA5151' : '#CCC'}}" />
</view>
</view>
</view>