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" (vbenjs#3640)

closed vbenjs#3639

(cherry picked from commit eae68bb)
  • Loading branch information
cszhjh authored and xxs3315 committed Mar 7, 2024
1 parent 9bd5795 commit de975d3
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 de975d3

Please sign in to comment.