vue 中 e.target

e.target 在vue中可获取该点击事件的dom标签元素

    <input type="checkbox" id="checkbox" :checked="isAll" @click="allClick"/>
	<script>
 methods:{
    allClick(e){
      console.log(e.target);// <input type="checkbox" id="checkbox">
    }
  },
  </script>
posted @ 2022-08-20 15:17  陈陈陈在成长  阅读(28)  评论(0)    收藏  举报