tsxiugai
This commit is contained in:
parent
034c82e514
commit
0958b9ee12
|
@ -265,16 +265,9 @@ export function Input(props: InputProps) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定义一个接口 AriaProps,包含一个可选的 aria 属性
|
export function PasswordInput(
|
||||||
interface AriaProps {
|
props: HTMLProps<HTMLInputElement> & { aria?: string },
|
||||||
aria?: string;
|
) {
|
||||||
}
|
|
||||||
|
|
||||||
// 定义一个接口 PasswordInputProps,继承自 HTMLProps<HTMLInputElement> 和 AriaProps
|
|
||||||
// 用于描述密码输入框组件的属性
|
|
||||||
interface PasswordInputProps extends HTMLProps<HTMLInputElement>, AriaProps {}
|
|
||||||
|
|
||||||
export function PasswordInput(props: PasswordInputProps) {
|
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
function changeVisibility() {
|
function changeVisibility() {
|
||||||
setVisible(!visible);
|
setVisible(!visible);
|
||||||
|
|
Loading…
Reference in New Issue