Commit d466629237dcdc8eadff60f0d7d27ccb1d1ce3e3

Authored by ww
1 parent 622f9c52

fix: 修复平台定制背景图未撑满屏幕

@@ -21,7 +21,7 @@ export const getVideoTypeByUrl = (url: string) => { @@ -21,7 +21,7 @@ export const getVideoTypeByUrl = (url: string) => {
21 const type = VideoPlayerType[ext]; 21 const type = VideoPlayerType[ext];
22 return type ? type : VideoPlayerType.webm; 22 return type ? type : VideoPlayerType.webm;
23 } catch (error) { 23 } catch (error) {
24 - console.error(error); 24 + console.error(`url: '${url}' is invalid!`);
25 return VideoPlayerType.webm; 25 return VideoPlayerType.webm;
26 } 26 }
27 }; 27 };
@@ -68,16 +68,17 @@ export const usePlatform = async () => { @@ -68,16 +68,17 @@ export const usePlatform = async () => {
68 .vben-login::before{ 68 .vben-login::before{
69 background-image:url("${background || lightThemeBgImage}"); 69 background-image:url("${background || lightThemeBgImage}");
70 position:absolute; 70 position:absolute;
  71 + background-size: ${background ? '100%' : 'auto'} 100% !important;
71 margin-left: ${background ? 0 : '-48%'} !important; 72 margin-left: ${background ? 0 : '-48%'} !important;
72 } 73 }
73 html[data-theme='dark'] .vben-login::before{ 74 html[data-theme='dark'] .vben-login::before{
74 background-image:url("${background || darkThemeBgImage}"); 75 background-image:url("${background || darkThemeBgImage}");
75 position:absolute; 76 position:absolute;
  77 + background-size: ${background ? '100%' : 'auto'} 100% !important;
76 margin-left: ${background ? 0 : '-48%'} !important; 78 margin-left: ${background ? 0 : '-48%'} !important;
77 } 79 }
78 `; 80 `;
79 81
80 - console.log(styleEl);  
81 document.head.appendChild(styleEl); 82 document.head.appendChild(styleEl);
82 }; 83 };
83 84