🎨 统一后台分页与设置页布局
This commit is contained in:
1 parent
a66a0b6a77
commit
f7108f5b44
5 files changed
+58
-58
No files matched your search
@@ -707,7 +707,7 @@
|
||||
:current-page="historyPage"
|
||||
:page-size="historyPageSize"
|
||||
:total="historyRows.length"
|
||||
:page-size-options="[5, 10, 20, 50]"
|
||||
:page-size-options="[5, 10, 20, 50, 100]"
|
||||
@page-change="historyPage = $event"
|
||||
@page-size-change="handleHistoryPageSizeChange"
|
||||
/>
|
||||
|
||||
@@ -31,59 +31,50 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="p-6">
|
||||
<div
|
||||
class="sticky top-0 z-20 -mx-6 -mt-6 mb-6 border-b px-6 py-4 backdrop-blur"
|
||||
:class="[isDarkMode ? 'border-gray-700 bg-gray-900/85' : 'border-gray-200 bg-gray-50/90']"
|
||||
class="mb-6 flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between"
|
||||
>
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div>
|
||||
<h2 class="text-2xl font-bold" :class="[isDarkMode ? 'text-white' : 'text-gray-800']">
|
||||
{{ t('admin.settings.title') }}
|
||||
</h2>
|
||||
<p
|
||||
class="mt-1 text-sm"
|
||||
:class="[isDirty ? 'text-amber-500' : isDarkMode ? 'text-gray-400' : 'text-gray-500']"
|
||||
>
|
||||
{{
|
||||
isDirty ? t('manage.settings.unsavedChanges') : t('manage.settings.allChangesSaved')
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-2xl font-bold" :class="[isDarkMode ? 'text-white' : 'text-[#2d4650]']">
|
||||
{{ t('admin.settings.title') }}
|
||||
</h2>
|
||||
<p
|
||||
class="mt-1 text-sm"
|
||||
:class="[isDirty ? 'text-amber-500' : isDarkMode ? 'text-gray-400' : 'text-[#586f75]']"
|
||||
>
|
||||
{{ isDirty ? t('manage.settings.unsavedChanges') : t('manage.settings.allChangesSaved') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<BaseButton
|
||||
variant="secondary"
|
||||
:loading="isRefreshing"
|
||||
:disabled="isSaving || isDirty"
|
||||
:title="
|
||||
isDirty ? t('manage.settings.refreshBlocked') : t('manage.settings.refreshConfig')
|
||||
"
|
||||
@click="refreshConfig"
|
||||
>
|
||||
<template #icon>
|
||||
<RefreshCwIcon class="mr-2 h-4 w-4" />
|
||||
</template>
|
||||
{{
|
||||
isRefreshing ? t('manage.settings.refreshing') : t('manage.settings.refreshConfig')
|
||||
}}
|
||||
</BaseButton>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<BaseButton
|
||||
variant="secondary"
|
||||
:loading="isRefreshing"
|
||||
:disabled="isSaving || isDirty"
|
||||
:title="isDirty ? t('manage.settings.refreshBlocked') : t('manage.settings.refreshConfig')"
|
||||
@click="refreshConfig"
|
||||
>
|
||||
<template #icon>
|
||||
<RefreshCwIcon class="mr-2 h-4 w-4" />
|
||||
</template>
|
||||
{{ isRefreshing ? t('manage.settings.refreshing') : t('manage.settings.refreshConfig') }}
|
||||
</BaseButton>
|
||||
|
||||
<BaseButton
|
||||
:loading="isSaving"
|
||||
:disabled="!isDirty || isRefreshing"
|
||||
@click="submitConfig"
|
||||
>
|
||||
<template #icon>
|
||||
<SaveIcon class="mr-2 h-4 w-4" />
|
||||
</template>
|
||||
{{ isSaving ? t('manage.settings.saving') : t('manage.settings.saveChanges') }}
|
||||
</BaseButton>
|
||||
</div>
|
||||
<BaseButton :loading="isSaving" :disabled="!isDirty || isRefreshing" @click="submitConfig">
|
||||
<template #icon>
|
||||
<SaveIcon class="mr-2 h-4 w-4" />
|
||||
</template>
|
||||
{{ isSaving ? t('manage.settings.saving') : t('manage.settings.saveChanges') }}
|
||||
</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="space-y-6 rounded-lg shadow-md p-6"
|
||||
:class="[isDarkMode ? 'bg-gray-800 bg-opacity-70' : 'bg-white']"
|
||||
class="theme-2026-card theme-2026-card-hover space-y-8 rounded-[30px] border p-6 shadow-md transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg"
|
||||
:class="[
|
||||
isDarkMode
|
||||
? 'border-[#40545c] bg-[#202f36]/90 hover:border-[#7199a8] hover:bg-[#263941] hover:shadow-black/25'
|
||||
: 'border-[#d7e3e5] bg-[#f8fbfb] hover:border-[#8fb2bf] hover:shadow-[#a9bdc2]/70'
|
||||
]"
|
||||
>
|
||||
<!-- 基本设置 -->
|
||||
<section class="space-y-4">
|
||||
@@ -714,4 +705,10 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
:deep(input:not([type='checkbox'])),
|
||||
:deep(select),
|
||||
:deep(textarea) {
|
||||
border-radius: 30px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user