2***@qq.com
2***@qq.com
  • 发布:2022-10-21 12:13
  • 更新:2022-10-21 12:13
  • 阅读:249

九宫格 <LuckyGrid />

分类:uni-app

九宫格 <LuckyGrid />:设置图片无效报错 Cannot read property 'nodeId' of undefined

<lucky-grid ref="canvas" width="650rpx" height="600rpx" :blocks="res.blocks" :prizes="res.prizes" buttons="res.buttons" :defaultStyle="res.defaultStyle" @start="onStart" @end="onEnd"> </lucky-grid>
const prizeImg = {  
    src: "http://11.cinqak.cn/img/alma.png",  
    width: "50%",  
    top: "25%"  
    }  

res: {  
    blocks: [{  
            padding: "25rpx",  
                background: "#FD8D35",  
            borderRadius: "50rpx"  
            },  
            {  
            padding: "12rpx",  
            background: "#FFD24B",  
            borderRadius: "30rpx"  
            },  
            {  
            padding: "20rpx",  
            background: "#FF4C0D",  
            borderRadius: "30rpx"  
            },  
            ],  
            prizes: [{  
                            x: 0,  
                            y: 0,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 1,  
                            y: 0,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 2,  
                            y: 0,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 2,  
                            y: 1,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 2,  
                            y: 2,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 1,  
                            y: 2,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 0,  
                            y: 2,  
                            imgs: [prizeImg]  
                        },  
                        {  
                            x: 0,  
                            y: 1,  
                            imgs: [prizeImg]  
                        },  
                    ],  
                    buttons: [{  
                        x: 1,  
                        y: 1,  
                        background: '#FFEEB8',  
                        fonts: [{  
                            text: '开始',  
                            top: '25%'  
                        }],  
                    }],  
                    defaultStyle: {  
                        background: '#FBE1AB'  
                    },  
                },
2022-10-21 12:13 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复