mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Fix types
This commit is contained in:
parent
12bf17b166
commit
401519ec6f
@ -17,6 +17,7 @@ export interface AbstractCheckboxProps {
|
||||
onMouseLeave?: React.MouseEventHandler<any>;
|
||||
value?: any;
|
||||
name?: string;
|
||||
children?: React.ReactChild;
|
||||
}
|
||||
|
||||
export interface CheckboxProps extends AbstractCheckboxProps {
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -54,6 +54,7 @@ export interface ArgsProps {
|
||||
placement?: notificationPlacement;
|
||||
style?: string;
|
||||
className?: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface ConfigProps {
|
||||
|
@ -15,7 +15,7 @@ export default class RadioButton extends React.Component<RadioButtonProps, any>
|
||||
};
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user