feat: 完成70%全局样式与可读性优化
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$avatar = Get-Content -LiteralPath (Join-Path $root 'utils/avatar.js') -Raw -Encoding UTF8
|
||||
$component = Get-Content -LiteralPath (Join-Path $root 'components/AppAvatar.vue') -Raw -Encoding UTF8
|
||||
|
||||
foreach ($required in @(
|
||||
'DEFAULT_MALE_AVATAR',
|
||||
'mjpc0703_A_cartoon_illustration_of_a_boy_wearing_a_red_Chinese__0@2x.png',
|
||||
'DEFAULT_FEMALE_AVATAR',
|
||||
'loyel003_Ancient_Beauty_Wearing_Tang_Dynasty_ClothingLooking_to_07cb98a9-ec37-4620-a032-ebe511fa93b5@2x.png',
|
||||
'String(sex ?? "").trim() === "1"'
|
||||
)) {
|
||||
if (-not $avatar.Contains($required)) {
|
||||
throw "Default avatar contract missing: $required"
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $component.Contains('getDefaultAvatar(props.sex)')) {
|
||||
throw 'AppAvatar must own the fallback-avatar selection'
|
||||
}
|
||||
|
||||
foreach ($page in @(
|
||||
'pages/tree/t01-tree-overview.vue',
|
||||
'pages/tree/t03-member-profile.vue',
|
||||
'pages/profile/m01-profile-home.vue'
|
||||
)) {
|
||||
$source = Get-Content -LiteralPath (Join-Path $root $page) -Raw -Encoding UTF8
|
||||
if (-not $source.Contains('import AppAvatar from "@/components/AppAvatar.vue"')) {
|
||||
throw "Shared avatar component is not wired in: $page"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output 'DEFAULT-AVATAR-CONTRACT PASS'
|
||||
Reference in New Issue
Block a user