Don't say much nonsense, just upload the code!
<dd class="clearfix" v-for="(item,index) in tableDataList" :class="index%2 != 0 ? 'dd-bg' : ''"> <div class="indexItem indexItem3 tal" title=""><span>{{}}{{countTotal}}</span></div> </dd>
<script type="text/ecmascript-6"> import Vue from 'vue' import axios from 'axios' export default { data(){ return{ tableDataList:[],//Define list data information } }, mounted(){ //Get list data information ('url',{ withCredentials: true }) .then((res) => { // (res); let tableData = ; = tableData.table_list; }) .catch((error) => { (error) }) }, computed:{ //Convert the status number to the corresponding text explanation countTotal() { for (let i = 0; i < ; i++) { if ([i].status === 0) { [i].status = 'Text description 0' } else if ([i].status === 1) { [i].status = 'Text Description 1' } else if ([i].status === 2) { [i].status = 'Text Description 2' } else if ([i].status === 3) { [i].status = 'Text description 3' } else if ([i].status === 4) { [i].status = 'Text Description 4' } else if ([i].status === 5) { [i].status = 'Text description 5' } (,i,[i]) } } } } </script>
Notice:(,i,[i]) This code must be written, otherwise the data will not be updated
The above data example after vue changes loop traversal is all the content I share with you. I hope you can give you a reference and I hope you can support me more.