The problem of reusing code in vue

this code like the following is actually a span tag that just judges different status and then displays different text. Is there a way to make it easier to write? you don"t have to write so many tags and v-if. You can even use

in other .vue files.
Mar.13,2021

write an array

[
    {
        status:2,
        statusText:''
    },
    ...
]

then use v-for to loop out
or more simply

statusTable={
    [2]:'',//statusstring'2':''
    ...
}

html template

<span>{statusTable[val.status]}</span>

statusText:{
  2:"",
  3:"",
}

<span>{{statusText[val.status]}}</span>

in the list lendRecrod collection, add the statusText attribute for each element. Value source and status

</span></td>
Menu