九宫格 <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'
},
},
0 个回复