How does Vue determine whether a clicked element is a desired element?

traditional JQ can determine whether there is a class or an attr by clicking on an element, so how does Vue judge whether it is a desired element?

Mar.22,2021

if you want to change your mind, don't even think about getting DOM nodes, data-driven, and change the data by clicking on events
ide/class-and-style.html" rel=" nofollow noreferrer "> official documents

.

-answer comments-

     <div class="vueBox">
        <ul class="faq_list">
            <li :class="['blue',curIdx==index ? 'red' : 'green']" v-for="(faq,index) in faqList"  @click="selectFaq(event,index)">
                <span  v-text="faq.title"> </span>
            </li>
        </ul>
    </div>
    <script src="js/vue.min.2.5.13.js"></script>
    <script src="js/vue.index.js"></script>
// vue.index.js
var vm = new Vue({
    el: ".vueBox",
    data: {
        arrow:'images/arrow.png',
        curIdx:0,
        faqList:[
            {
                title:'',
            },
            {
                title:'',
            },
            {
                title:'cp',
            }
        ] },
    created:function() { },
    methods: {
        selectFaq:function(e,index){
            console.log(e); 
            // 
             console.log(this.faqList[index].title);
            this.curIdx=index;
        },
    }

});

event.target is what you want


<div :class={active: isClass} @click="handleClick"></div>
data: {
  isClass: false
},
methods: {
  handleClick () {
    this.isClass = true
  }
}

when you click, className is bound to the style of active

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e97c1f-1683.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e97c1f-1683.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?