是这样的,
大概代码是这样的
buttonList(item,index){ 前端传来index 就是当前数组的索引,但是这有个问题 我的数据最开始是需要处理并分开的, 参考下图,
this.popshow=true;
this.buttonListArray=item;
this.$store.commit('updateWifiInformations', { index, stateValue: '使用中' }); //简化后大概就是这样的,
},
提交的地址上加上一个参数区分。