fix(反馈): ①分组管理操作列加宽160px ②查询ASIN操作列补「删除」(整店全站配置清除,逐国端点) ③去重汇总编辑/删除间距(gap8) ④店铺数据记录下载文件按钮与全站编辑主色统一(btn-sm主蓝) ⑤撞款页按钮色统一蓝白(btn-primary #4f78a5);⑥全站分页统一收官: 分组管理/菜单管理/软件版本补 OldPagination(10/20/50/100)
This commit is contained in:
@@ -9,6 +9,7 @@ import { openAdminConfirm } from '@/components/admin-confirm'
|
||||
import { deleteShopGroup, fetchShopGroups } from './shop-group-api'
|
||||
import type { ShopGroupItem } from './shop-group-model'
|
||||
import GroupEditorDialog from './GroupEditorDialog.vue'
|
||||
import OldPagination from '@/components/OldPagination.vue'
|
||||
|
||||
const session = useAdminSessionStore()
|
||||
const loading = ref(false)
|
||||
@@ -30,6 +31,12 @@ const filteredRows = computed(() => {
|
||||
return nameOk && leaderOk
|
||||
})
|
||||
})
|
||||
/** 全站分页统一:分组列表客户端分页(10/20/50/100)。 */
|
||||
const page = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const pagedGroups = computed(() => filteredRows.value.slice((page.value - 1) * pageSize.value, page.value * pageSize.value))
|
||||
function changeGroupPage(p: number) { page.value = p }
|
||||
function changeGroupSize(size: number) { pageSize.value = size; page.value = 1 }
|
||||
|
||||
function canEditOf(group: ShopGroupItem): boolean {
|
||||
if (isSuperAdmin.value) return true
|
||||
@@ -103,12 +110,12 @@ onMounted(loadGroups)
|
||||
<th>组员</th>
|
||||
<th style="width: 16%">创建时间</th>
|
||||
<th style="width: 16%">修改时间</th>
|
||||
<th style="width: 124px">操作</th>
|
||||
<th style="width: 160px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-if="filteredRows.length">
|
||||
<tr v-for="(group, index) in filteredRows" :key="group.id">
|
||||
<tr v-for="(group, index) in pagedGroups" :key="group.id">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ group.name }}</td>
|
||||
<td>{{ group.leaderUsername || '-' }}</td>
|
||||
@@ -139,6 +146,7 @@ onMounted(loadGroups)
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<OldPagination v-if="filteredRows.length > 0" :total="filteredRows.length" :page="page" :page-size="pageSize" @change="changeGroupPage" @size-change="changeGroupSize" />
|
||||
</section>
|
||||
|
||||
<GroupEditorDialog
|
||||
|
||||
Reference in New Issue
Block a user