From d86a0900e1a7c49ad5486427154bc1f7e7b3b7fd Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Fri, 9 Oct 2020 20:59:27 +0800 Subject: [PATCH] types(PasswordInput): use tsx --- src/password-input/{index.js => index.tsx} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename src/password-input/{index.js => index.tsx} (95%) diff --git a/src/password-input/index.js b/src/password-input/index.tsx similarity index 95% rename from src/password-input/index.js rename to src/password-input/index.tsx index 09533c1e6..ce92c74ab 100644 --- a/src/password-input/index.js +++ b/src/password-input/index.tsx @@ -1,4 +1,3 @@ -// Utils import { createNamespace, addUnit } from '../utils'; import { BORDER_LEFT, BORDER_SURROUND } from '../utils/constant'; @@ -27,13 +26,13 @@ export default createComponent({ emits: ['focus'], setup(props, { emit }) { - const onTouchStart = (event) => { + const onTouchStart = (event: TouchEvent) => { event.stopPropagation(); emit('focus', event); }; const renderPoints = () => { - const Points = []; + const Points: JSX.Element[] = []; const { mask, value, length, gutter, focused } = props; for (let i = 0; i < length; i++) {