UNPKG

ttk-app-core

Version:

@ttk/recat enterprise develop framework

27 lines (22 loc) 718 B
import './polyfill'; import React from "react"; import ReactDOM from "react-dom"; import { Layout, Spin } from "@ttk/component"; import ttkHost from 'ttk_host'; import { targetDomId } from './constant' // 引入项目公共样式 import './assets/index.less'; const TtkHost = React.lazy(() => ttkHost) // const TtkHost = React.lazy(() => import('ttk_host')) function Root() { return ( <React.Suspense fallback={ <Layout style={{ height: '100%' }}> <Spin size="large" spinning delay={16} style={{ margin: 'auto' }} /> </Layout> }> <TtkHost /> </React.Suspense> ); } ReactDOM.render(<Root />, document.getElementById(targetDomId));