Skip to content

Commit 520d6a5

Browse files
committed
perf: menu warning error
1 parent 5af2653 commit 520d6a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/vc-menu/MenuItem.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import BaseMixin from '../_util/BaseMixin';
44
import scrollIntoView from 'dom-scroll-into-view';
55
import { noop, menuAllProps } from './util';
66
import { getComponent, getSlot, findDOMNode } from '../_util/props-util';
7-
import { computed, defineComponent, inject, onBeforeUnmount, onMounted } from 'vue';
7+
import { computed, defineComponent, inject, onBeforeUnmount, onMounted, toRaw } from 'vue';
88
import InjectExtraProps from './InjectExtraProps';
99
const props = {
1010
attribute: PropTypes.object,
@@ -119,7 +119,7 @@ const MenuItem = defineComponent({
119119
const info = {
120120
key: eventKey,
121121
keyPath: [eventKey],
122-
item: this,
122+
item: { ...toRaw(this.$props), isSelected },
123123
domEvent: e,
124124
};
125125

0 commit comments

Comments
 (0)