mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-13 19:42:15 +08:00
初始化3.0.0版本
This commit is contained in:
28
km-console/packages/config-manager-fe/src/index.tsx
Normal file
28
km-console/packages/config-manager-fe/src/index.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import singleSpaReact from 'single-spa-react';
|
||||
import App from './app';
|
||||
|
||||
function domElementGetter() {
|
||||
let el = document.getElementById('ks-layout-container');
|
||||
if (!el) {
|
||||
el = document.createElement('div');
|
||||
el.id = 'ks-layout-container';
|
||||
document.body.appendChild(el);
|
||||
}
|
||||
|
||||
return el;
|
||||
}
|
||||
|
||||
const reactLifecycles = singleSpaReact({
|
||||
React,
|
||||
ReactDOM,
|
||||
rootComponent: App,
|
||||
domElementGetter,
|
||||
});
|
||||
|
||||
export const bootstrap = [reactLifecycles.bootstrap];
|
||||
|
||||
export const mount = [reactLifecycles.mount];
|
||||
|
||||
export const unmount = [reactLifecycles.unmount];
|
||||
Reference in New Issue
Block a user