nvue的list组件第二次渲染界面是逐条更新的,而不是一次性渲染出来。加了render-whole也没用,有什么解决方案吗?
- 发布:2021-06-28 15:45
- 更新:2023-08-24 11:08
- 阅读:935
夫子仰慕者 - 厉害了吧
报这种错误 Unknown custom element: <cell> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
这是我的代码
<template>
<view class="tabs">
<list class="scroll-v list"
scrollable='true'
enableBackToTop="true"
scroll-y
loadmoreoffset="15" >
<cell v-for="(newsitem,index2) in tabBars" :key="index2">
<view style="width:750rpx;height: 80rpx;background-color: aquamarine;padding: 10rpx;">{{newsitem.name}}</view>
</cell>
<cell class="loading-more" >
<text class="loading-more-text">fdfd</text>
</cell>
</list>
</view>
</template>
<script>
export default {
data () {
return {
dataList: [{id: "1", name: 'A'}, {id: "2", name: 'B'}, {id: "3", name: 'C'}],
tabBars: [{
name: '关注',
id: 'guanzhu'
}, {
name: '推荐',
id: 'tuijian'
}, {
name: '体育',
id: 'tiyu'
}, {
name: '热点',
id: 'redian'
}, {
name: '财经',
id: 'caijing'
}, {
name: '娱乐',
id: 'yule'
}, {
name: '军事',
id: 'junshi'
}, {
name: '历史',
id: 'lishi'
}, {
name: '本地',
id: 'bendi'
},{
name: '关注',
id: 'guanzhu'
}, {
name: '推荐',
id: 'tuijian'
}, {
name: '体育',
id: 'tiyu'
}, {
name: '热点',
id: 'redian'
}, {
name: '财经',
id: 'caijing'
}, {
name: '娱乐',
id: 'yule'
}, {
name: '军事',
id: 'junshi'
}, {
name: '历史',
id: 'lishi'
}, {
name: '本地',
id: 'bendi'
},{
name: '关注',
id: 'guanzhu'
}, {
name: '推荐',
id: 'tuijian'
}, {
name: '体育',
id: 'tiyu'
}, {
name: '热点',
id: 'redian'
}, {
name: '财经',
id: 'caijing'
}, {
name: '娱乐',
id: 'yule'
}, {
name: '军事',
id: 'junshi'
}, {
name: '历史',
id: 'lishi'
}, {
name: '本地',
id: 'bendi'
}],
}
}
}
</script>
DCloud移动团队
感谢反馈我们会确认下
2021-07-07 11:53