随笔分类 -  vue

vue.js的学习
vue兄弟组件之间的通信,事件名一定要想同
摘要://发送子组件 getRowId(event) { VueEvent.$emit('rowId', event.currentTarget.id); } //接收子组件 VueEvent.$on('rowId', function (id) { console.log(id); var anchor 阅读全文
posted @ 2020-06-07 15:06 ladlin 阅读(211) 评论(0) 推荐(0)
vue-获取<a :id></a>标签的id值
摘要:<a :id="'anchor-'+1" href="javascript:void(0)" @click="getRowId($event)" >click me</a> console.log(event.currentTarget.id) 阅读全文
posted @ 2020-06-07 11:59 ladlin 阅读(6648) 评论(0) 推荐(0)