chore: init mask theme

main
jialin 11 months ago
parent ac03a93c64
commit 17ec70f839

@ -37,6 +37,15 @@ const DarkModeMask = () => {
const maskRef = useRef<HTMLDivElement>(null);
const timerRef = useRef<any>(null);
const initTheme = () => {
const html = document.querySelector('html');
if (html) {
html.setAttribute('data-theme', savedTheme);
}
};
initTheme();
useEffect(() => {
if (savedTheme === 'realDark') {
setVisible(true);

@ -431,7 +431,7 @@ export default (props: any) => {
...themeData
}}
>
<DarkMask theme={userSettings.theme}></DarkMask>
<DarkMask></DarkMask>
<ProLayout
route={route}
location={location}

Loading…
Cancel
Save