CzRger hace 1 semana
padre
commit
e5e7e14ce0
Se han modificado 2 ficheros con 2 adiciones y 0 borrados
  1. 1 0
      index.html
  2. 1 0
      src/stores/theme.ts

+ 1 - 0
index.html

@@ -3,6 +3,7 @@
   <head>
     <meta charset="UTF-8" />
     <title><{VITE_TITLE}></title>
+    <link rel="icon" type="image/png" id="logo" href="/src/assets/images/global/logo.png">
   </head>
   <body>
     <div id="app"></div>

+ 1 - 0
src/stores/theme.ts

@@ -37,6 +37,7 @@ export const useThemeStore = defineStore('theme', {
       document.documentElement.style.setProperty('--cus-main-color', this.mainColor) // 主题色
       document.documentElement.style.setProperty('--cus-main-color-rgb', extractRgbFromRgba(hexToRgb(this.mainColor)).join(',')) // 主题色rgb
       document.documentElement.style.setProperty('--cus-main-color-hex-2', (hexToOpaqueHex(this.mainColor, 0.2))) // 表头颜色
+      document.getElementById("logo").href = this.logo
     }
   },
 })