mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-06-08 16:27:58 +08:00
fix: 全屏切换
This commit is contained in:
parent
95dc31329d
commit
a16cbff049
@ -356,17 +356,19 @@ function handleScreenSetting<T extends number | boolean>(
|
|||||||
const beforeIsMobile = isMobile;
|
const beforeIsMobile = isMobile;
|
||||||
// 全屏
|
// 全屏
|
||||||
triggerFullscreen(n as boolean).then(() => {
|
triggerFullscreen(n as boolean).then(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
if (beforeIsMobile) {
|
if (beforeIsMobile) {
|
||||||
mainSetting.setValue(
|
mainSetting.setValue(
|
||||||
'screen.fontSize',
|
'screen.fontSize',
|
||||||
Math.floor((fontSize * 2) / 3)
|
Math.floor((fontSize * 2) / 3)
|
||||||
);
|
);
|
||||||
} else if (isMobile) {
|
} else if (matchMedia('(max-width: 600px)').matches) {
|
||||||
mainSetting.setValue(
|
mainSetting.setValue(
|
||||||
'screen.fontSize',
|
'screen.fontSize',
|
||||||
Math.floor((fontSize * 3) / 2)
|
Math.floor((fontSize * 3) / 2)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
} else if (key === 'heroDetail') {
|
} else if (key === 'heroDetail') {
|
||||||
// 勇士显伤
|
// 勇士显伤
|
||||||
|
Loading…
Reference in New Issue
Block a user