change event name

This commit is contained in:
rickcole 2020-07-21 17:33:07 +08:00
parent 4ccce197d1
commit 659ab3d9c7
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ window.addEventListener('message', e => {
```json
{
"type": "amis:load", // 当前事件类型
"type": "amis:init", // 当前事件类型
"data": {
//... 当前数据域数据
}

View File

@ -70,7 +70,7 @@ export default class IFrame extends React.Component<IFrameProps, object> {
@autobind
onLoad() {
const {src, data} = this.props;
src && this.postMessage('load', data);
src && this.postMessage('init', data);
}
// 当别的组件通知 iframe reload 的时候执行。