import * as React from 'react';

import loadable from '@loadable/component';

export default (name: string, data) => {
    const AsyncPage = loadable(() => import(`../floor/${name}`));

    return class extends React.Component<any> {
        public render() {
            return (
                <AsyncPage {...data} />
            );
        }
    };
};

注意: 使用懒加载的楼层,不能通过其它的形式引入到页面了, 否则会导致拆分失败

相关文章:

  • 2022-02-18
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2021-11-13
  • 2022-12-23
  • 2022-01-01
  • 2021-11-27
  • 2021-08-05
  • 2021-06-15
相关资源
相似解决方案