feat: 优化响应式布局,使用 CSS 支持的单位调整屏幕高度和宽度
This commit is contained in:
12
src/App.vue
12
src/App.vue
@ -27,10 +27,14 @@ const themeConfig = computed(() => {
|
|||||||
.layout-wrapper {
|
.layout-wrapper {
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
}
|
}
|
||||||
.w-screen {
|
@supports (height: 100dvh) {
|
||||||
width: 100dvw;
|
.h-screen {
|
||||||
|
height: 100dvh;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.h-screen {
|
@supports (width: 100dvw) {
|
||||||
height: 100dvh;
|
.w-screen {
|
||||||
|
width: 100dvw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="p-4" style="height: 100dvh; width: 100dvw">
|
<div class="p-4 h-screen w-screen">
|
||||||
<PatternBackground
|
<PatternBackground
|
||||||
:animate="true"
|
:animate="true"
|
||||||
:direction="PATTERN_BACKGROUND_DIRECTION.TopRight"
|
:direction="PATTERN_BACKGROUND_DIRECTION.TopRight"
|
||||||
|
Reference in New Issue
Block a user