| 123456789101112131415161718192021222324252627282930 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <title>浠艾福</title>
- <!--preload-links-->
- <!--app-context-->
- <!-- H5 修复:uni-app 编译器在 tabBar 页面模块注入 exports.default.components=... 时
- 使用了自由变量 'exports'(webpack 压缩后模块参数是 a/e/t,e 才是 exports),
- 浏览器没有全局 exports,导致 ReferenceError 中断组件 chunk 执行、首页白屏。
- 提前 polyfill,让注入代码挂到 window.exports 不抛错;组件注册已由 main.js 的
- Vue.component('custom-tab-bar', CustomTabBar) 全局完成,不影响功能。 -->
- <script>
- if (typeof window !== 'undefined') {
- // uni-app 编译器在 tabBar 页面模块注入 exports.default.components=... 时
- // 混用自由变量 'exports'(webpack 压缩后模块参数为 a/e/t,e 才是 exports),
- // 浏览器无全局 exports → ReferenceError 中断组件 chunk 执行。
- // polyfill 需提供 window.exports 且带 .default 对象,避免再触发
- // "Cannot read properties of undefined (reading 'components')"。
- window.exports = window.exports || {};
- window.exports.default = window.exports.default || {};
- }
- </script>
- <link rel="stylesheet" href="/static/index.css" />
- </head>
- <body>
- <div id="app"><!--app-html--></div>
- </body>
- </html>
|