0

问题描述

Weex中使用recycle-list组件,web页面上不展示,使用Playground预览时,IOS端也不能显示,但是安卓手机展示了,我尝试使用Weex官网上recycle-list组件的使用示例代码简单的文本列表显示没有报错,但是的复杂的列表展示也是出现同样的错误情况。

问题出现的环境背景及自己尝试过哪些方法

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

报错信息:

START WEEX VUE RENDER: 0.12.32, Build 2018-10-18 11:48.
webpack-internal:///31:6248 [Vue Render] install Vue 2.6.10.
webpack-internal:///27:620 [Vue warn]: Property or method "item" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/re...

found in

---> <PointsMallHome> at /Users/ljq/myweex-project/src/views/pointsMall/PointsMallHome.vue

   <WeexDiv>
     <Root>

warn @ webpack-internal:///27:620
webpack-internal:///27:620 [Vue warn]: Error in render: "TypeError: Cannot read property 'urls' of undefined"

found in

---> <PointsMallHome> at /Users/ljq/myweex-project/src/views/pointsMall/PointsMallHome.vue

   <WeexDiv>
     <Root>

warn @ webpack-internal:///27:620
webpack-internal:///27:1887 TypeError: Cannot read property 'urls' of undefined

at Proxy.render (webpack-internal:///147:23)
at VueComponent.Vue._render (webpack-internal:///27:3541)
at VueComponent.updateComponent (webpack-internal:///27:4059)
at Watcher.get (webpack-internal:///27:4472)
at new Watcher (webpack-internal:///27:4461)
at mountComponent (webpack-internal:///27:4066)
at VueComponent.Vue.$mount (webpack-internal:///27:8408)
at init (webpack-internal:///27:3117)
at createComponent (webpack-internal:///27:5971)
at createElm (webpack-internal:///27:5918)

logError @ webpack-internal:///27:1887
webpack-internal:///27:8421 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-...
webpack-internal:///27:8432 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deplo...

代码:

<template>

<recycle-list class="list" for="(item, index) in listData" switch="type" @loadmore="fetch">
    <cell-slot case="banner">
        <banner :img-urls="item.urls"/>
    </cell-slot>
    
    .....
    
    <cell-slot case="floor">
        <floor :title="item.title" :floor-info-list="item.floorInfoList"/>
    </cell-slot>
</recycle-list>

</template>

你期待的结果是什么?实际看到的错误信息又是什么?

9月25日提问
0 个回答

撰写答案

推广链接