浏览代码

fixed reloadContent event + renamed unmountApp function from app's interface

Skylsmoi 6 年前
父节点
当前提交
b1f5fcfca8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/container/HtmlDocument.jsx
  2. 1 1
      src/index.js

+ 1 - 1
src/container/HtmlDocument.jsx 查看文件

41
         this.setState({isVisible: false})
41
         this.setState({isVisible: false})
42
         break
42
         break
43
       case 'html-documents_reloadContent':
43
       case 'html-documents_reloadContent':
44
-        this.setState({content: data})
44
+        this.setState(prev => ({content: {...prev.content, ...data}}))
45
     }
45
     }
46
   }
46
   }
47
 
47
 

+ 1 - 1
src/index.js 查看文件

34
       , document.getElementById(data.config.domContainer)
34
       , document.getElementById(data.config.domContainer)
35
     )
35
     )
36
   },
36
   },
37
-  hideApp: domId => {
37
+  unmountApp: domId => {
38
     return ReactDOM.unmountComponentAtNode(document.getElementById(domId)) // returns bool
38
     return ReactDOM.unmountComponentAtNode(document.getElementById(domId)) // returns bool
39
   },
39
   },
40
   renderPopupCreation: data => {
40
   renderPopupCreation: data => {