SoFunction
Updated on 2025-03-10

vue gets the current clicked element and passes the value instance

html:

<span @click='zan()' :data-id=''></span>

js:

zan(e){
  var target=;
  var dataid=e;//(value);  $(target)//The current dom clicked}

The above example of vue obtaining the currently clicked element and passing the value is all the content I share with you. I hope you can give you a reference and I hope you can support me more.