Solvedelement [Bug Report] $attrs is readonly $listeners is readonly

Element UI version


OS/Browsers version


Vue version


Reproduction Link


Steps to reproduce

开发环境,表格中的按钮点击时调用this. $confirm() 时,vue会报错:“$attrs is readonly 和 $listeners is readonly”;

What is Expected?


What is actually happening?

控制台有$attrs is readonly ,$listeners is readonly 两个错误警告,关闭的时候也会出现

23 Answers

✔️Accepted Answer

I use electron-vue and meet this issue too, there is a solution works for me, in webpack.render.config.js:

let whiteListedModules = ['vue'];

change to

let whiteListedModules = ['vue', 'element-ui'];

Other Answers:


please , where is the webpack.renderer.config.js , building project by @vue-cli3 , I can't find webpack.renderer.config.js file.

i came upon a this issue too, because i use webpack DllPlugin, after i remove webpack DllPlugin, the issue resolved.

so may be the issue is not caused by Vue version, but some tools like webpack.

you can also see

The same issue here, which is vue@2.6.6 & iview@3.2.2. Using this method to solve the problem

let whiteListedModules = ['vue'];

change to

let whiteListedModules = ['vue', 'element-ui'];

More Issues: