use vue + iview in a project to develop a project that uses iview"s table plug-in for table rendering
when looping with v-for: how the data property should loop
related codes
<div v-for="(info,index) in jizuInfo">
<h2>{{info.machineGroupName}}</h2>
<Table :id=""jizu_info"+(index + 1)" :columns="jizu1" :data="jizu_data1" :show-header = false></Table>
</div>
:
this.jizu_data1.push(
{
: "",
: "15kw",
: response.data[item].cPConverterSpecifications
},
{
: "",
: "15kw",
: response.data[item].wPConverterSpecifications
}
);
if I write the above code as:
< div VMI for = "(info,index) in jizuInfo" >
<h2>{{info.machineGroupName}}</h2>
<Table :id=""jizu_info"+ (index + 1)" :columns="jizu1" :data=""jizu_data"+(index)" :show-header = false></Table>
</div>
will report an error
the error message is an array expected by data, but the input is String
forEach () undefined
: whether the property data can be looped or whether I should solve the loop problem in some other way