fix: adapt shared page header to safe area

This commit is contained in:
rain
2026-07-21 13:46:16 +08:00
parent 779a44279c
commit 2f22df61b3
3 changed files with 24 additions and 2 deletions
@@ -17,6 +17,16 @@ foreach ($pattern in @(
if ($header -notmatch $pattern) { throw "PageHeader accessibility contract missing: $pattern" }
}
if (-not $header.Contains('fallbackUrl')) { throw 'PageHeader must expose a deep-link fallback route' }
foreach ($token in @(
'customBack: { type: Boolean, default: false }',
'const emit = defineEmits(["brand", "notice", "action", "back"]);',
'if (props.customBack) {',
'emit("back");',
'uni.navigateBack();',
'uni.reLaunch({ url: props.fallbackUrl });'
)) {
if (-not $header.Contains($token)) { throw "PageHeader back contract missing: $token" }
}
$dialog = Read-Utf8 'components/AppDialog.vue'
foreach ($token in @('role="dialog"', 'aria-modal="true"', 'tabindex="-1"', '@keydown.esc.stop="cancel"', 'max-height: calc(100vh - 80rpx)', 'overflow-y: auto')) {