From 3e7e54dde48c3c802c4b19f4d34b775687fbf78f Mon Sep 17 00:00:00 2001
From: ltx <1006158920@qq.com>
Date: Tue, 21 Apr 2026 18:07:25 +0800
Subject: [PATCH] =?UTF-8?q?update:=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 6 +-
src/api/http.js | 4 +-
src/design/change.less | 24 ++
src/utils/flexible.js | 84 ++---
src/views/index.vue | 197 +++++++++++-
src/views/index/index.less | 132 ++++++--
src/views/login/login.vue | 643 ++++++++++++++++++++-----------------
7 files changed, 705 insertions(+), 385 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 4e8d2ad..3550ab3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -23,10 +23,10 @@ export default {
}
};
-
diff --git a/src/views/index/index.less b/src/views/index/index.less
index 9f97b83..0e74c88 100644
--- a/src/views/index/index.less
+++ b/src/views/index/index.less
@@ -19,7 +19,7 @@
align-items: center;
z-index: 200;
background-color: #2d8cf0;
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
+ // box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.top-logo {
@@ -49,20 +49,54 @@
display: flex;
align-items: center;
height: 100%;
- padding: 0 16px;
+ padding: 0 8px 0 16px;
gap: 6px;
- overflow-x: auto;
- overflow-y: hidden;
- // 隐藏滚动条,但保留滚动功能
- scrollbar-width: none; // Firefox
- -ms-overflow-style: none; // IE/Edge
- &::-webkit-scrollbar {
- display: none; // Chrome/Safari
- }
- // 鼠标左右拖动提示
- cursor: default;
+ overflow: hidden;
+ min-width: 0;
}
+// 测量容器(全部菜单项不可见渲染,用于获取宽度)
+.top-nav-measure {
+ position: absolute;
+ top: -9999px;
+ left: 0;
+ display: flex;
+ gap: 6px;
+ visibility: hidden;
+ pointer-events: none;
+ white-space: nowrap;
+ z-index: -1;
+}
+
+// 溢出更多按钮外层容器
+.top-nav-more-wrapper {
+ position: relative;
+ display: inline-flex;
+ align-items: center;
+ height: 100%;
+ flex-shrink: 0;
+}
+
+// ··· 按钮样式
+.top-nav-more-btn {
+ font-size: 18px;
+ font-weight: 700;
+ letter-spacing: 3px;
+ padding: 0 14px !important;
+}
+
+// 下拉面板(position 由 JS 内联样式控制)
+.top-nav-overflow-panel {
+ min-width: 160px;
+ background: #fff;
+ border-radius: 12px;
+ box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
+ padding: 5px;
+ border: 1px solid rgba(0, 0, 0, 0.06);
+}
+
+// 下拉面板视觉样式已迁移至 index.vue 全局