Skip to content

Commit

Permalink
fix(layout->user-dropdown): resolve warning "Invalid prop name: key i…
Browse files Browse the repository at this point in the history
…s a reserved property" (#3640)

closed #3639
  • Loading branch information
cszhjh authored Mar 2, 2024
1 parent ca3ddd1 commit eae68bb
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
defineOptions({ name: 'DropdownMenuItem' });
const props = defineProps({
// eslint-disable-next-line
key: propTypes.string,
defineProps({
text: propTypes.string,
icon: propTypes.string,
});
const instance = getCurrentInstance();
const itemKey = computed(() => props.key || instance?.vnode?.props?.key);
const itemKey = computed(() => instance?.vnode?.props?.key);
</script>

0 comments on commit eae68bb

Please sign in to comment.