From dd4d9b67eedc311ec3f3726dc47c85f7db7c19ce Mon Sep 17 00:00:00 2001 From: Vixalie Date: Fri, 22 Aug 2025 10:12:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Input):=20=E8=B0=83=E6=95=B4=20InputPr?= =?UTF-8?q?ops=20=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了 InputProps 接口中不必要的 JSX.HTMLAttributes 继承 - 这个改动可以简化接口定义,提高代码可读性 --- src/components/Input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Input.tsx b/src/components/Input.tsx index e86496f..113aea6 100644 --- a/src/components/Input.tsx +++ b/src/components/Input.tsx @@ -2,7 +2,7 @@ import cx from 'clsx'; import { isNotNil } from 'es-toolkit'; import { Component, createEffect, createSignal, JSX, mergeProps, onMount, Show } from 'solid-js'; -interface InputProps extends JSX.HTMLAttributes { +interface InputProps { name?: string; variant?: 'normal' | 'underlined' | 'immersive'; left?: JSX.Element;