From 4753a74456fad05dc5ce6e155807a88b8bffe148 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Fri, 19 Jul 2024 11:40:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/6855=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8key=E4=BD=9Cprops=E6=8A=A5=E8=AD=A6=E5=91=8A?= =?UTF-8?q?=EF=BC=8C=E6=94=B9=E4=B8=BAitemKey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/user-dropdown/DropMenuItem.vue | 7 +++++-- .../header/components/user-dropdown/index.vue | 14 +++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue b/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue index aa193d5b..7bc9d760 100644 --- a/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue +++ b/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/DropMenuItem.vue @@ -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 }; }, }); diff --git a/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/index.vue b/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/index.vue index ee988f1b..bfd586d2 100644 --- a/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/index.vue +++ b/jeecgboot-vue3/src/layouts/default/header/components/user-dropdown/index.vue @@ -11,19 +11,19 @@