feat: 修复wiki样式问题
This commit is contained in:
+33
-4
@@ -1,7 +1,13 @@
|
||||
<!--pages/wiki/index.wxml-->
|
||||
<view class="wiki-page">
|
||||
|
||||
<view class="wiki-scroll-area">
|
||||
<scroll-view
|
||||
class="wiki-scroll-area"
|
||||
scroll-y
|
||||
bindscrolltolower="onReachBottom"
|
||||
enhanced
|
||||
show-scrollbar="{{false}}"
|
||||
>
|
||||
<view class="search-section">
|
||||
<t-search placeholder="搜索植物名称,如:龟背竹" value="{{searchQuery}}" bind:change="onSearchInput" shape="round" />
|
||||
</view>
|
||||
@@ -25,22 +31,45 @@
|
||||
<view class="wiki-list">
|
||||
<view wx:for="{{displayedList}}" wx:key="id" class="wiki-card" bindtap="goToDetail" data-item="{{item}}">
|
||||
<view class="wiki-image">
|
||||
<t-image src="/assets/{{item.images[0]}}" mode="aspectFill" width="100%" height="100%" />
|
||||
<t-image src="/assets/{{item.images[0]}}" mode="aspectFill" width="100%" height="100%" lazy />
|
||||
</view>
|
||||
<view class="wiki-info">
|
||||
<view class="wiki-top">
|
||||
<text class="wiki-name">{{item.name}}</text>
|
||||
<text class="scientific-name">{{item.scientificName}}</text>
|
||||
</view>
|
||||
<t-tag size="small" variant="light" theme="success">{{item.category}}</t-tag>
|
||||
|
||||
<!-- Tags Row -->
|
||||
<view class="tags-row">
|
||||
<t-tag
|
||||
wx:for="{{item.tags}}"
|
||||
wx:key="*this"
|
||||
wx:for-item="tag"
|
||||
size="small"
|
||||
variant="light"
|
||||
theme="primary"
|
||||
style="margin-right: 8rpx; margin-bottom: 8rpx;"
|
||||
>
|
||||
{{tag}}
|
||||
</t-tag>
|
||||
</view>
|
||||
</view>
|
||||
<t-icon name="chevron-right" size="48rpx" color="#ccc" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Loading / No More Data Footer -->
|
||||
<view class="loading-footer">
|
||||
<t-loading wx:if="{{isLoading}}" theme="circular" size="40rpx" text="加载中..." inherit-color />
|
||||
<text wx:elif="{{!hasMore && displayedList.length > 0}}" class="no-more-text">没有更多了</text>
|
||||
<view wx:elif="{{!hasMore && displayedList.length === 0}}" class="empty-state">
|
||||
<text>没有找到相关植物</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Spacer -->
|
||||
<view style="height: 160rpx;"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<t-fab icon="scan" text="植物识别" bind:click="openIdentifyModal" aria-label="植物识别"></t-fab>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user