mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
fix(frontend): 修复 restoreOriginalPlaceholder 递归调用、优化日志参数格式,补全 tsconfig lib 配置
This commit is contained in:
@@ -1159,7 +1159,7 @@ function restoreOriginalPlaceholder(value: unknown): unknown {
|
|||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
if (Array.isArray(value)) return value.map(restoreOriginalPlaceholder)
|
if (Array.isArray(value)) return value.map(item => restoreOriginalPlaceholder(item))
|
||||||
if (value !== null && typeof value === 'object') {
|
if (value !== null && typeof value === 'object') {
|
||||||
const result: Record<string, unknown> = {}
|
const result: Record<string, unknown> = {}
|
||||||
for (const [k, v] of Object.entries(value as Record<string, unknown>)) result[k] = restoreOriginalPlaceholder(v)
|
for (const [k, v] of Object.entries(value as Record<string, unknown>)) result[k] = restoreOriginalPlaceholder(v)
|
||||||
@@ -1262,7 +1262,7 @@ async function loadDefaultBodyRulesForFormat(apiFormat: string, force = false):
|
|||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
defaultBodyRulesByFormat.value[cacheKey] = []
|
defaultBodyRulesByFormat.value[cacheKey] = []
|
||||||
defaultBodyRulesLoaded.value[cacheKey] = true
|
defaultBodyRulesLoaded.value[cacheKey] = true
|
||||||
log.warn('加载默认请求体规则失败', apiFormat, error)
|
log.warn('加载默认请求体规则失败', { apiFormat, error })
|
||||||
return []
|
return []
|
||||||
} finally {
|
} finally {
|
||||||
loadingDefaultBodyRulesByFormat.value[cacheKey] = false
|
loadingDefaultBodyRulesByFormat.value[cacheKey] = false
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
|
"lib": ["ES2021", "DOM", "DOM.Iterable"],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
|
|||||||
Reference in New Issue
Block a user