index.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html><html lang="en"><head>
  2. <meta charset="UTF-8">
  3. <link rel="icon" type="image/svg+xml" href="/nginx-ui/vite.svg">
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>NginxUI</title>
  6. <script type="application/javascript" src="./config.js"></script>
  7. <script crossorigin="">import('/nginx-ui/assets/index-63ed8a66.js').finally(() => {
  8. const qiankunLifeCycle = window.moudleQiankunAppLifeCycles && window.moudleQiankunAppLifeCycles['nginx-ui'];
  9. if (qiankunLifeCycle) {
  10. window.proxy.vitemount((props) => qiankunLifeCycle.mount(props));
  11. window.proxy.viteunmount((props) => qiankunLifeCycle.unmount(props));
  12. window.proxy.vitebootstrap(() => qiankunLifeCycle.bootstrap());
  13. window.proxy.viteupdate((props) => qiankunLifeCycle.update(props));
  14. }
  15. })</script>
  16. <link rel="stylesheet" href="/nginx-ui/assets/index-9bea9e60.css">
  17. </head>
  18. <body>
  19. <div id="nginx_ui_root"></div>
  20. <script>
  21. const createDeffer = (hookName) => {
  22. const d = new Promise((resolve, reject) => {
  23. window.proxy && (window.proxy[`vite${hookName}`] = resolve)
  24. })
  25. return props => d.then(fn => fn(props));
  26. }
  27. const bootstrap = createDeffer('bootstrap');
  28. const mount = createDeffer('mount');
  29. const unmount = createDeffer('unmount');
  30. const update = createDeffer('update');
  31. ;(global => {
  32. global.qiankunName = 'nginx-ui';
  33. global['nginx-ui'] = {
  34. bootstrap,
  35. mount,
  36. unmount,
  37. update
  38. };
  39. })(window);
  40. </script></body></html>