✨ feat: 重构管理后台并增强组件系统与回收站功能
* 新增自适应数值与窗口分析工具,提升交互体验 * 优化回收站模块逻辑,增加展示与选择功能 * 引入 Macaron 主题配置文件并更新 Tailwind 配置 * 精简基础组件代码,移除冗余样式与设置项 * 完善测试用例,覆盖 UI 系统与回收站工作流 * 更新多语言配置,支持功能变更后的文案需求
This commit is contained in:
1 parent
614b9a2104
commit
9b22534e2b
61 files changed
+1624
-832
No files matched your search
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<nav
|
||||
class="mt-4 flex flex-col gap-3 border-t px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-6"
|
||||
:class="[isDarkMode ? 'border-[#31454d]' : 'border-[#c8d7da]']"
|
||||
class="fcb-pagination mt-3 flex flex-col gap-2 border-t px-3 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-6"
|
||||
:class="[isDarkMode ? 'border-[#495765]' : 'border-[#c8d7da]']"
|
||||
:aria-label="t('components.pagination.navigation')"
|
||||
>
|
||||
<div class="text-sm" :class="[isDarkMode ? 'text-gray-300' : 'text-gray-600']">
|
||||
<div class="text-xs sm:text-sm" :class="[isDarkMode ? 'text-gray-300' : 'text-gray-600']">
|
||||
{{ t('components.pagination.range', { start: rangeStart, end: rangeEnd, total }) }}
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 sm:flex sm:flex-wrap">
|
||||
<div class="fcb-pagination-controls grid grid-cols-[minmax(0,1fr)_auto_auto_auto] items-center gap-2 sm:flex sm:flex-wrap">
|
||||
<select
|
||||
:value="pageSize"
|
||||
class="col-span-3 min-h-11 rounded-[30px] border px-3 text-sm shadow-sm transition-colors sm:col-auto lg:min-h-9"
|
||||
class="fcb-page-size min-h-9 rounded-2xl border px-3 text-sm shadow-sm transition-colors lg:min-h-9"
|
||||
:class="[
|
||||
isDarkMode
|
||||
? 'border-[#40545c] bg-[#263941] text-[#d8e3e5] hover:border-[#7199a8]'
|
||||
? 'border-[#495765] bg-[#2c3440] text-[#d8e3e5] hover:border-[#7199a8]'
|
||||
: 'border-[#c8d8dc] bg-[#edf4f5] text-[#415d66] hover:border-[#9db6bd]'
|
||||
]"
|
||||
:aria-label="t('components.pagination.pageSize')"
|
||||
@@ -28,15 +28,15 @@
|
||||
<button
|
||||
type="button"
|
||||
:disabled="currentPage === 1"
|
||||
class="inline-flex min-h-11 items-center justify-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md lg:min-h-9"
|
||||
class="fcb-action fcb-page-nav inline-flex min-h-11 items-center justify-center rounded-2xl px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md lg:min-h-9"
|
||||
:class="buttonClass(currentPage === 1)"
|
||||
@click="$emit('page-change', currentPage - 1)"
|
||||
>
|
||||
<ChevronLeftIcon class="h-4 w-4" aria-hidden="true" />
|
||||
<span class="max-[359px]:sr-only">{{ t('common.previous') }}</span>
|
||||
<span class="sr-only sm:not-sr-only">{{ t('common.previous') }}</span>
|
||||
</button>
|
||||
|
||||
<span class="text-center text-sm font-medium sm:hidden" :class="[isDarkMode ? 'text-gray-200' : 'text-gray-700']">
|
||||
<span class="fcb-page-counter text-center text-sm font-medium tabular-nums sm:hidden" :class="[isDarkMode ? 'text-gray-200' : 'text-gray-700']">
|
||||
{{ currentPage }} / {{ totalPages }}
|
||||
</span>
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
<button
|
||||
v-if="pageNum !== '...'"
|
||||
type="button"
|
||||
class="inline-flex min-h-11 min-w-11 items-center justify-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md lg:min-h-9 lg:min-w-9"
|
||||
class="fcb-action inline-flex min-h-11 min-w-11 items-center justify-center rounded-2xl px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md lg:min-h-9 lg:min-w-9"
|
||||
:class="[
|
||||
currentPage === pageNum
|
||||
? 'bg-[#5f8796] text-white shadow-[#9fb8bf]/35'
|
||||
: isDarkMode
|
||||
? 'bg-[#263941] text-[#d8e3e5] hover:bg-[#2d4751]'
|
||||
? 'bg-[#2c3440] text-[#d8e3e5] hover:bg-[#384452]'
|
||||
: 'bg-[#edf4f5] text-[#415d66] hover:bg-[#e2ecee]'
|
||||
]"
|
||||
:aria-label="t('components.pagination.goToPage', { page: pageNum })"
|
||||
@@ -66,11 +66,11 @@
|
||||
<button
|
||||
type="button"
|
||||
:disabled="currentPage >= totalPages"
|
||||
class="inline-flex min-h-11 items-center justify-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md lg:min-h-9"
|
||||
class="fcb-action fcb-page-nav inline-flex min-h-11 items-center justify-center rounded-2xl px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md lg:min-h-9"
|
||||
:class="buttonClass(currentPage >= totalPages)"
|
||||
@click="$emit('page-change', currentPage + 1)"
|
||||
>
|
||||
<span class="max-[359px]:sr-only">{{ t('common.next') }}</span>
|
||||
<span class="sr-only sm:not-sr-only">{{ t('common.next') }}</span>
|
||||
<ChevronRightIcon class="h-4 w-4" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
@@ -121,7 +121,7 @@ const buttonClass = (disabled: boolean) => {
|
||||
if (isDarkMode.value) {
|
||||
return disabled
|
||||
? 'cursor-not-allowed bg-[#223039] text-[#71878d]'
|
||||
: 'bg-[#263941] text-[#d8e3e5] hover:bg-[#2d4751]'
|
||||
: 'bg-[#2c3440] text-[#d8e3e5] hover:bg-[#384452]'
|
||||
}
|
||||
return disabled
|
||||
? 'cursor-not-allowed bg-[#e8eeee] text-[#7d8d91]'
|
||||
|
||||
Reference in new issue
Block a user