관리자 목록 more vert 메뉴 통일 및 태그 메뉴 정렬 수정

AdminRowMoreMenu 공통 컴포넌트로 글·태그·페이지·미디어·네비게이션 행 액션을 ⋮ 팝오버로 통일.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 14:14:28 +09:00
parent 797a6dd5a0
commit 02d33996c5
10 changed files with 540 additions and 106 deletions

View File

@@ -6,6 +6,8 @@ definePageMeta({
const deletingId = ref('')
const errorMessage = ref('')
const { openMenuId, closeMenu } = useAdminRowMenu()
const { data: pages, refresh } = await useFetch('/admin/api/pages', {
default: () => []
})
@@ -34,6 +36,8 @@ const formatDate = (value) => {
* @returns {Promise<void>} 삭제 처리 결과
*/
const deletePage = async (page) => {
closeMenu()
if (!confirm(`"${page.title}" 페이지를 삭제할까요?`)) {
return
}
@@ -74,13 +78,15 @@ const deletePage = async (page) => {
{{ errorMessage }}
</p>
<div class="admin-pages__table mt-8 overflow-hidden border border-line">
<div class="admin-pages__table mt-8 overflow-x-auto border border-line">
<table class="admin-pages__table-inner w-full border-collapse text-left text-sm">
<thead class="admin-pages__table-head bg-[#f5f5f2] text-xs uppercase text-muted">
<tr>
<th class="admin-pages__cell px-4 py-3">제목</th>
<th class="admin-pages__cell px-4 py-3">수정일</th>
<th class="admin-pages__cell px-4 py-3">관리</th>
<th class="admin-pages__cell admin-pages__cell-actions w-12 px-2 py-3 text-right">
<span class="sr-only">관리</span>
</th>
</tr>
</thead>
<tbody class="admin-pages__table-body divide-y divide-line bg-white">
@@ -96,15 +102,31 @@ const deletePage = async (page) => {
<td class="admin-pages__cell px-4 py-4">
{{ formatDate(page.updatedAt) }}
</td>
<td class="admin-pages__cell px-4 py-4">
<button
class="admin-pages__delete rounded border border-red-200 px-3 py-1.5 text-xs font-semibold text-red-700 disabled:opacity-50"
type="button"
:disabled="deletingId === page.id"
@click="deletePage(page)"
<td class="admin-pages__cell admin-pages__cell-actions relative w-12 px-2 py-4 text-right">
<AdminRowMoreMenu
v-model:open-menu-id="openMenuId"
:item-id="page.id"
menu-label="페이지 메뉴"
:busy="deletingId === page.id"
>
{{ deletingId === page.id ? '삭제 중' : '삭제' }}
</button>
<NuxtLink
class="admin-row-more-menu__item"
:to="`/admin/pages/${page.id}`"
role="menuitem"
@click="closeMenu"
>
페이지 수정
</NuxtLink>
<button
class="admin-row-more-menu__item admin-row-more-menu__item--danger"
type="button"
role="menuitem"
:disabled="deletingId === page.id"
@click="deletePage(page)"
>
페이지 삭제
</button>
</AdminRowMoreMenu>
</td>
</tr>
</tbody>