feat(需求): ①全站列表/卡片分页统一为共享 OldPagination(共N条+10/20/50/100条数可选+跳页) ②创建用户菜单权限改左右布局(后台|桌面端并排) ③修复角色筛选失效(normalizeUserPageParams 白名单丢 role 字段)
This commit is contained in:
@@ -13,10 +13,13 @@ test('align_pagination_normal_primary_path', () => {
|
||||
})
|
||||
|
||||
test('align_pagination_normal_variant_input', () => {
|
||||
// 数字人版本数字页码含上一页/下一页。
|
||||
// 数字人版本分页升级为共享 OldPagination(含上一页/下一页/条数选择)。
|
||||
const dh = readSource('src/pages/records/RecordsDigitalHumanVersionPage.vue')
|
||||
assert.match(dh, />上一页<\/button>/, '数字人分页含上一页')
|
||||
assert.match(dh, />下一页<\/button>/, '数字人分页含下一页')
|
||||
assert.match(dh, /OldPagination/, '数字人分页用共享组件')
|
||||
const comp = readSource('src/components/OldPagination.vue')
|
||||
assert.match(comp, />上一页<\/button>/, '共享分页含上一页')
|
||||
assert.match(comp, />下一页<\/button>/, '共享分页含下一页')
|
||||
assert.match(comp, /10, 20, 50, 100|sizes/, '共享分页默认 10/20/50/100')
|
||||
})
|
||||
|
||||
test('align_pagination_boundary_empty_input', () => {
|
||||
@@ -35,19 +38,19 @@ test('align_pagination_boundary_single_item', () => {
|
||||
|
||||
test('align_pagination_repeated_operation_is_idempotent', () => {
|
||||
// 已像素复刻(自绘旧式分页/原生表格)的页单独断言。
|
||||
const users = readSource('src/pages/account/UsersPage.vue')
|
||||
assert.match(users, /class="pagination"/, '用户页已像素复刻,用旧式分页容器')
|
||||
assert.doesNotMatch(users, /el-pagination/, '用户页不再用 EP 分页')
|
||||
for (const page of [
|
||||
'src/pages/account/UsersPage.vue',
|
||||
'src/pages/asin/AsinInvalidPage.vue',
|
||||
'src/pages/asin/DedupeRegistryPage.vue',
|
||||
'src/pages/shop/ShopManagePage.vue',
|
||||
'src/pages/shop/ShopKeysPage.vue',
|
||||
'src/pages/tasks/ImageVideoTasksPage.vue',
|
||||
]) {
|
||||
const src = readSource(page)
|
||||
assert.match(src, /OldPagination/, `${page} 用共享旧式分页`)
|
||||
assert.doesNotMatch(src, /el-pagination/, `${page} 不再用 EP 分页`)
|
||||
}
|
||||
const groups = readSource('src/pages/account/GroupsPage.vue')
|
||||
assert.doesNotMatch(groups, /el-pagination/, '分组管理已像素复刻旧版(panel-group-manage 无分页)')
|
||||
assert.doesNotMatch(groups, /el-pagination/, '分组管理全量渲染无分页')
|
||||
assert.doesNotMatch(groups, /pagedRows/, '分组管理全量渲染无客户端切片')
|
||||
const invalid = readSource('src/pages/asin/AsinInvalidPage.vue')
|
||||
assert.match(invalid, /class="pagination"/, '品牌库已像素复刻,用旧式分页容器')
|
||||
assert.doesNotMatch(invalid, /el-pagination/, '品牌库不再用 EP 分页')
|
||||
const shops = readSource('src/pages/shop/ShopManagePage.vue')
|
||||
assert.match(shops, /class="pagination"/, '店铺管理已像素复刻,用旧式分页容器')
|
||||
assert.doesNotMatch(shops, /el-pagination/, '店铺管理不再用 EP 分页')
|
||||
const keys = readSource('src/pages/shop/ShopKeysPage.vue')
|
||||
assert.match(keys, /class="pagination"/, '店铺密钥已像素复刻,用旧式分页容器')
|
||||
assert.doesNotMatch(keys, /el-pagination/, '店铺密钥不再用 EP 分页')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user