修改手机端网页样式

This commit is contained in:
whyour committed 2023-04-06 21:49:42 +08:00
1 parent 1d2df860e8
commit 59c26d90d3
5 files changed
+14 -9

No files matched your search

+2
View File
@@ -14,11 +14,13 @@ export const useCtx = () => {
setMarginLeft(0);
setMarginTop(0);
setIsPhone(true);
document.body.setAttribute('data-mode', 'phone');
} else {
setWidth('100%');
setMarginLeft(0);
setMarginTop(-72);
setIsPhone(false);
document.body.setAttribute('data-mode', 'desktop');
}
}, []);