报错如下
谷歌浏览器控制台报错信息:
vue.esm.js?a026:628 [Vue warn]: Error in v-on handler: "TypeError: Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method."
found in
---> <ElButton> at packages/button/src/button.vue
<ElForm> at packages/form/src/form.vue
<ListPageFrame> at src/components/page-frame/ListPageFrame.vue
<RouteManage>
<ElContainer> at packages/container/src/main.vue
<MainLayout> at src/layouts/MainLayout.vue
<App> at src/App.vue
<Root>
warn @ vue.esm.js?a026:628
logError @ vue.esm.js?a026:1893
globalHandleError @ vue.esm.js?a026:1888
handleError @ vue.esm.js?a026:1848
invokeWithErrorHandling @ vue.esm.js?a026:1871
invoker @ vue.esm.js?a026:2188
invokeWithErrorHandling @ vue.esm.js?a026:1863
Vue.$emit @ vue.esm.js?a026:3897
handleClick @ element-ui.common.js?5c96:9441
invokeWithErrorHandling @ vue.esm.js?a026:1863
invoker @ vue.esm.js?a026:2188
original._wrapper @ vue.esm.js?a026:7565
vue.esm.js?a026:1897 TypeError: Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
at _nonIterableSpread (nonIterableSpread.js?3427:2:1)
at _toConsumableArray (toConsumableArray.js?2909:6:1)
at VueComponent.searchTap (RouteManage.vue?7f10:173:1)
at invokeWithErrorHandling (vue.esm.js?a026:1863:1)
at VueComponent.invoker (vue.esm.js?a026:2188:1)
at invokeWithErrorHandling (vue.esm.js?a026:1863:1)
at VueComponent.Vue.$emit (vue.esm.js?a026:3897:1)
at VueComponent.handleClick (element-ui.common.js?5c96:9441:1)
at invokeWithErrorHandling (vue.esm.js?a026:1863:1)
at HTMLButtonElement.invoker (vue.esm.js?a026:2188:1)
logError @ vue.esm.js?a026:1897
globalHandleError @ vue.esm.js?a026:1888
handleError @ vue.esm.js?a026:1848
invokeWithErrorHandling @ vue.esm.js?a026:1871
invoker @ vue.esm.js?a026:2188
invokeWithErrorHandling @ vue.esm.js?a026:1863
Vue.$emit @ vue.esm.js?a026:3897
handleClick @ element-ui.common.js?5c96:9441
invokeWithErrorHandling @ vue.esm.js?a026:1863
invoker @ vue.esm.js?a026:2188
original._wrapper @ vue.esm.js?a026:7565
控制台截图:
报错场景描述
- 前端添加搜索条件测试
- 前端添加了打印请求参数的代码
报错解决
- 注释掉打印请求参数的代码
截图如下:
测试截图如下:
- 后端能够拿到请求参数
控制台截图 - 控制台没有报错
问题解决