update: 公告支持html

This commit is contained in:
ctwj
2025-10-20 23:57:27 +08:00
parent 921bdc43cb
commit 40ad48f5cf
4 changed files with 109 additions and 23 deletions

View File

@@ -71,26 +71,26 @@ export const useConfigChangeDetection = <T extends Record<string, any>>(
}
const changedConfig: Partial<T> = {}
// 遍历所有配置项
for (const key in currentConfig.value) {
const currentValue = currentConfig.value[key]
const originalValue = originalConfig.value[key]
// 使用自定义比较函数或默认比较
const hasChanged = customCompare
const hasChanged = customCompare
? customCompare(key, currentValue, originalValue)
: currentValue !== originalValue
if (hasChanged) {
changedConfig[key as keyof T] = currentValue
}
}
if (debug) {
console.log('useConfigChangeDetection - 检测到的改动:', changedConfig)
}
return changedConfig
}