chore: use `lodash-es` to support vite (#2777)
To fix error: `Uncaught (in promise) SyntaxError: The requested module '/@modules/lodash/isPlainObject.js' does not provide an export named 'default'`pull/2784/head
parent
58b66daa1e
commit
fb52b36067
|
@ -1,7 +1,7 @@
|
|||
import interopDefault from './interopDefault';
|
||||
import moment from 'moment';
|
||||
import warning from './warning';
|
||||
import isNil from 'lodash/isNil';
|
||||
import isNil from 'lodash-es/isNil';
|
||||
|
||||
export const TimeType = {
|
||||
validator(value) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import isPlainObject from 'lodash-es/isPlainObject';
|
||||
import classNames from './classNames';
|
||||
import { isVNode, Fragment, Comment, Text, h } from 'vue';
|
||||
import { camelize, hyphenate, isOn, resolvePropValue } from './util';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import isPlainObject from 'lodash-es/isPlainObject';
|
||||
import { toType, getType, isFunction, validateType, isInteger, isArray, warn } from './utils';
|
||||
|
||||
const VuePropTypes = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import isPlainObject from 'lodash-es/isPlainObject';
|
||||
|
||||
const ObjProto = Object.prototype;
|
||||
const toString = ObjProto.toString;
|
||||
|
|
|
@ -6,7 +6,7 @@ import PropTypes from '../_util/vue-types';
|
|||
import { getComponent, getSlot, isEmptyElement } from '../_util/props-util';
|
||||
import BaseMixin from '../_util/BaseMixin';
|
||||
import { ConfigConsumerProps } from '../config-provider';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import isPlainObject from 'lodash-es/isPlainObject';
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
export default {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { inject } from 'vue';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import hasProp, { initDefaultProps, getComponent } from '../_util/props-util';
|
||||
import { ConfigConsumerProps } from '../config-provider';
|
||||
import warning from '../_util/warning';
|
||||
|
|
|
@ -5,7 +5,7 @@ import Pickr from '@simonwep/pickr/dist/pickr.es5.min';
|
|||
import Icon from '../icon';
|
||||
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
||||
import enUS from './locale/en_US';
|
||||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
|
||||
import { getOptionProps, findDOMNode } from '../_util/props-util';
|
||||
let colors = '#194d33';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { inject } from 'vue';
|
||||
import moment from 'moment';
|
||||
import omit from 'lodash/omit';
|
||||
import omit from 'lodash-es/omit';
|
||||
import MonthCalendar from '../vc-calendar/src/MonthCalendar';
|
||||
import VcDatePicker from '../vc-calendar/src/Picker';
|
||||
import classNames from '../_util/classNames';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { inject, provide } from 'vue';
|
|||
import PropTypes from '../_util/vue-types';
|
||||
import classNames from '../_util/classNames';
|
||||
import { ColProps } from '../grid/Col';
|
||||
import isRegExp from 'lodash/isRegExp';
|
||||
import isRegExp from 'lodash-es/isRegExp';
|
||||
import warning from '../_util/warning';
|
||||
import FormItem from './FormItem';
|
||||
import { initDefaultProps, getSlot } from '../_util/props-util';
|
||||
|
@ -11,7 +11,7 @@ import { getNamePath, containsNamePath } from './utils/valueUtil';
|
|||
import { defaultValidateMessages } from './utils/messages';
|
||||
import { allPromiseFinish } from './utils/asyncUtil';
|
||||
import { toArray } from './utils/typeUtil';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import isEqual from 'lodash-es/isEqual';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
|
||||
export const FormProps = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { inject, provide, Transition } from 'vue';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import cloneDeep from 'lodash-es/cloneDeep';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import classNames from '../_util/classNames';
|
||||
import getTransitionProps from '../_util/getTransitionProps';
|
||||
|
@ -25,7 +25,7 @@ import { validateRules } from './utils/validateUtil';
|
|||
import { getNamePath } from './utils/valueUtil';
|
||||
import { toArray } from './utils/typeUtil';
|
||||
import { warning } from '../vc-util/warning';
|
||||
import find from 'lodash/find';
|
||||
import find from 'lodash-es/find';
|
||||
|
||||
const iconMap = {
|
||||
success: CheckCircleFilled,
|
||||
|
|
|
@ -10,7 +10,7 @@ import { cloneElement } from '../_util/vnode';
|
|||
import PropTypes from '../_util/vue-types';
|
||||
import { getOptionProps, getComponent } from '../_util/props-util';
|
||||
import { ConfigConsumerProps } from '../config-provider';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
import isPlainObject from 'lodash-es/isPlainObject';
|
||||
|
||||
export default {
|
||||
name: 'AInputSearch',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { inject, cloneVNode, isVNode } from 'vue';
|
||||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import BaseMixin from '../_util/BaseMixin';
|
||||
import { initDefaultProps, getComponent, getSlot } from '../_util/props-util';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import padEnd from 'lodash/padEnd';
|
||||
import padEnd from 'lodash-es/padEnd';
|
||||
import { createVNode } from 'vue';
|
||||
|
||||
const Number = (_, { attrs }) => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import moment from 'moment';
|
||||
import padStart from 'lodash/padStart';
|
||||
import padStart from 'lodash-es/padStart';
|
||||
|
||||
import interopDefault from '../_util/interopDefault';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { inject } from 'vue';
|
||||
import omit from 'omit.js';
|
||||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import FolderOpenOutlined from '@ant-design/icons-vue/FolderOpenOutlined';
|
||||
import FolderOutlined from '@ant-design/icons-vue/FolderOutlined';
|
||||
import FileOutlined from '@ant-design/icons-vue/FileOutlined';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import classNames from '../_util/classNames';
|
||||
import uniqBy from 'lodash/uniqBy';
|
||||
import findIndex from 'lodash/findIndex';
|
||||
import uniqBy from 'lodash-es/uniqBy';
|
||||
import findIndex from 'lodash-es/findIndex';
|
||||
import VcUpload from '../vc-upload';
|
||||
import BaseMixin from '../_util/BaseMixin';
|
||||
import { getOptionProps, initDefaultProps, hasProp, getSlot } from '../_util/props-util';
|
||||
|
|
|
@ -4,7 +4,7 @@ import { alignElement, alignPoint } from 'dom-align';
|
|||
import addEventListener from '../vc-util/Dom/addEventListener';
|
||||
import { isWindow, buffer, isSamePoint, isSimilarValue, restoreFocus } from './util';
|
||||
import { cloneElement } from '../_util/vnode.js';
|
||||
import clonedeep from 'lodash/cloneDeep';
|
||||
import clonedeep from 'lodash-es/cloneDeep';
|
||||
import { getSlot, findDOMNode } from '../_util/props-util';
|
||||
|
||||
function getElement(func) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import KeyCode from '../../_util/KeyCode';
|
|||
import placements from './picker/placements';
|
||||
import Trigger from '../../vc-trigger';
|
||||
import moment from 'moment';
|
||||
import isNil from 'lodash/isNil';
|
||||
import isNil from 'lodash-es/isNil';
|
||||
const TimeType = {
|
||||
validator(value) {
|
||||
if (Array.isArray(value)) {
|
||||
|
|
|
@ -3,8 +3,8 @@ import BaseMixin from '../../_util/BaseMixin';
|
|||
import addEventListener from '../../vc-util/Dom/addEventListener';
|
||||
import { initDefaultProps, findDOMNode, getSlot } from '../../_util/props-util';
|
||||
import warning from '../../_util/warning';
|
||||
import debounce from 'lodash/debounce';
|
||||
import throttle from 'lodash/throttle';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import throttle from 'lodash-es/throttle';
|
||||
import parentScroll from './utils/parentScroll';
|
||||
import inViewport from './utils/inViewport';
|
||||
import { watchEffect } from 'vue';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import isMobile from './utils/isMobile';
|
||||
import isObject from 'lodash/isObject';
|
||||
import isObject from 'lodash-es/isObject';
|
||||
|
||||
export function noop() {}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import classnames from '../../_util/classNames';
|
||||
import BaseMixin from '../../_util/BaseMixin';
|
||||
import defaultProps from './default-props';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import PropTypes from '../_util/vue-types';
|
||||
import BaseMixin from '../_util/BaseMixin';
|
||||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import isFlexSupported from '../_util/isFlexSupported';
|
||||
import { filterEmpty, getSlot, getPropsData } from '../_util/props-util';
|
||||
import { cloneElement } from '../_util/vnode';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable camelcase */
|
||||
import { provide, markRaw } from 'vue';
|
||||
import shallowequal from '../../_util/shallowequal';
|
||||
import merge from 'lodash/merge';
|
||||
import merge from 'lodash-es/merge';
|
||||
import classes from 'component-classes';
|
||||
import classNames from '../../_util/classNames';
|
||||
import PropTypes from '../../_util/vue-types';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { inject } from 'vue';
|
||||
import PropTypes from '../../_util/vue-types';
|
||||
import get from 'lodash/get';
|
||||
import get from 'lodash-es/get';
|
||||
import classNames from '../../_util/classNames';
|
||||
import { isValidElement } from '../../_util/props-util';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
import ResizeObserver from 'resize-observer-polyfill';
|
||||
import PropTypes from '../../_util/vue-types';
|
||||
import BaseMixin from '../../_util/BaseMixin';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import PropTypes from '../../_util/vue-types';
|
||||
import BaseMixin from '../../_util/BaseMixin';
|
||||
import partition from 'lodash/partition';
|
||||
import partition from 'lodash-es/partition';
|
||||
import classNames from '../../_util/classNames';
|
||||
import defaultRequest from './request';
|
||||
import getUid from './uid';
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
},
|
||||
"homepage": "https://www.antdv.com/",
|
||||
"peerDependencies": {
|
||||
"vue": ">=3.0.0",
|
||||
"@vue/compiler-sfc": ">=3.0.0"
|
||||
"@vue/compiler-sfc": ">=3.0.0",
|
||||
"vue": ">=3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design-vue/babel-plugin-jsx": "^1.0.0-rc.1",
|
||||
|
@ -200,7 +200,7 @@
|
|||
"is-negative-zero": "^2.0.0",
|
||||
"ismobilejs": "^1.0.0",
|
||||
"json2mq": "^0.2.0",
|
||||
"lodash": "^4.17.5",
|
||||
"lodash-es": "^4.17.15",
|
||||
"moment": "^2.27.0",
|
||||
"node-emoji": "^1.10.0",
|
||||
"omit.js": "^2.0.0",
|
||||
|
|
Loading…
Reference in New Issue