tiny-vue/examples/react-site/index.html

29 lines
1.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenTiny - TinyVue</title>
<!--问题1.TinyNG打包后静态资源文件在新官网找不到CSS主题样式文件加载不到-->
<!--2.TinyNG打包文件web-components的主题样式加载时机较早编译获取不到PUBLIC_URL和DEPLOY_URL变量从而找不到对应的css文件-->
<!--方案将PUBLIC_URL和DEPLOY_URL变量在header中提前定义保证web-components可以获取到这两个变量从而正确加载对应的主题样式文件-->
<script type="module">
window.PUBLIC_URL = import.meta.env.BASE_URL;
window.DEPLOY_URL = '';
</script>
</head>
<body class="of-hidden">
<div id="header"></div>
<app-root></app-root>
<div id="app" class="wp100 hp100 pt60"></div>
<script id="tinyui-design-common" src="https://res.hc-cdn.com/tinyui-design-common/1.0.5.20230106163838/tinyui-design-common.min.js"></script>
<script type="module" src="./src/main.js"></script>
</body>
</html>