feat: 最终优化收尾
- Settings 添加加载骨架屏 - 添加 humans.txt - 批量操作UI完善 - 代码质量检查(无遗留TODO/FIXME)
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
/* TEAM */
|
||||||
|
Developer: Hermes Agent (Nous Research)
|
||||||
|
Maintainer: chenhaodong
|
||||||
|
Site: 言逍导航
|
||||||
|
|
||||||
|
/* SITE */
|
||||||
|
Language: zh-CN
|
||||||
|
Last update: 2026-07-14
|
||||||
|
|
||||||
|
/* THANKS */
|
||||||
|
Vue.js, Element Plus, Express, MySQL, Docker
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="settings-page">
|
<div class="settings-page">
|
||||||
<div class="page-header"><h2>站点配置</h2></div>
|
<div class="page-header"><h2>站点配置</h2></div>
|
||||||
|
<div v-if="loading" class="loading-wrap"><el-skeleton :rows="6" animated /></div>
|
||||||
<el-card>
|
<el-card v-else>
|
||||||
<el-form :model="settings" :label-width="isMobile ? '80px' : '120px'" :label-position="isMobile ? 'top' : 'left'">
|
<el-form :model="settings" :label-width="isMobile ? '80px' : '120px'" :label-position="isMobile ? 'top' : 'left'">
|
||||||
<el-form-item label="站点名称">
|
<el-form-item label="站点名称">
|
||||||
<el-input v-model="settings.site_name" />
|
<el-input v-model="settings.site_name" />
|
||||||
@@ -43,9 +43,14 @@ const settings = ref({
|
|||||||
footer_text: '',
|
footer_text: '',
|
||||||
})
|
})
|
||||||
const isMobile = ref(window.innerWidth < 768)
|
const isMobile = ref(window.innerWidth < 768)
|
||||||
|
const loading = ref(true)
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
try {
|
||||||
Object.assign(settings.value, (await adminApi.getSettings()).result.data)
|
Object.assign(settings.value, (await adminApi.getSettings()).result.data)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
window.addEventListener('resize', () => { isMobile.value = window.innerWidth < 768 })
|
window.addEventListener('resize', () => { isMobile.value = window.innerWidth < 768 })
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -58,4 +63,5 @@ async function save() {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.page-header { margin-bottom: 20px; }
|
.page-header { margin-bottom: 20px; }
|
||||||
.page-header h2 { font-size: 20px; font-weight: 600; }
|
.page-header h2 { font-size: 20px; font-weight: 600; }
|
||||||
|
.loading-wrap { padding: 20px; }
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user