Browse Source
fix(layout->user-dropdown): resolve warning "Invalid prop name: key is a reserved property" (#3640)
closed #3639
pull/3643/head
Zhong
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
4 deletions
-
src/layouts/default/header/components/user-dropdown/DropMenuItem.vue
|
|
|
@ -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> |
|
|
|
|