fix(admin): 统一后台筛选控件高度与对齐
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
|
||||
const brandPath = '/admin-vue/asin-center/invalid'
|
||||
|
||||
test('品牌数据库:单行筛选控件等高、底边对齐,窄屏可以换行', async ({ page }) => {
|
||||
await page.goto(brandPath)
|
||||
const filters = page.locator('.invalid-filter-row')
|
||||
await expect(filters.getByRole('button', { name: '查询' })).toBeVisible()
|
||||
const controls = [
|
||||
filters.getByPlaceholder('输入 ASIN'),
|
||||
filters.getByPlaceholder('输入品牌'),
|
||||
filters.locator('.el-select__wrapper'),
|
||||
filters.getByRole('button', { name: '查询' }),
|
||||
]
|
||||
const boxes = await Promise.all(controls.map((control) => control.evaluate((el) => {
|
||||
const { height, bottom } = el.getBoundingClientRect()
|
||||
return { height, bottom }
|
||||
})))
|
||||
expect(boxes.map((box) => box.height)).toEqual([34, 34, 34, 34])
|
||||
expect(Math.max(...boxes.map((box) => box.bottom)) - Math.min(...boxes.map((box) => box.bottom))).toBeLessThan(1)
|
||||
|
||||
const batchDelete = page.getByRole('button', { name: '批量删除(0)' })
|
||||
await expect(batchDelete).toBeDisabled()
|
||||
const batchBox = await batchDelete.boundingBox()
|
||||
const tableBox = await page.locator('.invalid-asin-table-scroll').boundingBox()
|
||||
expect(batchBox?.height).toBe(34)
|
||||
expect(tableBox!.y - batchBox!.y - batchBox!.height).toBeGreaterThanOrEqual(8)
|
||||
|
||||
await page.setViewportSize({ width: 680, height: 900 })
|
||||
await expect.poll(async () => filters.evaluate((row) => {
|
||||
const first = row.firstElementChild!.getBoundingClientRect()
|
||||
const last = row.lastElementChild!.getBoundingClientRect()
|
||||
return last.top >= first.bottom && last.right <= row.getBoundingClientRect().right + 1
|
||||
})).toBe(true)
|
||||
})
|
||||
|
||||
test('品牌数据库:键盘搜索分组、查询和新增仍可用', async ({ page }) => {
|
||||
await page.goto(brandPath)
|
||||
const filters = page.locator('.invalid-filter-row')
|
||||
await filters.getByPlaceholder('输入品牌').press('Tab')
|
||||
const group = filters.getByRole('combobox')
|
||||
await expect(group).toBeFocused()
|
||||
await group.fill('测试')
|
||||
await expect(page.getByRole('option', { name: '测试分组' })).toBeVisible()
|
||||
await expect(page.getByRole('option', { name: '其他分组' })).not.toBeVisible()
|
||||
await page.getByRole('option', { name: '测试分组' }).click()
|
||||
await filters.getByPlaceholder('输入 ASIN').fill('B0INVALID1')
|
||||
const queried = page.waitForRequest((req) => new URL(req.url()).pathname === '/api/admin/invalid-asin-data' && req.url().includes('group_id=1'))
|
||||
await filters.getByRole('button', { name: '查询' }).click()
|
||||
const params = new URL((await queried).url()).searchParams
|
||||
expect(params.get('data_value')).toBe('B0INVALID1')
|
||||
expect(params.get('page')).toBe('1')
|
||||
await page.getByRole('button', { name: '新增', exact: true }).click()
|
||||
const dialog = page.getByRole('dialog')
|
||||
await expect(dialog.getByRole('button', { name: '保存' })).toBeVisible()
|
||||
await dialog.getByRole('button', { name: '取消' }).click()
|
||||
await expect(dialog).not.toBeVisible()
|
||||
})
|
||||
@@ -0,0 +1,159 @@
|
||||
import { expect, test, type Locator } from '@playwright/test'
|
||||
|
||||
// 独立的可见菜单清单;不从运行时路由反推夹具,以免漏注册时测试仍然全绿。
|
||||
const shared = [
|
||||
['admin_users', '用户管理', 'account/users', '.form-row'],
|
||||
['admin_columns', '菜单管理', 'account/menus', '.form-row'],
|
||||
['admin_group_manage', '数据权限分组', 'account/groups', '.form-row'],
|
||||
['admin_companies', '公司管理', 'account/companies', '.form-row'],
|
||||
] as const
|
||||
const amazon = [
|
||||
...shared,
|
||||
['admin_user_secrets', '密钥管理', 'account/user-secrets', '.form-row'],
|
||||
['admin_user_secret_usage', '密钥用量统计', 'account/user-secret-usage', '.form-row'],
|
||||
['admin_shop_data_duplicate_check', '店铺撞款监控', 'shop-center/duplicate-check', '.filter-row'],
|
||||
['admin_brand_gating', '品牌Gating库', 'shop-center/brand-gating', '.g-filters'],
|
||||
['admin_keyword_usage', '关键词使用记录', 'shop-center/keyword-usage', '.kw-filters'],
|
||||
['admin_shop_keys', '店铺密钥管理', 'shop-center/keys', '.form-row'],
|
||||
['admin_shop_manage', '店铺管理', 'shop-center/shops', '.form-row'],
|
||||
['admin_history', '生成记录', 'records/history', '.form-row'],
|
||||
['admin_version', '软件版本管理', 'records/software-version', '.admin-header-controls'],
|
||||
['admin_tutorial', '教程管理', 'records/tutorial', '.admin-header-controls'],
|
||||
['admin_workbench_client_package', '数富AI工作台客户端包管理', 'records/workbench-client-package', '.admin-header-controls'],
|
||||
['admin_device_logs', '日志管理', 'records/device-logs', '.form-row'],
|
||||
['admin_task_center', '客户端任务管理', 'task-center/board', '.form-row'],
|
||||
['digital_human_version', '数字人版本管理', 'records/digital-human-version', '.admin-header-controls'],
|
||||
['admin_image_video_tasks', '视频任务记录', 'records/image-video-tasks', '.form-row'],
|
||||
['admin_shop_data_crawl_tasks', '店铺数据记录', 'shop-center/data-tasks', '.form-row'],
|
||||
['admin_dedupe_total_data', '数据去重总数据', 'asin-center/registry', '.dedupe-filter-row'],
|
||||
['admin_invalid_asin_data', '品牌数据库', 'asin-center/invalid', '.form-row'],
|
||||
['admin_query_asin', '查询ASIN', 'asin-center/query', '.form-row'],
|
||||
['admin_product_categories', '商品类目', 'asin-center/categories', '.admin-header-controls'],
|
||||
['admin_skip_price_asin', '最低价ASIN', 'asin-center/skip-price', '.form-row'],
|
||||
['admin_appearance_patent_clean_items', '外观专利数据库', 'patent-center/clean-items', '.clean-filter-row'],
|
||||
] as const
|
||||
const jdDatabase = ['admin_jd_database', '京东数据库', 'jd-center/database', '.jd-filter-row'] as const
|
||||
const jd = [...shared, jdDatabase]
|
||||
const allMenus = [...amazon, jdDatabase].map(([key, name, path]) => ({ key, name, route: `/${path}` }))
|
||||
|
||||
const emptyPage = { items: [], total: 0 }
|
||||
const fixtures: Record<string, unknown> = {
|
||||
'/api/admin/appearance-patent-clean-items': emptyPage,
|
||||
'/api/admin/brand-gating': emptyPage,
|
||||
'/api/admin/brand-gating/stats': { total: 0 },
|
||||
'/api/admin/companies': { items: [{ id: 1, name: '测试公司' }], total: 1 },
|
||||
'/api/admin/device-logs/files': emptyPage,
|
||||
'/api/admin/history': emptyPage,
|
||||
'/api/admin/image-video-tasks': emptyPage,
|
||||
'/api/admin/jd-product-groups': { items: [{ id: 1, name: '测试分类' }] },
|
||||
'/api/admin/jd-product-groups/scope': {
|
||||
platformSuperAdmin: true, defaultGroupId: 1,
|
||||
groups: [{ id: 1, name: '测试分组', label: '测试分组', editable: true }, { id: 2, name: '其他分组', label: '其他分组', editable: true }],
|
||||
},
|
||||
'/api/admin/jd-products': emptyPage,
|
||||
'/api/admin/jd-products/categories': [],
|
||||
'/api/admin/keyword-usage': emptyPage,
|
||||
'/api/admin/keyword-usage/deletes': emptyPage,
|
||||
'/api/admin/keyword-usage/overview': {},
|
||||
'/api/admin/shop-data-crawl-tasks': emptyPage,
|
||||
'/api/admin/shop-keys': emptyPage,
|
||||
'/api/admin/shop-manages': emptyPage,
|
||||
'/api/admin/shop-manages/groups': [{ id: 1, group_name: '测试分组' }],
|
||||
'/api/admin/task-center/overview': { runningTasks: 0, todayFinishedTasks: 0, stuckTasks: 0 },
|
||||
'/api/admin/task-center/shop-options': { items: ['测试店铺'] },
|
||||
'/api/admin/task-center/tasks': emptyPage,
|
||||
'/api/admin/task-center/variant-tasks': emptyPage,
|
||||
'/api/admin/user-secret-usage': emptyPage,
|
||||
'/api/admin/versions': emptyPage,
|
||||
'/api/admin/workbench-client/packages': emptyPage,
|
||||
'/api/digital-human/versions': emptyPage,
|
||||
}
|
||||
|
||||
// 这些接口在 mock-admin-server 里已经有专门的响应,不吃通用兜底。
|
||||
const serverFixtures = new Set([
|
||||
'/api/admin/current-user', '/api/admin/notifications/summary', '/api/admin/users',
|
||||
'/api/admin/permission-menus', '/api/admin/user-secrets', '/api/admin/user-secrets/balances',
|
||||
'/api/admin/shop-data-crawl/duplicate-check-console', '/api/admin/shop-data-crawl/duplicate-check-ledger',
|
||||
'/api/admin/tutorials', '/api/admin/invalid-asin-data', '/api/admin/invalid-asin-data/groups',
|
||||
'/api/admin/dedupe-total-data', '/api/admin/query-asins', '/api/admin/product-categories/children',
|
||||
'/api/admin/skip-price-asins',
|
||||
])
|
||||
|
||||
async function controlDeviations(row: Locator) {
|
||||
await expect(row).toBeVisible()
|
||||
return row.evaluate((el) => {
|
||||
const selector = 'input[type="text"], input[type="number"], input[type="date"], input[type="datetime-local"], select, .el-select__wrapper:not(.is-multiple), button:not(.btn-sm), .admin-header-controls > .btn'
|
||||
const controls = Array.from(el.querySelectorAll<HTMLElement>(selector)).flatMap((control) => {
|
||||
if (control.matches('.el-select__input, .el-input__inner') || control.closest('[role="listbox"], .cat-panel')) return []
|
||||
const box = control.getBoundingClientRect()
|
||||
if (!box.width || !box.height) return []
|
||||
const name = control.getAttribute('placeholder') || control.textContent?.trim() || control.className
|
||||
return [{ name, box }]
|
||||
})
|
||||
if (!controls.length) return ['没有测到可见控件']
|
||||
const failures = controls.filter(({ box }) => Math.abs(box.height - 34) >= 1)
|
||||
.map(({ name, box }) => `${name}: ${box.height}px`)
|
||||
for (const [index, { name, box }] of controls.entries()) {
|
||||
for (const other of controls.slice(index + 1)) {
|
||||
const overlapY = Math.min(box.bottom, other.box.bottom) - Math.max(box.top, other.box.top)
|
||||
if (overlapY < 17) continue
|
||||
if (Math.abs(box.bottom - other.box.bottom) >= 1) failures.push(`${name} / ${other.name} 底边未对齐`)
|
||||
}
|
||||
}
|
||||
return failures
|
||||
})
|
||||
}
|
||||
|
||||
for (const [platform, menus] of [['亚马逊', amazon], ['京东', jd]] as const) {
|
||||
test(`${platform}:逐个点击侧栏菜单,检查筛选区外框`, async ({ page, baseURL }) => {
|
||||
test.setTimeout(120_000)
|
||||
const pageErrors: string[] = []
|
||||
const missingFixtures = new Set<string>()
|
||||
page.on('pageerror', (error) => pageErrors.push(error.message))
|
||||
await page.route('**/*', async (route) => {
|
||||
const url = new URL(route.request().url())
|
||||
if (url.origin !== baseURL) return route.abort()
|
||||
if (url.pathname === '/api/admin/current-user/menus') {
|
||||
return route.fulfill({ json: { success: true, data: { items: allMenus } } })
|
||||
}
|
||||
if (Object.hasOwn(fixtures, url.pathname)) {
|
||||
return route.fulfill({ json: { success: true, data: fixtures[url.pathname] } })
|
||||
}
|
||||
if (url.pathname.startsWith('/api/') && !serverFixtures.has(url.pathname)) {
|
||||
missingFixtures.add(url.pathname)
|
||||
return route.abort()
|
||||
}
|
||||
return route.continue()
|
||||
})
|
||||
await page.goto('/admin-vue/')
|
||||
await page.getByRole('tab', { name: platform }).click()
|
||||
const sidebar = page.locator('.admin-menu')
|
||||
await expect(sidebar.getByRole('menuitem')).toHaveCount(menus.length)
|
||||
const deviations: string[] = []
|
||||
for (const [, name, path, selector] of menus) {
|
||||
await test.step(name, async () => {
|
||||
await sidebar.getByRole('menuitem', { name, exact: true }).click()
|
||||
await expect(page).toHaveURL(new RegExp(`/admin-vue/${path}$`))
|
||||
await expect(page.locator('.admin-topbar h1')).toHaveText(name)
|
||||
const content = page.locator('#admin-content')
|
||||
await expect(content.locator('.load-failure-bar:visible, .page-error:visible')).toHaveCount(0)
|
||||
const record = async (label: string, row: Locator) => {
|
||||
const mismatches = await controlDeviations(row)
|
||||
if (mismatches.length) deviations.push(`${name}${label}:${mismatches.join('、')}`)
|
||||
}
|
||||
await record('', content.locator(`${selector}:visible`).first())
|
||||
if (path === 'asin-center/registry') {
|
||||
await record('日期导出', content.locator('.dedupe-filter-date-row'))
|
||||
}
|
||||
if (path === 'task-center/board') {
|
||||
await content.getByRole('button', { name: /^变体采集/ }).click()
|
||||
await expect(content.getByRole('heading', { name: '变体采集(麦象批量任务)' })).toBeVisible()
|
||||
await record('变体采集', content.locator('.form-row:visible'))
|
||||
}
|
||||
})
|
||||
}
|
||||
expect.soft(pageErrors).toEqual([])
|
||||
expect.soft([...missingFixtures], '逐菜单验收不能使用未登记的空响应').toEqual([])
|
||||
expect(deviations).toEqual([])
|
||||
})
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import { defineConfig } from '@playwright/test'
|
||||
* 会让 playwright 直接连上那个「不是本站」的服务,整份验收测的是别人的页面。
|
||||
*/
|
||||
const PORT = Number(process.env.E2E_PORT || 5174)
|
||||
const MOCK_PORT = Number(process.env.MOCK_PORT || 18100)
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
@@ -27,13 +28,14 @@ export default defineConfig({
|
||||
webServer: [
|
||||
{
|
||||
command: 'node scripts/mock-admin-server.mjs',
|
||||
port: 18100,
|
||||
reuseExistingServer: true,
|
||||
port: MOCK_PORT,
|
||||
reuseExistingServer: false,
|
||||
},
|
||||
{
|
||||
command: `set VITE_API_TARGET=http://127.0.0.1:18100&& npm run dev -- --port ${PORT} --strictPort`,
|
||||
command: `npm run dev -- --host 127.0.0.1 --port ${PORT} --strictPort`,
|
||||
env: { VITE_API_TARGET: `http://127.0.0.1:${MOCK_PORT}` },
|
||||
port: PORT,
|
||||
reuseExistingServer: true,
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -345,6 +345,9 @@ const server = createServer((req, res) => {
|
||||
],
|
||||
})
|
||||
}
|
||||
if (url === '/api/admin/invalid-asin-data/groups') {
|
||||
return json(res, { success: true, data: [{ id: 1, group_name: '测试分组' }, { id: 2, group_name: '其他分组' }] })
|
||||
}
|
||||
if (url === '/api/admin/invalid-asin-data') {
|
||||
return json(res, {
|
||||
success: true,
|
||||
@@ -589,4 +592,4 @@ const server = createServer((req, res) => {
|
||||
return json(res, { success: true }, 200)
|
||||
})
|
||||
|
||||
server.listen(PORT, () => console.log(`mock admin api listening on ${PORT}`))
|
||||
server.listen(PORT, '127.0.0.1', () => console.log(`mock admin api listening on ${PORT}`))
|
||||
|
||||
@@ -14,10 +14,10 @@ defineProps<{
|
||||
|
||||
<template>
|
||||
<div class="batch-delete-actions">
|
||||
<button class="btn btn-danger" type="button" :disabled="batch.disabled || !batch.count" @click="batch.submit">
|
||||
<button class="btn btn-danger batch-delete-button" type="button" :disabled="batch.disabled || !batch.count" @click="batch.submit">
|
||||
{{ batch.progress ? `正在${batch.verb} ${batch.progress}` : `批量${batch.verb}(${batch.count})` }}
|
||||
</button>
|
||||
<button v-if="batch.count" class="btn btn-sm" type="button" :disabled="batch.disabled" @click="batch.clearSelection">清除勾选</button>
|
||||
<button v-if="batch.count" class="btn btn-sm batch-clear-button" type="button" :disabled="batch.disabled" @click="batch.clearSelection">清除勾选</button>
|
||||
<details v-if="batch.result?.failures.length" class="batch-delete-failures">
|
||||
<summary>查看失败原因({{ batch.result.failures.length }} 条)</summary>
|
||||
<ul>
|
||||
@@ -28,8 +28,21 @@ defineProps<{
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.batch-delete-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.batch-delete-actions .btn-danger { color: #fff; background: #b35f6a; border-color: #b35f6a; }
|
||||
.batch-delete-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
|
||||
.batch-delete-actions button {
|
||||
min-height: 34px;
|
||||
padding: 5px 12px;
|
||||
border: 1px solid var(--admin-border);
|
||||
border-radius: 9px;
|
||||
background: #fff;
|
||||
color: var(--admin-text);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.batch-delete-actions .batch-delete-button { color: #fff; background: #b35f6a; border-color: #b35f6a; }
|
||||
.batch-delete-button:hover:not(:disabled) { background: #a34f5b; }
|
||||
.batch-clear-button:hover:not(:disabled) { background: #edf5fb; }
|
||||
.batch-delete-actions button:focus-visible { outline: 2px solid var(--admin-primary); outline-offset: 2px; }
|
||||
.batch-delete-actions button:disabled { cursor: not-allowed; opacity: 0.55; }
|
||||
.batch-delete-failures { max-width: 520px; color: #9f3845; overflow-wrap: anywhere; }
|
||||
.batch-delete-failures ul { max-height: 180px; overflow: auto; margin: 4px 0; padding-left: 20px; }
|
||||
|
||||
@@ -171,17 +171,17 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<div class="form-row invalid-filter-row">
|
||||
<div class="form-group" style="min-width: 200px">
|
||||
<label>ASIN</label>
|
||||
<input v-model="filter.dataValue" type="text" placeholder="输入 ASIN" @keyup.enter="apply" />
|
||||
<div class="form-group">
|
||||
<label for="invalid-asin-filter">ASIN</label>
|
||||
<input id="invalid-asin-filter" v-model="filter.dataValue" type="text" placeholder="输入 ASIN" @keyup.enter="apply" />
|
||||
</div>
|
||||
<div class="form-group" style="min-width: 200px">
|
||||
<label>品牌</label>
|
||||
<input v-model="filter.brand" type="text" placeholder="输入品牌" @keyup.enter="apply" />
|
||||
<div class="form-group">
|
||||
<label for="invalid-brand-filter">品牌</label>
|
||||
<input id="invalid-brand-filter" v-model="filter.brand" type="text" placeholder="输入品牌" @keyup.enter="apply" />
|
||||
</div>
|
||||
<div class="form-group" style="min-width: 180px">
|
||||
<label>分组</label>
|
||||
<el-select v-model="filter.groupId" class="admin-filter" filterable clearable placeholder="全部分组">
|
||||
<div class="form-group">
|
||||
<label for="invalid-group-filter">分组</label>
|
||||
<el-select id="invalid-group-filter" v-model="filter.groupId" class="admin-filter" filterable clearable placeholder="全部分组">
|
||||
<el-option v-for="group in groupOptions" :key="group.id" :label="group.groupName" :value="group.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -293,7 +293,7 @@ h3 {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-row {
|
||||
display: flex;
|
||||
@@ -308,6 +308,11 @@ h3 {
|
||||
gap: 7px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.invalid-filter-row > .form-group {
|
||||
flex: 0 1 190px;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
.form-group label {
|
||||
color: #5b6f83;
|
||||
font-size: 12.5px;
|
||||
|
||||
@@ -336,7 +336,7 @@ onMounted(loadTree)
|
||||
<section class="panel-box">
|
||||
<div class="category-head">
|
||||
<h3>商品类目</h3>
|
||||
<div class="category-head-tools">
|
||||
<div class="category-head-tools admin-header-controls">
|
||||
<input v-model="keyword" type="text" placeholder="搜索类目名称、编码或备注" class="category-keyword" @keyup.enter="apply" />
|
||||
<button class="btn btn-sm" type="button" @click="apply">搜索</button>
|
||||
<button class="btn btn-sm btn-secondary" type="button" @click="reset">清空</button>
|
||||
|
||||
@@ -229,7 +229,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="dh-head">
|
||||
<h3>版本列表</h3>
|
||||
<div class="dh-head-tools">
|
||||
<div class="dh-head-tools admin-header-controls">
|
||||
<input v-model="versionKeyword" type="text" placeholder="搜索版本号" class="dh-keyword" />
|
||||
<button class="btn" type="button" @click="uploadVisible = true">上传新版本</button>
|
||||
</div>
|
||||
|
||||
@@ -162,7 +162,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="version-head">
|
||||
<h3>版本列表</h3>
|
||||
<div class="version-head-tools">
|
||||
<div class="version-head-tools admin-header-controls">
|
||||
<input v-model="versionKeyword" type="text" placeholder="搜索版本号" class="version-keyword" />
|
||||
<button class="btn btn-danger" type="button" :disabled="!selectedCount" @click="removeSelected">删除选中{{ selectedCount ? `(${selectedCount})` : '' }}</button>
|
||||
<button class="btn" type="button" @click="openUpload">上传新版本</button>
|
||||
|
||||
@@ -214,7 +214,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="tutorial-head">
|
||||
<h3>教程包列表</h3>
|
||||
<div class="tutorial-head-tools">
|
||||
<div class="tutorial-head-tools admin-header-controls">
|
||||
<input v-model="keyword" type="text" placeholder="搜索文件名" class="tutorial-keyword" />
|
||||
<button class="btn btn-danger" type="button" :disabled="!selectedCount" @click="removeSelected">删除选中{{ selectedCount ? `(${selectedCount})` : '' }}</button>
|
||||
<button class="btn" type="button" @click="openUpload">上传教程包</button>
|
||||
|
||||
@@ -170,7 +170,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="workbench-head">
|
||||
<h3>客户端包列表</h3>
|
||||
<div class="workbench-head-tools">
|
||||
<div class="workbench-head-tools admin-header-controls">
|
||||
<input v-model="keyword" type="text" placeholder="搜索版本号或文件名" class="workbench-keyword" />
|
||||
<button class="btn btn-danger" type="button" :disabled="!selectedCount" @click="removeSelected">删除选中{{ selectedCount ? `(${selectedCount})` : '' }}</button>
|
||||
<button class="btn" type="button" @click="openUpload">上传客户端包</button>
|
||||
|
||||
@@ -219,12 +219,12 @@ button, input, textarea, select { font: inherit; }
|
||||
background: #f8fbfd;
|
||||
box-shadow: 0 0 0 1px #cbd9e6 inset;
|
||||
}
|
||||
.el-select.admin-filter .el-select__wrapper:hover {
|
||||
.el-select.admin-filter .el-select__wrapper:hover:not(.is-disabled, .is-focused) {
|
||||
box-shadow: 0 0 0 1px #9fb7cd inset;
|
||||
}
|
||||
.el-select.admin-filter.is-focused .el-select__wrapper {
|
||||
.el-select.admin-filter .el-select__wrapper.is-focused {
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||||
box-shadow: 0 0 0 1px var(--admin-primary) inset, 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||||
}
|
||||
|
||||
/* 列表密度统一收口;带壳层作用域的选择器覆盖各页 scoped 旧皮肤,不影响弹窗编辑表单。 */
|
||||
@@ -242,9 +242,15 @@ button, input, textarea, select { font: inherit; }
|
||||
flex: 1 1 140px; min-width: 0; max-width: 220px;
|
||||
}
|
||||
.admin-shell .admin-content :is(.form-row, .clean-filter-row, .dedupe-filter-row, .dedupe-filter-date-row, .jd-filter-row) .form-group { gap: 4px; }
|
||||
.admin-shell .admin-content :is(.panel-box, .form-box) .form-group input:not([type="checkbox"]):not([type="radio"]),
|
||||
/* 只给原生字段的外框定尺寸,不穿透下拉/级联组件的内部输入。 */
|
||||
.admin-shell .admin-content :is(.panel-box, .form-box) .form-group > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
|
||||
.admin-shell .admin-content .price-range-row > input,
|
||||
.admin-shell .admin-content .admin-header-controls > input,
|
||||
.admin-shell .admin-content .jd-group-locked { min-height: 34px; padding: 5px 10px; }
|
||||
.admin-shell .admin-content .el-select.admin-filter .el-select__wrapper { min-height: 34px; padding: 4px 10px; }
|
||||
.admin-shell .admin-content .admin-header-controls { min-width: 0; flex-wrap: wrap; gap: 8px; }
|
||||
.admin-shell .admin-content .admin-header-controls > input { max-width: 100%; }
|
||||
.admin-shell .admin-content .admin-header-controls > .btn,
|
||||
.admin-shell .admin-content :is(.panel-box, .form-box) .btn:not(.btn-sm) { min-height: 34px; padding: 5px 12px; }
|
||||
.admin-shell .admin-content :is(.clean-filter-actions, .dedupe-filter-actions, .jd-filter-actions) { flex-wrap: wrap; gap: 6px; }
|
||||
.admin-shell .admin-content .jd-filter-row > .el-select.admin-filter { width: 170px; }
|
||||
|
||||
Reference in New Issue
Block a user