From 3574aeda3ab4b62dc04e84322d479e6cc800f94d Mon Sep 17 00:00:00 2001 From: jimczj Date: Wed, 24 Oct 2018 17:54:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(textarea):=20=E7=BB=84=E4=BB=B6=20props=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @types/textarea.d.ts | 4 ++-- src/components/textarea/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/@types/textarea.d.ts b/@types/textarea.d.ts index 1b36e06c2..48ec54687 100644 --- a/@types/textarea.d.ts +++ b/@types/textarea.d.ts @@ -6,7 +6,7 @@ import AtComponent from './base' export interface AtTextareaProps extends AtComponent{ style?: string - value?: string + value: string maxlength?: string @@ -34,7 +34,7 @@ export interface AtTextareaProps extends AtComponent{ cursorSpacing?: number - onChange?: BaseEventFunction + onChange: BaseEventFunction onFocus?: BaseEventFunction diff --git a/src/components/textarea/index.js b/src/components/textarea/index.js index acb376357..3e3e08000 100644 --- a/src/components/textarea/index.js +++ b/src/components/textarea/index.js @@ -43,7 +43,7 @@ export default class AtTextarea extends AtComponent { PropTypes.array, PropTypes.string ]), - value: PropTypes.string, + value: PropTypes.string.isRequired, cursorSpacing: PropTypes.number, maxlength: PropTypes.oneOfType([ PropTypes.string, @@ -63,7 +63,7 @@ export default class AtTextarea extends AtComponent { fixed: PropTypes.bool, height: PropTypes.string, onLinechange: PropTypes.func, - onChange: PropTypes.func, + onChange: PropTypes.func.isRequired, onFocus: PropTypes.func, onBlur: PropTypes.func, onConfirm: PropTypes.func