From 3b52fceca1fb23c6c1f9ed3d229b433f585b1951 Mon Sep 17 00:00:00 2001 From: wonfen Date: Mon, 29 Jun 2026 11:30:50 +0800 Subject: [PATCH] fix: DNS overrides could not be edited in advanced mode --- Changelog.md | 1 + src/components/setting/mods/dns-viewer.tsx | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Changelog.md b/Changelog.md index bf35ba453..862745223 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,6 +11,7 @@ - macOS 12(Monterey) 首页 IP 卡兼容性 - 代理卡可能显示的通信错误,但实际可用 - 修复 Fake-IP 模式开启 IPv6 后未生成 fake-ip-range6 +- 修复 DNS 覆写的高级模式无法正常编辑
✨ 新增功能 diff --git a/src/components/setting/mods/dns-viewer.tsx b/src/components/setting/mods/dns-viewer.tsx index 5d081f895..099a53393 100644 --- a/src/components/setting/mods/dns-viewer.tsx +++ b/src/components/setting/mods/dns-viewer.tsx @@ -31,7 +31,6 @@ import { useClash } from '@/hooks/use-clash' import { showNotice } from '@/services/notice-service' import { useThemeMode } from '@/services/states' import type { MonacoEditorInstance } from '@/types/monaco' -import { debugLog } from '@/utils/debug' import getSystem from '@/utils/get-system' const Item = styled(ListItem)(() => ({ @@ -591,18 +590,6 @@ export function DnsViewer({ ref }: { ref?: Ref }) { // YAML编辑器内容变更处理 const handleYamlChange = (value?: string) => { setYamlContent(value || '') - - // 允许YAML编辑后立即分析和更新表单值 - try { - const config = yaml.load(value || '') as any - if (config && typeof config === 'object') { - setTimeout(() => { - updateValuesFromConfig(config) - }, 300) - } - } catch (err) { - debugLog('YAML解析错误,忽略自动更新', err) - } } // 处理表单值变化