From 10bddda9ef86dafb711c1a510c5e8b0b3f936b6a Mon Sep 17 00:00:00 2001 From: Agent Date: Tue, 14 Jul 2026 20:55:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E7=AB=99=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E9=80=82=E9=85=8D=20-=20AdminLayout:=20=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=8A=BD=E5=B1=89?= =?UTF-8?q?=E5=BC=8F=E6=8A=98=E5=8F=A0=EF=BC=88=E6=B1=89=E5=A0=A1=E8=8F=9C?= =?UTF-8?q?=E5=8D=95+=E9=81=AE=E7=BD=A9=EF=BC=89=20-=20Dashboard:=20?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8D=A1=E7=89=87/=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=93=8D=E5=BA=94=E5=BC=8F=E5=B8=83=E5=B1=80?= =?UTF-8?q?=EF=BC=882=E5=88=97=E2=86=921=E5=88=97=EF=BC=89=20-=20Links:=20?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E5=9E=82=E7=9B=B4=E5=A0=86?= =?UTF-8?q?=E5=8F=A0=EF=BC=8C=E8=A1=A8=E6=A0=BC=E6=A8=AA=E5=90=91=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=EF=BC=8C=E5=BC=B9=E7=AA=97=E8=87=AA=E9=80=82=E5=BA=94?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6=20-=20Categories:=20=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=A8=AA=E5=90=91=E6=BB=9A=E5=8A=A8=EF=BC=8C=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=20-=20Settings:=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=A0=87=E7=AD=BE=E5=93=8D=E5=BA=94=E5=BC=8F=EF=BC=88?= =?UTF-8?q?=E5=B0=8F=E5=B1=8F=E6=8D=A2=E8=A1=8C=EF=BC=89=20-=20Login:=20?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=8D=A1=E7=89=87=E8=87=AA=E9=80=82=E5=BA=94?= =?UTF-8?q?=E8=BE=B9=E8=B7=9D=20-=20Home:=20=E6=90=9C=E7=B4=A2=E6=A1=86?= =?UTF-8?q?=E5=85=A8=E5=AE=BD=EF=BC=8C=E7=BD=91=E5=9D=80=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E7=BC=A9=E7=AA=84=EF=BC=8C=E5=AF=BC=E8=88=AA=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Home.vue | 25 +++++ frontend/src/views/admin/AdminLayout.vue | 137 ++++++++++++++++++++--- frontend/src/views/admin/Categories.vue | 38 ++++--- frontend/src/views/admin/Dashboard.vue | 56 +++++---- frontend/src/views/admin/Links.vue | 68 ++++++----- frontend/src/views/admin/Login.vue | 10 +- frontend/src/views/admin/Settings.vue | 6 +- 7 files changed, 254 insertions(+), 86 deletions(-) diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index 53fc0df..e369f09 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -164,6 +164,7 @@ loadData() border: 1px solid #6366f1; border-radius: 8px; transition: all 0.2s; + white-space: nowrap; &:hover { background: #6366f1; color: white; @@ -251,4 +252,28 @@ loadData() color: #aaa; font-size: 13px; } + +@media (max-width: 767px) { + .header { + .header-content { + padding: 16px; + flex-wrap: wrap; + gap: 12px; + } + .brand { + .logo { font-size: 22px; } + .desc { display: none; } + } + .search-box { width: 100%; order: 10; } + .admin-link { + padding: 6px 12px; + font-size: 13px; + } + } + .main-content { padding: 16px; } + .links-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; } + .link-card { padding: 12px; } + .category-header .name { font-size: 16px; } + .category-section { margin-bottom: 24px; } +} diff --git a/frontend/src/views/admin/AdminLayout.vue b/frontend/src/views/admin/AdminLayout.vue index f976e61..afadbde 100644 --- a/frontend/src/views/admin/AdminLayout.vue +++ b/frontend/src/views/admin/AdminLayout.vue @@ -1,7 +1,13 @@ +.header-left { + display: flex; + align-items: center; + gap: 12px; +} +.menu-btn { + width: 36px; + height: 36px; + background: none; + border: 1px solid #ddd; + border-radius: 8px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; +} +.hamburger { + display: block; + width: 18px; + height: 2px; + background: #555; + position: relative; +} +.hamburger::before, +.hamburger::after { + content: ''; + display: block; + width: 18px; + height: 2px; + background: #555; + position: absolute; + left: 0; +} +.hamburger::before { top: -6px; } +.hamburger::after { top: 6px; } +.user-area { display: flex; align-items: center; gap: 12px; flex-shrink: 0; } +.nickname { color: #555; font-weight: 500; white-space: nowrap; } +.el-main { background: #f5f7fa; padding: 24px; overflow-y: auto; flex: 1; } + +@media (max-width: 767px) { + .sidebar { + position: fixed; + top: 0; + left: 0; + height: 100vh; + z-index: 100; + width: 200px !important; + transform: translateX(-100%); + transition: transform 0.3s; + } + .sidebar:not([style*="width: 0"]) { + transform: translateX(0); + } + .sidebar[style*="width: 0"] { + transform: translateX(-100%); + } + .sidebar-overlay { + display: block; + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: rgba(0,0,0,0.4); + z-index: 99; + } + .admin-header { flex-wrap: wrap; gap: 8px; } + .el-main { padding: 16px; } +} + \ No newline at end of file diff --git a/frontend/src/views/admin/Categories.vue b/frontend/src/views/admin/Categories.vue index d457246..50ebbd6 100644 --- a/frontend/src/views/admin/Categories.vue +++ b/frontend/src/views/admin/Categories.vue @@ -3,25 +3,27 @@ - - - - - - - - +
+ + + + + + + + +
- + @@ -42,7 +44,7 @@