game-button
v0.0.15
Published
``` npm install game-button ```
Downloads
5
Readme
game-button
游戏
安装
npm install game-button
使用
- json
{
"usingComponents": {
"game-button": "game-button/button"
}
}
- mini.project.json
{
"node_modules_es6_whitelist": [
"game-button"
]
}
- js
Page({
data: {
buttonData: {
name: "活动规则",
"imageUrl": "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01t4CMya1FJvenwRo2L_!!1080040467.jpg", "width": "750", "height": "384",
// imageUrl: "",
// width: 60,
// height: 90,
// left: 652,
left: 0,
top: 162 - 162,
className: "",
tapName: "",//自定义事件,如果没有默认handleTap
typeName: "tipDialog",
spmdName: "rule"
},
},
handleTap(e) {
console.log("handleTap:", e);
},
onClickFun(e) {
console.log(e)
}
})
- xaml
<game-button component-data="{{buttonData}}" onClickFun="onClickFun" />