From e58a6e85ac57576081bfeef9a48a15640a2f66cb Mon Sep 17 00:00:00 2001 From: xzt <1113240624@qq.com> Date: Tue, 17 Dec 2024 19:13:17 +0800 Subject: [PATCH] =?UTF-8?q?navbar=E5=85=BC=E5=AE=B9=E6=94=BE=E5=A4=A7?= =?UTF-8?q?=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/styles/sidebar.scss | 24 ++++++++++++++++ .../src/layout/components/Navbar.vue | 28 +++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/jwtech-admin-page/src/assets/styles/sidebar.scss b/jwtech-admin-page/src/assets/styles/sidebar.scss index 8b2d50d0..4d67fbe4 100644 --- a/jwtech-admin-page/src/assets/styles/sidebar.scss +++ b/jwtech-admin-page/src/assets/styles/sidebar.scss @@ -261,3 +261,27 @@ } } } + +// 放大110% +@media screen and (-webkit-min-device-pixel-ratio: 1.1) { + .sidebar-container { + top: calc(56px * 0.9091) !important; + height: calc(100% - calc(56px * 0.9091)) !important; + } +} + +// 放大125% +@media screen and (-webkit-min-device-pixel-ratio: 1.25) { + .sidebar-container { + top: calc(56px * 0.8) !important; + height: calc(100% - calc(56px * 0.8)) !important; + } +} + +// 放大150% +@media screen and (-webkit-min-device-pixel-ratio: 1.50) { + .sidebar-container { + top: calc(56px * 0.66667) !important; + height: calc(100% - calc(56px * 0.66667)) !important; + } +} \ No newline at end of file diff --git a/jwtech-admin-page/src/layout/components/Navbar.vue b/jwtech-admin-page/src/layout/components/Navbar.vue index 8714a3ef..d25d08fe 100644 --- a/jwtech-admin-page/src/layout/components/Navbar.vue +++ b/jwtech-admin-page/src/layout/components/Navbar.vue @@ -380,6 +380,7 @@ export default { } } } + .hid { width: 150px; text-overflow: ellipsis; @@ -398,4 +399,31 @@ export default { -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } + +// 放大110% +@media screen and (-webkit-min-device-pixel-ratio: 1.1) { + .navbar { + transform: scale(0.9091); /* 将内容缩小到80% */ + transform-origin: top left; /* 设置缩放的原点为左上角 */ + width: 110%; /* 由于缩放,可能需要调整宽度以避免内容被裁剪 */ + } +} + +// 放大125% +@media screen and (-webkit-min-device-pixel-ratio: 1.25) { + .navbar { + transform: scale(0.8); /* 将内容缩小到80% */ + transform-origin: top left; /* 设置缩放的原点为左上角 */ + width: 125%; /* 由于缩放,可能需要调整宽度以避免内容被裁剪 */ + } +} + +// 放大150% +@media screen and (-webkit-min-device-pixel-ratio: 1.50) { + .navbar { + transform: scale(0.66667); /* 将内容缩小到80% */ + transform-origin: top left; /* 设置缩放的原点为左上角 */ + width: 150%; /* 由于缩放,可能需要调整宽度以避免内容被裁剪 */ + } +}