我在nuxt项目中使用vue onsenUI。
我正在尝试在v-ons-lazy-repeat元素中创建v-ons-lazy-repeat元素,但是我不能。
像这样:
<template>
</v-ons-page>
<v-ons-list class="list">
<v-ons-lazy-repeat
:render-item="renderItem"
:length="renderLength"
:calculate-item-height="renderItemHeight"
>
</v-ons-lazy-repeat>
</v-ons-list>
</v-ons-page>
</template>
<script>
data() {
return {
//renderLength, renderItemHeight, xItem, xLength, xHeight are written.
renderItem:
i => {
return new Vue({
render: createElement => {
return createElement("div",{},[
(()=> {return createElement('v-ons-list', {}, [
createElement('v-ons-lazy-repeat', {props: { renderItem: xItem, length: xLength, calculateItemHeight: xHeight},)])
</script>
我收到此错误。
"Error: [Onsen UI] LazyRepeat must be descendant of a Page element"
如何在v-ons-lazy-repeat中使用v-ons-lazy-repeat?