Skip to content

Commit 365a32b

Browse files
committed
style: remove omit.js
1 parent 8e111e6 commit 365a32b

File tree

21 files changed

+36
-56
lines changed

21 files changed

+36
-56
lines changed

components/affix/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
} from 'vue';
1313
import PropTypes from '../_util/vue-types';
1414
import classNames from '../_util/classNames';
15-
import omit from 'omit.js';
1615
import ResizeObserver from '../vc-resize-observer';
1716
import throttleByAnimationFrame from '../_util/throttleByAnimationFrame';
1817
import { withInstall } from '../_util/type';
@@ -24,6 +23,7 @@ import {
2423
getFixedBottom,
2524
} from './utils';
2625
import useConfigInject from '../_util/hooks/useConfigInject';
26+
import omit from '../_util/omit';
2727

2828
function getDefaultTarget() {
2929
return typeof window !== 'undefined' ? window : null;

components/auto-complete/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import Select, { selectProps } from '../select';
44
import PropTypes from '../_util/vue-types';
55
import { defaultConfigProvider } from '../config-provider';
66
import { getComponent, getOptionProps, isValidElement, getSlot } from '../_util/props-util';
7-
import Omit from 'omit.js';
87
import warning from '../_util/warning';
98
import Option from './Option';
109
import OptGroup from './OptGroup';
10+
import omit from '../_util/omit';
1111

1212
function isSelectOptionOrSelectOptGroup(child: any): boolean {
1313
return child?.type?.isSelectOption || child?.type?.isSelectOptGroup;
@@ -134,7 +134,7 @@ const AutoComplete = defineComponent({
134134
: [];
135135
}
136136
const selectProps = {
137-
...Omit(getOptionProps(this), ['dataSource', 'optionLabelProp']),
137+
...omit(getOptionProps(this) as any, ['dataSource', 'optionLabelProp']),
138138
...this.$attrs,
139139
mode: Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
140140
// optionLabelProp,

components/cascader/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import PropTypes from '../_util/vue-types';
44
import VcCascader from '../vc-cascader';
55
import arrayTreeFilter from 'array-tree-filter';
66
import classNames from '../_util/classNames';
7-
import omit from 'omit.js';
87
import KeyCode from '../_util/KeyCode';
98
import Input from '../input';
109
import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
@@ -28,6 +27,7 @@ import type { VueNode } from '../_util/type';
2827
import { tuple, withInstall } from '../_util/type';
2928
import type { RenderEmptyHandler } from '../config-provider/renderEmpty';
3029
import { useInjectFormItemContext } from '../form/FormItemContext';
30+
import omit from '../_util/omit';
3131

3232
export interface CascaderOptionType {
3333
value?: string | number;

components/drawer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type { CSSProperties } from 'vue';
22
import { inject, provide, nextTick, defineComponent } from 'vue';
33
import classnames from '../_util/classNames';
4-
import omit from 'omit.js';
54
import VcDrawer from '../vc-drawer/src';
65
import PropTypes from '../_util/vue-types';
76
import BaseMixin from '../_util/BaseMixin';
87
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
98
import { getComponent, getOptionProps } from '../_util/props-util';
109
import { defaultConfigProvider } from '../config-provider';
1110
import { tuple, withInstall } from '../_util/type';
11+
import omit from '../_util/omit';
1212

1313
const PlacementTypes = tuple('top', 'right', 'bottom', 'left');
1414
type placementType = typeof PlacementTypes[number];

components/input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import type { VNode } from 'vue';
22
import { defineComponent, inject, nextTick, withDirectives } from 'vue';
33
import antInputDirective from '../_util/antInputDirective';
44
import classNames from '../_util/classNames';
5-
import omit from 'omit.js';
65
import inputProps from './inputProps';
76
import { hasProp, getComponent, getOptionProps } from '../_util/props-util';
87
import { defaultConfigProvider } from '../config-provider';
98
import ClearableLabeledInput from './ClearableLabeledInput';
109
import { useInjectFormItemContext } from '../form/FormItemContext';
10+
import omit from '../_util/omit';
1111

1212
export function fixControlledValue(value: string | number) {
1313
if (typeof value === 'undefined' || value === null) {

components/input/ResizableTextArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { PropType, VNode } from 'vue';
22
import { nextTick, defineComponent, withDirectives } from 'vue';
33
import ResizeObserver from '../vc-resize-observer';
4-
import omit from 'omit.js';
54
import classNames from '../_util/classNames';
65
import calculateNodeHeight from './calculateNodeHeight';
76
import raf from '../_util/raf';
@@ -11,6 +10,7 @@ import inputProps from './inputProps';
1110
import PropTypes from '../_util/vue-types';
1211
import { getOptionProps } from '../_util/props-util';
1312
import antInput from '../_util/antInputDirective';
13+
import omit from '../_util/omit';
1414

1515
const RESIZE_STATUS_NONE = 0;
1616
const RESIZE_STATUS_RESIZING = 1;

components/mentions/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { App, PropType, Plugin, ExtractPropTypes } from 'vue';
22
import { watch, ref, onMounted, defineComponent, nextTick } from 'vue';
33
import classNames from '../_util/classNames';
4-
import omit from 'omit.js';
54
import PropTypes from '../_util/vue-types';
65
import VcMentions from '../vc-mentions';
76
import { mentionsProps as baseMentionsProps } from '../vc-mentions/src/mentionsProps';
87
import useConfigInject from '../_util/hooks/useConfigInject';
98
import { flattenChildren, getOptionProps } from '../_util/props-util';
109
import { useInjectFormItemContext } from '../form/FormItemContext';
10+
import omit from '../_util/omit';
1111

1212
const { Option } = VcMentions;
1313

components/modal/confirm.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { createVNode, render as vueRender } from 'vue';
22
import ConfirmDialog from './ConfirmDialog';
33
import type { ModalFuncProps } from './Modal';
44
import { destroyFns } from './Modal';
5-
6-
import Omit from 'omit.js';
75
import ConfigProvider, { globalConfig } from '../config-provider';
6+
import omit from '../_util/omit';
87

98
const defaultRootPrefixCls = '';
109

@@ -16,7 +15,7 @@ const confirm = (config: ModalFuncProps) => {
1615
const div = document.createElement('div');
1716
document.body.appendChild(div);
1817
let currentConfig = {
19-
...Omit(config, ['parentContext', 'appContext']),
18+
...omit(config, ['parentContext', 'appContext']),
2019
close,
2120
visible: true,
2221
} as any;

components/popconfirm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import omit from 'omit.js';
21
import type { ExtractPropTypes, PropType } from 'vue';
32
import { computed, onMounted, ref, toRef, defineComponent } from 'vue';
43
import Tooltip from '../tooltip';
@@ -19,6 +18,7 @@ import useConfigInject from '../_util/hooks/useConfigInject';
1918
import classNames from '../_util/classNames';
2019
import { getTransitionName } from '../_util/transition';
2120
import { cloneVNodes } from '../_util/vnode';
21+
import omit from '../_util/omit';
2222

2323
export const popconfirmProps = () => ({
2424
...abstractTooltipProps(),

components/skeleton/Input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { tuple } from '../_util/type';
55
import useConfigInject from '../_util/hooks/useConfigInject';
66
import type { SkeletonElementProps } from './Element';
77
import Element, { skeletonElementProps } from './Element';
8-
import Omit from 'omit.js';
8+
import omit from '../_util/omit';
99

1010
export interface SkeletonInputProps extends Omit<SkeletonElementProps, 'size' | 'shape'> {
1111
size?: 'large' | 'small' | 'default';
@@ -14,7 +14,7 @@ export interface SkeletonInputProps extends Omit<SkeletonElementProps, 'size' |
1414
const SkeletonInput = defineComponent({
1515
name: 'ASkeletonInput',
1616
props: {
17-
...Omit(skeletonElementProps(), 'shape'),
17+
...omit(skeletonElementProps(), ['shape']),
1818
size: PropTypes.oneOf(tuple('large', 'small', 'default')),
1919
},
2020
setup(props) {

0 commit comments

Comments
 (0)