Browse Source

deps: replace obejct.omit with omit.js, close: #2988 (#2994)

pull/2996/head
Benjy Cui 8 years ago
committed by 偏右
parent
commit
1dac1370de
  1. 2
      components/back-top/index.tsx
  2. 2
      components/badge/ScrollNumber.tsx
  3. 2
      components/cascader/index.tsx
  4. 2
      components/form/Form.tsx
  5. 4
      components/input/Input.tsx
  6. 2
      components/spin/index.tsx
  7. 2
      components/tag/index.tsx
  8. 4
      custom-typings.d.ts
  9. 2
      package.json

2
components/back-top/index.tsx

@ -3,7 +3,7 @@ import Animate from 'rc-animate';
import Icon from '../icon'; import Icon from '../icon';
import addEventListener from 'rc-util/lib/Dom/addEventListener'; import addEventListener from 'rc-util/lib/Dom/addEventListener';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'object.omit'; import omit from 'omit.js';
function getScroll(target, top) { function getScroll(target, top) {
if (typeof window === 'undefined') { if (typeof window === 'undefined') {

2
components/badge/ScrollNumber.tsx

@ -3,7 +3,7 @@ import { createElement, Component } from 'react';
import {findDOMNode} from 'react-dom'; import {findDOMNode} from 'react-dom';
import isCssAnimationSupported from '../_util/isCssAnimationSupported'; import isCssAnimationSupported from '../_util/isCssAnimationSupported';
import assign from 'object-assign'; import assign from 'object-assign';
import omit from 'object.omit'; import omit from 'omit.js';
function getNumberArray(num) { function getNumberArray(num) {
return num ? return num ?

2
components/cascader/index.tsx

@ -5,7 +5,7 @@ import Icon from '../icon';
import arrayTreeFilter from 'array-tree-filter'; import arrayTreeFilter from 'array-tree-filter';
import classNames from 'classnames'; import classNames from 'classnames';
import splitObject from '../_util/splitObject'; import splitObject from '../_util/splitObject';
import omit from 'object.omit'; import omit from 'omit.js';
export interface CascaderOptionType { export interface CascaderOptionType {
value: string; value: string;

2
components/form/Form.tsx

@ -2,7 +2,7 @@ import * as React from 'react';
import { PropTypes } from 'react'; import { PropTypes } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import PureRenderMixin from 'react-addons-pure-render-mixin'; import PureRenderMixin from 'react-addons-pure-render-mixin';
import omit from 'object.omit'; import omit from 'omit.js';
import warning from 'warning'; import warning from 'warning';
import assign from 'object-assign'; import assign from 'object-assign';
import FormItem from './FormItem'; import FormItem from './FormItem';

4
components/input/Input.tsx

@ -3,7 +3,7 @@ import { Component, PropTypes } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import calculateNodeHeight from './calculateNodeHeight'; import calculateNodeHeight from './calculateNodeHeight';
import assign from 'object-assign'; import assign from 'object-assign';
import omit from 'object.omit'; import omit from 'omit.js';
function fixControlledValue(value) { function fixControlledValue(value) {
if (typeof value === 'undefined' || value === null) { if (typeof value === 'undefined' || value === null) {
@ -35,7 +35,7 @@ interface AutoSizeType {
export interface InputProps { export interface InputProps {
prefixCls?: string; prefixCls?: string;
className?: string; className?: string;
type: string; type?: string;
id?: number | string; id?: number | string;
value?: any; value?: any;
defaultValue?: any; defaultValue?: any;

2
components/spin/index.tsx

@ -4,7 +4,7 @@ import { findDOMNode } from 'react-dom';
import classNames from 'classnames'; import classNames from 'classnames';
import isCssAnimationSupported from '../_util/isCssAnimationSupported'; import isCssAnimationSupported from '../_util/isCssAnimationSupported';
import splitObject from '../_util/splitObject'; import splitObject from '../_util/splitObject';
import omit from 'object.omit'; import omit from 'omit.js';
export interface SpinProps { export interface SpinProps {
prefixCls?: string; prefixCls?: string;

2
components/tag/index.tsx

@ -4,7 +4,7 @@ import Animate from 'rc-animate';
import Icon from '../icon'; import Icon from '../icon';
import classNames from 'classnames'; import classNames from 'classnames';
import splitObject from '../_util/splitObject'; import splitObject from '../_util/splitObject';
import omit from 'object.omit'; import omit from 'omit.js';
export interface TagProps { export interface TagProps {
/** 标签是否可以关闭 */ /** 标签是否可以关闭 */

4
custom-typings.d.ts

@ -67,8 +67,8 @@ declare module "object-assign" {
export default function(target: any, ...sources: any[]): any; export default function(target: any, ...sources: any[]): any;
} }
declare module "object.omit" { declare module "omit.js" {
export default function(target: any, ...sources: any[]): any; export default function(obj: Object, fields: string[]): any;
} }
declare module 'rc-animate' { declare module 'rc-animate' {

2
package.json

@ -40,7 +40,7 @@
"gregorian-calendar": "~4.1.0", "gregorian-calendar": "~4.1.0",
"gregorian-calendar-format": "~4.1.0", "gregorian-calendar-format": "~4.1.0",
"object-assign": "~4.1.0", "object-assign": "~4.1.0",
"object.omit": "^2.0.0", "omit.js": "^0.1.0",
"rc-animate": "~2.3.0", "rc-animate": "~2.3.0",
"rc-calendar": "^7.0.3", "rc-calendar": "^7.0.3",
"rc-cascader": "~0.10.1", "rc-cascader": "~0.10.1",

Loading…
Cancel
Save