|
@@ -1,9 +1,9 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
- <meta charset="utf-8">
|
|
|
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
|
+ <meta charset="utf-8" />
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -12,6 +12,21 @@
|
|
|
</noscript>
|
|
|
<div id="app"></div>
|
|
|
<script src="./data.js"></script>
|
|
|
+ <script>
|
|
|
+ const autoZoom = () => {
|
|
|
+ var t = window.devicePixelRatio;
|
|
|
+ if (t != 1) {
|
|
|
+ document.body.style.zoom = -0.6 * t + 1.55;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ // 判断是windows就使用
|
|
|
+ if (window.navigator.userAgent.indexOf("Windows") !== -1) {
|
|
|
+ window.addEventListener("resize", autoZoom);
|
|
|
+ window.addEventListener("load", autoZoom);
|
|
|
+ window.addEventListener("DOMContentLoaded", autoZoom);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+
|
|
|
<!-- built files will be auto injected -->
|
|
|
</body>
|
|
|
</html>
|