From 454e05e82d90975a9920fe57b754417c13c9ca48 Mon Sep 17 00:00:00 2001 From: Agent Date: Tue, 14 Jul 2026 21:22:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B9=E7=9B=AE=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?-=20=E6=B7=BB=E5=8A=A0=20SVG=20favicon=20=E5=93=81=E7=89=8C?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=20+=20SEO=20meta=20=E6=A0=87=E7=AD=BE=20-=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20404=20=E9=94=99=E8=AF=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20+=20=E8=B7=AF=E7=94=B1=E5=85=9C=E5=BA=95=20-=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=A1=B5=E9=9D=A2=E5=88=87=E6=8D=A2=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E8=BF=87=E6=B8=A1=20-=20Links/Categories=20=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E6=B7=BB=E5=8A=A0=E5=8A=A0=E8=BD=BD=E9=AA=A8=E6=9E=B6?= =?UTF-8?q?=E5=B1=8F=20-=20Links=20=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E9=A2=84=E8=A7=88=E5=88=97=20-=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=89=8D=E7=AB=AF=20index.html=20=E5=85=83=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 6 ++++- frontend/public/favicon.svg | 4 +++ frontend/src/App.vue | 15 +++++++++-- frontend/src/router/index.ts | 17 ++++++++----- frontend/src/views/NotFound.vue | 31 ++++++++++++++++++++++ frontend/src/views/admin/Categories.vue | 14 ++++++++-- frontend/src/views/admin/Links.vue | 34 ++++++++++++++++++++++--- 7 files changed, 105 insertions(+), 16 deletions(-) create mode 100644 frontend/public/favicon.svg create mode 100644 frontend/src/views/NotFound.vue diff --git a/frontend/index.html b/frontend/index.html index 0a57cb9..b3d417a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,10 +3,14 @@ + + + + 言逍导航
- + \ No newline at end of file diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg new file mode 100644 index 0000000..356aa47 --- /dev/null +++ b/frontend/public/favicon.svg @@ -0,0 +1,4 @@ + + + Y + diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 6dd241c..72c8513 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,5 +1,16 @@ - + \ No newline at end of file diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 31dea0e..f0fdbbb 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -1,5 +1,6 @@ import { createRouter, createWebHashHistory } from 'vue-router' import Home from '@/views/Home.vue' +import NotFound from '@/views/NotFound.vue' import AdminLayout from '@/views/admin/AdminLayout.vue' import AdminDashboard from '@/views/admin/Dashboard.vue' import AdminLinks from '@/views/admin/Links.vue' @@ -10,19 +11,21 @@ import AdminLogin from '@/views/admin/Login.vue' const router = createRouter({ history: createWebHashHistory(), routes: [ - { path: '/', name: 'home', component: Home }, - { path: '/admin/login', name: 'login', component: AdminLogin }, + { path: '/', name: 'home', component: Home, meta: { transition: 'fade' } }, + { path: '/admin/login', name: 'login', component: AdminLogin, meta: { transition: 'fade' } }, { path: '/admin', component: AdminLayout, redirect: '/admin/dashboard', + meta: { transition: 'fade' }, children: [ - { path: 'dashboard', name: 'dashboard', component: AdminDashboard }, - { path: 'links', name: 'links', component: AdminLinks }, - { path: 'categories', name: 'categories', component: AdminCategories }, - { path: 'settings', name: 'settings', component: AdminSettings }, + { path: 'dashboard', name: 'dashboard', component: AdminDashboard, meta: { transition: 'slide' } }, + { path: 'links', name: 'links', component: AdminLinks, meta: { transition: 'slide' } }, + { path: 'categories', name: 'categories', component: AdminCategories, meta: { transition: 'slide' } }, + { path: 'settings', name: 'settings', component: AdminSettings, meta: { transition: 'slide' } }, ], }, + { path: '/:pathMatch(.*)*', name: 'not-found', component: NotFound }, ], }) @@ -37,4 +40,4 @@ router.beforeEach((to, _from, next) => { } }) -export default router +export default router \ No newline at end of file diff --git a/frontend/src/views/NotFound.vue b/frontend/src/views/NotFound.vue new file mode 100644 index 0000000..777408e --- /dev/null +++ b/frontend/src/views/NotFound.vue @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/frontend/src/views/admin/Categories.vue b/frontend/src/views/admin/Categories.vue index 50ebbd6..e092ea8 100644 --- a/frontend/src/views/admin/Categories.vue +++ b/frontend/src/views/admin/Categories.vue @@ -8,7 +8,10 @@ -
+
+ +
+
@@ -50,13 +53,19 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { adminApi } from '@/api' const categories = ref([]) +const loading = ref(true) const dialogVisible = ref(false) const editId = ref(null) const form = ref({ icon: '🔗', name: '', sort: 0 }) const dialogWidth = computed(() => window.innerWidth < 500 ? '92%' : '420px') async function load() { - categories.value = (await adminApi.getCategories()).result.data + loading.value = true + try { + categories.value = (await adminApi.getCategories()).result.data + } finally { + loading.value = false + } } function openDialog(row?: any) { @@ -91,6 +100,7 @@ onMounted(load) .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .page-header h2 { font-size: 20px; font-weight: 600; } .table-wrap { overflow-x: auto; } +.loading-wrap { padding: 20px; } @media (max-width: 767px) { .page-header h2 { font-size: 18px; } diff --git a/frontend/src/views/admin/Links.vue b/frontend/src/views/admin/Links.vue index bd1fcfd..2200dfb 100644 --- a/frontend/src/views/admin/Links.vue +++ b/frontend/src/views/admin/Links.vue @@ -19,12 +19,20 @@ -
+
+ +
+
+ + + - - + +