This commit is contained in:
2026-10-26 13:58:52 +08:00
parent 7688f859c7
commit 6580853ad3
6 changed files with 28 additions and 15 deletions
+3
View File
@@ -285,6 +285,9 @@
--el-input-hover-border-color: var(--el-color-primary);
--el-input-bg-color: var(--admin-surface);
}
:is(.admin-density, .admin-density-dialog) .density-form--outlined {
--el-border-radius-base: var(--cc-radius-lg);
}
:is(.admin-density, .admin-density-dialog) .density-form--outlined :is(.el-input, .el-textarea) {
--el-input-border-color: var(--el-border-color);
--el-input-hover-border-color: var(--el-border-color-hover);
+15 -8
View File
@@ -219,12 +219,16 @@ const cssRoot = (css: string) => {
}
describe('approved Admin density ownership', () => {
it('keeps domestic pallet metric appearance owned by shared workbench styles', () => {
const page = parse(read('modules/warehouse-resources/pallets/pages/PalletsView.vue')).descriptor
const css = page.styles.map(style => style.content).join('\n')
expect(page.template!.content).toContain('workbench-metric workbench-tone is-compact')
expect(css).not.toMatch(/\.summary-grid\s+(?:article|span|strong|\.idle|\.occupied)\b/)
expect(css).not.toMatch(/\.workbench-metric[\s.{]/)
it('keeps pallet overview spacing and metric appearance owned by shared primitives', () => {
for (const file of ['warehouse-resources/pallets/pages/PalletsView.vue', 'overseas-warehouse/pages/PalletsView.vue']) {
const page = parse(read(`modules/${file}`)).descriptor
const css = page.styles.map(style => style.content).join('\n')
expect(page.template!.content, file).toMatch(/<AdminPage\b[^>]*spacing="compact"/)
expect(css, file).toContain('.pallet-page.admin-page.is-spacing-compact { gap: var(--admin-space-3); }')
expect(page.template!.content, file).toContain('workbench-metric workbench-tone is-compact')
expect(css, file).not.toMatch(/\.summary-grid\s+(?:article|span|strong|\.idle|\.occupied)\b/)
expect(css, file).not.toMatch(/\.workbench-metric[\s.{]/)
}
})
it('lets local transport editors fill the workspace and keeps form density in shared primitives', () => {
@@ -308,6 +312,9 @@ describe('approved Admin density ownership', () => {
'--el-input-hover-border-color': 'var(--el-border-color-hover)',
'--el-input-bg-color': 'var(--admin-surface)',
})
expect(rules.get(':is(.admin-density, .admin-density-dialog) .density-form--outlined')).toEqual({
'--el-border-radius-base': 'var(--cc-radius-lg)',
})
const customerRules = new Map<string, Record<string, string>>()
cssRoot(read('modules/customers/customerDensity.css')).walkRules(rule => {
const values: Record<string, string> = {}
@@ -356,10 +363,10 @@ describe('approved Admin density ownership', () => {
})
}
})
it('keeps declaration order fields on the continuous cell-editor baseline', () => {
it('keeps declaration order fields outlined within the continuous cell-editor layout', () => {
const source = read('modules/unified-orders/components/OrderDeclarationEditorDialog.vue')
const orderFields = source.slice(source.indexOf('<el-form label-position="left"'), source.indexOf('</el-form>') + '</el-form>'.length)
expect(orderFields).toContain('class="order-fields density-form"')
expect(orderFields).toContain('class="order-fields density-form density-form--outlined"')
expect(orderFields).toContain('density-table density-table--editable')
expect(orderFields).not.toMatch(/<el-(?:row|col)\b/)
expect(orderFields).toContain('<span aria-label="渠道编码">')