fix: table filter (#3650)

pull/3667/head
zkwolf 2021-02-06 13:47:44 +08:00 committed by GitHub
parent 18ce372a13
commit ae41fa1127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ const MenuItem = defineComponent({
setup(props) {
const uniKey = `menu_item_${++indexGuid}`;
const store = inject('menuStore', () => ({}));
const isSelected = computed(() => store.selectedKeys.indexOf(props.eventKey) !== -1);
const isSelected = computed(
() => store.selectedKeys && store.selectedKeys.indexOf(props.eventKey) !== -1,
);
onMounted(() => {
store.addChildrenInfo(
uniKey,