Skip to content

Commit 07476d4

Browse files
committed
perf: update shallowequal
1 parent d592854 commit 07476d4

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

components/_util/store/connect.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import shallowEqual from 'shallowequal';
2-
import { inject, createVNode, watchEffect, toRaw } from 'vue';
1+
import shallowEqual from '../shallowequal';
2+
import { inject, createVNode, watchEffect } from 'vue';
33
import omit from 'omit.js';
44
import { getOptionProps } from '../props-util';
55

@@ -54,7 +54,7 @@ export default function connect(mapStateToProps) {
5454
const nextSubscribed = finalMapStateToProps(this.store.getState(), props);
5555
if (
5656
!shallowEqual(this.preProps, props) ||
57-
!shallowEqual(toRaw(this.subscribed), nextSubscribed)
57+
!shallowEqual(this.subscribed, nextSubscribed)
5858
) {
5959
this.subscribed = nextSubscribed;
6060
}

components/date-picker/RangePicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as moment from 'moment';
33
import RangeCalendar from '../vc-calendar/src/RangeCalendar';
44
import VcDatePicker from '../vc-calendar/src/Picker';
55
import classNames from 'classnames';
6-
import shallowequal from 'shallowequal';
6+
import shallowequal from '../_util/shallowequal';
77
import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
88
import Tag from '../tag';
99
import { ConfigConsumerProps } from '../config-provider';

components/table/Table.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import CaretUpFilled from '@ant-design/icons-vue/CaretUpFilled';
33
import CaretDownFilled from '@ant-design/icons-vue/CaretDownFilled';
44
import VcTable, { INTERNAL_COL_DEFINE } from '../vc-table';
55
import classNames from 'classnames';
6-
import shallowEqual from 'shallowequal';
6+
import shallowEqual from '../_util/shallowequal';
77
import FilterDropdown from './filterDropdown';
88
import createStore from './createStore';
99
import SelectionBox from './SelectionBox';

components/vc-table/src/ExpandableTable.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PropTypes from '../../_util/vue-types';
22
import BaseMixin from '../../_util/BaseMixin';
33
import { connect } from '../../_util/store';
4-
import shallowEqual from 'shallowequal';
4+
import shallowEqual from '../../_util/shallowequal';
55
import TableRow from './TableRow';
66
import { remove } from './utils';
77
import { initDefaultProps, getOptionProps, getSlot } from '../../_util/props-util';

components/vc-table/src/Table.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable camelcase */
22
import { provide, markRaw } from 'vue';
3-
import shallowequal from 'shallowequal';
3+
import shallowequal from '../../_util/shallowequal';
44
import merge from 'lodash/merge';
55
import classes from 'component-classes';
66
import classNames from 'classnames';

components/vc-tree-select/src/Select.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* In multiple mode, we should focus on the `input`
2020
*/
2121
import { provide } from 'vue';
22-
import shallowEqual from 'shallowequal';
22+
import shallowEqual from '../../_util/shallowequal';
2323
import raf from 'raf';
2424
import scrollIntoView from 'dom-scroll-into-view';
2525
import warning from 'warning';

0 commit comments

Comments
 (0)