diff --git a/components/checkbox/Checkbox.tsx b/components/checkbox/Checkbox.tsx index 363aa5cb25..a047e112fa 100644 --- a/components/checkbox/Checkbox.tsx +++ b/components/checkbox/Checkbox.tsx @@ -17,6 +17,7 @@ export interface AbstractCheckboxProps { onMouseLeave?: React.MouseEventHandler; value?: any; name?: string; + children?: React.ReactChild; } export interface CheckboxProps extends AbstractCheckboxProps { diff --git a/components/locale-provider/index.tsx b/components/locale-provider/index.tsx index ad6ca50ef5..657a783566 100644 --- a/components/locale-provider/index.tsx +++ b/components/locale-provider/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { changeConfirmLocale } from '../modal/locale'; +import { ModalLocale, changeConfirmLocale } from '../modal/locale'; export interface LocaleProviderProps { locale: { @@ -9,7 +9,7 @@ export interface LocaleProviderProps { TimePicker?: Object, Calendar?: Object, Table?: Object, - Modal?: Object, + Modal?: ModalLocale, Popconfirm?: Object, Transfer?: Object, Select?: Object, diff --git a/components/modal/locale.tsx b/components/modal/locale.tsx index 1f8adaeac6..9e87d91cb1 100644 --- a/components/modal/locale.tsx +++ b/components/modal/locale.tsx @@ -1,14 +1,20 @@ -const defaultLocale = { +export interface ModalLocale { + okText: string; + cancelText: string; + justOkText: string; +} + +const defaultLocale: ModalLocale = { okText: '确定', cancelText: '取消', justOkText: '知道了', }; -let runtimeLocale = { +let runtimeLocale: ModalLocale = { ...defaultLocale, }; -export function changeConfirmLocale(newLocale?: Object) { +export function changeConfirmLocale(newLocale?: ModalLocale) { if (newLocale) { runtimeLocale = { ...runtimeLocale, diff --git a/components/notification/index.tsx b/components/notification/index.tsx index ee29789e2d..311a954be5 100755 --- a/components/notification/index.tsx +++ b/components/notification/index.tsx @@ -54,6 +54,7 @@ export interface ArgsProps { placement?: notificationPlacement; style?: string; className?: string; + type: string; } export interface ConfigProps { diff --git a/components/radio/radioButton.tsx b/components/radio/radioButton.tsx index 548c129097..efc5ed3666 100644 --- a/components/radio/radioButton.tsx +++ b/components/radio/radioButton.tsx @@ -15,7 +15,7 @@ export default class RadioButton extends React.Component }; render() { - let radioProps: RadioButtonProps = { ...this.props }; + const radioProps: RadioButtonProps = { ...this.props }; if (this.context.radioGroup) { radioProps.onChange = this.context.radioGroup.onChange; radioProps.checked = this.props.value === this.context.radioGroup.value;