We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 638ccb3 + ae41fa1 commit 57b9ac1Copy full SHA for 57b9ac1
components/vc-menu/MenuItem.jsx
@@ -38,7 +38,9 @@ const MenuItem = defineComponent({
38
setup(props) {
39
const uniKey = `menu_item_${++indexGuid}`;
40
const store = inject('menuStore', () => ({}));
41
- const isSelected = computed(() => store.selectedKeys.indexOf(props.eventKey) !== -1);
+ const isSelected = computed(
42
+ () => store.selectedKeys && store.selectedKeys.indexOf(props.eventKey) !== -1,
43
+ );
44
onMounted(() => {
45
store.addChildrenInfo(
46
uniKey,
0 commit comments