style: 登录页默认样式

This commit is contained in:
Tony 2024-04-09 15:44:57 +08:00
parent 9b6df9e701
commit 7c15d60c5e

View File

@ -146,11 +146,12 @@ export default {
created() { created() {
this.getCode(); this.getCode();
this.getCookie(); this.getCookie();
}, },
methods: { methods: {
getTitleBg() { getTitleBg() {
const theme = localStorage.getItem("data-theme") || 'redTheme' const theme = localStorage.getItem("data-theme") || 'default'
window.document.documentElement.setAttribute('data-theme', theme)
window.document.documentElement.setAttribute('class', 'light')
if (theme === 'default') return '/theme/default/loginTitle.png' if (theme === 'default') return '/theme/default/loginTitle.png'
if (theme === 'redTheme') return '/theme/redTheme/loginTitle.png' if (theme === 'redTheme') return '/theme/redTheme/loginTitle.png'
return '/theme/default/loginTitle.png' return '/theme/default/loginTitle.png'