perf: update shallowequal

pull/2682/head
tanjinzhou 2020-08-14 18:24:30 +08:00
parent d592854c73
commit 07476d43db
6 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
import shallowEqual from 'shallowequal';
import { inject, createVNode, watchEffect, toRaw } from 'vue';
import shallowEqual from '../shallowequal';
import { inject, createVNode, watchEffect } from 'vue';
import omit from 'omit.js';
import { getOptionProps } from '../props-util';
@ -54,7 +54,7 @@ export default function connect(mapStateToProps) {
const nextSubscribed = finalMapStateToProps(this.store.getState(), props);
if (
!shallowEqual(this.preProps, props) ||
!shallowEqual(toRaw(this.subscribed), nextSubscribed)
!shallowEqual(this.subscribed, nextSubscribed)
) {
this.subscribed = nextSubscribed;
}

View File

@ -3,7 +3,7 @@ import * as moment from 'moment';
import RangeCalendar from '../vc-calendar/src/RangeCalendar';
import VcDatePicker from '../vc-calendar/src/Picker';
import classNames from 'classnames';
import shallowequal from 'shallowequal';
import shallowequal from '../_util/shallowequal';
import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
import Tag from '../tag';
import { ConfigConsumerProps } from '../config-provider';

View File

@ -3,7 +3,7 @@ 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 shallowEqual from 'shallowequal';
import shallowEqual from '../_util/shallowequal';
import FilterDropdown from './filterDropdown';
import createStore from './createStore';
import SelectionBox from './SelectionBox';

View File

@ -1,7 +1,7 @@
import PropTypes from '../../_util/vue-types';
import BaseMixin from '../../_util/BaseMixin';
import { connect } from '../../_util/store';
import shallowEqual from 'shallowequal';
import shallowEqual from '../../_util/shallowequal';
import TableRow from './TableRow';
import { remove } from './utils';
import { initDefaultProps, getOptionProps, getSlot } from '../../_util/props-util';

View File

@ -1,6 +1,6 @@
/* eslint-disable camelcase */
import { provide, markRaw } from 'vue';
import shallowequal from 'shallowequal';
import shallowequal from '../../_util/shallowequal';
import merge from 'lodash/merge';
import classes from 'component-classes';
import classNames from 'classnames';

View File

@ -19,7 +19,7 @@
* In multiple mode, we should focus on the `input`
*/
import { provide } from 'vue';
import shallowEqual from 'shallowequal';
import shallowEqual from '../../_util/shallowequal';
import raf from 'raf';
import scrollIntoView from 'dom-scroll-into-view';
import warning from 'warning';