42 lines
1.9 KiB
Plaintext
42 lines
1.9 KiB
Plaintext
<!--index.wxml-->
|
|
<view class="flex flex-center flex-col">
|
|
<view wx:if="{{list.length === 0}}" class="flex flex-center flex-col " style="margin-top: 268rpx;" >
|
|
<view class="empty flex flex-center flex-col">
|
|
</view>
|
|
<view class="mt-16 flex flex-center flex-col">
|
|
<view class="font-16 bold" >暂无植物</view>
|
|
<view class="font-12 grey mt-16">您还没有添加任何植物</view>
|
|
</view>
|
|
<view style="width: 100vw; margin-top: 48rpx; " class="flex flex-center">
|
|
<t-button theme="primary" style="width: 60%;" size="small" shape="round" bind:tap="goAdd">添加您的第一颗植物</t-button>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- list 数据 -->
|
|
<scroll-view scroll-y="{{true}}" wx:else>
|
|
<view class="padding">
|
|
<view wx:for="{{list}}" class="row padding mb-32" data-id="{{item.id}}" bind:tap="goInfo">
|
|
<view class="flex flex-center flex-justify-start">
|
|
<image class="pic" mode="aspectFill" wx:if="{{item.pic}}" src="{{item.pic}}"></image>
|
|
<image class="pic" mode="aspectFill" wx:else src="https://res.catter.cn/pub/2025/09/30/20250930143920286.png"></image>
|
|
<view style="margin-left:16rpx">
|
|
<view class="font-16 bold">{{item.name}}</view>
|
|
<view class="font-14 grey">{{item.latinName}}</view>
|
|
<view class="flex flex-center flex-justify-start mt-16 ">
|
|
<t-avatar size="56rpx" icon="color-invert" />
|
|
<view class="ml-32">
|
|
<t-avatar size="56rpx" icon="color-invert" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
<view class="bottom" wx:if="{{list.length === 0}}">
|
|
<view class="font-12 grey mt-16">您添加的植物将全部显示在这里</view>
|
|
</view>
|
|
|
|
<t-fab wx:if="{{list.length > 0}}" icon="add" bind:click="goAdd"></t-fab>
|
|
</view>
|