修改完成55%

This commit is contained in:
2026-07-15 08:31:21 +08:00
parent 8c98936da5
commit 241a7af54c
98 changed files with 3269 additions and 782 deletions
+20 -17
View File
@@ -2,30 +2,33 @@ $ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$componentPath = Join-Path $root 'components/ModulePage.vue'
if (-not (Test-Path -LiteralPath $componentPath)) {
throw 'Missing shared module page component'
}
if (-not (Test-Path -LiteralPath $componentPath)) { throw 'Missing shared module page component' }
$component = Get-Content -LiteralPath $componentPath -Raw -Encoding utf8
foreach ($anchor in @(
"const moduleState = ref('ready')",
'module-state--ready',
'module-state--empty',
'module-state--success',
'module-state--error',
'g03-create-flow-panel.png',
'g06-search-input-wide.png',
'application-status-card.png',
'a01-primary-button.png',
'background-image:',
'background-size: 100% 100%',
'.primary-action--compact'
'a01-secondary-button.png',
'query.state'
)) {
if ($component -notmatch [regex]::Escape($anchor)) {
throw "ModulePage is missing primary-action visual anchor: $anchor"
if ($component -notmatch [regex]::Escape($anchor)) { throw "ModulePage is missing high-spec anchor: $anchor" }
}
foreach ($className in @('module-panel', 'form-row', 'list-card', 'detail-card', 'timeline-row', 'settings-row', 'status-card', 'primary-action')) {
foreach ($property in @('border', 'background', 'border-radius', 'box-shadow', 'background-image')) {
if ($component -match "(?s)\.$className\s*\{[^}]*\b$property\s*:") {
throw "ModulePage must not construct .$className with CSS $property"
}
}
}
if ($component -match '(?s)\.primary-action\s*\{[^}]*\bborder\s*:') {
throw 'ModulePage primary actions must not redraw the final button border with CSS'
}
if ($component -match '(?s)\.primary-action\s*\{[^}]*\bbackground\s*:\s*\$brand-red') {
throw 'ModulePage primary actions must not redraw the final button surface with a plain CSS color'
}
if ($component -match '::before|::after') { throw 'ModulePage must not draw visible decorations with CSS pseudo-elements' }
Write-Output 'MODULE-PAGE-VISUAL-CONTRACT PASS'