# LuckyGrid

Nine Palace Draw

# Example one:

Leeao版权所有
1元红包
100元红包
0.5元红包
2元红包
10元红包
50元红包
0.3元红包
5元红包
12 次
显示代码

# Example two:

Leeao版权所有
显示代码

# Example three:

Leeao版权所有
谢谢
红包
谢谢
红包
谢谢
红包
谢谢
红包
抽奖
消耗10积分
显示代码

# Example four

Leeao版权所有
谢谢参与
米饭
排骨
咖啡
卷心蛋糕
热狗
草莓蛋糕
零食
开始
- start -
显示代码

# Attribute

Parameter Description Type Optional Value Default Value
ref LuckyGrid Name String -- --
config config Object gridstyle --
btnConfig btnConfig Object background,fonts,imgs --
prizes prizes Array fonts,imgs --

# Event

Event name Description Callback parameter
start start event --
end end event result index

# Method

Method name Description parameter
play method 1-9 which index be check

# config setting

Parameter Description Type Optional Value Default Value
grid grid setting Object borderRadius:15,//格子圆边值
fontSize:'14px',//字体大小
defaultStyle:{
    background:'#fff',//初始背景色
    fontColor:'#DF424B',//初始字体颜色
},
activeStyle:{
    background:'#fff',//加亮背景色
    fontColor:'#DF424B',//加亮字体颜色
}
--
style whole setting Object width:310,//九宫格宽度
height:310,//九宫格高度
padding:20,//九宫格内边距
backgroundColor:'#ff4a4c',//九宫格背景色
backgroundImage:'/k3.png',//九宫格背景图
borderRadius:15,//九宫格圆边
gutter:5,//格间距
--

# btnConfig setting

Parameter Description Type Optional Value Default Value
background button color String 'linear-gradient(270deg, #FFDCB8, #FDC689)' --
fonts button text Array {
text: '开始',//按钮文字1
fontColor: '#1c258e',//按钮文字颜色
top: '18%',//按钮顶部位置
fontSize:'30px'//按钮字体大小
}
--
imgs button imgs Array {
src: '/active-eat.png',//按钮图片
width: '100%',//按钮图片大小
top: '18%',//按钮图片顶部位置
}
--

# prizes setting

Parameter Description Type Optional Value Default Value
fonts prizes texts Object {
text: '草莓蛋糕',//奖品文字
top: '18%',//奖品文字顶部位置
}
--
imgs prizes imgs Array {
src:'/img/default-eat.png',//奖品图片
activeSrc:'/img/active-eat.png',//奖品加亮图片
width:'100%',//奖品图片宽度
top:'0%'//奖品图片顶部位置
}
--
Last Updated: 3/3/2023, 10:59:23 AM