amis
amis copied to clipboard
新手帮忙给看一下如何隐藏按钮?点击button1隐藏button2
{
"type": "button-group", // 按钮组
"buttons": [
{
"type": "button", // 点击此按钮隐藏button2
"label": "button1",
"actionType": "reload",
"reload": 'button.html?varName=true', // 这行配置是否正确??
"target": "button2"
},
{
"type": "button", // button2(被隐藏的按钮)
"label": "button2",
"name": "button2",
"actionType": "dialog",
"dialog": {
"title": "系统提示",
"body": "对你点击了"
},
"visibleOn": "!this.varName"
}
]
}
reload 是目标组件,比如,你给 page 设置个 name 为 'button.html'
再装是目标组件,比如,你给页设置个姓名为“button.html”
大佬, 新版的手册, 会到哪月份发布呢, 好期待.
快了快了
{
"type": "button-group", // 按钮组
"buttons": [
{
"type": "button", // 点击此按钮隐藏button2
"label": "button1",
"actionType": "reload",
"reload": 'button2?varName=true', // 这行配置是否正确??
"target": "button2"
},
{
"type": "button", // button2(被隐藏的按钮)
"label": "button2",
"name": "button2",
"actionType": "dialog",
"dialog": {
"title": "系统提示",
"body": "对你点击了"
},
"visibleOn": "!this.varName"
}
]
}
是这么写吗?不好用啊