Vue control element display and hide, use v-if

new Vue({
    el: '#app',
    data: {
        showOne:false,
        showTwo:false
     } 
    methods: {
	   changeStatus(){
		  if("设置的条件"){
		      this.showOne= true;
		      this.showTwo= true;  
          }
       }
    }
 })

Guess you like

Origin blog.csdn.net/qq_41353397/article/details/113748557