From 06b7e33cc0a76670e669d36ee2d16428ea9ae79f Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Mon, 31 Aug 2020 16:53:19 +0800 Subject: [PATCH] chore: remove classnames --- components/_util/classNames.js | 20 +++++++++++++++++++ components/_util/props-util.js | 2 +- components/_util/util.js | 7 ++++++- components/affix/index.jsx | 2 +- components/alert/index.jsx | 2 +- components/anchor/Anchor.jsx | 2 +- components/anchor/AnchorLink.jsx | 2 +- components/back-top/index.jsx | 2 +- components/badge/Badge.jsx | 2 +- components/badge/ScrollNumber.jsx | 2 +- components/carousel/index.jsx | 2 +- components/cascader/index.jsx | 2 +- components/checkbox/Checkbox.jsx | 2 +- components/date-picker/InputIcon.js | 2 +- components/date-picker/RangePicker.jsx | 2 +- components/date-picker/WeekPicker.jsx | 2 +- components/date-picker/createPicker.js | 2 +- components/date-picker/wrapPicker.js | 2 +- components/drawer/index.jsx | 2 +- components/dropdown/dropdown-button.jsx | 2 +- components/dropdown/dropdown.jsx | 2 +- components/form/Form.jsx | 2 +- components/form/FormItem.jsx | 2 +- components/input-number/index.jsx | 2 +- components/input/ClearableLabeledInput.jsx | 2 +- components/input/Input.jsx | 2 +- components/input/Password.jsx | 2 +- components/input/ResizableTextArea.jsx | 2 +- components/input/Search.jsx | 2 +- components/layout/Sider.jsx | 2 +- components/layout/layout.jsx | 2 +- components/list/Item.jsx | 2 +- components/list/index.jsx | 2 +- components/mentions/index.jsx | 2 +- components/menu/SubMenu.jsx | 2 +- components/modal/ConfirmDialog.jsx | 2 +- components/modal/Modal.jsx | 2 +- components/pagination/Pagination.jsx | 2 +- components/progress/progress.jsx | 2 +- components/radio/Group.jsx | 2 +- components/radio/Radio.jsx | 2 +- components/skeleton/Avatar.jsx | 2 +- components/skeleton/index.jsx | 2 +- components/table/SelectionCheckboxAll.jsx | 2 +- components/table/Table.jsx | 2 +- components/table/filterDropdown.jsx | 2 +- components/timeline/Timeline.jsx | 2 +- components/timeline/TimelineItem.jsx | 2 +- components/tooltip/Tooltip.jsx | 2 +- components/transfer/ListItem.jsx | 2 +- components/transfer/index.jsx | 2 +- components/transfer/list.jsx | 2 +- components/tree-select/index.jsx | 2 +- components/tree/DirectoryTree.jsx | 2 +- components/tree/Tree.jsx | 2 +- components/upload/Upload.jsx | 2 +- components/upload/UploadList.jsx | 2 +- components/vc-calendar/src/date/DateTBody.jsx | 2 +- components/vc-checkbox/src/Checkbox.jsx | 2 +- components/vc-drawer/src/Drawer.js | 2 +- components/vc-input-number/src/index.js | 2 +- .../vc-m-feedback/src/TouchFeedback.jsx | 2 +- components/vc-mentions/src/Mentions.jsx | 2 +- components/vc-menu/SubPopupMenu.jsx | 2 +- components/vc-pagination/Pager.jsx | 2 +- components/vc-pagination/Pagination.jsx | 2 +- components/vc-rate/src/Rate.jsx | 2 +- components/vc-select/Select.jsx | 2 +- components/vc-select/SelectTrigger.jsx | 2 +- components/vc-slick/src/arrows.js | 2 +- components/vc-slick/src/dots.js | 2 +- components/vc-slick/src/inner-slider.js | 2 +- components/vc-slick/src/track.js | 2 +- components/vc-slider/src/Handle.jsx | 2 +- components/vc-slider/src/Range.jsx | 2 +- components/vc-slider/src/common/Marks.jsx | 2 +- components/vc-slider/src/common/Steps.jsx | 2 +- .../vc-slider/src/common/createSlider.jsx | 2 +- components/vc-table/src/BaseTable.jsx | 2 +- components/vc-table/src/HeadTable.jsx | 2 +- components/vc-table/src/Table.jsx | 2 +- components/vc-table/src/TableCell.jsx | 2 +- components/vc-table/src/TableHeaderRow.jsx | 2 +- components/vc-table/src/TableRow.jsx | 2 +- components/vc-time-picker/Panel.jsx | 2 +- components/vc-time-picker/Select.jsx | 2 +- components/vc-time-picker/TimePicker.jsx | 2 +- .../vc-tree-select/src/Base/BaseSelector.jsx | 2 +- .../vc-tree-select/src/SelectTrigger.jsx | 2 +- .../Selector/MultipleSelector/Selection.jsx | 2 +- components/vc-tree/src/Tree.jsx | 2 +- components/vc-tree/src/TreeNode.jsx | 2 +- components/vc-trigger/Trigger.jsx | 2 +- components/vc-upload/src/AjaxUploader.jsx | 2 +- components/vc-upload/src/IframeUploader.jsx | 2 +- package.json | 1 - 96 files changed, 119 insertions(+), 95 deletions(-) create mode 100644 components/_util/classNames.js diff --git a/components/_util/classNames.js b/components/_util/classNames.js new file mode 100644 index 000000000..984024502 --- /dev/null +++ b/components/_util/classNames.js @@ -0,0 +1,20 @@ +import { isArray, isString, isObject } from './util'; +function classNames(value) { + let res = ''; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + res += classNames(value[i]) + ' '; + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + ' '; + } + } + } + return res.trim(); +} + +export default classNames; diff --git a/components/_util/props-util.js b/components/_util/props-util.js index 5b719bc79..ad61e24e0 100644 --- a/components/_util/props-util.js +++ b/components/_util/props-util.js @@ -1,5 +1,5 @@ import isPlainObject from 'lodash/isPlainObject'; -import classNames from 'classnames'; +import classNames from './classNames'; import { isVNode, Fragment, Comment, Text, h } from 'vue'; import { camelize, hyphenate, isOn, resolvePropValue } from './util'; import isValid from './isValid'; diff --git a/components/_util/util.js b/components/_util/util.js index 8c8e7ced5..8140af3fa 100644 --- a/components/_util/util.js +++ b/components/_util/util.js @@ -1,4 +1,9 @@ -const isFunction = val => typeof val === 'function'; +export const isFunction = val => typeof val === 'function'; + +export const isArray = Array.isArray; +export const isString = val => typeof val === 'string'; +export const isSymbol = val => typeof val === 'symbol'; +export const isObject = val => val !== null && typeof val === 'object'; const onRE = /^on[^a-z]/; const isOn = key => onRE.test(key); diff --git a/components/affix/index.jsx b/components/affix/index.jsx index eb0778eaa..7eea0b00c 100644 --- a/components/affix/index.jsx +++ b/components/affix/index.jsx @@ -1,6 +1,6 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import omit from 'omit.js'; import ResizeObserver from '../vc-resize-observer'; import BaseMixin from '../_util/BaseMixin'; diff --git a/components/alert/index.jsx b/components/alert/index.jsx index ea209f039..c51b25135 100644 --- a/components/alert/index.jsx +++ b/components/alert/index.jsx @@ -8,7 +8,7 @@ import CheckCircleFilled from '@ant-design/icons-vue/CheckCircleFilled'; import ExclamationCircleFilled from '@ant-design/icons-vue/ExclamationCircleFilled'; import InfoCircleFilled from '@ant-design/icons-vue/InfoCircleFilled'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import BaseMixin from '../_util/BaseMixin'; import PropTypes from '../_util/vue-types'; import getTransitionProps from '../_util/getTransitionProps'; diff --git a/components/anchor/Anchor.jsx b/components/anchor/Anchor.jsx index 9150d5f67..b8ca299aa 100644 --- a/components/anchor/Anchor.jsx +++ b/components/anchor/Anchor.jsx @@ -1,6 +1,6 @@ import { inject, provide } from 'vue'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import addEventListener from '../vc-util/Dom/addEventListener'; import Affix from '../affix'; import scrollTo from '../_util/scrollTo'; diff --git a/components/anchor/AnchorLink.jsx b/components/anchor/AnchorLink.jsx index 40579b217..cca32ff82 100644 --- a/components/anchor/AnchorLink.jsx +++ b/components/anchor/AnchorLink.jsx @@ -1,7 +1,7 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; import { initDefaultProps, getComponent } from '../_util/props-util'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { ConfigConsumerProps } from '../config-provider'; function noop() {} diff --git a/components/back-top/index.jsx b/components/back-top/index.jsx index 0eb5e8f70..bb715156e 100644 --- a/components/back-top/index.jsx +++ b/components/back-top/index.jsx @@ -1,5 +1,5 @@ import { inject, Transition } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import backTopTypes from './backTopTypes'; import addEventListener from '../vc-util/Dom/addEventListener'; diff --git a/components/badge/Badge.jsx b/components/badge/Badge.jsx index 2ca8c5626..98368c2e1 100644 --- a/components/badge/Badge.jsx +++ b/components/badge/Badge.jsx @@ -1,7 +1,7 @@ import PropTypes from '../_util/vue-types'; import ScrollNumber from './ScrollNumber'; import { PresetColorTypes } from '../_util/colors'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { initDefaultProps, getComponent, getSlot } from '../_util/props-util'; import { cloneElement } from '../_util/vnode'; import getTransitionProps from '../_util/getTransitionProps'; diff --git a/components/badge/ScrollNumber.jsx b/components/badge/ScrollNumber.jsx index 69a01f7d8..f91f71d99 100644 --- a/components/badge/ScrollNumber.jsx +++ b/components/badge/ScrollNumber.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import BaseMixin from '../_util/BaseMixin'; import omit from 'omit.js'; diff --git a/components/carousel/index.jsx b/components/carousel/index.jsx index bf63b4738..1925d4465 100644 --- a/components/carousel/index.jsx +++ b/components/carousel/index.jsx @@ -4,7 +4,7 @@ import debounce from 'lodash/debounce'; import hasProp, { initDefaultProps, getComponent } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; import warning from '../_util/warning'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import SlickCarousel from '../vc-slick/src'; export const CarouselEffect = PropTypes.oneOf(['scrollx', 'fade']); diff --git a/components/cascader/index.jsx b/components/cascader/index.jsx index a714a46c3..1d354e3d7 100644 --- a/components/cascader/index.jsx +++ b/components/cascader/index.jsx @@ -2,7 +2,7 @@ import { inject, provide } from 'vue'; import PropTypes from '../_util/vue-types'; import VcCascader from '../vc-cascader'; import arrayTreeFilter from 'array-tree-filter'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import omit from 'omit.js'; import KeyCode from '../_util/KeyCode'; import Input from '../input'; diff --git a/components/checkbox/Checkbox.jsx b/components/checkbox/Checkbox.jsx index db0530f50..5e8bd44ac 100644 --- a/components/checkbox/Checkbox.jsx +++ b/components/checkbox/Checkbox.jsx @@ -1,6 +1,6 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import VcCheckbox from '../vc-checkbox'; import hasProp, { getOptionProps, getSlot } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/date-picker/InputIcon.js b/components/date-picker/InputIcon.js index 88a964e66..afa08a4a6 100644 --- a/components/date-picker/InputIcon.js +++ b/components/date-picker/InputIcon.js @@ -1,7 +1,7 @@ import CalendarOutlined from '@ant-design/icons-vue/CalendarOutlined'; import { isValidElement } from '../_util/props-util'; import { cloneElement } from '../_util/vnode'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; const InputIcon = (_, { attrs }) => { const { suffixIcon, prefixCls } = attrs; diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index e332f899a..757468e32 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -2,7 +2,7 @@ import { inject } from 'vue'; import * as moment from 'moment'; import RangeCalendar from '../vc-calendar/src/RangeCalendar'; import VcDatePicker from '../vc-calendar/src/Picker'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import shallowequal from '../_util/shallowequal'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; import Tag from '../tag'; diff --git a/components/date-picker/WeekPicker.jsx b/components/date-picker/WeekPicker.jsx index b552fae00..d6de7e811 100644 --- a/components/date-picker/WeekPicker.jsx +++ b/components/date-picker/WeekPicker.jsx @@ -5,7 +5,7 @@ import VcDatePicker from '../vc-calendar/src/Picker'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; import { ConfigConsumerProps } from '../config-provider'; import { hasProp, getOptionProps, initDefaultProps, getComponent } from '../_util/props-util'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import BaseMixin from '../_util/BaseMixin'; import { WeekPickerProps } from './interface'; import interopDefault from '../_util/interopDefault'; diff --git a/components/date-picker/createPicker.js b/components/date-picker/createPicker.js index cd12f4d9e..44468841e 100644 --- a/components/date-picker/createPicker.js +++ b/components/date-picker/createPicker.js @@ -3,7 +3,7 @@ import * as moment from 'moment'; import omit from 'lodash/omit'; import MonthCalendar from '../vc-calendar/src/MonthCalendar'; import VcDatePicker from '../vc-calendar/src/Picker'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; import CalendarOutlined from '@ant-design/icons-vue/CalendarOutlined'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/date-picker/wrapPicker.js b/components/date-picker/wrapPicker.js index 3c91f9d47..22b6e7128 100644 --- a/components/date-picker/wrapPicker.js +++ b/components/date-picker/wrapPicker.js @@ -1,6 +1,6 @@ import { provide, inject } from 'vue'; import TimePickerPanel from '../vc-time-picker/Panel'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; import { generateShowHourMinuteSecond } from '../time-picker'; import enUS from './locale/en_US'; diff --git a/components/drawer/index.jsx b/components/drawer/index.jsx index 2584f95d8..77a37e6d0 100644 --- a/components/drawer/index.jsx +++ b/components/drawer/index.jsx @@ -1,5 +1,5 @@ import { inject, provide, nextTick } from 'vue'; -import classnames from 'classnames'; +import classnames from '../_util/classNames'; import omit from 'omit.js'; import VcDrawer from '../vc-drawer/src'; import PropTypes from '../_util/vue-types'; diff --git a/components/dropdown/dropdown-button.jsx b/components/dropdown/dropdown-button.jsx index 891e8cc43..086bd19e3 100644 --- a/components/dropdown/dropdown-button.jsx +++ b/components/dropdown/dropdown-button.jsx @@ -1,6 +1,6 @@ import { provide, inject } from 'vue'; import Button from '../button'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import buttonTypes from '../button/buttonTypes'; import { ButtonGroupProps } from '../button/button-group'; import Dropdown from './dropdown'; diff --git a/components/dropdown/dropdown.jsx b/components/dropdown/dropdown.jsx index 5a5bf205c..f573fefe2 100644 --- a/components/dropdown/dropdown.jsx +++ b/components/dropdown/dropdown.jsx @@ -3,7 +3,7 @@ import RcDropdown from '../vc-dropdown/src/index'; import DropdownButton from './dropdown-button'; import PropTypes from '../_util/vue-types'; import { cloneElement } from '../_util/vnode'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { getOptionProps, getPropsData, diff --git a/components/form/Form.jsx b/components/form/Form.jsx index 5f3dcf387..c674ee4bf 100755 --- a/components/form/Form.jsx +++ b/components/form/Form.jsx @@ -1,6 +1,6 @@ import { inject, provide } from 'vue'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { ColProps } from '../grid/Col'; import isRegExp from 'lodash/isRegExp'; import warning from '../_util/warning'; diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index e17e1cfe4..61656e485 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -1,7 +1,7 @@ import { inject, provide, Transition } from 'vue'; import cloneDeep from 'lodash/cloneDeep'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import getTransitionProps from '../_util/getTransitionProps'; import Row from '../grid/Row'; import Col, { ColProps } from '../grid/Col'; diff --git a/components/input-number/index.jsx b/components/input-number/index.jsx index 6b82355d1..c1730db9c 100644 --- a/components/input-number/index.jsx +++ b/components/input-number/index.jsx @@ -1,7 +1,7 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; import { initDefaultProps, getOptionProps } from '../_util/props-util'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import UpOutlined from '@ant-design/icons-vue/UpOutlined'; import DownOutlined from '@ant-design/icons-vue/DownOutlined'; import VcInputNumber from '../vc-input-number/src'; diff --git a/components/input/ClearableLabeledInput.jsx b/components/input/ClearableLabeledInput.jsx index 62f3538ee..bbeb170ef 100644 --- a/components/input/ClearableLabeledInput.jsx +++ b/components/input/ClearableLabeledInput.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; import { getInputClassName } from './Input'; import PropTypes from '../_util/vue-types'; diff --git a/components/input/Input.jsx b/components/input/Input.jsx index a90ede41e..1dc080a69 100644 --- a/components/input/Input.jsx +++ b/components/input/Input.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import omit from 'omit.js'; import inputProps from './inputProps'; import { hasProp, getComponent, getOptionProps } from '../_util/props-util'; diff --git a/components/input/Password.jsx b/components/input/Password.jsx index 99ce991d6..1473d58b9 100644 --- a/components/input/Password.jsx +++ b/components/input/Password.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { getComponent, getOptionProps } from '../_util/props-util'; import Input from './Input'; import EyeOutlined from '@ant-design/icons-vue/EyeOutlined'; diff --git a/components/input/ResizableTextArea.jsx b/components/input/ResizableTextArea.jsx index 9910f6606..369d603d3 100644 --- a/components/input/ResizableTextArea.jsx +++ b/components/input/ResizableTextArea.jsx @@ -1,6 +1,6 @@ import ResizeObserver from '../vc-resize-observer'; import omit from 'omit.js'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import calculateNodeHeight from './calculateNodeHeight'; import raf from '../_util/raf'; import warning from '../_util/warning'; diff --git a/components/input/Search.jsx b/components/input/Search.jsx index 03adc0338..37e416170 100644 --- a/components/input/Search.jsx +++ b/components/input/Search.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { isMobile } from 'is-mobile'; import Input from './Input'; import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined'; diff --git a/components/layout/Sider.jsx b/components/layout/Sider.jsx index 6099a34f1..602c1efd4 100644 --- a/components/layout/Sider.jsx +++ b/components/layout/Sider.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { inject, provide } from 'vue'; import PropTypes from '../_util/vue-types'; import { diff --git a/components/layout/layout.jsx b/components/layout/layout.jsx index dacb9a3ef..24e2566a3 100644 --- a/components/layout/layout.jsx +++ b/components/layout/layout.jsx @@ -1,6 +1,6 @@ import { inject, provide } from 'vue'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { getOptionProps, getSlot } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/list/Item.jsx b/components/list/Item.jsx index e19616fbf..ba91f7c35 100644 --- a/components/list/Item.jsx +++ b/components/list/Item.jsx @@ -1,5 +1,5 @@ import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { getComponent, isStringElement, isEmptyElement, getSlot } from '../_util/props-util'; import { Col } from '../grid'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/list/index.jsx b/components/list/index.jsx index 8854953f2..474089fc2 100644 --- a/components/list/index.jsx +++ b/components/list/index.jsx @@ -1,5 +1,5 @@ import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import omit from 'omit.js'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/mentions/index.jsx b/components/mentions/index.jsx index cfd4a822a..9cc6283c1 100644 --- a/components/mentions/index.jsx +++ b/components/mentions/index.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import omit from 'omit.js'; import PropTypes from '../_util/vue-types'; import VcMentions from '../vc-mentions'; diff --git a/components/menu/SubMenu.jsx b/components/menu/SubMenu.jsx index b9b41dec7..989866306 100644 --- a/components/menu/SubMenu.jsx +++ b/components/menu/SubMenu.jsx @@ -1,6 +1,6 @@ import { inject } from 'vue'; import { SubMenu as VcSubMenu } from '../vc-menu'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import Omit from 'omit.js'; import { getSlot } from '../_util/props-util'; diff --git a/components/modal/ConfirmDialog.jsx b/components/modal/ConfirmDialog.jsx index 29d3f73af..b51efb2b4 100644 --- a/components/modal/ConfirmDialog.jsx +++ b/components/modal/ConfirmDialog.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import Dialog from './Modal'; import ActionButton from './ActionButton'; import { getConfirmLocale } from './locale'; diff --git a/components/modal/Modal.jsx b/components/modal/Modal.jsx index 7808322f3..fc8dbf50d 100644 --- a/components/modal/Modal.jsx +++ b/components/modal/Modal.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import Dialog from '../vc-dialog'; import PropTypes from '../_util/vue-types'; import addEventListener from '../vc-util/Dom/addEventListener'; diff --git a/components/pagination/Pagination.jsx b/components/pagination/Pagination.jsx index 8722a4939..5f8d35a44 100644 --- a/components/pagination/Pagination.jsx +++ b/components/pagination/Pagination.jsx @@ -11,7 +11,7 @@ import DoubleLeftOutlined from '@ant-design/icons-vue/DoubleLeftOutlined'; import DoubleRightOutlined from '@ant-design/icons-vue/DoubleRightOutlined'; import { ConfigConsumerProps } from '../config-provider'; import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; export const PaginationProps = () => ({ total: PropTypes.number, diff --git a/components/progress/progress.jsx b/components/progress/progress.jsx index 5d0f1b571..ae0694fe7 100644 --- a/components/progress/progress.jsx +++ b/components/progress/progress.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import { getOptionProps, initDefaultProps } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/radio/Group.jsx b/components/radio/Group.jsx index b5772083e..f4fbec5a2 100644 --- a/components/radio/Group.jsx +++ b/components/radio/Group.jsx @@ -1,5 +1,5 @@ import { provide, inject, nextTick } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import Radio from './Radio'; import { getOptionProps, filterEmpty, hasProp, getSlot } from '../_util/props-util'; diff --git a/components/radio/Radio.jsx b/components/radio/Radio.jsx index 56d46eaf8..d0e30eb7b 100644 --- a/components/radio/Radio.jsx +++ b/components/radio/Radio.jsx @@ -1,7 +1,7 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; import VcCheckbox from '../vc-checkbox'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { getOptionProps } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/skeleton/Avatar.jsx b/components/skeleton/Avatar.jsx index 75f5671c5..49a58d59d 100644 --- a/components/skeleton/Avatar.jsx +++ b/components/skeleton/Avatar.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import { initDefaultProps } from '../_util/props-util'; diff --git a/components/skeleton/index.jsx b/components/skeleton/index.jsx index 5e5e7fd92..b1e681784 100644 --- a/components/skeleton/index.jsx +++ b/components/skeleton/index.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import { initDefaultProps, hasProp } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/table/SelectionCheckboxAll.jsx b/components/table/SelectionCheckboxAll.jsx index fa16cc8f6..75de379d6 100644 --- a/components/table/SelectionCheckboxAll.jsx +++ b/components/table/SelectionCheckboxAll.jsx @@ -2,7 +2,7 @@ import DownOutlined from '@ant-design/icons-vue/DownOutlined'; import Checkbox from '../checkbox'; import Dropdown from '../dropdown'; import Menu from '../menu'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { SelectionCheckboxAllProps } from './interface'; import BaseMixin from '../_util/BaseMixin'; diff --git a/components/table/Table.jsx b/components/table/Table.jsx index 2b52f3085..e3c39cfb5 100755 --- a/components/table/Table.jsx +++ b/components/table/Table.jsx @@ -2,7 +2,7 @@ import { inject, markRaw } from 'vue'; import CaretUpFilled from '@ant-design/icons-vue/CaretUpFilled'; import CaretDownFilled from '@ant-design/icons-vue/CaretDownFilled'; import VcTable, { INTERNAL_COL_DEFINE } from '../vc-table'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import shallowEqual from '../_util/shallowequal'; import FilterDropdown from './filterDropdown'; import createStore from './createStore'; diff --git a/components/table/filterDropdown.jsx b/components/table/filterDropdown.jsx index d201cf4eb..5e4723115 100755 --- a/components/table/filterDropdown.jsx +++ b/components/table/filterDropdown.jsx @@ -1,7 +1,7 @@ import FilterFilled from '@ant-design/icons-vue/FilterFilled'; import Menu, { SubMenu, Item as MenuItem } from '../vc-menu'; import closest from 'dom-closest'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import shallowequal from '../_util/shallowequal'; import Dropdown from '../dropdown'; import Checkbox from '../checkbox'; diff --git a/components/timeline/Timeline.jsx b/components/timeline/Timeline.jsx index 65e886639..7dab2fd33 100644 --- a/components/timeline/Timeline.jsx +++ b/components/timeline/Timeline.jsx @@ -1,5 +1,5 @@ import { inject, cloneVNode } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import { getOptionProps, diff --git a/components/timeline/TimelineItem.jsx b/components/timeline/TimelineItem.jsx index ad8e8920a..fee9d95bd 100644 --- a/components/timeline/TimelineItem.jsx +++ b/components/timeline/TimelineItem.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import { getOptionProps, initDefaultProps, getComponent } from '../_util/props-util'; import { ConfigConsumerProps } from '../config-provider'; diff --git a/components/tooltip/Tooltip.jsx b/components/tooltip/Tooltip.jsx index 59c098035..9d2fb35b4 100644 --- a/components/tooltip/Tooltip.jsx +++ b/components/tooltip/Tooltip.jsx @@ -1,6 +1,6 @@ import { inject } from 'vue'; import VcTooltip from '../vc-tooltip'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import getPlacements from './placements'; import PropTypes from '../_util/vue-types'; import { diff --git a/components/transfer/ListItem.jsx b/components/transfer/ListItem.jsx index 5f55923ae..ec7da984b 100644 --- a/components/transfer/ListItem.jsx +++ b/components/transfer/ListItem.jsx @@ -1,5 +1,5 @@ import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import Lazyload from '../vc-lazy-load'; import Checkbox from '../checkbox'; diff --git a/components/transfer/index.jsx b/components/transfer/index.jsx index 95e799a8e..caa841453 100644 --- a/components/transfer/index.jsx +++ b/components/transfer/index.jsx @@ -2,7 +2,7 @@ import { inject } from 'vue'; import PropTypes from '../_util/vue-types'; import { hasProp, initDefaultProps, getOptionProps, getComponent } from '../_util/props-util'; import BaseMixin from '../_util/BaseMixin'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import List from './list'; import Operation from './operation'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; diff --git a/components/transfer/list.jsx b/components/transfer/list.jsx index 83d236647..e8a41131a 100644 --- a/components/transfer/list.jsx +++ b/components/transfer/list.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import { isValidElement, diff --git a/components/tree-select/index.jsx b/components/tree-select/index.jsx index 8c472ab0b..23ec07022 100644 --- a/components/tree-select/index.jsx +++ b/components/tree-select/index.jsx @@ -1,6 +1,6 @@ import VcTreeSelect, { TreeNode, SHOW_ALL, SHOW_PARENT, SHOW_CHILD } from '../vc-tree-select'; import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { TreeSelectProps } from './interface'; import warning from '../_util/warning'; import { initDefaultProps, getOptionProps, getComponent, getSlot } from '../_util/props-util'; diff --git a/components/tree/DirectoryTree.jsx b/components/tree/DirectoryTree.jsx index f0ae19112..883c35326 100644 --- a/components/tree/DirectoryTree.jsx +++ b/components/tree/DirectoryTree.jsx @@ -5,7 +5,7 @@ import FolderOpenOutlined from '@ant-design/icons-vue/FolderOpenOutlined'; import FolderOutlined from '@ant-design/icons-vue/FolderOutlined'; import FileOutlined from '@ant-design/icons-vue/FileOutlined'; import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { conductExpandParent, convertTreeToEntities } from '../vc-tree/src/util'; import Tree, { TreeProps } from './Tree'; import { diff --git a/components/tree/Tree.jsx b/components/tree/Tree.jsx index 6e3f383e5..ef301c293 100644 --- a/components/tree/Tree.jsx +++ b/components/tree/Tree.jsx @@ -1,5 +1,5 @@ import { inject } from 'vue'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined'; import FileOutlined from '@ant-design/icons-vue/FileOutlined'; import CaretDownFilled from '@ant-design/icons-vue/CaretDownFilled'; diff --git a/components/upload/Upload.jsx b/components/upload/Upload.jsx index 197740bf1..ccd6a004e 100644 --- a/components/upload/Upload.jsx +++ b/components/upload/Upload.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import uniqBy from 'lodash/uniqBy'; import findIndex from 'lodash/findIndex'; import VcUpload from '../vc-upload'; diff --git a/components/upload/UploadList.jsx b/components/upload/UploadList.jsx index 16706ac53..82353281c 100644 --- a/components/upload/UploadList.jsx +++ b/components/upload/UploadList.jsx @@ -13,7 +13,7 @@ import DownloadOutlined from '@ant-design/icons-vue/DownloadOutlined'; import EyeOutlined from '@ant-design/icons-vue/EyeOutlined'; import Tooltip from '../tooltip'; import Progress from '../progress'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { UploadListProps } from './interface'; export default { diff --git a/components/vc-calendar/src/date/DateTBody.jsx b/components/vc-calendar/src/date/DateTBody.jsx index be5358a5f..3b6646724 100644 --- a/components/vc-calendar/src/date/DateTBody.jsx +++ b/components/vc-calendar/src/date/DateTBody.jsx @@ -1,6 +1,6 @@ import PropTypes from '../../../_util/vue-types'; import { getOptionProps } from '../../../_util/props-util'; -import cx from 'classnames'; +import cx from '../../../_util/classNames'; import DateConstants from './DateConstants'; import { getTitleString, getTodayTime } from '../util/'; function noop() {} diff --git a/components/vc-checkbox/src/Checkbox.jsx b/components/vc-checkbox/src/Checkbox.jsx index 9c22a08e8..2828dcd25 100644 --- a/components/vc-checkbox/src/Checkbox.jsx +++ b/components/vc-checkbox/src/Checkbox.jsx @@ -1,5 +1,5 @@ import { nextTick } from 'vue'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import PropTypes from '../../_util/vue-types'; import BaseMixin from '../../_util/BaseMixin'; import { getOptionProps, hasProp, initDefaultProps } from '../../_util/props-util'; diff --git a/components/vc-drawer/src/Drawer.js b/components/vc-drawer/src/Drawer.js index 6a58fd05e..eac3691ec 100644 --- a/components/vc-drawer/src/Drawer.js +++ b/components/vc-drawer/src/Drawer.js @@ -1,4 +1,4 @@ -import classnames from 'classnames'; +import classnames from '../../_util/classNames'; import { cloneVNode, Teleport, nextTick } from 'vue'; import BaseMixin from '../../_util/BaseMixin'; import { initDefaultProps, getSlot } from '../../_util/props-util'; diff --git a/components/vc-input-number/src/index.js b/components/vc-input-number/src/index.js index b57930d62..6f9a72971 100755 --- a/components/vc-input-number/src/index.js +++ b/components/vc-input-number/src/index.js @@ -2,7 +2,7 @@ import PropTypes from '../../_util/vue-types'; import BaseMixin from '../../_util/BaseMixin'; import { initDefaultProps, hasProp, getOptionProps } from '../../_util/props-util'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import KeyCode from '../../_util/KeyCode'; import InputHandler from './InputHandler'; diff --git a/components/vc-m-feedback/src/TouchFeedback.jsx b/components/vc-m-feedback/src/TouchFeedback.jsx index 89c388911..73187ee0f 100755 --- a/components/vc-m-feedback/src/TouchFeedback.jsx +++ b/components/vc-m-feedback/src/TouchFeedback.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import { initDefaultProps, getSlot } from '../../_util/props-util'; import { cloneElement } from '../../_util/vnode'; import warning from '../../_util/warning'; diff --git a/components/vc-mentions/src/Mentions.jsx b/components/vc-mentions/src/Mentions.jsx index 45b3ac72a..8071753de 100644 --- a/components/vc-mentions/src/Mentions.jsx +++ b/components/vc-mentions/src/Mentions.jsx @@ -1,5 +1,5 @@ import { provide } from 'vue'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import omit from 'omit.js'; import KeyCode from '../../_util/KeyCode'; import BaseMixin from '../../_util/BaseMixin'; diff --git a/components/vc-menu/SubPopupMenu.jsx b/components/vc-menu/SubPopupMenu.jsx index 5843cdfbb..72b4bca7d 100644 --- a/components/vc-menu/SubPopupMenu.jsx +++ b/components/vc-menu/SubPopupMenu.jsx @@ -3,7 +3,7 @@ import PropTypes from '../_util/vue-types'; import { connect } from '../_util/store'; import BaseMixin from '../_util/BaseMixin'; import KeyCode from '../_util/KeyCode'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { getKeyFromChildrenIndex, loopMenuItem, noop, isMobileDevice, menuAllProps } from './util'; import DOMWrap from './DOMWrap'; import { cloneElement } from '../_util/vnode'; diff --git a/components/vc-pagination/Pager.jsx b/components/vc-pagination/Pager.jsx index 66272ab26..4023aca32 100644 --- a/components/vc-pagination/Pager.jsx +++ b/components/vc-pagination/Pager.jsx @@ -1,5 +1,5 @@ import PropTypes from '../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import BaseMixin from '../_util/BaseMixin'; export default { diff --git a/components/vc-pagination/Pagination.jsx b/components/vc-pagination/Pagination.jsx index 5f450ad14..6ab628450 100644 --- a/components/vc-pagination/Pagination.jsx +++ b/components/vc-pagination/Pagination.jsx @@ -5,7 +5,7 @@ import Pager from './Pager'; import Options from './Options'; import LOCALE from './locale/zh_CN'; import KEYCODE from './KeyCode'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; function noop() {} diff --git a/components/vc-rate/src/Rate.jsx b/components/vc-rate/src/Rate.jsx index 9061b923c..34d323888 100644 --- a/components/vc-rate/src/Rate.jsx +++ b/components/vc-rate/src/Rate.jsx @@ -1,5 +1,5 @@ import PropTypes from '../../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import KeyCode from '../../_util/KeyCode'; import { initDefaultProps, diff --git a/components/vc-select/Select.jsx b/components/vc-select/Select.jsx index e536b705f..d9b0d59c0 100644 --- a/components/vc-select/Select.jsx +++ b/components/vc-select/Select.jsx @@ -1,7 +1,7 @@ import { TransitionGroup } from 'vue'; import KeyCode from '../_util/KeyCode'; import PropTypes from '../_util/vue-types'; -import classnames from 'classnames'; +import classnames from '../_util/classNames'; import classes from 'component-classes'; import { Item as MenuItem, ItemGroup as MenuItemGroup } from '../vc-menu'; import warning from 'warning'; diff --git a/components/vc-select/SelectTrigger.jsx b/components/vc-select/SelectTrigger.jsx index bddf07d25..31e735482 100644 --- a/components/vc-select/SelectTrigger.jsx +++ b/components/vc-select/SelectTrigger.jsx @@ -1,4 +1,4 @@ -import classnames from 'classnames'; +import classnames from '../_util/classNames'; import raf from 'raf'; import Trigger from '../vc-trigger'; import PropTypes from '../_util/vue-types'; diff --git a/components/vc-slick/src/arrows.js b/components/vc-slick/src/arrows.js index fc580728a..67a622203 100644 --- a/components/vc-slick/src/arrows.js +++ b/components/vc-slick/src/arrows.js @@ -1,4 +1,4 @@ -import classnames from 'classnames'; +import classnames from '../../_util/classNames'; import { cloneElement } from '../../_util/vnode'; import { canGoNext } from './utils/innerSliderUtils'; diff --git a/components/vc-slick/src/dots.js b/components/vc-slick/src/dots.js index 64a5f59cd..398ad8083 100644 --- a/components/vc-slick/src/dots.js +++ b/components/vc-slick/src/dots.js @@ -1,4 +1,4 @@ -import classnames from 'classnames'; +import classnames from '../../_util/classNames'; import { cloneElement } from '../../_util/vnode'; const getDotCount = function(spec) { diff --git a/components/vc-slick/src/inner-slider.js b/components/vc-slick/src/inner-slider.js index 67778335b..8767518ce 100644 --- a/components/vc-slick/src/inner-slider.js +++ b/components/vc-slick/src/inner-slider.js @@ -1,5 +1,5 @@ import debounce from 'lodash/debounce'; -import classnames from 'classnames'; +import classnames from '../../_util/classNames'; import BaseMixin from '../../_util/BaseMixin'; import defaultProps from './default-props'; import initialState from './initial-state'; diff --git a/components/vc-slick/src/track.js b/components/vc-slick/src/track.js index 8af84cb77..6b2c8f622 100644 --- a/components/vc-slick/src/track.js +++ b/components/vc-slick/src/track.js @@ -1,5 +1,5 @@ import { createVNode } from 'vue'; -import classnames from 'classnames'; +import classnames from '../../_util/classNames'; import { cloneElement } from '../../_util/vnode'; import { flattenChildren } from '../../_util/props-util'; import { lazyStartIndex, lazyEndIndex, getPreClones } from './utils/innerSliderUtils'; diff --git a/components/vc-slider/src/Handle.jsx b/components/vc-slider/src/Handle.jsx index 907a42399..4359e85be 100644 --- a/components/vc-slider/src/Handle.jsx +++ b/components/vc-slider/src/Handle.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import PropTypes from '../../_util/vue-types'; import BaseMixin from '../../_util/BaseMixin'; import { getOptionProps } from '../../_util/props-util'; diff --git a/components/vc-slider/src/Range.jsx b/components/vc-slider/src/Range.jsx index c2e720a30..f05e085cc 100644 --- a/components/vc-slider/src/Range.jsx +++ b/components/vc-slider/src/Range.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import PropTypes from '../../_util/vue-types'; import BaseMixin from '../../_util/BaseMixin'; import { initDefaultProps, hasProp } from '../../_util/props-util'; diff --git a/components/vc-slider/src/common/Marks.jsx b/components/vc-slider/src/common/Marks.jsx index 1fc43db31..0886fcdc3 100644 --- a/components/vc-slider/src/common/Marks.jsx +++ b/components/vc-slider/src/common/Marks.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../../_util/classNames'; import { isValidElement } from '../../../_util/props-util'; const Marks = (_, { attrs }) => { diff --git a/components/vc-slider/src/common/Steps.jsx b/components/vc-slider/src/common/Steps.jsx index 47b6911a1..c34be3990 100644 --- a/components/vc-slider/src/common/Steps.jsx +++ b/components/vc-slider/src/common/Steps.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../../_util/classNames'; import warning from '../../../_util/warning'; const calcPoints = (vertical, marks, dots, step, min, max) => { diff --git a/components/vc-slider/src/common/createSlider.jsx b/components/vc-slider/src/common/createSlider.jsx index 1143d368d..18cfc127b 100644 --- a/components/vc-slider/src/common/createSlider.jsx +++ b/components/vc-slider/src/common/createSlider.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../../_util/classNames'; import PropTypes from '../../../_util/vue-types'; import addEventListener from '../../../vc-util/Dom/addEventListener'; import warning from '../../../_util/warning'; diff --git a/components/vc-table/src/BaseTable.jsx b/components/vc-table/src/BaseTable.jsx index 7e58f19c5..446222ed8 100644 --- a/components/vc-table/src/BaseTable.jsx +++ b/components/vc-table/src/BaseTable.jsx @@ -1,6 +1,6 @@ import { inject } from 'vue'; import PropTypes from '../../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import ColGroup from './ColGroup'; import TableHeader from './TableHeader'; import TableRow from './TableRow'; diff --git a/components/vc-table/src/HeadTable.jsx b/components/vc-table/src/HeadTable.jsx index af640b1ac..4706ffcda 100644 --- a/components/vc-table/src/HeadTable.jsx +++ b/components/vc-table/src/HeadTable.jsx @@ -2,7 +2,7 @@ import { inject } from 'vue'; import PropTypes from '../../_util/vue-types'; import { measureScrollbar } from './utils'; import BaseTable from './BaseTable'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; export default { name: 'HeadTable', diff --git a/components/vc-table/src/Table.jsx b/components/vc-table/src/Table.jsx index 522efc9dd..6acd60ff7 100644 --- a/components/vc-table/src/Table.jsx +++ b/components/vc-table/src/Table.jsx @@ -3,7 +3,7 @@ import { provide, markRaw } from 'vue'; import shallowequal from '../../_util/shallowequal'; import merge from 'lodash/merge'; import classes from 'component-classes'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import PropTypes from '../../_util/vue-types'; import { debounce, getDataAndAriaProps } from './utils'; import warning from '../../_util/warning'; diff --git a/components/vc-table/src/TableCell.jsx b/components/vc-table/src/TableCell.jsx index b196c6b96..f46e55709 100644 --- a/components/vc-table/src/TableCell.jsx +++ b/components/vc-table/src/TableCell.jsx @@ -1,7 +1,7 @@ import { inject } from 'vue'; import PropTypes from '../../_util/vue-types'; import get from 'lodash/get'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import { isValidElement } from '../../_util/props-util'; function isInvalidRenderCellText(text) { diff --git a/components/vc-table/src/TableHeaderRow.jsx b/components/vc-table/src/TableHeaderRow.jsx index 9d1037958..3a26f00d1 100644 --- a/components/vc-table/src/TableHeaderRow.jsx +++ b/components/vc-table/src/TableHeaderRow.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import PropTypes from '../../_util/vue-types'; import { connect } from '../../_util/store'; diff --git a/components/vc-table/src/TableRow.jsx b/components/vc-table/src/TableRow.jsx index 0dc7aca48..4e4bd52da 100644 --- a/components/vc-table/src/TableRow.jsx +++ b/components/vc-table/src/TableRow.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import PropTypes from '../../_util/vue-types'; import { connect } from '../../_util/store'; import TableCell from './TableCell'; diff --git a/components/vc-time-picker/Panel.jsx b/components/vc-time-picker/Panel.jsx index 741e5400f..29993ec34 100644 --- a/components/vc-time-picker/Panel.jsx +++ b/components/vc-time-picker/Panel.jsx @@ -1,5 +1,5 @@ import moment from 'moment'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import BaseMixin from '../_util/BaseMixin'; import Header from './Header'; diff --git a/components/vc-time-picker/Select.jsx b/components/vc-time-picker/Select.jsx index a305f0c31..a9a7fcc48 100644 --- a/components/vc-time-picker/Select.jsx +++ b/components/vc-time-picker/Select.jsx @@ -1,6 +1,6 @@ import PropTypes from '../_util/vue-types'; import BaseMixin from '../_util/BaseMixin'; -import classnames from 'classnames'; +import classnames from '../_util/classNames'; import raf from 'raf'; import { findDOMNode } from '../_util/props-util'; diff --git a/components/vc-time-picker/TimePicker.jsx b/components/vc-time-picker/TimePicker.jsx index 18fd05084..614f7c956 100644 --- a/components/vc-time-picker/TimePicker.jsx +++ b/components/vc-time-picker/TimePicker.jsx @@ -1,5 +1,5 @@ import moment from 'moment'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import PropTypes from '../_util/vue-types'; import BaseMixin from '../_util/BaseMixin'; import { diff --git a/components/vc-tree-select/src/Base/BaseSelector.jsx b/components/vc-tree-select/src/Base/BaseSelector.jsx index 94689f398..992c1ff54 100644 --- a/components/vc-tree-select/src/Base/BaseSelector.jsx +++ b/components/vc-tree-select/src/Base/BaseSelector.jsx @@ -8,7 +8,7 @@ import { inject } from 'vue'; import { createRef } from '../util'; import PropTypes from '../../../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../../../_util/classNames'; import { initDefaultProps, getComponent } from '../../../_util/props-util'; import BaseMixin from '../../../_util/BaseMixin'; export const selectorPropTypes = () => ({ diff --git a/components/vc-tree-select/src/SelectTrigger.jsx b/components/vc-tree-select/src/SelectTrigger.jsx index 9ba348489..c9e916d87 100644 --- a/components/vc-tree-select/src/SelectTrigger.jsx +++ b/components/vc-tree-select/src/SelectTrigger.jsx @@ -1,7 +1,7 @@ import PropTypes from '../../_util/vue-types'; import Trigger from '../../vc-trigger'; import { createRef } from './util'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import { getSlot } from '../../_util/props-util'; const BUILT_IN_PLACEMENTS = { diff --git a/components/vc-tree-select/src/Selector/MultipleSelector/Selection.jsx b/components/vc-tree-select/src/Selector/MultipleSelector/Selection.jsx index 834b1ff6b..11f13cebf 100644 --- a/components/vc-tree-select/src/Selector/MultipleSelector/Selection.jsx +++ b/components/vc-tree-select/src/Selector/MultipleSelector/Selection.jsx @@ -1,4 +1,4 @@ -import classNames from 'classnames'; +import classNames from '../../../../_util/classNames'; import PropTypes from '../../../../_util/vue-types'; import { toTitle, UNSELECTABLE_ATTRIBUTE, UNSELECTABLE_STYLE } from '../../util'; import { getComponent } from '../../../../_util/props-util'; diff --git a/components/vc-tree/src/Tree.jsx b/components/vc-tree/src/Tree.jsx index 189093752..e7e32e7f0 100644 --- a/components/vc-tree/src/Tree.jsx +++ b/components/vc-tree/src/Tree.jsx @@ -1,5 +1,5 @@ import PropTypes from '../../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import warning from 'warning'; import { hasProp, initDefaultProps, getOptionProps, getSlot } from '../../_util/props-util'; import { cloneElement } from '../../_util/vnode'; diff --git a/components/vc-tree/src/TreeNode.jsx b/components/vc-tree/src/TreeNode.jsx index d668a94c5..5ece80c5a 100644 --- a/components/vc-tree/src/TreeNode.jsx +++ b/components/vc-tree/src/TreeNode.jsx @@ -1,6 +1,6 @@ import { inject, provide, Transition } from 'vue'; import PropTypes from '../../_util/vue-types'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import { getNodeChildren, mapChildren, warnOnlyTreeNode, getDataAndAria } from './util'; import { initDefaultProps, getComponent, getSlot } from '../../_util/props-util'; import BaseMixin from '../../_util/BaseMixin'; diff --git a/components/vc-trigger/Trigger.jsx b/components/vc-trigger/Trigger.jsx index 5ff0739ae..1dc384973 100644 --- a/components/vc-trigger/Trigger.jsx +++ b/components/vc-trigger/Trigger.jsx @@ -16,7 +16,7 @@ import Popup from './Popup'; import { getAlignFromPlacement, getAlignPopupClassName, noop } from './utils'; import BaseMixin from '../_util/BaseMixin'; import Portal from '../_util/Portal'; -import classNames from 'classnames'; +import classNames from '../_util/classNames'; import { cloneElement } from '../_util/vnode'; function returnEmptyString() { diff --git a/components/vc-upload/src/AjaxUploader.jsx b/components/vc-upload/src/AjaxUploader.jsx index ab6f4cdd9..8d7f3a872 100644 --- a/components/vc-upload/src/AjaxUploader.jsx +++ b/components/vc-upload/src/AjaxUploader.jsx @@ -1,7 +1,7 @@ import PropTypes from '../../_util/vue-types'; import BaseMixin from '../../_util/BaseMixin'; import partition from 'lodash/partition'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import defaultRequest from './request'; import getUid from './uid'; import attrAccept from './attr-accept'; diff --git a/components/vc-upload/src/IframeUploader.jsx b/components/vc-upload/src/IframeUploader.jsx index 41f2ab952..e9a15a2d6 100644 --- a/components/vc-upload/src/IframeUploader.jsx +++ b/components/vc-upload/src/IframeUploader.jsx @@ -1,6 +1,6 @@ import PropTypes from '../../_util/vue-types'; import BaseMixin from '../../_util/BaseMixin'; -import classNames from 'classnames'; +import classNames from '../../_util/classNames'; import getUid from './uid'; import warning from '../../_util/warning'; import { getSlot, findDOMNode } from '../../_util/props-util'; diff --git a/package.json b/package.json index f567de747..15dedde73 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,6 @@ "array-tree-filter": "^2.1.0", "async-validator": "^3.3.0", "babel-helper-vue-jsx-merge-props": "^2.0.3", - "classnames": "^2.2.5", "component-classes": "^1.2.6", "dom-align": "^1.10.4", "dom-closest": "^0.2.0",