Initial commit of akmon project
This commit is contained in:
51
doc_zhipao/fix_display_grid.ps1
Normal file
51
doc_zhipao/fix_display_grid.ps1
Normal file
@@ -0,0 +1,51 @@
|
||||
# Fix display: grid compatibility for UTS Android
|
||||
# UTS Android only supports display: flex and display: none
|
||||
|
||||
$files = @(
|
||||
"h:\blews\akmon\pages\sport\teacher\analytics.uvue",
|
||||
"h:\blews\akmon\pages\sport\teacher\records.uvue",
|
||||
"h:\blews\akmon\pages\sport\teacher\project-create.uvue",
|
||||
"h:\blews\akmon\pages\sport\student\record-detail.uvue",
|
||||
"h:\blews\akmon\pages\eldercare\incident\report.uvue",
|
||||
"h:\blews\akmon\pages\eldercare\finance\management.uvue",
|
||||
"h:\blews\akmon\pages\eldercare\family\dashboard.uvue",
|
||||
"h:\blews\akmon\pages\eldercare\nurse\dashboard.uvue",
|
||||
"h:\blews\akmon\pages\eldercare\equipment\management.uvue",
|
||||
"h:\blews\akmon\pages\eldercare\analytics\dashboard.uvue"
|
||||
)
|
||||
|
||||
$totalFixed = 0
|
||||
|
||||
foreach ($file in $files) {
|
||||
if (Test-Path $file) {
|
||||
Write-Host "Processing: $file" -ForegroundColor Yellow
|
||||
|
||||
# Read file content
|
||||
$content = Get-Content $file -Raw -Encoding UTF8
|
||||
$originalContent = $content
|
||||
|
||||
# Replace display: grid with display: flex + flex-wrap
|
||||
$content = $content -replace 'display:\s*grid;', 'display: flex; flex-wrap: wrap;'
|
||||
$content = $content -replace 'display:\s*grid\s*;', 'display: flex; flex-wrap: wrap;'
|
||||
|
||||
# Count replacements
|
||||
$gridMatches = [regex]::Matches($originalContent, 'display:\s*grid\s*;')
|
||||
$fixedCount = $gridMatches.Count
|
||||
|
||||
if ($fixedCount -gt 0) {
|
||||
# Write the modified content back
|
||||
Set-Content $file $content -Encoding UTF8
|
||||
Write-Host " ✅ Fixed $fixedCount display: grid instances" -ForegroundColor Green
|
||||
$totalFixed += $fixedCount
|
||||
} else {
|
||||
Write-Host " ℹ️ No display: grid found" -ForegroundColor Gray
|
||||
}
|
||||
} else {
|
||||
Write-Host " ❌ File not found: $file" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "`n📊 Summary:" -ForegroundColor Cyan
|
||||
Write-Host "Total files processed: $($files.Count)" -ForegroundColor White
|
||||
Write-Host "Total display: grid instances fixed: $totalFixed" -ForegroundColor Green
|
||||
Write-Host "`n✅ All display: grid properties have been converted to flex layout!" -ForegroundColor Green
|
||||
Reference in New Issue
Block a user