refactor: 优化跨标签会话同步、引入强类型安全JSON解析工具及Seller样式重构

This commit is contained in:
yml
2026-05-25 02:31:14 +08:00
parent 65dae78532
commit bc04b43db6
8 changed files with 387 additions and 371 deletions
+8
View File
@@ -0,0 +1,8 @@
export function safeParseJSON<T>(raw: string, fallback: T): T {
if (!raw || !raw.trim()) return fallback
try {
return JSON.parse(raw) as T
} catch {
return fallback
}
}