From 032e3af282124f654b690d426cb9770c59a1f6d7 Mon Sep 17 00:00:00 2001 From: Vixalie Date: Tue, 12 Aug 2025 22:18:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(components):=20=E4=B8=BA=20Check=20?= =?UTF-8?q?=E5=92=8C=20Radio=20=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E7=8A=B6=E6=80=81=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Check 和 Radio 组件的父容器上添加 classList 属性 - 根据 mProps.disabled 的值动态设置 'text-neutral' 类 - 优化组件结构,提高可读性和可维护性 --- src/components/Check.tsx | 5 ++++- src/components/Radio.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Check.tsx b/src/components/Check.tsx index be60cfb..837695f 100644 --- a/src/components/Check.tsx +++ b/src/components/Check.tsx @@ -49,7 +49,10 @@ const Check: ParentComponent = (props) => { }; return ( -
+
{mProps.children}
diff --git a/src/components/Radio.tsx b/src/components/Radio.tsx index a6b0cd8..5a90d21 100644 --- a/src/components/Radio.tsx +++ b/src/components/Radio.tsx @@ -49,7 +49,10 @@ const Radio: ParentComponent = (props) => { }; return ( -
+
{mProps.children}