How does Vue force the refresh of the V-for list?

<li :class= "isnewList()?"active" : """ v-for="(list, index) in shoppinglists" :key="list.id"  role="presentation">

methods: {
  test(){
    this.$forceUpdate();//
  }


addnewListnewListactive class
listactive

newListactive    

clipboard.png

(bootstrap nav component implements mouse click to generate active class)

Mar.07,2021

$forceUpdate () forces the Vue instance to render again. Note that it affects only the instance itself and the sub-components that insert the contents of the slot, not all the sub-components.
you can think differently. You bind a click event to each li, pass in index, assign index to a variable such as curr in the method, and then use on li: class= "index = = curr?'active':'"
so that you can add class to the clicked li


.

solution: use DOM to operate `removeActive () {

    let nav = document.querySelector(".nav").querySelector(".active"); //active
    let content = document.querySelector(".tab-content").querySelector(".active");//active
    if(nav!==null)
    nav.className = '';
    if (content!==null)
    content.className = 'tab-pane';
  },`
Menu