feat: Dashboard骨架屏+robots.txt

- Dashboard 加载骨架屏
- 添加 robots.txt
- 优化前端加载体验
This commit is contained in:
Agent
2026-07-14 23:27:09 +08:00
parent 0dfe699cee
commit d4138cd7d7
2 changed files with 26 additions and 10 deletions
+4
View File
@@ -0,0 +1,4 @@
# 言逍导航
User-agent: *
Allow: /
Sitemap: https://110.42.189.169:9110/sitemap.xml
+13 -1
View File
@@ -1,5 +1,11 @@
<template>
<div class="dashboard">
<div v-if="loading" class="dashboard-loading">
<el-skeleton :rows="2" animated />
<el-skeleton style="margin-top:24px" :rows="2" animated />
<el-skeleton style="margin-top:24px" :rows="6" animated />
</div>
<template v-else>
<el-row :gutter="[16, 16]" class="stat-cards">
<el-col :xs="12" :sm="6">
<el-card shadow="hover">
@@ -72,7 +78,8 @@
</div>
</el-card>
</div>
</template>
</template>
</div>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
@@ -82,8 +89,10 @@ import { adminApi } from '@/api'
const stats = ref({ linkCount: 0, catCount: 0, totalViews: 0 })
const settings = ref({})
const categories = ref([])
const loading = ref(true)
onMounted(async () => {
try {
const [statsRes, setRes] = await Promise.all([
adminApi.getStats(),
adminApi.getSettings()
@@ -92,6 +101,9 @@ onMounted(async () => {
stats.value = { linkCount: d.linkCount, catCount: d.categories.length, totalViews: d.totalViews }
categories.value = d.categories
settings.value = setRes.result.data
} finally {
loading.value = false
}
})
</script>