amis
amis copied to clipboard
iframe回传变量外部无法使用
实现场景:
使用iframe回传的变量值,可以正常弹出对话框显示,但是form表单中flow没有值
存在的问题:
使用iframe回传的变量值,iframe外部无法使用
当前方案:
{
"type": "page",
"body": {
"type": "form",
"controls": [
{
"type": "text",
"name": "name",
"label": "名字"
},
{
"type": "text",
"name": "description",
"label": "描述"
},
{
"type": "text",
"name": "flow",
"label": "flow"
},
{
"type": "iframe",
"name": "flow",
"className": "flow_chart",
"src": "xx/flow.html",
"events": {
"detail": {
"actionType": "dialog",
"dialog": {
"title": "弹框",
"body": "${flow}"
}
}
},
"height": "100%"
}
]
}
}
看文档,用 postMessage