接口开始5%
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$source = Get-Content 'pages/notification/n01-message-center.vue' -Raw -Encoding UTF8
|
||||
$profiles = Get-Content 'styles/adaptive-frame-profiles.scss' -Raw -Encoding UTF8
|
||||
@@ -43,4 +43,21 @@ if ($source -match '100%\s+100%\s+no-repeat|border-image-slice\s*:') {
|
||||
throw 'N01 must consume adaptive frame geometry without page-local stretching or slicing'
|
||||
}
|
||||
|
||||
# N01 的可读性与块级操作由本页面基线合同持有,不再依赖浏览器截图状态助手。
|
||||
foreach ($ruleContract in @(
|
||||
@{ Selector = 'notice-card__status'; Expected = 'font-size:\s*21rpx;' }
|
||||
@{ Selector = 'notice-card__summary'; Expected = 'font-size:\s*23rpx;' }
|
||||
)) {
|
||||
$selector = [regex]::Escape($ruleContract.Selector)
|
||||
if ($source -notmatch "(?s)\.$selector\s*\{[^}]*$($ruleContract.Expected)") {
|
||||
throw "N01 readable style rule missing: $($ruleContract.Selector) $($ruleContract.Expected)"
|
||||
}
|
||||
}
|
||||
if ($source -notmatch '(?s)<AppButton\s+class="notice-review-action"\s+block\s+type="secondary"') {
|
||||
throw 'N01 review action must remain a block-level secondary button'
|
||||
}
|
||||
if ($source -notmatch '(?s)<AppButton\s+block\s+:type="noticeState === ''error'' \? ''secondary'' : ''primary''"') {
|
||||
throw 'N01 empty and error recovery action must remain block-level and state-aware'
|
||||
}
|
||||
|
||||
Write-Output 'N01-MODULE-BASELINE-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user