nvue使用list渲染,分页渲染只有第一个正常,其他出现拖柄不移动问题
<template>
<view class="pages" :style="{ height: pageHeight + 'px' }">
<list ref="list" class="list" fixFreezing="true" :loadmoreoffset="pageHeight * 2" :show-scrollbar="false" :pagingEnabled="true" :bounce="true" :scrollable="true" offset-accuracy="50">
<cell v-for="(item, index) in array" :key="index">
<view style="flex-direction: row;" :style="{ height: pageHeight + 'px' }"><bingarprogress :value="item" activeColor="red" noActiveColor="#fff" subActiveColor="red" strokeWidth="6px" :showInfo="false" handleColor="red" handleWidth="10px" handleHeight="10px" handleBorderRadius="10px" @change="change"></bingarprogress></view>
</cell>
</list>
</view>
</template>
<script>
const dom = weex.requireModule('dom');
const BindingX = uni.requireNativePlugin('bindingx');
var deviceInfo = uni.getSystemInfoSync();
import bingarprogress from '@/components/bing-progress/bing-progress.vue';
export default {
components: { bingarprogress },
data() {
return {
array: [0, 0, 0, 0],
pageHeight: deviceInfo.windowHeight
};
},
mounted() {
var that = this;
// var IntervalIndex = setInterval(()=>{
// that.value = that.value+10;
// if(that.value == 100){
// clearInterval(IntervalIndex)
// }
// },1000)
},
methods: {
change: function(e) {
console.log(e);
}
}
};
</script>
<style>
.list {
}
</style>
1 个回复
微风r - 没啥好说的...
这是list的内存回收机制导致的,可以改用其他组件滚动,或者在组件出现在显示区域再初始化组件