index.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>教员管理系统</title>
  5. <meta charset="UTF-8" />
  6. <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
  7. <!-- 禁止缩放页面 -->
  8. <!--
  9. width=device-width 设置页面的宽度与设备的屏幕宽度相同,确保网页在移动设备上能正确显示。
  10. initial-scale=1.0 设置网页在移动设备上的初始缩放比例
  11. maximum-scale=1.0 设置网页在移动设备上的最大缩放比例
  12. minimum-scale=1.0 设置网页在移动设备上的最小缩放比例
  13. user-scalable=no 禁用用户缩放功能
  14. -->
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  16. <meta
  17. name="description"
  18. content="教员管理系统 - A modern admin dashboard template built with Vue 3, TypeScript, and Element Plus."
  19. />
  20. <link rel="shortcut icon" type="image/x-icon" href="src/assets/img/favicon.ico" />
  21. <style>
  22. /* 防止页面刷新时白屏的初始样式 */
  23. html {
  24. background-color: #fafbfc;
  25. }
  26. html.dark {
  27. background-color: #070707;
  28. }
  29. </style>
  30. <script>
  31. // 初始化 html class 主题属性
  32. ;(function () {
  33. try {
  34. if (typeof Storage === 'undefined' || !window.localStorage) {
  35. return
  36. }
  37. const themeType = localStorage.getItem('sys-theme')
  38. if (themeType === 'dark') {
  39. document.documentElement.classList.add('dark')
  40. }
  41. } catch (e) {
  42. console.warn('Failed to apply initial theme:', e)
  43. }
  44. })()
  45. </script>
  46. </head>
  47. <body>
  48. <div id="app"></div>
  49. <script type="module" src="/src/main.ts"></script>
  50. </body>
  51. </html>