mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:29:24 +08:00
fix(amis-saas-9318): 支持react18;富文本编辑器控件配置项支持搜索
Change-Id: I093d58b6ce914eb6905a28a07e878f679c6e01a3
This commit is contained in:
parent
0071722e88
commit
808d25d1eb
@ -1,8 +1,8 @@
|
||||
import {observer} from 'mobx-react';
|
||||
import {isAlive} from 'mobx-state-tree';
|
||||
import React from 'react';
|
||||
import {unmountComponentAtNode} from 'react-dom';
|
||||
// import {createRoot} from 'react-dom/client';
|
||||
// import {unmountComponentAtNode} from 'react-dom';
|
||||
import {createRoot} from 'react-dom/client';
|
||||
import {EditorManager} from '../manager';
|
||||
import {EditorStoreType} from '../store/editor';
|
||||
import {autobind, guid} from '../util';
|
||||
@ -156,20 +156,21 @@ export function mountInIframe(
|
||||
|
||||
const bridgeName = location.hash.substring(1);
|
||||
|
||||
/*
|
||||
// react 18 版本以下的 render方法
|
||||
reactDom.render(
|
||||
<PreviewWrapper bridgeName={bridgeName} envCreator={envCreator} />,
|
||||
dom
|
||||
);
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
// react 18 render方法
|
||||
const root = createRoot(dom);
|
||||
root.render(<PreviewWrapper bridgeName={bridgeName} envCreator={envCreator} />);
|
||||
*/
|
||||
|
||||
|
||||
window.onunload = function () {
|
||||
unmountComponentAtNode(dom);
|
||||
// root.unmount(); // react18
|
||||
// unmountComponentAtNode(dom);
|
||||
root.unmount(); // react18
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user