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