Cannot destructure property 'Symbol(Symbol.iterator)' of 'item' as it is undefined. TypeError: Cannot destructure property 'Symbol(Symbol.iterator)' of 'item' as it is undefined. at eval (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/src/main.vue?vue&type=script&lang=js&:337:23) at Array.map (<anonymous>) at VueComponent.calcflylinePoints (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/src/main.vue?vue&type=script&lang=js&:335:35) at VueComponent.calcData (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/src/main.vue?vue&type=script&lang=js&:293:7) at VueComponent.onResize (webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/src/main.vue?vue&type=script&lang=js&:284:7) at eval (webpack-internal:///./node_modules/@jiaminghi/data-view/lib/mixin/autoResize.js:44:57) at Array.eval (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:3008:12) at flushCallbacks (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:2936:14)
时间: 2023-06-28 07:12:39 浏览: 235
ES6中Iterator与for..of..遍历用法分析
这是一个 JavaScript 的 TypeError,指定的属性未定义导致无法解构。具体来说,这里可能是在对一个未定义或空数组进行解构操作,例如:
```
const item = undefined;
const { [Symbol.iterator]: iterator } = item;
```
或者:
```
const item = [];
const { [Symbol.iterator]: iterator } = item;
```
在这两个例子中,`item` 的值分别为 `undefined` 和 `[]`,都不能进行解构操作。因此,你需要检查代码中使用到的变量,确保其已经被正确地初始化。
阅读全文