mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +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;
|
||||
// 全屏
|
||||
triggerFullscreen(n as boolean).then(() => {
|
||||
if (beforeIsMobile) {
|
||||
mainSetting.setValue(
|
||||
'screen.fontSize',
|
||||
Math.floor((fontSize * 2) / 3)
|
||||
);
|
||||
} else if (isMobile) {
|
||||
mainSetting.setValue(
|
||||
'screen.fontSize',
|
||||
Math.floor((fontSize * 3) / 2)
|
||||
);
|
||||
}
|
||||
requestAnimationFrame(() => {
|
||||
if (beforeIsMobile) {
|
||||
mainSetting.setValue(
|
||||
'screen.fontSize',
|
||||
Math.floor((fontSize * 2) / 3)
|
||||
);
|
||||
} else if (matchMedia('(max-width: 600px)').matches) {
|
||||
mainSetting.setValue(
|
||||
'screen.fontSize',
|
||||
Math.floor((fontSize * 3) / 2)
|
||||
);
|
||||
}
|
||||
})
|
||||
});
|
||||
} else if (key === 'heroDetail') {
|
||||
// 勇士显伤
|
||||
|
Loading…
Reference in New Issue
Block a user