runtime-core.esm-bundler.js:221 Uncaught TypeError: Assignment to constant variable
时间: 2024-02-22 12:35:24 浏览: 104
该错误是由于对常量变量进行赋值操作引起的。根据引用中的错误提示,报错位置是在runtime-core.esm-bundler.js文件的第221行。这通常是由于在Vue3中使用了script setup语法糖的情况下,对常量进行了重新赋值引起的。在引用的父组件代码中,我们可以看到一个箭头函数filterConfirm,其中对常量params进行了重新赋值操作。这可能导致了常量变量的重复赋值,在子组件中通过emits事件将filterData.data传递给父组件时出现错误。解决这个问题的方法是避免对常量进行重新赋值操作,或者将params声明为可变变量。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [vue3报错runtime-core.esm-bundler.js?d2dd:220 Uncaught TypeError: Assignment to constant variable](https://blog.csdn.net/weixin_45682701/article/details/129039045)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [vue3 runtime-core.esm-bundler.js:221 Uncaught TypeError: route.push is not a function](https://blog.csdn.net/m0_46151522/article/details/131457058)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文