Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user-dropdown这个组件用key作为prop名称 #6855

Closed
yidao2000 opened this issue Jul 8, 2024 · 2 comments
Closed

user-dropdown这个组件用key作为prop名称 #6855

yidao2000 opened this issue Jul 8, 2024 · 2 comments

Comments

@yidao2000
Copy link

版本号:

分支: springboot3,
版本: 3.7.0(发布日期:2024-06-17)
vue3部分

问题描述:

在控制台里出现这样的错误,下面错误截图1.

原因:这个错误消息表明你在某个组件中使用了 Vue 的保留属性 key 作为 prop 名称。key 是 Vue 内部使用的一个特殊属性,用于标识节点和组件的唯一性,因此不能将其用作 prop。

解决办法:把key改为itemKey就好了.

这两个文件路径分别是
src/layouts/default/header/components/user-dropdown/index.vue
src/layouts/default/header/components/user-dropdown/DropMenuItem.vue

错误截图:

F12控制台出现的错误,由于无法复现了,我把错误粘贴到sublime里了.
image
把key改为:itemKey
image
把key改为itemKey
image

友情提示:

  • 未按格式要求发帖、描述过于简单的,会被直接删掉;
  • 描述问题请图文并茂,方便我们理解并快速定位问题;
  • 如果使用的不是master,请说明你使用的分支;
@zhangdaiscott
Copy link
Member

zy

@liaozhiyang
Copy link

已修复,下一版本发布。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants