提交 a7635554 编写于 作者: shutao-dc's avatar shutao-dc

调整list-view 复用测试例 修复截图长列表失败问题

上级 31f368eb
<template>
<scroll-view direction="horizontal" style="flex-direction: row;">
<button class="button_item" @click="delayShow">测试延时显示</button>
</scroll-view>
<list-view v-show="list_show" id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-view id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-item v-for="index in item_count" class="item" @click="itemClick(index)">
<text >item-------<text>{{index}}</text></text>
<input style="border-width: 1px; border-style: solid;" :placeholder="index + ''" :value= "index ==1 ? `第一个` :index "/>
......@@ -15,7 +12,6 @@
data() {
return {
item_count: 20,
list_show: true,
listViewElement: null as UniListViewElement|null
}
},
......@@ -30,14 +26,6 @@
},
itemClick(index: number) {
console.log("itemTextClick---"+index)
},
delayShow() {
this.list_show = !this.list_show
this.item_count += 20
//延时显示list-view 测试list-item延时显示bug
setTimeout(()=>{
this.list_show = !this.list_show
}, 400)
}
}
}
......
<template>
<scroll-view direction="horizontal" style="flex-direction: row;">
<button class="button_item" @click="delayShow">测试延时显示</button>
<button class="button_item" @click="switchItemContent">修改item子元素</button>
</scroll-view>
<list-view v-show="list_show" id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-item v-for="index in item_count" class="item" @click="itemClick(index)">
<text >item-------<text>{{index}}</text></text>
<text v-if="displayArrow" >item-------<text>{{index}}</text></text>
</list-item>
</list-view>
<view style="flex: 1;">
<scroll-view direction="horizontal" style="flex-direction: row;">
<button class="button_item" @click="delayShow">测试延时显示</button>
<button class="button_item" @click="switchItemContent">修改item子元素</button>
</scroll-view>
<list-view v-show="list_show" id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-item v-for="index in item_count" class="item" @click="itemClick(index)">
<text >item-------<text>{{index}}</text></text>
<text v-if="displayArrow" >item-------<text>{{index}}</text></text>
</list-item>
</list-view>
</view>
</template>
<script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册