提交 4f5fcb9b 编写于 作者: 雪洛's avatar 雪洛

feat: 使用scroll-view替代list-view

上级 c2867eaa
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<view v-else="mixinDatacomResData.length>0"> <view v-else="mixinDatacomResData.length>0">
<!-- 需要自行处理数据及相关UI展现 --> <!-- 需要自行处理数据及相关UI展现 -->
<!-- {{mixinDatacomResData}} --> <!-- {{mixinDatacomResData}} -->
<list-view class="list-view"> <scroll-view class="list-view">
<list-item class="list-item" v-for="(item, _) in mixinDatacomResData"> <view class="list-item" v-for="(item, _) in mixinDatacomResData">
<text>{{item}}</text> <text>{{item}}</text>
</list-item> </view>
</list-view> </scroll-view>
</view> </view>
<view v-if="!mixinDatacomLoading && mixinDatacomResData.length==0"> <view v-if="!mixinDatacomLoading && mixinDatacomResData.length==0">
无数据 无数据
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
</button> </button>
</navigator> </navigator>
<view class="uni-common-pb"></view> <view class="uni-common-pb"></view>
<!-- #ifdef APP -->
<navigator url="/pages/component/scroll-view/scroll-view-refresher-props" hover-class="none"> <navigator url="/pages/component/scroll-view/scroll-view-refresher-props" hover-class="none">
<button type="primary" class="button"> <button type="primary" class="button">
下拉刷新的属性示例 下拉刷新的属性示例
...@@ -55,6 +57,7 @@ ...@@ -55,6 +57,7 @@
</button> </button>
</navigator> </navigator>
<view class="uni-common-pb"></view> <view class="uni-common-pb"></view>
<!-- #endif -->
</view> </view>
</view> </view>
<!-- #ifdef APP --> <!-- #ifdef APP -->
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<unicloud-db ref="udb" class="udb" v-slot:default="{data, pagination, loading, hasMore, error}" <unicloud-db ref="udb" class="udb" v-slot:default="{data, pagination, loading, hasMore, error}"
:collection="collection" :page-size="15" :getcount="true" loadtime="manual"> :collection="collection" :page-size="15" :getcount="true" loadtime="manual">
<view v-if="error!=null" class="error">{{error.errMsg}}</view> <view v-if="error!=null" class="error">{{error.errMsg}}</view>
<list-view ref="listView" class="list-view" :scroll-y="true" @scrolltolower="loadMore()"> <scroll-view ref="listView" class="list-view" @scrolltolower="loadMore()">
<list-item class="list-item" v-for="(item, _) in data" @click="gotoDetailPage(item['_id'] as string)"> <view class="list-item" v-for="(item, _) in data" @click="gotoDetailPage(item['_id'] as string)">
<view class="list-item-fill"> <view class="list-item-fill">
<text class="name">{{item['username']}}</text> <text class="name">{{item['username']}}</text>
<text class="mobile">{{item['mobile']}}</text> <text class="mobile">{{item['mobile']}}</text>
</view> </view>
</list-item> </view>
</list-view> </scroll-view>
<uni-loading v-if="loading" class="loading" color="#999" text="正在加载..."></uni-loading> <uni-loading v-if="loading" class="loading" color="#999" text="正在加载..."></uni-loading>
<view v-if="data.length>0" class="pagination"> <view v-if="data.length>0" class="pagination">
<text class="pagination-item">{{data.length}} / {{pagination.count}}</text> <text class="pagination-item">{{data.length}} / {{pagination.count}}</text>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册