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

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

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