Hurry! How to get the desired array according to the type loop in vue!

I now traverse an array with a length of more than 50, and there is a question description and an answer field in which type can be judged by different type, but the question now is how to cycle it out by question by question

May.27,2022

< v-for >
< template v-if >


timus is the variable where your topic is stored.


<template>
    <div v-for="(timu, index) in timus" :key="index">
      <template v-if="timu.type === 1">
        <div>
          type  1 
        </div>
      </template>
      
      <template v-if="timu.type === 2">
        <div>
          type  2 
        </div>
      </template>
      
    </div>
</template>
Menu