vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
https://antdv.com/
Other
20.21k stars 3.79k forks source link

Warnings on console when using Menu component #3998

Closed ais-one closed 3 years ago

ais-one commented 3 years ago

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: ƒ}

jiubanqingchen commented 3 years ago

我这边也出现了同样的问题,目前还不知道是啥原因,就是更新了新的版本之后就冒出来了

kriszheng-cashwerkz commented 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.

zkwolf commented 3 years ago

似乎没复现出来,哪个例子有问题我去试试

lemonchip commented 3 years ago

I also had the same problem :the console warning Set operation on key "xxxx" failed: target is readonly.

liulei92 commented 3 years ago

I also had the same problem :the console warning Set operation on key "xxxx" failed: target is readonly.

i, too

liulei92 commented 3 years ago

具体demo warning:Set operation on key "expandIcon" failed: target is readonly.

munu中使用了 <template #expandIcon> <i class="icomoon icon-arrow_right"></i> </template> 自定义了expandIcon

bao2314483 commented 3 years ago

我也是出現這個問題,報錯誤是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>
reaink commented 3 years ago

俺也一样 The same for me

rmlzy commented 3 years ago

mark

rmlzy commented 3 years ago

v2.1.2 没有此问题

zkwolf commented 3 years ago

检查一下warning的vue版本?

bao2314483 commented 3 years ago

v2.1.2 没有此问题

升級了2.1.3就出現了

rmlzy commented 3 years ago

@zkwolf vue@3.0.11

jiubanqingchen commented 3 years ago

检查一下warning的vue版本?

我前天试过,将vue版本回退到3.0.6也不行,3.0.11也是一样会出先这个问题,用的vite

ndrshn commented 3 years ago

vue@3.0.11 ant-design-vue@2.1.2 vite@2.1.5

same warnings

reaink commented 3 years ago

"vue": "3.0.11", "ant-design-vue": "2.1.3", "vite": "^2.2.3",

There is this warning message

zkwolf commented 3 years ago

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?

huangzhengyon commented 3 years ago

I had the same problem

TimRChen commented 3 years ago

mark.

bandaoqiu commented 3 years ago

vue@3.0.11 ant-design-vue@2.1.3 vite@2.2.3

same warning

JobinJia commented 3 years ago

mark

zjlovezj commented 3 years ago

"mark" or "I have the same problem" is very annoying, please stop spamming this thread.

rmlzy commented 3 years ago

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

ais-one commented 3 years ago

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"
fengbaoheng commented 3 years ago

鼠标滑过Menu组件时报这个问题,也是最近更新过依赖版本后才有的 "dependencies": { "@ant-design/icons-vue": "^6.0.1", "ant-design-vue": "^2.1.2", "vue": "^3.0.11", "vuex": "^4.0.0" },

tangjinzhou commented 3 years ago

use vue 3.0.10

ref https://github.com/vuejs/vue-next/issues/3695

fengbaoheng commented 3 years ago

use vue 3.0.10

ref vuejs/vue-next#3695

I've tried, but it's still unresolved. "ant-design-vue": "^2.1.2", "vue": "^3.0.10"

tuyutian commented 3 years ago

用的异步数据更新SubMenu的时候,就会这样,连带着其他固定写死的副菜单也会报这个warning,鼠标一移上去就会 DB5C0BE9-B8D7-44ed-91CD-F936D764C178 "dependencies": { "@ant-design/icons-vue": "^6.0.1", "ant-design-vue": "^2.1.3", "axios": "^0.21.1", "vue": "^3.0.11", } 移上去报一批移下来报一批

Hello-Alex-Cheng commented 3 years ago

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.

varzy commented 3 years ago

Same problem.

yexiaodong commented 3 years ago

解决了吗?

zhuxianglong commented 3 years ago

我也遇到这个问题

ais-one commented 3 years ago

It may be an ant design problem also, based on the following assumptions...

white-007 commented 3 years ago

mark!!!! the same problem

oimmc commented 3 years ago
  • [ ] 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.

973782523 commented 3 years ago

退回2.1.2是正常, 搞了一两个小时....

ghost commented 3 years ago

升级这几个版本后,菜单无法正常使用

icepole-jon commented 3 years ago

这个搭配使用正常

{
    "ant-design-vue": "^2.1.2",
    "vue": "^3.0.11"
}

升级antdv到2.1.2以上就会报警告,但是使用正常

natuan62 commented 3 years ago

image

// package.json

"ant-design-vue": "2.1.4",
"vue": "3.1.0-beta.3",
973782523 commented 3 years ago
  • I hame same problem with a-collapse

image

// package.json

"ant-design-vue": "2.1.4",
"vue": "3.1.0-beta.3",

You try to "ant-design-vue": "2.1.2",

zhenzhenChange commented 3 years ago

我的菜单有50多个,每次热更新之后就会报警告,改几次代码之后警告4000多个,当场卡死😭😭😭😭😭

tangjinzhou commented 3 years ago

是因为 组件库用的 11构建出来的版本,所以降级 vue 没有效果 我用 10 构建一个版本出来吧

tangjinzhou commented 3 years ago

https://github.com/vueComponent/ant-design-vue/commit/07b4150966411f32a36376f9f2b0c7615b0c148a

tangjinzhou commented 3 years ago

update 2.1.6

tangjinzhou commented 3 years ago

vue 同步使用 3.0.10 依然还有少量 warning ,等待 vue 修复了

ais-one commented 3 years ago

我的菜单有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

zhenzhenChange commented 3 years ago

我的菜单有50多个,每次热更新之后就会报警告,改几次代码之后警告4000多个,当场卡死😭😭😭😭😭

I am requesting for vue team the increase the urgency from p3-minor-bug, it should be p1

vuejs/vue-next#3695 (comment)

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

zhenzhenChange commented 3 years ago

vue 同步使用 3.0.10 依然还有少量 warning ,等待 vue 修复了

辛苦了

Kunkka0229 commented 3 years ago

同样的问题

jackywu commented 3 years ago

还没有最终解决么?菜鸟也踏入此坑了。