From ae4067aee6068998e0e02239535eb9341522d53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=90=E9=9B=81=E5=8D=97=E9=A3=9B?= Date: Thu, 17 Apr 2025 17:12:58 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=8F=96=E6=B6=88=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=BB=95=E8=BF=87=E4=B8=94=E5=BD=93=E7=BB=95?= =?UTF-8?q?=E8=BF=87=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4=E7=BB=95=E8=BF=87?= =?UTF-8?q?=E5=A1=AB=E5=85=85=E7=BB=95=E8=BF=87=E9=85=8D=E7=BD=AE=E4=BB=A5?= =?UTF-8?q?=E4=BE=BF=E7=94=A8=E6=88=B7=E5=9F=BA=E4=BA=8E=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9=E3=80=82=20(#3365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/setting/mods/sysproxy-viewer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/setting/mods/sysproxy-viewer.tsx b/src/components/setting/mods/sysproxy-viewer.tsx index b8c44514..9dcf8a85 100644 --- a/src/components/setting/mods/sysproxy-viewer.tsx +++ b/src/components/setting/mods/sysproxy-viewer.tsx @@ -387,7 +387,12 @@ export const SysproxyViewer = forwardRef((props, ref) => { edge="end" disabled={!enabled} checked={value.use_default} - onChange={(_, e) => setValue((v) => ({ ...v, use_default: e }))} + onChange={(_, e) => setValue((v) => ({ + ...v, + use_default: e, + // 当取消选择use_default且当前bypass为空时,填充默认值 + bypass: (!e && !v.bypass) ? defaultBypass() : v.bypass + }))} /> )}