fix(layout->user-dropdown): resolve warning "Invalid prop name: key is a reserved property" (#3640)
closed #3639
This commit is contained in:
parent
ca3ddd19f7
commit
eae68bb029
|
|
@ -14,13 +14,11 @@
|
||||||
|
|
||||||
defineOptions({ name: 'DropdownMenuItem' });
|
defineOptions({ name: 'DropdownMenuItem' });
|
||||||
|
|
||||||
const props = defineProps({
|
defineProps({
|
||||||
// eslint-disable-next-line
|
|
||||||
key: propTypes.string,
|
|
||||||
text: propTypes.string,
|
text: propTypes.string,
|
||||||
icon: propTypes.string,
|
icon: propTypes.string,
|
||||||
});
|
});
|
||||||
|
|
||||||
const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
const itemKey = computed(() => props.key || instance?.vnode?.props?.key);
|
const itemKey = computed(() => instance?.vnode?.props?.key);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue