Closed ais-one closed 3 years ago
我这边也出现了同样的问题,目前还不知道是啥原因,就是更新了新的版本之后就冒出来了
The same warnings occur when hovering or clicking on menu items. It does not have any impact to the functionalities and the warnings don't show after build.
似乎没复现出来,哪个例子有问题我去试试
I also had the same problem :the console warning Set operation on key "xxxx" failed: target is readonly.
I also had the same problem :the console warning Set operation on key "xxxx" failed: target is readonly.
i, too
具体demo warning:Set operation on key "expandIcon" failed: target is readonly.
munu中使用了
<template #expandIcon> <i class="icomoon icon-arrow_right"></i> </template>
自定义了expandIcon
我也是出現這個問題,報錯誤是Set operation on key "default" failed: target is readonly. 引起這個錯誤的代碼是如下
<a-menu theme="dark" mode="inline" v-model:selectedKeys="SelectedKeys" @click="OnMuenClick">
<a-menu-item v-for="Item in Routers" :key="Item.name">
<SvgIcon :name="Item.meta?.icon" />
<span>{{ Item.meta?.title }}</span>
</a-menu-item>
</a-menu>
俺也一样 The same for me
mark
v2.1.2 没有此问题
检查一下warning的vue版本?
v2.1.2 没有此问题
升級了2.1.3就出現了
@zkwolf vue@3.0.11
检查一下warning的vue版本?
我前天试过,将vue版本回退到3.0.6也不行,3.0.11也是一样会出先这个问题,用的vite
vue@3.0.11 ant-design-vue@2.1.2 vite@2.1.5
same warnings
"vue": "3.0.11", "ant-design-vue": "2.1.3", "vite": "^2.2.3",
There is this warning message
It seems that only vite env will report this warning, I reproduce this warning with vite@2.2.3. Is there anyone have this warning without vite env?
I had the same problem
mark.
vue@3.0.11 ant-design-vue@2.1.3 vite@2.2.3
same warning
mark
"mark" or "I have the same problem" is very annoying, please stop spamming this thread.
It seems that only vite env will report this warning, I reproduce this warning with vite@2.2.3. Is there anyone have this warning without vite env?
@vue/cli-service 4.5.12
If it helps... this is the versions that I see the problem, my env is vite
"vue": "^3.0.11",
"@vitejs/plugin-vue": "^1.2.2",
"@vue/compiler-sfc": "^3.0.11",
"vite": "^2.2.3"
鼠标滑过Menu组件时报这个问题,也是最近更新过依赖版本后才有的 "dependencies": { "@ant-design/icons-vue": "^6.0.1", "ant-design-vue": "^2.1.2", "vue": "^3.0.11", "vuex": "^4.0.0" },
use vue 3.0.10
use vue 3.0.10
I've tried, but it's still unresolved. "ant-design-vue": "^2.1.2", "vue": "^3.0.10"
用的异步数据更新SubMenu的时候,就会这样,连带着其他固定写死的副菜单也会报这个warning,鼠标一移上去就会 "dependencies": { "@ant-design/icons-vue": "^6.0.1", "ant-design-vue": "^2.1.3", "axios": "^0.21.1", "vue": "^3.0.11", } 移上去报一批移下来报一批
Ooops,,,I got the same problem. But I don't know why,Mark.
"ant-design-vue": "2.1.3"
"ant-design-vue": "2.1.2" no this problem.
Same problem.
解决了吗?
我也遇到这个问题
It may be an ant design problem also, based on the following assumptions...
mark!!!! the same problem
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
2.1.3
Environment
Windows 10, Chrome 89, Vue 3.0.11
Reproduction link
https://2x.antdv.com/components/menu
Steps to reproduce
Use the example code for Menu, with version ant-design-vue version 2.1.3
What is expected?
It is working properly but...
What is actually happening?
There is warnings in the console
reactivity.esm-bundler.js:337 Set operation on key "" failed: target is readonly. {: 1, __vInternal: 1, default: ƒ}
"ant-design-vue": "2.1.0" is ok.
退回2.1.2是正常, 搞了一两个小时....
升级这几个版本后,菜单无法正常使用
这个搭配使用正常
{
"ant-design-vue": "^2.1.2",
"vue": "^3.0.11"
}
升级antdv到2.1.2以上就会报警告,但是使用正常
a-collapse
// package.json
"ant-design-vue": "2.1.4",
"vue": "3.1.0-beta.3",
- I hame same problem with
a-collapse
// package.json "ant-design-vue": "2.1.4", "vue": "3.1.0-beta.3",
You try to "ant-design-vue": "2.1.2",
我的菜单有50多个,每次热更新之后就会报警告,改几次代码之后警告4000多个,当场卡死😭😭😭😭😭
是因为 组件库用的 11构建出来的版本,所以降级 vue 没有效果 我用 10 构建一个版本出来吧
update 2.1.6
vue 同步使用 3.0.10 依然还有少量 warning ,等待 vue 修复了
我的菜单有50多个,每次热更新之后就会报警告,改几次代码之后警告4000多个,当场卡死😭😭😭😭😭
I am requesting for vue team the increase the urgency from p3-minor-bug, it should be p1
https://github.com/vuejs/vue-next/issues/3695#issuecomment-840665259
我的菜单有50多个,每次热更新之后就会报警告,改几次代码之后警告4000多个,当场卡死😭😭😭😭😭
I am requesting for vue team the increase the urgency from p3-minor-bug, it should be p1
Good brother thank you ~
After replacing this item with v2.1.6
for my 50+ menus, the warning was removed and another small item was synchronized with the version and there was actually, hahaha my goodness
vue 同步使用 3.0.10 依然还有少量 warning ,等待 vue 修复了
辛苦了
同样的问题
还没有最终解决么?菜鸟也踏入此坑了。
Version
2.1.3
Environment
Windows 10, Chrome 89, Vue 3.0.11
Reproduction link
https://2x.antdv.com/components/menu
Steps to reproduce
Use the example code for Menu, with version ant-design-vue version 2.1.3
What is expected?
It is working properly but...
What is actually happening?
There is warnings in the console
reactivity.esm-bundler.js:337 Set operation on key "" failed: target is readonly. {: 1, __vInternal: 1, default: ƒ}