Explorar el Código

fix: 修复登录成功后水印没有按预期刷新的问题

许俊杰 hace 3 años
padre
commit
f6ff6238ef
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Web/src/stores/userInfo.ts

+ 2 - 1
Web/src/stores/userInfo.ts

@@ -64,7 +64,8 @@ export const useUserInfo = defineStore('userInfo', {
 
 						// storesThemeConfig.themeConfig.watermarkText = d.account;
 						storesThemeConfig.themeConfig.isWatermark = configData.watermarkEnabled;
-						Watermark.set(storesThemeConfig.themeConfig.watermarkText);
+						if (storesThemeConfig.themeConfig.isWatermark) Watermark.set(storesThemeConfig.themeConfig.watermarkText);
+						else Watermark.del();
 
 						Local.remove('themeConfig');
 						Local.set('themeConfig', storesThemeConfig.themeConfig);