We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67d0fc5 commit 9cc46ecCopy full SHA for 9cc46ec
src/pages/index/index.wxml
@@ -12,7 +12,14 @@
12
<text>{{item.text}}</text>
13
</view>
14
15
- <view class="topic-list-wrap">
16
- <topic-list data="{{aTopicList}}"></topic-list>
+ <view class="topic-list-wrap">
+ <block wx:if="{{aTopicList.length}}">
17
+ <topic-list data="{{aTopicList}}"></topic-list>
18
+ </block>
19
+ <block wx:else>
20
+ <view class="topic-list-no-data vh-parent color-grey">
21
+ <text class="vh">暂无数据~</text>
22
+ </view>
23
24
25
src/pages/index/index.wxss
@@ -26,4 +26,8 @@
26
}
27
.topic-list-wrap {
28
padding: 20rpx
29
+}
30
+.topic-list-no-data {
31
+ height: calc(100vh - 150rpx);
32
+ font-size: 28rpx;
33
0 commit comments