2***@qq.com
2***@qq.com
  • 发布:2024-07-31 23:53
  • 更新:2024-08-28 15:00
  • 阅读:159

关于uniapp 循环渲染组件 app 端正常,转为微信小程序后会提示渲染错误,要一个个写,还不能动态传参

分类:uni-app

页面内容

<uni-grid :column="5" :show-border="false" :square="false" @change="onminechange">  
                    <uni-grid-item v-for="(item ,index) in gridlist" :index="index" :key="index">  
                        <view class="grid-item">  
                            <view class="">  
                                <uni-icons font-family="iconfont" :size="30">{{item.icon}}</uni-icons>  
                            </view>  
                            <text class="text text-sm">{{item.text}}</text>  
                            <view v-if="item.badge" class="grid-dot">  
                                <uni-badge :text="item.badge" :type="item.type" />  
                            </view>  
                        </view>  
                    </uni-grid-item>  
                </uni-grid>

绑定数据

gridlist: [{  
                    icon: "\ue9f4",  
                    text: '待寄出',  
                    badge: 0,  
                    type: "error",  
                },  
                {  
                    icon: '\ue9ef',  
                    text: '已寄出',  
                    badge: 0,  
                    type: "error",  
                },  

                {  
                    icon: '\ue9f0',  
                    text: '竞拍中',  
                    badge: 0,  
                    type: "error",  
                },{  
                    icon: '\ue9eb',  
                    text: '待确认',  
                    badge: 0,  
                    type: "error",  
                },  
                {  
                    icon: '\ue9ed',  
                    text: '待取回',  
                    badge: 0,  
                    type: "error",  
                }]

APP端渲染正常,转为小程序后显示错误
[渲染层错误] Framework inner error (expect FLOW_CREATE_NODE but get another)(env: Windows,mp,1.06.2407101; lib: 3.5.1)
[渲染层错误] Error: SystemError (webviewScriptError)
Framework inner error (expect FLOW_CREATE_NODE but get another)(env: Windows,mp,1.06.2407101; lib: 3.5.1)
[渲染层错误] Uncaught (in promise) TypeError: Cannot read property 'addListener' of undefined(env: Windows,mp,1.06.2407101; lib: 3.5.1)
[渲染层错误] TypeError: SystemError (webviewScriptError)
Cannot read property 'addListener' of undefined(env: Windows,mp,1.06.2407101; lib: 3.5.1)
如果把循环去掉,一个个写uni-grid-item可以正常显示

2024-07-31 23:53 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com (作者)

请问有遇到这种问题吗?有什么好的解决办法,求指教

1***@qq.com

1***@qq.com - 阿巴阿巴

同样的问题,有解决方案吗

要回复问题请先登录注册