Zuobin Wang
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with
5 additions and
14 deletions
-
components/_util/type.ts
-
components/breadcrumb/Breadcrumb.tsx
-
components/button/button.tsx
-
components/card/index.tsx
-
components/input-number/index.tsx
-
components/input/Input.tsx
-
components/time-picker/index.tsx
-
components/transfer/ListBody.tsx
-
components/typography/Title.tsx
-
docs/react/replace-moment.en-US.md
-
docs/react/replace-moment.zh-CN.md
|
|
@ -1,4 +1,3 @@ |
|
|
|
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; |
|
|
|
// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
|
|
|
|
export const tuple = <T extends string[]>(...args: T) => args; |
|
|
|
|
|
|
|
|
|
@ -6,7 +6,6 @@ import BreadcrumbSeparator from './BreadcrumbSeparator'; |
|
|
|
import Menu from '../menu'; |
|
|
|
import { ConfigContext } from '../config-provider'; |
|
|
|
import devWarning from '../_util/devWarning'; |
|
|
|
import { Omit } from '../_util/type'; |
|
|
|
import { cloneElement } from '../_util/reactNode'; |
|
|
|
|
|
|
|
export interface Route { |
|
|
|
|
|
@ -6,7 +6,7 @@ import omit from 'rc-util/lib/omit'; |
|
|
|
import Group from './button-group'; |
|
|
|
import { ConfigContext } from '../config-provider'; |
|
|
|
import Wave from '../_util/wave'; |
|
|
|
import { Omit, tuple } from '../_util/type'; |
|
|
|
import { tuple } from '../_util/type'; |
|
|
|
import devWarning from '../_util/devWarning'; |
|
|
|
import SizeContext, { SizeType } from '../config-provider/SizeContext'; |
|
|
|
import LoadingIcon from './LoadingIcon'; |
|
|
|
|
|
@ -7,7 +7,6 @@ import Tabs, { TabsProps } from '../tabs'; |
|
|
|
import Row from '../row'; |
|
|
|
import Col from '../col'; |
|
|
|
import { ConfigContext } from '../config-provider'; |
|
|
|
import { Omit } from '../_util/type'; |
|
|
|
import SizeContext from '../config-provider/SizeContext'; |
|
|
|
|
|
|
|
function getAction(actions: React.ReactNode[]) { |
|
|
|
|
|
@ -5,7 +5,6 @@ import UpOutlined from '@ant-design/icons/UpOutlined'; |
|
|
|
import DownOutlined from '@ant-design/icons/DownOutlined'; |
|
|
|
|
|
|
|
import { ConfigContext } from '../config-provider'; |
|
|
|
import { Omit } from '../_util/type'; |
|
|
|
import SizeContext, { SizeType } from '../config-provider/SizeContext'; |
|
|
|
|
|
|
|
type ValueType = string | number; |
|
|
|
|
|
@ -5,7 +5,7 @@ import Group from './Group'; |
|
|
|
import Search from './Search'; |
|
|
|
import TextArea from './TextArea'; |
|
|
|
import Password from './Password'; |
|
|
|
import { Omit, LiteralUnion } from '../_util/type'; |
|
|
|
import { LiteralUnion } from '../_util/type'; |
|
|
|
import ClearableLabeledInput, { hasPrefixSuffix } from './ClearableLabeledInput'; |
|
|
|
import { ConfigConsumer, ConfigConsumerProps, DirectionType } from '../config-provider'; |
|
|
|
import SizeContext, { SizeType } from '../config-provider/SizeContext'; |
|
|
@ -67,9 +67,7 @@ export function resolveOnChange<E extends HTMLInputElement | HTMLTextAreaElement |
|
|
|
| React.ChangeEvent<E> |
|
|
|
| React.MouseEvent<HTMLElement, MouseEvent> |
|
|
|
| React.CompositionEvent<HTMLElement>, |
|
|
|
onChange: |
|
|
|
| undefined |
|
|
|
| ((event: React.ChangeEvent<E>) => void), |
|
|
|
onChange: undefined | ((event: React.ChangeEvent<E>) => void), |
|
|
|
targetValue?: string, |
|
|
|
) { |
|
|
|
if (!onChange) { |
|
|
|
|
|
@ -3,7 +3,6 @@ import * as React from 'react'; |
|
|
|
import DatePicker from '../date-picker'; |
|
|
|
import { PickerTimeProps, RangePickerTimeProps } from '../date-picker/generatePicker'; |
|
|
|
import devWarning from '../_util/devWarning'; |
|
|
|
import { Omit } from '../_util/type'; |
|
|
|
|
|
|
|
const { TimePicker: InternalTimePicker, RangePicker: InternalRangePicker } = DatePicker; |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import * as React from 'react'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
import { ElementOf, Omit, tuple } from '../_util/type'; |
|
|
|
import { ElementOf, tuple } from '../_util/type'; |
|
|
|
import Pagination from '../pagination'; |
|
|
|
import { TransferListProps, RenderedItem } from './list'; |
|
|
|
import ListItem from './ListItem'; |
|
|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
import * as React from 'react'; |
|
|
|
import devWarning from '../_util/devWarning'; |
|
|
|
import Base, { BlockProps } from './Base'; |
|
|
|
import { tupleNum, Omit } from '../_util/type'; |
|
|
|
import { tupleNum } from '../_util/type'; |
|
|
|
|
|
|
|
const TITLE_ELE_LIST = tupleNum(1, 2, 3, 4, 5); |
|
|
|
|
|
|
|
|
|
@ -39,7 +39,6 @@ import { Dayjs } from 'dayjs'; |
|
|
|
import * as React from 'react'; |
|
|
|
import DatePicker from './DatePicker'; |
|
|
|
import { PickerTimeProps } from 'antd/es/date-picker/generatePicker'; |
|
|
|
import { Omit } from 'antd/es/_util/type'; |
|
|
|
|
|
|
|
export interface TimePickerProps extends Omit<PickerTimeProps<Dayjs>, 'picker'> {} |
|
|
|
|
|
|
|
|
|
@ -39,7 +39,6 @@ import { Dayjs } from 'dayjs'; |
|
|
|
import * as React from 'react'; |
|
|
|
import DatePicker from './DatePicker'; |
|
|
|
import { PickerTimeProps } from 'antd/es/date-picker/generatePicker'; |
|
|
|
import { Omit } from 'antd/es/_util/type'; |
|
|
|
|
|
|
|
export interface TimePickerProps extends Omit<PickerTimeProps<Dayjs>, 'picker'> {} |
|
|
|
|
|
|
|