feat: 优化响应式布局,使用 CSS 支持的单位调整屏幕高度和宽度
Some checks failed
/ build-and-deploy-to-vercel (push) Successful in 2m42s
/ lint-build-and-check (push) Successful in 4m25s
/ surge (push) Successful in 2m18s
/ playwright (push) Failing after 5m2s

This commit is contained in:
严浩
2025-03-31 15:30:45 +08:00
parent 3edb7392ce
commit 12d5ee979f
2 changed files with 9 additions and 5 deletions

View File

@ -27,10 +27,14 @@ const themeConfig = computed(() => {
.layout-wrapper {
isolation: isolate;
}
.w-screen {
width: 100dvw;
@supports (height: 100dvh) {
.h-screen {
height: 100dvh;
}
}
.h-screen {
height: 100dvh;
@supports (width: 100dvw) {
.w-screen {
width: 100dvw;
}
}
</style>

View File

@ -7,7 +7,7 @@ import {
</script>
<template>
<div class="p-4" style="height: 100dvh; width: 100dvw">
<div class="p-4 h-screen w-screen">
<PatternBackground
:animate="true"
:direction="PATTERN_BACKGROUND_DIRECTION.TopRight"