完成全项目响应式审核与换机交接

This commit is contained in:
2026-07-22 07:41:27 +08:00
parent a127280ce6
commit eced3d1e6e
77 changed files with 2052 additions and 378 deletions
+29
View File
@@ -0,0 +1,29 @@
$ErrorActionPreference = 'Stop'
$activeFiles = @(
'pages/genealogy/g01-my-genealogies.vue',
'pages/genealogy/g03-create-genealogy.vue',
'pages/genealogy/g06-search-genealogies.vue'
)
foreach ($file in $activeFiles) {
$source = Get-Content $file -Raw -Encoding UTF8
foreach ($forbidden in @('location.hash', 'new URLSearchParams', 'hashchange')) {
if ($source.Contains($forbidden)) {
throw "$file must not read native route state through $forbidden"
}
}
if ($source -notmatch 'onLoad\s*\(\s*\(?\s*query\b') {
throw "$file must consume its native query through onLoad(query)"
}
}
$g01 = Get-Content 'pages/genealogy/g01-my-genealogies.vue' -Raw -Encoding UTF8
$g03 = Get-Content 'pages/genealogy/g03-create-genealogy.vue' -Raw -Encoding UTF8
$g06 = Get-Content 'pages/genealogy/g06-search-genealogies.vue' -Raw -Encoding UTF8
if ($g01 -notmatch 'query\?\.state') { throw 'G01 must normalize presentation state from onLoad query' }
if ($g03 -notmatch 'query\?\.step\s*===\s*"ancestor"') { throw 'G03 must whitelist the ancestor step from onLoad query' }
if ($g06 -notmatch 'query\?\.mode\s*===\s*"invite"') { throw 'G06 must whitelist invite mode from onLoad query' }
Write-Output 'NATIVE-ROUTE-QUERY-CONTRACT PASS'