mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 修复 iframe postMessage 可能会报 could not be cloned 错问题 (#3919)
* fix: 修复 iframe posemessage 可能会报 could not be cloned 错问题 * 修复 iframe 链接错误
This commit is contained in:
parent
1e1180614d
commit
9bb6e64efc
@ -15,7 +15,7 @@ order: 51
|
||||
```schema: scope="body"
|
||||
{
|
||||
"type": "iframe",
|
||||
"src": "https://gitee.com/baidu/amis",
|
||||
"src": "https://github.com/baidu/amis",
|
||||
"height": 300
|
||||
}
|
||||
```
|
||||
@ -28,11 +28,11 @@ order: 51
|
||||
{
|
||||
"type": "page",
|
||||
"data": {
|
||||
"iframeSrc": "baidu/amis"
|
||||
"iframeSrc": "https://github.com/baidu/amis"
|
||||
},
|
||||
"body": {
|
||||
"type": "iframe",
|
||||
"src": "https://gitee.com/${iframeSrc}",
|
||||
"src": "${iframeSrc}",
|
||||
"height": 300
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ export default class IFrame extends React.Component<IFrameProps, object> {
|
||||
(this.IFrameRef.current as HTMLIFrameElement)?.contentWindow?.postMessage(
|
||||
{
|
||||
type: `amis:${type}`,
|
||||
data
|
||||
data: JSON.parse(JSON.stringify(data))
|
||||
},
|
||||
'*'
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user