mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-02-02 16:45:24 +08:00
【issues/6855】组件使用key作props报警告,改为itemKey
This commit is contained in:
@ -18,13 +18,16 @@
|
||||
name: 'DropdownMenuItem',
|
||||
components: { MenuItem: Menu.Item, Icon },
|
||||
props: {
|
||||
key: propTypes.string,
|
||||
// 【issues/6855】
|
||||
itemKey: propTypes.string,
|
||||
text: propTypes.string,
|
||||
icon: propTypes.string,
|
||||
},
|
||||
setup(props) {
|
||||
const instance = getCurrentInstance();
|
||||
const itemKey = computed(() => props.key || instance?.vnode?.props?.key);
|
||||
// update-begin--author:liaozhiyang---date:20240717---for:【issues/6855】组件使用key作props报警告,改为itemKey
|
||||
const itemKey = computed(() => props.itemKey || instance?.vnode?.props?.itemKey);
|
||||
// update-end--author:liaozhiyang---date:20240717---for:【issues/6855】组件使用key作props报警告,改为itemKey
|
||||
return { itemKey };
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user