<div @click="router(items.productId)" style="float: left;" :key=‘items.productName‘ v-for="items in item"> </div>
获取:
router(e){ conslone.log(e); }
vue 通过绑定事件获取当前行的id
原文:https://www.cnblogs.com/nongzihong/p/10281576.html