package是一个空数组,后端返回数据后push进去,页面显示一切正常,求大佬们指教
代码
具体的错误描述如下:
98% after emitting CopyPlugin
WARNING Compiled with 1 warnings 14:59:47
Module Warning (from ./node_modules/eslint-loader/index.js):
error: 'v-for' directives require that attribute value (vue/valid-v-for) at src/pages/order.vue:17:19:
15 | <el-row :gutter="20" type="flex" justify="space-between" style="flex-wrap:wrap;">
16 | <el-col
> 17 | v-for="item in package"
| ^
18 | :key="item.id"
19 | :xs="12"
20 | :sm="12"
error: Parsing error: Line 1: Unexpected reserved word 'package'
> 1 | for(let item in package);
| ^ (vue/no-parsing-error) at src/pages/order.vue:17:34:
15 | <el-row :gutter="20" type="flex" justify="space-between" style="flex-wrap:wrap;">
16 | <el-col
> 17 | v-for="item in package"
| ^
18 | :key="item.id"
19 | :xs="12"
20 | :sm="12"
error: Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive (vue/valid-v-for) at src/pages/order.vue:18:19:
16 | <el-col
17 | v-for="item in package"
> 18 | :key="item.id"
| ^
19 | :xs="12"
20 | :sm="12"
21 | :md="6"
3 errors found.
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
因为
package
是js的保留字,所以报错。