feat: 个人中心重设计 + 后台全量响应式适配
- 个人中心重设计:对齐站点黑白编辑风(极简资料区+细分隔线统计、下划线页签、 细边框卡片、克制危险区、收藏网格、评论列表),移除后台系组件与彩色渐变 - 后台响应式适配:表格页 md 以下卡片堆叠(md:hidden/hidden md:block 双模板)、 Dashboard 统计卡自适应、表单双语两列、AdminModal 移动端底部弹层、 触摸目标与间距统一,覆盖全部 9 个后台页 + 布局
This commit is contained in:
+38
-34
@@ -339,7 +339,7 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
<button
|
||||
v-if="keyword"
|
||||
@click="keyword = ''"
|
||||
class="absolute right-2.5 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100 flex items-center justify-center"
|
||||
class="absolute right-2.5 top-1/2 -translate-y-1/2 w-6 h-6 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100 flex items-center justify-center"
|
||||
aria-label="清空筛选"
|
||||
>
|
||||
<Icon name="ph:x" class="w-3.5 h-3.5" />
|
||||
@@ -458,10 +458,10 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
</td>
|
||||
<td class="px-5 py-4">
|
||||
<div class="flex items-center justify-end gap-2">
|
||||
<AdminButton size="sm" variant="secondary" @click="openEdit(w)">
|
||||
<AdminButton size="sm" variant="secondary" class="min-h-10" @click="openEdit(w)">
|
||||
<Icon name="ph:pencil-simple" class="w-3.5 h-3.5" /> 编辑
|
||||
</AdminButton>
|
||||
<AdminButton size="sm" variant="danger" @click="askDelete(w)">
|
||||
<AdminButton size="sm" variant="danger" class="min-h-10" @click="askDelete(w)">
|
||||
<Icon name="ph:trash" class="w-3.5 h-3.5" /> 删除
|
||||
</AdminButton>
|
||||
</div>
|
||||
@@ -518,7 +518,7 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
|
||||
<!-- 标题与简介 -->
|
||||
<AdminCard title="标题与简介">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
|
||||
<div class="space-y-4">
|
||||
<AdminInput v-model="form.titleZh" label="中文标题" required />
|
||||
<AdminTextarea v-model="form.descriptionZh" label="中文简介" :rows="3" />
|
||||
@@ -533,7 +533,7 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
<!-- 项目详情(中英) -->
|
||||
<AdminCard title="项目详情(中英各一组)">
|
||||
<div class="space-y-6">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
|
||||
<div class="space-y-4">
|
||||
<AdminTextarea v-model="form.overviewZh" label="中文概述(Overview)" :rows="4" />
|
||||
<AdminTextarea v-model="form.challengeZh" label="中文挑战(Challenge)" :rows="3" />
|
||||
@@ -546,7 +546,7 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
|
||||
<AdminInput v-model="form.clientZh" label="中文客户(Client)" />
|
||||
<AdminInput v-model="form.clientEn" label="English Client" />
|
||||
<AdminInput v-model="form.durationZh" label="中文周期(Duration)" placeholder="如 3 个月" />
|
||||
@@ -572,39 +572,41 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
<div
|
||||
v-for="(url, i) in form.gallery"
|
||||
:key="i"
|
||||
class="flex items-center gap-3 border border-gray-200 rounded-xl bg-white p-3"
|
||||
class="flex flex-col sm:flex-row sm:items-center gap-3 border border-gray-200 rounded-xl bg-white p-3"
|
||||
>
|
||||
<div class="flex-1 min-w-0">
|
||||
<input
|
||||
v-model="form.gallery[i]"
|
||||
type="text"
|
||||
placeholder="图片 URL(本地 /uploads/... 或 https://...)"
|
||||
class="w-full px-3 py-2 rounded-lg border border-gray-200 bg-gray-50 text-sm outline-none transition-all focus:border-black focus:bg-white"
|
||||
class="w-full px-3 py-2.5 rounded-lg border border-gray-200 bg-gray-50 text-sm outline-none transition-all focus:border-black focus:bg-white"
|
||||
/>
|
||||
<div v-if="url" class="mt-2">
|
||||
<img :src="url" alt="图集预览" class="h-24 w-auto max-w-full rounded-lg border border-gray-100 object-cover" />
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
:disabled="galleryUploading && uploadingIndex === i"
|
||||
@click="pickGalleryFile(i)"
|
||||
class="flex items-center gap-1.5 px-3 py-2 rounded-lg bg-black text-white text-xs font-semibold hover:bg-gray-800 transition-colors disabled:opacity-60 flex-shrink-0"
|
||||
>
|
||||
<Icon
|
||||
:name="galleryUploading && uploadingIndex === i ? 'ph:circle-notch' : 'ph:upload-simple'"
|
||||
:class="galleryUploading && uploadingIndex === i ? 'w-3.5 h-3.5 animate-spin' : 'w-3.5 h-3.5'"
|
||||
/>
|
||||
{{ galleryUploading && uploadingIndex === i ? '上传中…' : '上传' }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@click="removeGalleryRow(i)"
|
||||
class="w-8 h-8 rounded-lg hover:bg-red-50 text-gray-400 hover:text-red-600 flex items-center justify-center transition-colors flex-shrink-0"
|
||||
aria-label="删除该图"
|
||||
>
|
||||
<Icon name="ph:trash" class="w-4 h-4" />
|
||||
</button>
|
||||
<div class="flex items-center gap-2 sm:flex-shrink-0">
|
||||
<button
|
||||
type="button"
|
||||
:disabled="galleryUploading && uploadingIndex === i"
|
||||
@click="pickGalleryFile(i)"
|
||||
class="flex-1 sm:flex-none flex items-center justify-center gap-1.5 px-3 py-2.5 min-h-10 rounded-lg bg-black text-white text-xs font-semibold hover:bg-gray-800 transition-colors disabled:opacity-60"
|
||||
>
|
||||
<Icon
|
||||
:name="galleryUploading && uploadingIndex === i ? 'ph:circle-notch' : 'ph:upload-simple'"
|
||||
:class="galleryUploading && uploadingIndex === i ? 'w-3.5 h-3.5 animate-spin' : 'w-3.5 h-3.5'"
|
||||
/>
|
||||
{{ galleryUploading && uploadingIndex === i ? '上传中…' : '上传' }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@click="removeGalleryRow(i)"
|
||||
class="w-10 h-10 rounded-lg hover:bg-red-50 text-gray-400 hover:text-red-600 flex items-center justify-center transition-colors flex-shrink-0"
|
||||
aria-label="删除该图"
|
||||
>
|
||||
<Icon name="ph:trash" class="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="galleryError" class="text-xs text-red-600">{{ galleryError }}</p>
|
||||
</div>
|
||||
@@ -613,12 +615,14 @@ const removeGalleryRow = (i: number) => form.gallery.splice(i, 1)
|
||||
</AdminCard>
|
||||
|
||||
<!-- 提交 -->
|
||||
<div class="flex items-center justify-end gap-3">
|
||||
<p v-if="formError" class="mr-auto text-sm text-red-600">{{ formError }}</p>
|
||||
<AdminButton variant="secondary" @click="backToList">取消</AdminButton>
|
||||
<AdminButton :loading="saving" @click="save">
|
||||
{{ saving ? '保存中…' : editingId != null ? '保存修改' : '创建作品' }}
|
||||
</AdminButton>
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-end gap-3">
|
||||
<p v-if="formError" class="text-sm text-red-600 sm:mr-auto">{{ formError }}</p>
|
||||
<div class="flex items-center gap-3 w-full sm:w-auto sm:justify-end">
|
||||
<AdminButton class="flex-1 sm:flex-none" variant="secondary" @click="backToList">取消</AdminButton>
|
||||
<AdminButton class="flex-1 sm:flex-none" :loading="saving" @click="save">
|
||||
{{ saving ? '保存中…' : editingId != null ? '保存修改' : '创建作品' }}
|
||||
</AdminButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user